Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
easy-affair-show
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
easy-affair-show
Commits
82fd9ee5
Commit
82fd9ee5
authored
Sep 06, 2022
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时改为无须注册服务
parent
24ab5575
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
482 additions
and
26 deletions
+482
-26
eas-manager/pom.xml
eas-manager/pom.xml
+1
-3
eas-manager/src/main/java/com/mortals/xhx/EASManagerApplication.java
.../src/main/java/com/mortals/xhx/EASManagerApplication.java
+0
-1
eas-manager/src/main/java/com/mortals/xhx/base/framework/config/MybatisConfiguration.java
...rtals/xhx/base/framework/config/MybatisConfiguration.java
+0
-1
eas-manager/src/main/java/com/mortals/xhx/module/home/model/MaterialStatisticsVO.java
...m/mortals/xhx/module/home/model/MaterialStatisticsVO.java
+14
-0
eas-manager/src/main/java/com/mortals/xhx/module/home/service/HomePageService.java
.../com/mortals/xhx/module/home/service/HomePageService.java
+243
-0
eas-manager/src/main/java/com/mortals/xhx/module/home/web/HomePageController.java
...a/com/mortals/xhx/module/home/web/HomePageController.java
+162
-0
eas-manager/src/main/java/com/mortals/xhx/module/picture/dao/PictureMaterialDao.java
...om/mortals/xhx/module/picture/dao/PictureMaterialDao.java
+7
-0
eas-manager/src/main/java/com/mortals/xhx/module/picture/dao/ibatis/PictureMaterialDaoImpl.java
...xhx/module/picture/dao/ibatis/PictureMaterialDaoImpl.java
+6
-0
eas-manager/src/main/resources/bootstrap.yml
eas-manager/src/main/resources/bootstrap.yml
+31
-13
eas-manager/src/main/resources/sqlmap/module/picture/PictureMaterialMapperExt.xml
...ources/sqlmap/module/picture/PictureMaterialMapperExt.xml
+10
-0
pom.xml
pom.xml
+8
-8
No files found.
eas-manager/pom.xml
View file @
82fd9ee5
...
@@ -30,9 +30,7 @@
...
@@ -30,9 +30,7 @@
<profiles.kafka.brokers>
192.168.0.251:9092
</profiles.kafka.brokers>
<profiles.kafka.brokers>
192.168.0.251:9092
</profiles.kafka.brokers>
<profiles.rabbitmq.host>
192.168.0.98
</profiles.rabbitmq.host>
<profiles.rabbitmq.host>
192.168.0.98
</profiles.rabbitmq.host>
<profiles.rabbitmq.port>
5672
</profiles.rabbitmq.port>
<profiles.rabbitmq.port>
5672
</profiles.rabbitmq.port>
<profiles.nacos.server-addr>
192.168.0.252:8848
</profiles.nacos.server-addr>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.namespace>
easy-affair-show
</profiles.nacos.namespace>
<profiles.log.path>
/mortals/app/logs
</profiles.log.path>
<profiles.log.path>
/mortals/app/logs
</profiles.log.path>
</properties>
</properties>
</profile>
</profile>
...
...
eas-manager/src/main/java/com/mortals/xhx/EASManagerApplication.java
View file @
82fd9ee5
...
@@ -8,7 +8,6 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
...
@@ -8,7 +8,6 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
import
org.springframework.context.annotation.ImportResource
;
import
org.springframework.context.annotation.ImportResource
;
//import springfox.documentation.swagger2.annotations.EnableSwagger2;
//import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableFeignClients
@SpringBootApplication
(
scanBasePackages
=
{
"com.mortals"
})
@SpringBootApplication
(
scanBasePackages
=
{
"com.mortals"
})
@ServletComponentScan
(
"com.mortals"
)
@ServletComponentScan
(
"com.mortals"
)
@ImportResource
(
locations
=
{
"classpath:config/spring-config.xml"
})
@ImportResource
(
locations
=
{
"classpath:config/spring-config.xml"
})
...
...
eas-manager/src/main/java/com/mortals/xhx/base/framework/config/MybatisConfiguration.java
View file @
82fd9ee5
...
@@ -6,7 +6,6 @@ import java.net.URLDecoder;
...
@@ -6,7 +6,6 @@ import java.net.URLDecoder;
import
javax.sql.DataSource
;
import
javax.sql.DataSource
;
import
com.mortals.framework.springcloud.config.mybatis.AbstractMybatisConfiguration
;
import
com.mortals.framework.springcloud.config.mybatis.AbstractMybatisConfiguration
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.apache.commons.logging.LogFactory
;
import
org.apache.ibatis.io.VFS
;
import
org.apache.ibatis.io.VFS
;
...
...
eas-manager/src/main/java/com/mortals/xhx/module/home/model/MaterialStatisticsVO.java
0 → 100644
View file @
82fd9ee5
package
com.mortals.xhx.module.home.model
;
import
lombok.Data
;
@Data
public
class
MaterialStatisticsVO
{
/**
* 图片类型,0:普通图片,1:素材,2:背景图片。默认:0
*/
private
Integer
pictureType
;
private
Integer
pictureCount
;
}
eas-manager/src/main/java/com/mortals/xhx/module/home/service/HomePageService.java
0 → 100644
View file @
82fd9ee5
package
com.mortals.xhx.module.home.service
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.util.DateUtils
;
import
com.mortals.xhx.common.code.EvaluateType
;
import
com.mortals.xhx.common.code.PictureTypeEnum
;
import
com.mortals.xhx.common.code.ReplyStatusEnum
;
import
com.mortals.xhx.module.customer.dao.CustomerDao
;
import
com.mortals.xhx.module.customer.model.CustomerEntity
;
import
com.mortals.xhx.module.customer.model.CustomerQuery
;
import
com.mortals.xhx.module.design.dao.DesignMasterplateDao
;
import
com.mortals.xhx.module.design.model.DesignMasterplateEntity
;
import
com.mortals.xhx.module.font.dao.FontMaterialDao
;
import
com.mortals.xhx.module.font.model.FontMaterialEntity
;
import
com.mortals.xhx.module.help.dao.HelpDao
;
import
com.mortals.xhx.module.help.dao.HelpEvaluateDao
;
import
com.mortals.xhx.module.help.model.HelpEntity
;
import
com.mortals.xhx.module.help.model.HelpEvaluateEntity
;
import
com.mortals.xhx.module.home.model.MaterialStatisticsVO
;
import
com.mortals.xhx.module.picture.dao.PictureMaterialDao
;
import
com.mortals.xhx.module.proposal.dao.ProposalDao
;
import
com.mortals.xhx.module.proposal.model.ProposalEntity
;
import
com.mortals.xhx.module.question.dao.QuestionDao
;
import
com.mortals.xhx.module.question.model.QuestionEntity
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.text.DecimalFormat
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Random
;
import
java.util.stream.Collectors
;
@Service
public
class
HomePageService
{
@Autowired
private
PictureMaterialDao
pictureMaterialDao
;
@Autowired
private
FontMaterialDao
fontMaterialDao
;
@Autowired
private
DesignMasterplateDao
designMasterplateDao
;
@Autowired
private
QuestionDao
questionDao
;
@Autowired
private
HelpDao
helpDao
;
@Autowired
private
HelpEvaluateDao
helpEvaluateDao
;
@Autowired
private
ProposalDao
proposalDao
;
@Autowired
private
CustomerDao
customerDao
;
public
Map
<
String
,
Object
>
customerStatistics
()
throws
AppException
{
List
<
CustomerEntity
>
sumList
=
customerDao
.
getList
(
new
CustomerEntity
());
CustomerQuery
query
=
new
CustomerQuery
();
query
.
setCreateTimeStart
(
DateUtils
.
addCurrDateToStr
(
"yyyy-MM-dd"
,-
1
)+
" 00:00:01"
);
List
<
CustomerEntity
>
yesterdayList
=
customerDao
.
getList
(
query
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
Integer
,
Long
>
sumMap
=
sumList
.
stream
().
collect
(
Collectors
.
groupingBy
(
CustomerEntity:
:
getMemberLevel
,
Collectors
.
counting
()));
if
(!
sumMap
.
containsKey
(
1
)){
sumMap
.
put
(
1
,
0
l
);
}
if
(!
sumMap
.
containsKey
(
2
)){
sumMap
.
put
(
2
,
0
l
);
}
if
(!
sumMap
.
containsKey
(
3
)){
sumMap
.
put
(
3
,
0
l
);
}
map
.
put
(
"customerTotal"
,
sumList
.
size
());
map
.
put
(
"trialTotal"
,
sumMap
.
get
(
1
));
map
.
put
(
"vipTotal"
,
sumMap
.
get
(
2
));
map
.
put
(
"designTotal"
,
sumMap
.
get
(
3
));
if
(
CollectionUtils
.
isEmpty
(
yesterdayList
)){
map
.
put
(
"totalAdd"
,
0
);
map
.
put
(
"totalChange"
,
"0.00%"
);
map
.
put
(
"trialAdd"
,
0
);
map
.
put
(
"trialChange"
,
"0.00%"
);
map
.
put
(
"vipAdd"
,
0
);
map
.
put
(
"vipChange"
,
"0.00%"
);
map
.
put
(
"designAdd"
,
0
);
map
.
put
(
"designChange"
,
"0.00%"
);
}
else
{
Map
<
Integer
,
Long
>
yMap
=
yesterdayList
.
stream
().
collect
(
Collectors
.
groupingBy
(
CustomerEntity:
:
getMemberLevel
,
Collectors
.
counting
()));
if
(!
yMap
.
containsKey
(
1
)){
yMap
.
put
(
1
,
0
l
);
}
if
(!
yMap
.
containsKey
(
2
)){
yMap
.
put
(
2
,
0
l
);
}
if
(!
yMap
.
containsKey
(
3
)){
yMap
.
put
(
3
,
0
l
);
}
map
.
put
(
"totalAdd"
,
yesterdayList
.
size
());
map
.
put
(
"totalChange"
,
percentage
((
long
)
yesterdayList
.
size
(),(
long
)
sumList
.
size
()));
map
.
put
(
"trialAdd"
,
yMap
.
get
(
1
));
map
.
put
(
"trialChange"
,
percentage
(
yMap
.
get
(
1
),
sumMap
.
get
(
1
)));
map
.
put
(
"vipAdd"
,
yMap
.
get
(
2
));
map
.
put
(
"vipChange"
,
percentage
(
yMap
.
get
(
2
),
sumMap
.
get
(
2
)));
map
.
put
(
"designAdd"
,
yMap
.
get
(
3
));
map
.
put
(
"designChange"
,
percentage
(
yMap
.
get
(
3
),
sumMap
.
get
(
3
)));
}
return
map
;
}
private
static
String
percentage
(
Long
num1
,
Long
num2
){
String
rate
=
"0.00%"
;
String
format
=
"0.00"
;
if
(
num2
!=
0
&&
num1
!=
0
){
DecimalFormat
dec
=
new
DecimalFormat
(
format
);
rate
=
dec
.
format
((
double
)
num1
/
num2
*
100
)+
"%"
;
while
(
true
){
if
(
rate
.
equals
(
format
+
"%"
)){
format
=
format
+
"0"
;
DecimalFormat
dec1
=
new
DecimalFormat
(
format
);
rate
=
dec1
.
format
((
double
)
num1
/
num2
*
100
)+
"%"
;
}
else
{
break
;
}
}
}
else
if
(
num1
!=
0
&&
num2
==
0
){
rate
=
"100%"
;
}
return
rate
;
}
public
Map
<
String
,
Object
>
resourceCensus
(){
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
List
<
MaterialStatisticsVO
>
materialStatisticsVOS
=
pictureMaterialDao
.
selectPictureCensus
();
if
(
CollectionUtils
.
isNotEmpty
(
materialStatisticsVOS
)){
materialStatisticsVOS
.
forEach
(
e
->{
if
(
e
.
getPictureType
()==
PictureTypeEnum
.
PICTURE
.
getValue
()){
result
.
put
(
"pictureCount"
,
e
.
getPictureCount
());
}
if
(
e
.
getPictureType
()==
PictureTypeEnum
.
ELEMENT
.
getValue
()){
result
.
put
(
"elementCount"
,
e
.
getPictureCount
());
}
if
(
e
.
getPictureType
()==
PictureTypeEnum
.
BACKGROUND
.
getValue
()){
result
.
put
(
"backgroundCount"
,
e
.
getPictureCount
());
}
});
}
if
(!
result
.
containsKey
(
"pictureCount"
)){
result
.
put
(
"pictureCount"
,
0
);
}
if
(!
result
.
containsKey
(
"elementCount"
)){
result
.
put
(
"elementCount"
,
0
);
}
if
(!
result
.
containsKey
(
"backgroundCount"
)){
result
.
put
(
"backgroundCount"
,
0
);
}
int
fontCount
=
fontMaterialDao
.
getCount
(
new
FontMaterialEntity
());
result
.
put
(
"fontCount"
,
fontCount
);
int
designCount
=
designMasterplateDao
.
getCount
(
new
DesignMasterplateEntity
());
result
.
put
(
"masterplate"
,
designCount
);
DesignMasterplateEntity
query
=
new
DesignMasterplateEntity
();
Map
<
String
,
String
>
orderCols
=
new
HashMap
<>();
orderCols
.
put
(
"masterplateUseNum"
,
"DESC"
);
orderCols
.
put
(
"createTime"
,
"DESC"
);
query
.
setOrderCols
(
orderCols
);
query
.
setPage
(
1
);
query
.
setSize
(
5
);
List
<
DesignMasterplateEntity
>
list
=
designMasterplateDao
.
getList
(
query
,
0
,
5
);
result
.
put
(
"top5"
,
list
);
return
result
;
}
public
Map
<
String
,
Object
>
feedbackCensus
(){
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
int
questionCount
=
questionDao
.
getCount
(
new
QuestionEntity
());
result
.
put
(
"questionCount"
,
questionCount
);
int
helpCount
=
helpDao
.
getCount
(
new
HelpEntity
());
result
.
put
(
"helpCount"
,
helpCount
);
HelpEvaluateEntity
hq
=
new
HelpEvaluateEntity
();
hq
.
setEvaluateType
(
EvaluateType
.
USEFUL
.
getValue
());
int
helpUsefulCount
=
helpEvaluateDao
.
getCount
(
hq
);
result
.
put
(
"helpUseful"
,
percentage
((
long
)
helpUsefulCount
,(
long
)
helpCount
));
hq
.
setEvaluateType
(
EvaluateType
.
USELESS
.
getValue
());
int
helpUselessCount
=
helpEvaluateDao
.
getCount
(
hq
);
result
.
put
(
"helpUseless"
,
percentage
((
long
)
helpUselessCount
,(
long
)
helpCount
));
int
proposalCount
=
proposalDao
.
getCount
(
new
ProposalEntity
());
result
.
put
(
"proposalCount"
,
proposalCount
);
ProposalEntity
pquery
=
new
ProposalEntity
();
pquery
.
setReplyStatus
(
ReplyStatusEnum
.
REPLY
.
getValue
());
int
proposalReplyCount
=
proposalDao
.
getCount
(
pquery
);
result
.
put
(
"proposalReplyCount"
,
proposalReplyCount
);
return
result
;
}
public
JSONArray
creatData
(){
JSONArray
list
=
new
JSONArray
();
Random
random
=
new
Random
();
random
.
setSeed
(
10000L
);
int
i
=
0
;
while
(
true
){
if
(
i
>=
30
){
break
;
}
String
dateTime
=
DateUtils
.
addCurrDateToStr
(
"yyyy-MM-dd"
,(
0
-
i
));
JSONObject
json
=
new
JSONObject
();
json
.
put
(
"dateTime"
,
dateTime
);
json
.
put
(
"count"
,
random
.
nextInt
(
1000
));
list
.
add
(
json
);
i
++;
}
return
list
;
}
public
JSONArray
creatCustomerData
()
{
JSONArray
list
=
new
JSONArray
();
Random
random
=
new
Random
();
random
.
setSeed
(
10000L
);
JSONObject
json
=
new
JSONObject
();
json
.
put
(
"areaName"
,
"成都"
);
json
.
put
(
"count"
,
random
.
nextInt
(
1000
));
list
.
add
(
json
);
JSONObject
json1
=
new
JSONObject
();
json1
.
put
(
"areaName"
,
"眉山"
);
json1
.
put
(
"count"
,
random
.
nextInt
(
1000
));
list
.
add
(
json1
);
JSONObject
json2
=
new
JSONObject
();
json2
.
put
(
"areaName"
,
"绵阳"
);
json2
.
put
(
"count"
,
random
.
nextInt
(
1000
));
list
.
add
(
json2
);
JSONObject
json3
=
new
JSONObject
();
json3
.
put
(
"areaName"
,
"宜宾"
);
json3
.
put
(
"count"
,
random
.
nextInt
(
1000
));
list
.
add
(
json3
);
JSONObject
json4
=
new
JSONObject
();
json4
.
put
(
"areaName"
,
"乐山"
);
json4
.
put
(
"count"
,
random
.
nextInt
(
1000
));
list
.
add
(
json4
);
JSONObject
json5
=
new
JSONObject
();
json5
.
put
(
"areaName"
,
"雅安"
);
json5
.
put
(
"count"
,
random
.
nextInt
(
1000
));
list
.
add
(
json5
);
return
list
;
}
}
eas-manager/src/main/java/com/mortals/xhx/module/home/web/HomePageController.java
0 → 100644
View file @
82fd9ee5
package
com.mortals.xhx.module.home.web
;
import
com.alibaba.fastjson.JSONArray
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.web.BaseJsonBodyController
;
import
com.mortals.xhx.module.customer.service.CustomerService
;
import
com.mortals.xhx.module.home.service.HomePageService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
import
java.util.Map
;
@RestController
@RequestMapping
(
"home"
)
public
class
HomePageController
extends
BaseJsonBodyController
{
@Autowired
private
HomePageService
homePageService
;
@PostMapping
({
"customer/census"
})
@UnAuth
public
Rest
<
Object
>
customerCensus
()
{
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
Context
context
=
this
.
getContext
();
String
busiDesc
=
"客流统计"
;
int
code
=
1
;
try
{
Map
<
String
,
Object
>
result
=
this
.
homePageService
.
customerStatistics
();
model
.
put
(
"data"
,
result
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var9
);
}
ret
.
setCode
(
code
);
ret
.
setData
(
model
);
ret
.
setMsg
(
model
.
get
(
"message_info"
)
==
null
?
""
:
model
.
remove
(
"message_info"
).
toString
());
return
ret
;
}
@PostMapping
({
"resource/census"
})
@UnAuth
public
Rest
<
Object
>
resourceCensus
()
{
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
Context
context
=
this
.
getContext
();
String
busiDesc
=
"资源统计"
;
int
code
=
1
;
try
{
Map
<
String
,
Object
>
result
=
this
.
homePageService
.
resourceCensus
();
model
.
put
(
"data"
,
result
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var9
);
}
ret
.
setCode
(
code
);
ret
.
setData
(
model
);
ret
.
setMsg
(
model
.
get
(
"message_info"
)
==
null
?
""
:
model
.
remove
(
"message_info"
).
toString
());
return
ret
;
}
@PostMapping
({
"feedback/census"
})
@UnAuth
public
Rest
<
Object
>
feedbackCensus
()
{
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
Context
context
=
this
.
getContext
();
String
busiDesc
=
"反馈统计"
;
int
code
=
1
;
try
{
Map
<
String
,
Object
>
result
=
this
.
homePageService
.
feedbackCensus
();
model
.
put
(
"data"
,
result
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var9
);
}
ret
.
setCode
(
code
);
ret
.
setData
(
model
);
ret
.
setMsg
(
model
.
get
(
"message_info"
)
==
null
?
""
:
model
.
remove
(
"message_info"
).
toString
());
return
ret
;
}
@PostMapping
({
"nearly/login/census"
})
@UnAuth
public
Rest
<
Object
>
nearlyLoginCensus
()
{
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
Context
context
=
this
.
getContext
();
String
busiDesc
=
"近30日登录人数趋势统计"
;
int
code
=
1
;
try
{
JSONArray
list
=
this
.
homePageService
.
creatData
();
model
.
put
(
"data"
,
list
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var9
);
}
ret
.
setCode
(
code
);
ret
.
setData
(
model
);
ret
.
setMsg
(
model
.
get
(
"message_info"
)
==
null
?
""
:
model
.
remove
(
"message_info"
).
toString
());
return
ret
;
}
@PostMapping
({
"nearly/design/census"
})
@UnAuth
public
Rest
<
Object
>
nearlyDesignCensus
()
{
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
Context
context
=
this
.
getContext
();
String
busiDesc
=
"近30日作品数统计"
;
int
code
=
1
;
try
{
JSONArray
list
=
this
.
homePageService
.
creatData
();
model
.
put
(
"data"
,
list
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var9
);
}
ret
.
setCode
(
code
);
ret
.
setData
(
model
);
ret
.
setMsg
(
model
.
get
(
"message_info"
)
==
null
?
""
:
model
.
remove
(
"message_info"
).
toString
());
return
ret
;
}
@PostMapping
({
"customer/distribution"
})
@UnAuth
public
Rest
<
Object
>
customerDistribution
()
{
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
Context
context
=
this
.
getContext
();
String
busiDesc
=
"客户区域分布统计"
;
int
code
=
1
;
try
{
JSONArray
list
=
this
.
homePageService
.
creatCustomerData
();
model
.
put
(
"data"
,
list
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var9
);
}
ret
.
setCode
(
code
);
ret
.
setData
(
model
);
ret
.
setMsg
(
model
.
get
(
"message_info"
)
==
null
?
""
:
model
.
remove
(
"message_info"
).
toString
());
return
ret
;
}
}
eas-manager/src/main/java/com/mortals/xhx/module/picture/dao/PictureMaterialDao.java
View file @
82fd9ee5
package
com.mortals.xhx.module.picture.dao
;
package
com.mortals.xhx.module.picture.dao
;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.framework.dao.ICRUDDao
;
import
com.mortals.xhx.module.home.model.MaterialStatisticsVO
;
import
com.mortals.xhx.module.picture.model.PictureMaterialEntity
;
import
com.mortals.xhx.module.picture.model.PictureMaterialEntity
;
import
com.mortals.xhx.module.picture.model.vo.PictureGroupCountVo
;
import
com.mortals.xhx.module.picture.model.vo.PictureGroupCountVo
;
...
@@ -19,4 +20,10 @@ public interface PictureMaterialDao extends ICRUDDao<PictureMaterialEntity,Long
...
@@ -19,4 +20,10 @@ public interface PictureMaterialDao extends ICRUDDao<PictureMaterialEntity,Long
* @return
* @return
*/
*/
List
<
PictureGroupCountVo
>
selectPictureGroupCount
(
int
pictureType
);
List
<
PictureGroupCountVo
>
selectPictureGroupCount
(
int
pictureType
);
/**
* 素材统计
* @return
*/
List
<
MaterialStatisticsVO
>
selectPictureCensus
();
}
}
eas-manager/src/main/java/com/mortals/xhx/module/picture/dao/ibatis/PictureMaterialDaoImpl.java
View file @
82fd9ee5
package
com.mortals.xhx.module.picture.dao.ibatis
;
package
com.mortals.xhx.module.picture.dao.ibatis
;
import
com.mortals.xhx.module.home.model.MaterialStatisticsVO
;
import
com.mortals.xhx.module.picture.model.vo.PictureGroupCountVo
;
import
com.mortals.xhx.module.picture.model.vo.PictureGroupCountVo
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.mortals.xhx.module.picture.dao.PictureMaterialDao
;
import
com.mortals.xhx.module.picture.dao.PictureMaterialDao
;
...
@@ -22,4 +23,9 @@ public class PictureMaterialDaoImpl extends BaseCRUDDaoMybatis<PictureMaterialEn
...
@@ -22,4 +23,9 @@ public class PictureMaterialDaoImpl extends BaseCRUDDaoMybatis<PictureMaterialEn
public
List
<
PictureGroupCountVo
>
selectPictureGroupCount
(
int
pictureType
)
{
public
List
<
PictureGroupCountVo
>
selectPictureGroupCount
(
int
pictureType
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"selectPictureGroupCount"
),
pictureType
);
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"selectPictureGroupCount"
),
pictureType
);
}
}
@Override
public
List
<
MaterialStatisticsVO
>
selectPictureCensus
()
{
return
this
.
getSqlSession
().
selectList
(
this
.
getSqlId
(
"selectPictureCensus"
));
}
}
}
eas-manager/src/main/resources/bootstrap.yml
View file @
82fd9ee5
server
:
server
:
port
:
17001
servlet
:
context-path
:
/eas
tomcat
:
tomcat
:
uri-encoding
:
utf-8
uri-encoding
:
utf-8
spring
:
spring
:
...
@@ -13,19 +16,27 @@ spring:
...
@@ -13,19 +16,27 @@ spring:
jackson
:
jackson
:
date-format
:
yyyy-MM-dd HH:mm:ss
date-format
:
yyyy-MM-dd HH:mm:ss
time-zone
:
GMT+8
time-zone
:
GMT+8
security
:
cloud
:
enable
:
true
nacos
:
user
:
# Nacos 作为注册中心的配置项,对应 NacosDiscoveryProperties 配置类
name
:
admin
discovery
:
password
:
1
server-addr
:
@
profiles.nacos.server-addr@
# Nacos 服务器地址
redis
:
group
:
@
profiles.nacos.group@
host
:
127.0.0.1
namespace
:
@
profiles.nacos.namespace@
port
:
6379
config
:
database
:
6
server-addr
:
${spring.cloud.nacos.discovery.server-addr}
# Nacos 服务器地址
timeout
:
30000
group
:
${spring.cloud.nacos.discovery.group}
pool
:
namespace
:
${spring.cloud.nacos.discovery.namespace}
# Nacos 命名空间 dev 的编号
max-idle
:
30
file-extension
:
yaml
min-idle
:
0
max-active
:
100
max-wait
:
1000
datasource
:
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://localhost:3306/yi_zheng_xiu?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Hongkong
username
:
root
password
:
12345678
mybatis
:
mybatis
:
root-path
:
com.mortals
root-path
:
com.mortals
type-aliases-package
:
com.mortals.framework.model,com.mortals.xhx.common.**.model,com.mortals.xhx.**.model
type-aliases-package
:
com.mortals.framework.model,com.mortals.xhx.common.**.model,com.mortals.xhx.**.model
...
@@ -38,5 +49,12 @@ application:
...
@@ -38,5 +49,12 @@ application:
uncheckUrl
:
/refresh,/error,/login/login,/login/index,/login/logout,/customer/login/login,/customer/login/logout,/securitycode/createCode,/customer/trial/save,/file/common/*,/file/preview/*,/test*,/api/asset/*,/api/*,/zwfw/*,/ws/*,/swagger-ui*,/topic/*,/uploads/*
uncheckUrl
:
/refresh,/error,/login/login,/login/index,/login/logout,/customer/login/login,/customer/login/logout,/securitycode/createCode,/customer/trial/save,/file/common/*,/file/preview/*,/test*,/api/asset/*,/api/*,/zwfw/*,/ws/*,/swagger-ui*,/topic/*,/uploads/*
workflow
:
workflow
:
tenantId
:
${spring.application.name}
tenantId
:
${spring.application.name}
cookie
:
ssoServerUrl
:
http://sso.testnew.com
key
:
026db82420614469897fcc2dc1b4ce38
domain
:
base.testnew.com
port
:
111
token
:
token
:
head
:
mortal
head
:
mortal
upload
:
path
:
/mortals/app/data
eas-manager/src/main/resources/sqlmap/module/picture/PictureMaterialMapperExt.xml
View file @
82fd9ee5
...
@@ -27,4 +27,14 @@
...
@@ -27,4 +27,14 @@
GROUP BY
GROUP BY
p.id,p.paramKey,p.paramValue
p.id,p.paramKey,p.paramValue
</select>
</select>
<select
id=
"selectPictureCensus"
parameterType=
"int"
resultType=
"com.mortals.xhx.module.home.model.MaterialStatisticsVO"
>
SELECT
pictureType,
count(id) AS pictureCount
FROM
mortals_xhx_picture_material
GROUP BY
pictureType
</select>
</mapper>
</mapper>
\ No newline at end of file
pom.xml
View file @
82fd9ee5
...
@@ -50,14 +50,14 @@
...
@@ -50,14 +50,14 @@
</dependency>
</dependency>
<!-- 引入 Spring Cloud Alibaba Nacos Config 相关依赖,将 Nacos 作为配置中心,并实现对其的自动配置 -->
<!-- 引入 Spring Cloud Alibaba Nacos Config 相关依赖,将 Nacos 作为配置中心,并实现对其的自动配置 -->
<dependency
>
<!-- <dependency>--
>
<groupId>
com.alibaba.cloud
</groupId
>
<!-- <groupId>com.alibaba.cloud</groupId>--
>
<artifactId>
spring-cloud-starter-alibaba-nacos-config
</artifactId
>
<!-- <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>--
>
</dependency
>
<!-- </dependency>--
>
<dependency
>
<!-- <dependency>--
>
<groupId>
com.alibaba.cloud
</groupId
>
<!-- <groupId>com.alibaba.cloud</groupId>--
>
<artifactId>
spring-cloud-starter-alibaba-nacos-discovery
</artifactId
>
<!-- <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>--
>
</dependency
>
<!-- </dependency>--
>
</dependencies>
</dependencies>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment