Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
e3c457d7
Commit
e3c457d7
authored
Jul 13, 2022
by
guojx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
引流链接数据接口
parent
8fe65855
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
133 additions
and
112 deletions
+133
-112
StatisticsApolloKeyConstant.java
...ban/manage/api/constants/StatisticsApolloKeyConstant.java
+13
-0
DataStatisticsApiService.java
...nage/api/service/statistics/DataStatisticsApiService.java
+0
-18
DataStatisticsApiServiceImpl.java
...ervice/service/out/impl/DataStatisticsApiServiceImpl.java
+0
-20
dubbo-haoban-manage-service.xml
...ervice/src/main/resources/dubbo-haoban-manage-service.xml
+2
-4
HmLinkController.java
...gic/haoban/manage/web/controller/hm/HmLinkController.java
+96
-31
DataStatisticsParamUtils.java
...manage/web/utils/statistics/DataStatisticsParamUtils.java
+22
-36
dubbo-haoban-manage-web.xml
...3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
+0
-3
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/constants/StatisticsApolloKeyConstant.java
View file @
e3c457d7
...
@@ -40,5 +40,18 @@ public interface StatisticsApolloKeyConstant {
...
@@ -40,5 +40,18 @@ public interface StatisticsApolloKeyConstant {
*/
*/
String
data_haoban_hm_many_detail
=
"data_haoban_hm_many_detail"
;
String
data_haoban_hm_many_detail
=
"data_haoban_hm_many_detail"
;
/**
* 用于链接明细导购数据 企业+链接+导购
*/
String
data_haoban_link_detail
=
"data_haoban_link_detail"
;
/**
* 用于好办链接概览数据 企业+链接
*/
String
data_haoban_link_overview
=
"data_haoban_link_overview"
;
/**
* 用于好办链接列表数据 企业+链接
*/
String
data_haoban_link_list
=
"data_haoban_link_list"
;
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/statistics/DataStatisticsApiService.java
deleted
100644 → 0
View file @
8fe65855
package
com
.
gic
.
haoban
.
manage
.
api
.
service
.
statistics
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.haoban.manage.api.dto.statistics.StatisticsDTO
;
/**
* 数据组统一接口
*/
public
interface
DataStatisticsApiService
{
/**
* 调用数据组接口
* @param apolloKey
* @param body
* @return
*/
ServiceResponse
<
StatisticsDTO
>
post
(
String
apolloKey
,
Object
body
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DataStatisticsApiServiceImpl.java
deleted
100644 → 0
View file @
8fe65855
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.haoban.manage.api.dto.statistics.StatisticsDTO
;
import
com.gic.haoban.manage.api.service.statistics.DataStatisticsApiService
;
import
com.gic.haoban.manage.api.util.DataHttpUtil
;
import
org.springframework.stereotype.Service
;
/**
* 数据组对接接口
* @Author guojx
* @Date 2022/7/13 11:34
*/
@Service
(
"dataStatisticsApiService"
)
public
class
DataStatisticsApiServiceImpl
implements
DataStatisticsApiService
{
@Override
public
ServiceResponse
<
StatisticsDTO
>
post
(
String
apolloKey
,
Object
body
)
{
return
ServiceResponse
.
success
(
DataHttpUtil
.
post
(
apolloKey
,
body
));
}
}
haoban-manage3-service/src/main/resources/dubbo-haoban-manage-service.xml
View file @
e3c457d7
...
@@ -119,9 +119,6 @@
...
@@ -119,9 +119,6 @@
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.hm.HmQrcodeApiService"
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.hm.HmQrcodeApiService"
ref=
"hmQrcodeApiServiceImpl"
timeout=
"10000"
/>
ref=
"hmQrcodeApiServiceImpl"
timeout=
"10000"
/>
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.statistics.DataStatisticsApiService"
ref=
"dataStatisticsApiService"
timeout=
"10000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.DepartmentService"
id=
"gicDepartmentService"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.DepartmentService"
id=
"gicDepartmentService"
/>
<dubbo:reference
interface=
"com.gic.wechat.api.service.qywx.QywxDepartmentApiService"
<dubbo:reference
interface=
"com.gic.wechat.api.service.qywx.QywxDepartmentApiService"
id=
"qywxDepartmentApiService"
/>
id=
"qywxDepartmentApiService"
/>
...
@@ -181,5 +178,5 @@
...
@@ -181,5 +178,5 @@
<dubbo:reference
interface=
"com.gic.enterprise.api.service.EnterpriseUseForbidService"
id=
"enterpriseUseForbidService"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.EnterpriseUseForbidService"
id=
"enterpriseUseForbidService"
/>
</beans>
</beans>
\ No newline at end of file
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmLinkController.java
View file @
e3c457d7
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
hm
;
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
hm
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.haoban.manage.api.service.statistics.DataStatisticsApiService
;
import
com.gic.haoban.manage.web.utils.statistics.DataStatisticsParamUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.common.utils.AuthWebRequestUtil
;
import
com.gic.haoban.common.utils.AuthWebRequestUtil
;
import
com.gic.haoban.manage.api.dto.hm.HmLinkDTO
;
import
com.gic.haoban.manage.api.constants.StatisticsApolloKeyConstant
;
import
com.gic.haoban.manage.api.dto.hm.HmLinkStoreDTO
;
import
com.gic.haoban.manage.api.dto.hm.*
;
import
com.gic.haoban.manage.api.dto.hm.HmLinkStoreSettingDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmPageDTO
;
import
com.gic.haoban.manage.api.dto.hm.WxUserAddLogDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmLinkSearchQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmLinkSearchQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.WxUserAddLogSearchQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.WxUserAddLogSearchQDTO
;
import
com.gic.haoban.manage.api.dto.statistics.StatisticsDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.WelcomeDetailDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.WelcomeDetailDTO
;
import
com.gic.haoban.manage.api.service.hm.HmLinkApiService
;
import
com.gic.haoban.manage.api.service.hm.HmLinkApiService
;
import
com.gic.haoban.manage.api.service.hm.HmPageApiService
;
import
com.gic.haoban.manage.api.service.hm.HmPageApiService
;
import
com.gic.haoban.manage.api.service.hm.WxUserAddLogApiService
;
import
com.gic.haoban.manage.api.service.hm.WxUserAddLogApiService
;
import
com.gic.haoban.manage.api.service.out.WelcomeApiService
;
import
com.gic.haoban.manage.api.service.out.WelcomeApiService
;
import
com.gic.haoban.manage.api.util.DataHttpUtil
;
import
com.gic.haoban.manage.web.utils.statistics.DataStatisticsParamUtils
;
import
com.gic.haoban.manage.web.vo.hm.HmLinkListVO
;
import
com.gic.haoban.manage.web.vo.hm.HmLinkListVO
;
import
com.gic.haoban.manage.web.vo.hm.HmLinkStatisticsClerkVO
;
import
com.gic.haoban.manage.web.vo.hm.HmLinkStatisticsVO
;
import
com.gic.haoban.manage.web.vo.hm.HmLinkVO
;
import
com.gic.haoban.manage.web.vo.hm.HmLinkVO
;
import
com.gic.haoban.manage.web.vo.hm.WxUserAddLogVO
;
import
com.gic.haoban.manage.web.vo.hm.WxUserAddLogVO
;
import
com.gic.log.record.anno.GicLogRecord
;
import
com.gic.log.record.anno.GicLogRecord
;
...
@@ -48,6 +32,18 @@ import com.gic.log.record.util.GicLogRecordEvaluationContext;
...
@@ -48,6 +32,18 @@ import com.gic.log.record.util.GicLogRecordEvaluationContext;
import
com.gic.log.record.util.GicLogRecordOptTypeEnum
;
import
com.gic.log.record.util.GicLogRecordOptTypeEnum
;
import
com.gic.member.tag.api.dto.MemberTagItemDTO
;
import
com.gic.member.tag.api.dto.MemberTagItemDTO
;
import
com.gic.member.tag.api.service.MemberTagApiService
;
import
com.gic.member.tag.api.service.MemberTagApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
/**
*
*
...
@@ -73,8 +69,6 @@ public class HmLinkController {
...
@@ -73,8 +69,6 @@ public class HmLinkController {
private
MemberTagApiService
memberTagApiService
;
private
MemberTagApiService
memberTagApiService
;
@Autowired
@Autowired
private
WxUserAddLogApiService
wxUserAddLogApiService
;
private
WxUserAddLogApiService
wxUserAddLogApiService
;
@Autowired
private
DataStatisticsApiService
dataStatisticsApiService
;
@RequestMapping
(
"add"
)
@RequestMapping
(
"add"
)
@GicLogRecord
(
value
=
"${#logValue}"
,
category
=
GicLogRecordCategoryEnum
.
RECHAGE_CENTER
,
optType
=
GicLogRecordOptTypeEnum
.
RECHAGE_MODIFY_OPT
,
userFunc
=
LogRecordUserService
.
class
,
optPage
=
"活码"
)
@GicLogRecord
(
value
=
"${#logValue}"
,
category
=
GicLogRecordCategoryEnum
.
RECHAGE_CENTER
,
optType
=
GicLogRecordOptTypeEnum
.
RECHAGE_MODIFY_OPT
,
userFunc
=
LogRecordUserService
.
class
,
optPage
=
"活码"
)
...
@@ -528,9 +522,9 @@ public class HmLinkController {
...
@@ -528,9 +522,9 @@ public class HmLinkController {
qdto
.
setSortType
(
"desc"
);
qdto
.
setSortType
(
"desc"
);
}
}
jsonObject
.
put
(
"orderByField"
,
qdto
.
getSortColumn
()
+
" "
+
qdto
.
getSortType
());
jsonObject
.
put
(
"orderByField"
,
qdto
.
getSortColumn
()
+
" "
+
qdto
.
getSortType
());
//用于好办链接列表数据 企业+链接
JSONObject
param
=
DataStatisticsParamUtils
.
getParam
(
basePageInfo
,
jsonObject
);
JSONObject
param
=
DataStatisticsParamUtils
.
getParam
(
basePageInfo
,
jsonObject
);
Page
page
=
DataStatisticsParamUtils
.
getPage
(
dataStatisticsApiService
.
post
(
"data_haoban_link_list"
,
param
));
Page
page
=
DataStatisticsParamUtils
.
getPage
(
DataHttpUtil
.
post
(
StatisticsApolloKeyConstant
.
data_haoban_link_list
,
param
));
if
(
page
==
null
)
{
if
(
page
==
null
)
{
return
RestResponse
.
successResult
();
return
RestResponse
.
successResult
();
}
}
...
@@ -596,8 +590,8 @@ public class HmLinkController {
...
@@ -596,8 +590,8 @@ public class HmLinkController {
jsonObject
.
put
(
"linkId"
,
linkId
);
jsonObject
.
put
(
"linkId"
,
linkId
);
JSONObject
param
=
DataStatisticsParamUtils
.
getParamNoPage
(
jsonObject
);
JSONObject
param
=
DataStatisticsParamUtils
.
getParamNoPage
(
jsonObject
);
//HmLinkStatisticsVO vo = new HmLinkStatisticsVO();
//HmLinkStatisticsVO vo = new HmLinkStatisticsVO();
//用于好办链接概览数据 企业+链接
return
DataStatisticsParamUtils
.
responseOne
(
DataHttpUtil
return
DataStatisticsParamUtils
.
responseOne
(
dataStatisticsApiService
.
post
(
"data_haoban_link_overview"
,
param
));
.
post
(
StatisticsApolloKeyConstant
.
data_haoban_link_overview
,
param
));
}
}
// 统计图表
// 统计图表
...
@@ -621,14 +615,47 @@ public class HmLinkController {
...
@@ -621,14 +615,47 @@ public class HmLinkController {
}
}
endTime
=
DateUtil
.
getEndTimeOfDay
(
endTime
);
endTime
=
DateUtil
.
getEndTimeOfDay
(
endTime
);
jsonObject
.
put
(
"endTime"
,
endTime
);
jsonObject
.
put
(
"endTime"
,
endTime
);
//日期填充
List
<
String
>
dateList
;
//用于链接添加趋势图数据 企业+链接+日期
//用于链接添加趋势图数据 企业+链接+日期
String
apolloKey
=
"data_haoban_link_add_trend_d"
;
String
apolloKey
=
"data_haoban_link_add_trend_d"
;
//用于链接点击趋势图数据 企业+链接+日期
String
clickApolloKey
=
"data_haoban_link_click_trend_d"
;
//如果天数大于60,调用月接口
//如果天数大于60,调用月接口
if
(
DateUtil
.
daysBetween
(
startTime
,
endTime
)
>
60
)
{
if
(
DateUtil
.
daysBetween
(
startTime
,
endTime
)
>
60
)
{
dateList
=
getMonthBetween
(
startTime
,
endTime
);
apolloKey
=
"data_haoban_link_add_trend_m"
;
apolloKey
=
"data_haoban_link_add_trend_m"
;
clickApolloKey
=
"data_haoban_link_click_trend_m"
;
}
else
{
dateList
=
DateUtil
.
getBetweenDate
(
startTime
,
endTime
);
}
}
JSONObject
param
=
DataStatisticsParamUtils
.
getParamNoPage
(
jsonObject
);
JSONObject
param
=
DataStatisticsParamUtils
.
getParamNoPage
(
jsonObject
);
return
DataStatisticsParamUtils
.
response
(
dataStatisticsApiService
.
post
(
apolloKey
,
param
));
StatisticsDTO
newDTO
=
DataHttpUtil
.
post
(
apolloKey
,
param
);
Map
<
String
,
JSONObject
>
newMap
=
getTrendMap
(
newDTO
);
//
StatisticsDTO
clickDTO
=
DataHttpUtil
.
post
(
clickApolloKey
,
param
);
Map
<
String
,
JSONObject
>
clickMap
=
getTrendMap
(
clickDTO
);
List
<
JSONObject
>
resultList
=
new
ArrayList
<>();
for
(
String
date
:
dateList
)
{
JSONObject
vo
=
new
JSONObject
();
vo
.
put
(
"bizDate"
,
date
);
JSONObject
newJson
=
newMap
.
get
(
date
);
if
(
newJson
==
null
)
{
vo
.
put
(
"addNum"
,
0
);
}
else
{
vo
.
put
(
"addNum"
,
newJson
.
get
(
"addNum"
));
}
JSONObject
clickJson
=
clickMap
.
get
(
date
);
if
(
clickJson
==
null
)
{
vo
.
put
(
"clickTimes"
,
0
);
vo
.
put
(
"clickNum"
,
0
);
}
else
{
vo
.
put
(
"clickTimes"
,
clickJson
.
get
(
"clickTimes"
));
vo
.
put
(
"clickNum"
,
clickJson
.
get
(
"clickNum"
));
}
resultList
.
add
(
vo
);
}
return
RestResponse
.
successResult
(
resultList
);
}
}
// 导购统计
// 导购统计
...
@@ -661,8 +688,8 @@ public class HmLinkController {
...
@@ -661,8 +688,8 @@ public class HmLinkController {
}
}
jsonObject
.
put
(
"orderByField"
,
sortColumn
+
" "
+
sortType
);
jsonObject
.
put
(
"orderByField"
,
sortColumn
+
" "
+
sortType
);
JSONObject
param
=
DataStatisticsParamUtils
.
getParam
(
basePageInfo
,
jsonObject
);
JSONObject
param
=
DataStatisticsParamUtils
.
getParam
(
basePageInfo
,
jsonObject
);
//用于链接明细导购数据 企业+链接+导购
return
DataStatisticsParamUtils
.
responsePage
(
DataHttpUtil
return
DataStatisticsParamUtils
.
responsePage
(
dataStatisticsApiService
.
post
(
"data_haoban_link_detail"
,
param
));
.
post
(
StatisticsApolloKeyConstant
.
data_haoban_link_detail
,
param
));
}
}
// 加好友列表
// 加好友列表
...
@@ -680,4 +707,42 @@ public class HmLinkController {
...
@@ -680,4 +707,42 @@ public class HmLinkController {
return
RestResponse
.
successResult
(
retPage
);
return
RestResponse
.
successResult
(
retPage
);
}
}
public
static
List
<
String
>
getMonthBetween
(
Date
minDate
,
Date
maxDate
)
{
ArrayList
<
String
>
result
=
new
ArrayList
<>();
try
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM"
);
//格式化为年月
Calendar
min
=
Calendar
.
getInstance
();
Calendar
max
=
Calendar
.
getInstance
();
min
.
setTime
(
minDate
);
min
.
set
(
min
.
get
(
Calendar
.
YEAR
),
min
.
get
(
Calendar
.
MONTH
),
1
);
max
.
setTime
(
maxDate
);
max
.
set
(
max
.
get
(
Calendar
.
YEAR
),
max
.
get
(
Calendar
.
MONTH
),
2
);
Calendar
curr
=
min
;
while
(
curr
.
before
(
max
))
{
result
.
add
(
sdf
.
format
(
curr
.
getTime
()));
curr
.
add
(
Calendar
.
MONTH
,
1
);
}
}
catch
(
Exception
e
)
{
}
return
result
;
}
private
static
Map
<
String
,
JSONObject
>
getTrendMap
(
StatisticsDTO
newDTO
)
{
Map
<
String
,
JSONObject
>
newMap
=
new
HashMap
<>();
if
(
newDTO
!=
null
)
{
List
<
JSONObject
>
newList
=
newDTO
.
getData
();
if
(
CollectionUtils
.
isNotEmpty
(
newList
))
{
for
(
JSONObject
temp
:
newList
)
{
newMap
.
put
(
temp
.
getString
(
"bizDate"
),
temp
);
}
}
}
return
newMap
;
}
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/utils/statistics/DataStatisticsParamUtils.java
View file @
e3c457d7
...
@@ -3,8 +3,6 @@ package com.gic.haoban.manage.web.utils.statistics;
...
@@ -3,8 +3,6 @@ package com.gic.haoban.manage.web.utils.statistics;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.web.qo.PageQo
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.haoban.manage.api.dto.statistics.StatisticsDTO
;
import
com.gic.haoban.manage.api.dto.statistics.StatisticsDTO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
...
@@ -53,50 +51,38 @@ public class DataStatisticsParamUtils {
...
@@ -53,50 +51,38 @@ public class DataStatisticsParamUtils {
return
jsonObject
;
return
jsonObject
;
}
}
public
static
RestResponse
response
(
ServiceResponse
<
StatisticsDTO
>
res
)
{
public
static
RestResponse
response
(
StatisticsDTO
statisticsDTO
)
{
if
(
res
.
isSuccess
())
{
if
(
statisticsDTO
==
null
)
{
StatisticsDTO
statisticsDTO
=
res
.
getResult
();
return
RestResponse
.
successResult
();
if
(
statisticsDTO
==
null
)
{
return
RestResponse
.
successResult
();
}
return
RestResponse
.
successResult
(
statisticsDTO
.
getData
());
}
}
return
RestResponse
.
failure
(
res
.
getCode
(),
res
.
getMessage
());
return
RestResponse
.
successResult
(
statisticsDTO
.
getData
());
}
}
public
static
RestResponse
responseOne
(
ServiceResponse
<
StatisticsDTO
>
res
)
{
public
static
RestResponse
responseOne
(
StatisticsDTO
statisticsDTO
)
{
if
(
res
.
isSuccess
())
{
if
(
statisticsDTO
==
null
)
{
StatisticsDTO
statisticsDTO
=
res
.
getResult
();
if
(
statisticsDTO
==
null
)
{
return
RestResponse
.
successResult
();
}
if
(
CollectionUtils
.
isNotEmpty
(
statisticsDTO
.
getData
()))
{
return
RestResponse
.
successResult
(
statisticsDTO
.
getData
().
get
(
0
));
}
return
RestResponse
.
successResult
();
return
RestResponse
.
successResult
();
}
}
return
RestResponse
.
failure
(
res
.
getCode
(),
res
.
getMessage
());
if
(
CollectionUtils
.
isNotEmpty
(
statisticsDTO
.
getData
()))
{
return
RestResponse
.
successResult
(
statisticsDTO
.
getData
().
get
(
0
));
}
return
RestResponse
.
successResult
();
}
}
public
static
RestResponse
responsePage
(
ServiceResponse
<
StatisticsDTO
>
res
)
{
public
static
RestResponse
responsePage
(
StatisticsDTO
statisticsDTO
)
{
if
(
res
.
isSuccess
())
{
if
(
statisticsDTO
==
null
)
{
StatisticsDTO
statisticsDTO
=
res
.
getResult
();
return
RestResponse
.
successResult
();
if
(
statisticsDTO
==
null
)
{
return
RestResponse
.
successResult
();
}
Page
page
=
new
Page
();
page
.
setResult
(
statisticsDTO
.
getData
());
page
.
setPageSize
(
statisticsDTO
.
getPage
().
getPageSize
());
page
.
setCurrentPage
(
statisticsDTO
.
getPage
().
getCurrentPage
());
page
.
setTotalPage
(
statisticsDTO
.
getPage
().
getTotalPage
());
page
.
setTotalCount
(
statisticsDTO
.
getPage
().
getTotalCount
());
return
RestResponse
.
successResult
(
page
);
}
}
return
RestResponse
.
failure
(
res
.
getCode
(),
res
.
getMessage
());
Page
page
=
new
Page
();
page
.
setResult
(
statisticsDTO
.
getData
());
page
.
setPageSize
(
statisticsDTO
.
getPage
().
getPageSize
());
page
.
setCurrentPage
(
statisticsDTO
.
getPage
().
getCurrentPage
());
page
.
setTotalPage
(
statisticsDTO
.
getPage
().
getTotalPage
());
page
.
setTotalCount
(
statisticsDTO
.
getPage
().
getTotalCount
());
return
RestResponse
.
successResult
(
page
);
}
}
public
static
Page
getPage
(
S
erviceResponse
<
StatisticsDTO
>
res
)
{
public
static
Page
getPage
(
S
tatisticsDTO
statisticsDTO
)
{
RestResponse
response
=
responsePage
(
res
);
RestResponse
response
=
responsePage
(
statisticsDTO
);
if
(
"0"
.
equals
(
response
.
getCode
()))
{
if
(
"0"
.
equals
(
response
.
getCode
()))
{
Page
page
=
(
Page
)
response
.
getResult
();
Page
page
=
(
Page
)
response
.
getResult
();
return
page
;
return
page
;
...
...
haoban-manage3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
View file @
e3c457d7
...
@@ -113,7 +113,4 @@
...
@@ -113,7 +113,4 @@
timeout=
"10000"
retries=
"0"
check=
"false"
/>
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"hmQrcodeApiService"
interface=
"com.gic.haoban.manage.api.service.hm.HmQrcodeApiService"
<dubbo:reference
id=
"hmQrcodeApiService"
interface=
"com.gic.haoban.manage.api.service.hm.HmQrcodeApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"dataStatisticsApiService"
interface=
"com.gic.haoban.manage.api.service.statistics.DataStatisticsApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
</beans>
</beans>
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