Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-data-cloud
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
base_platform_enterprise
gic-data-cloud
Commits
aa343331
Commit
aa343331
authored
Aug 12, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
观云台小程序
parent
5181747a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
204 additions
and
594 deletions
+204
-594
BaseSalesController.java
...ava/com/gic/cloud/web/controller/BaseSalesController.java
+2
-70
ConsumeStructureController.java
.../gic/cloud/web/controller/ConsumeStructureController.java
+26
-524
GoDownComponent.java
...in/java/com/gic/cloud/web/controller/GoDownComponent.java
+176
-0
No files found.
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/controller/BaseSalesController.java
View file @
aa343331
...
@@ -37,9 +37,7 @@ public class BaseSalesController {
...
@@ -37,9 +37,7 @@ public class BaseSalesController {
@Autowired
@Autowired
private
BaseSalesApiService
baseSalesApiService
;
private
BaseSalesApiService
baseSalesApiService
;
@Autowired
@Autowired
private
ShopApiService
shopApiService
;
private
GoDownComponent
goDownComponent
;
@Autowired
private
WmStoreApiService
wmStoreApiService
;
@RequestMapping
(
"base-sales"
)
@RequestMapping
(
"base-sales"
)
public
RestResponse
baseSales
(
BaseSalesParamQo
qo
){
public
RestResponse
baseSales
(
BaseSalesParamQo
qo
){
...
@@ -88,7 +86,7 @@ public class BaseSalesController {
...
@@ -88,7 +86,7 @@ public class BaseSalesController {
dto
.
setPageNum
(
qo
.
getPageNum
());
dto
.
setPageNum
(
qo
.
getPageNum
());
dto
.
setPageSize
(
qo
.
getPageSize
());
dto
.
setPageSize
(
qo
.
getPageSize
());
ServiceResponse
<
Page
<
BaseSalesDTO
>>
response
=
this
.
baseSalesApiService
.
pageBaseSales
(
dto
);
ServiceResponse
<
Page
<
BaseSalesDTO
>>
response
=
this
.
baseSalesApiService
.
pageBaseSales
(
dto
);
vo
.
setPage
(
this
.
parseData
(
response
.
getResult
(),
qo
.
getChannel
(),
qo
.
getEnterpriseId
(),
qo
.
getLevel
(),
maxLevel
));
vo
.
setPage
(
this
.
goDownComponent
.
parseData
(
response
.
getResult
(),
qo
.
getChannel
(),
qo
.
getEnterpriseId
(),
qo
.
getLevel
(),
maxLevel
));
dto
.
setCountType
(
2
);
//合计
dto
.
setCountType
(
2
);
//合计
ServiceResponse
<
Page
<
BaseSalesDTO
>>
response1
=
this
.
baseSalesApiService
.
pageBaseSales
(
dto
);
ServiceResponse
<
Page
<
BaseSalesDTO
>>
response1
=
this
.
baseSalesApiService
.
pageBaseSales
(
dto
);
if
(
response1
.
isSuccess
()
&&
response1
.
getResult
()
!=
null
&&
CollectionUtils
.
isNotEmpty
(
response1
.
getResult
().
getResult
())){
if
(
response1
.
isSuccess
()
&&
response1
.
getResult
()
!=
null
&&
CollectionUtils
.
isNotEmpty
(
response1
.
getResult
().
getResult
())){
...
@@ -113,70 +111,4 @@ public class BaseSalesController {
...
@@ -113,70 +111,4 @@ public class BaseSalesController {
}
}
return
RestResponse
.
success
(
vo
);
return
RestResponse
.
success
(
vo
);
}
}
public
Page
<
BaseSalesDTO
>
parseData
(
Page
<
BaseSalesDTO
>
page
,
Integer
channel
,
Integer
enterpriseId
,
Integer
level
,
Integer
maxLevel
){
if
(
page
!=
null
&&
CollectionUtils
.
isNotEmpty
(
page
.
getResult
())){
if
(
channel
==
null
){
//全渠道
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
-
1
);
if
(
StoreChannelEnum
.
OFFLINE
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getId
())){
baseSalesDTO
.
setName
(
StoreChannelEnum
.
OFFLINE
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
GICMALL
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getId
())){
baseSalesDTO
.
setName
(
StoreChannelEnum
.
GICMALL
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
GICMALL
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
WMMALL
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getId
())){
baseSalesDTO
.
setName
(
StoreChannelEnum
.
WMMALL
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
WMMALL
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
TIANMAO
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getId
())){
baseSalesDTO
.
setName
(
StoreChannelEnum
.
TIANMAO
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
TIANMAO
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
});
}
if
(
channel
==
StoreChannelEnum
.
GICMALL
.
getChannel
()){
List
<
ShopDTO
>
result
=
shopApiService
.
getAllShopByEnterpriseIdAndName
(
enterpriseId
,
null
,
ShopTypeEnum
.
MALL_SHOP
.
getCode
()).
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result
)){
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
-
1
);
for
(
ShopDTO
shopDTO
:
result
){
if
(
baseSalesDTO
.
getId
().
equals
(
shopDTO
.
getId
()+
""
)){
baseSalesDTO
.
setName
(
shopDTO
.
getName
());
baseSalesDTO
.
setChannel
(
channel
);
}
}
});
}
}
if
(
channel
==
StoreChannelEnum
.
WMMALL
.
getChannel
()){
List
<
WmStoreDTO
>
result1
=
wmStoreApiService
.
listWmStore
(
enterpriseId
,
null
).
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result1
)){
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
-
1
);
for
(
WmStoreDTO
dto
:
result1
){
if
(
baseSalesDTO
.
getId
().
equals
(
dto
.
getWmMallStoreId
()+
""
)){
baseSalesDTO
.
setName
(
dto
.
getWmMainAccount
());
baseSalesDTO
.
setChannel
(
channel
);
}
}
});
}
}
if
(
channel
==
StoreChannelEnum
.
OFFLINE
.
getChannel
()){
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
);
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
level
<
maxLevel
?
1
:
0
);
});
}
}
return
page
;
}
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/controller/ConsumeStructureController.java
View file @
aa343331
...
@@ -39,9 +39,7 @@ public class ConsumeStructureController {
...
@@ -39,9 +39,7 @@ public class ConsumeStructureController {
@Autowired
@Autowired
private
DataAuthUtils
dataAuthUtils
;
private
DataAuthUtils
dataAuthUtils
;
@Autowired
@Autowired
private
ShopApiService
shopApiService
;
private
GoDownComponent
goDownComponent
;
@Autowired
private
WmStoreApiService
wmStoreApiService
;
/**
/**
* 年龄消费占比(订单人数/订单数/销售额)
* 年龄消费占比(订单人数/订单数/销售额)
...
@@ -76,123 +74,23 @@ public class ConsumeStructureController {
...
@@ -76,123 +74,23 @@ public class ConsumeStructureController {
@RequestMapping
(
"get-age-consume-area"
)
@RequestMapping
(
"get-age-consume-area"
)
public
RestResponse
queryAgeConsumeArea
(
AgeConsumeAreaQO
params
)
{
public
RestResponse
queryAgeConsumeArea
(
AgeConsumeAreaQO
params
)
{
log
.
info
(
"消费构成-消费年龄-区域参数:{}"
,
JSON
.
toJSONString
(
params
));
log
.
info
(
"消费构成-消费年龄-区域参数:{}"
,
JSON
.
toJSONString
(
params
));
params
.
setOnlineStoreIdList
(
storeSearchUtils
.
onLineStoreSearch
(
params
.
getUserId
(),
params
.
getEnterpriseId
(),
params
.
getSearchJson
()));
params
.
setStoreInfoIdList
(
storeSearchUtils
.
storeSearch
(
params
.
getUserId
(),
params
.
getEnterpriseId
(),
params
.
getSearchJson
()));
params
.
setGroupIdList
(
storeSearchUtils
.
getChildrenStoreGroupIdList
(
params
.
getParentId
()));
params
.
setMemberCardIdList
(
dataAuthUtils
.
getMbrAreaId
(
params
.
getUserId
(),
params
.
getEnterpriseId
()));
BaseSalesVo
vo
=
new
BaseSalesVo
();
BaseSalesVo
vo
=
new
BaseSalesVo
();
Integer
maxLevel
=
0
;
LevelVo
levelVo
=
this
.
goDownComponent
.
setValue
(
params
,
vo
);
/******线下渠道需要点击下钻,该值只会在线下时才会使用********/
Integer
maxLevel
=
levelVo
.
getMaxLevel
();
LevelVo
levelVo
=
this
.
storeSearchUtils
.
getLevel
(
params
.
getUserId
(),
params
.
getEnterpriseId
(),
params
.
getSearchJson
());
maxLevel
=
levelVo
.
getMaxLevel
();
if
(
params
.
getLevel
()
==
null
){
params
.
setLevel
(
levelVo
.
getLevel
());
}
/***********如果是线下的第一层级,需要展示切换层级按钮*************/
if
(
params
.
getChannel
()
==
StoreChannelEnum
.
OFFLINE
.
getChannel
()
&&
params
.
getLevel
()
==
levelVo
.
getLevel
()){
vo
.
setChangeLevel
(
1
);
}
if
(
params
.
getChannel
()
==
null
){
vo
.
setLevelName
(
"所有渠道"
);
}
else
if
(
params
.
getChannel
()
==
StoreChannelEnum
.
OFFLINE
.
getChannel
()){
vo
.
setLevelName
(
LevelUtil
.
getLevelName
(
params
.
getLevel
()));
}
else
{
vo
.
setLevelName
(
"店铺层级"
);
}
params
.
setCountType
(
1
);
params
.
setCountType
(
1
);
ServiceResponse
<
Page
<
AgeConsumeAreaDTO
>>
pageServiceResponse
=
consumeStructureApiService
.
pageAgeConsumeArea
(
params
);
ServiceResponse
<
Page
<
AgeConsumeAreaDTO
>>
pageServiceResponse
=
consumeStructureApiService
.
pageAgeConsumeArea
(
params
);
vo
.
setPage
(
this
.
parseAgeConsumeAre
a
(
pageServiceResponse
.
getResult
(),
params
.
getChannel
(),
params
.
getEnterpriseId
(),
params
.
getLevel
(),
maxLevel
));
vo
.
setPage
(
this
.
goDownComponent
.
parseDat
a
(
pageServiceResponse
.
getResult
(),
params
.
getChannel
(),
params
.
getEnterpriseId
(),
params
.
getLevel
(),
maxLevel
));
params
.
setCountType
(
2
);
params
.
setCountType
(
2
);
ServiceResponse
<
Page
<
AgeConsumeAreaDTO
>>
response1
=
consumeStructureApiService
.
pageAgeConsumeArea
(
params
);
ServiceResponse
<
Page
<
AgeConsumeAreaDTO
>>
response1
=
consumeStructureApiService
.
pageAgeConsumeArea
(
params
);
if
(
response1
.
isSuccess
()
&&
response1
.
getResult
()
!=
null
&&
CollectionUtils
.
isNotEmpty
(
response1
.
getResult
().
getResult
())){
this
.
goDownComponent
.
parseTotal
(
response1
,
vo
);
AgeConsumeAreaDTO
total
=
response1
.
getResult
().
getResult
().
get
(
0
);
if
(
total
!=
null
){
total
.
setAreaId
(
"0"
);
total
.
setAreaName
(
"合计/均值"
);
vo
.
setTotal
(
total
);
}
}
if
(
params
.
getChannel
()
!=
null
&&
params
.
getChannel
()
==
1
&&
params
.
getLevel
()
==
levelVo
.
getLevel
()){
if
(
params
.
getChannel
()
!=
null
&&
params
.
getChannel
()
==
1
&&
params
.
getLevel
()
==
levelVo
.
getLevel
()){
params
.
setCountType
(
3
);
//无归属
params
.
setCountType
(
3
);
//无归属
ServiceResponse
<
Page
<
AgeConsumeAreaDTO
>>
response2
=
consumeStructureApiService
.
pageAgeConsumeArea
(
params
);
ServiceResponse
<
Page
<
AgeConsumeAreaDTO
>>
response2
=
consumeStructureApiService
.
pageAgeConsumeArea
(
params
);
if
(
response2
.
isSuccess
()
&&
response2
.
getResult
()
!=
null
&&
CollectionUtils
.
isNotEmpty
(
response2
.
getResult
().
getResult
())){
this
.
goDownComponent
.
parseWgs
(
response2
,
vo
);
AgeConsumeAreaDTO
wgs
=
response2
.
getResult
().
getResult
().
get
(
0
);
if
(
wgs
!=
null
){
wgs
.
setAreaName
(
"无归属"
);
wgs
.
setAreaId
(
"-1"
);
vo
.
setWgs
(
wgs
);
}
}
}
}
return
RestResponse
.
success
(
vo
);
return
RestResponse
.
success
(
vo
);
}
}
public
Page
<
AgeConsumeAreaDTO
>
parseAgeConsumeArea
(
Page
<
AgeConsumeAreaDTO
>
page
,
Integer
channel
,
Integer
enterpriseId
,
Integer
level
,
Integer
maxLevel
){
if
(
page
!=
null
&&
CollectionUtils
.
isNotEmpty
(
page
.
getResult
())){
if
(
channel
==
null
){
//全渠道
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
-
1
);
if
(
StoreChannelEnum
.
OFFLINE
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getAreaId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
OFFLINE
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
GICMALL
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getAreaId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
GICMALL
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
GICMALL
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
WMMALL
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getAreaId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
WMMALL
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
WMMALL
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
TIANMAO
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getAreaId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
TIANMAO
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
TIANMAO
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
});
}
if
(
channel
==
StoreChannelEnum
.
GICMALL
.
getChannel
()){
List
<
ShopDTO
>
result
=
shopApiService
.
getAllShopByEnterpriseIdAndName
(
enterpriseId
,
null
,
ShopTypeEnum
.
MALL_SHOP
.
getCode
()).
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result
)){
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
-
1
);
for
(
ShopDTO
shopDTO
:
result
){
if
(
baseSalesDTO
.
getAreaId
().
equals
(
shopDTO
.
getId
()+
""
)){
baseSalesDTO
.
setAreaName
(
shopDTO
.
getName
());
baseSalesDTO
.
setChannel
(
channel
);
}
}
});
}
}
if
(
channel
==
StoreChannelEnum
.
WMMALL
.
getChannel
()){
List
<
WmStoreDTO
>
result1
=
wmStoreApiService
.
listWmStore
(
enterpriseId
,
null
).
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result1
)){
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
-
1
);
for
(
WmStoreDTO
dto
:
result1
){
if
(
baseSalesDTO
.
getAreaId
().
equals
(
dto
.
getWmMallStoreId
()+
""
)){
baseSalesDTO
.
setAreaName
(
dto
.
getWmMainAccount
());
baseSalesDTO
.
setChannel
(
channel
);
}
}
});
}
}
if
(
channel
==
StoreChannelEnum
.
OFFLINE
.
getChannel
()){
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
);
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
level
<
maxLevel
?
1
:
0
);
});
}
}
return
page
;
}
@RequestMapping
(
"get-grade-consume-trend"
)
@RequestMapping
(
"get-grade-consume-trend"
)
public
RestResponse
getGradeConsumeTrend
(
GradeConsumeTrendQO
params
)
{
public
RestResponse
getGradeConsumeTrend
(
GradeConsumeTrendQO
params
)
{
log
.
info
(
"消费构成-等级-趋势参数:{}"
,
JSON
.
toJSONString
(
params
));
log
.
info
(
"消费构成-等级-趋势参数:{}"
,
JSON
.
toJSONString
(
params
));
...
@@ -212,122 +110,23 @@ public class ConsumeStructureController {
...
@@ -212,122 +110,23 @@ public class ConsumeStructureController {
@RequestMapping
(
"get-grade-consume-area"
)
@RequestMapping
(
"get-grade-consume-area"
)
public
RestResponse
queryGradeConsumeArea
(
GradeConsumeAreaQO
params
)
{
public
RestResponse
queryGradeConsumeArea
(
GradeConsumeAreaQO
params
)
{
log
.
info
(
"消费构成-等级-区域参数:{}"
,
JSON
.
toJSONString
(
params
));
log
.
info
(
"消费构成-等级-区域参数:{}"
,
JSON
.
toJSONString
(
params
));
params
.
setOnlineStoreIdList
(
storeSearchUtils
.
onLineStoreSearch
(
params
.
getUserId
(),
params
.
getEnterpriseId
(),
params
.
getSearchJson
()));
params
.
setStoreInfoIdList
(
storeSearchUtils
.
storeSearch
(
params
.
getUserId
(),
params
.
getEnterpriseId
(),
params
.
getSearchJson
()));
params
.
setGroupIdList
(
storeSearchUtils
.
getChildrenStoreGroupIdList
(
params
.
getParentId
()));
BaseSalesVo
vo
=
new
BaseSalesVo
();
BaseSalesVo
vo
=
new
BaseSalesVo
();
Integer
maxLevel
=
0
;
LevelVo
levelVo
=
this
.
goDownComponent
.
setValue
(
params
,
vo
);
/******线下渠道需要点击下钻,该值只会在线下时才会使用********/
Integer
maxLevel
=
levelVo
.
getMaxLevel
();
LevelVo
levelVo
=
this
.
storeSearchUtils
.
getLevel
(
params
.
getUserId
(),
params
.
getEnterpriseId
(),
params
.
getSearchJson
());
maxLevel
=
levelVo
.
getMaxLevel
();
if
(
params
.
getLevel
()
==
null
){
params
.
setLevel
(
levelVo
.
getLevel
());
}
/***********如果是线下的第一层级,需要展示切换层级按钮*************/
if
(
params
.
getChannel
()
==
StoreChannelEnum
.
OFFLINE
.
getChannel
()
&&
params
.
getLevel
()
==
levelVo
.
getLevel
()){
vo
.
setChangeLevel
(
1
);
}
if
(
params
.
getChannel
()
==
null
){
vo
.
setLevelName
(
"所有渠道"
);
}
else
if
(
params
.
getChannel
()
==
StoreChannelEnum
.
OFFLINE
.
getChannel
()){
vo
.
setLevelName
(
LevelUtil
.
getLevelName
(
params
.
getLevel
()));
}
else
{
vo
.
setLevelName
(
"店铺层级"
);
}
params
.
setCountType
(
1
);
params
.
setCountType
(
1
);
ServiceResponse
<
Page
<
GradeConsumeAreaDTO
>>
pageServiceResponse
=
consumeStructureApiService
.
pageGradeConsumeArea
(
params
);
ServiceResponse
<
Page
<
GradeConsumeAreaDTO
>>
pageServiceResponse
=
consumeStructureApiService
.
pageGradeConsumeArea
(
params
);
vo
.
setPage
(
this
.
parseGradeConsumeAre
a
(
pageServiceResponse
.
getResult
(),
params
.
getChannel
(),
params
.
getEnterpriseId
(),
params
.
getLevel
(),
maxLevel
));
vo
.
setPage
(
this
.
goDownComponent
.
parseDat
a
(
pageServiceResponse
.
getResult
(),
params
.
getChannel
(),
params
.
getEnterpriseId
(),
params
.
getLevel
(),
maxLevel
));
params
.
setCountType
(
2
);
params
.
setCountType
(
2
);
ServiceResponse
<
Page
<
GradeConsumeAreaDTO
>>
response1
=
consumeStructureApiService
.
pageGradeConsumeArea
(
params
);
ServiceResponse
<
Page
<
GradeConsumeAreaDTO
>>
response1
=
consumeStructureApiService
.
pageGradeConsumeArea
(
params
);
if
(
response1
.
isSuccess
()
&&
response1
.
getResult
()
!=
null
&&
CollectionUtils
.
isNotEmpty
(
response1
.
getResult
().
getResult
())){
this
.
goDownComponent
.
parseTotal
(
response1
,
vo
);
GradeConsumeAreaDTO
total
=
response1
.
getResult
().
getResult
().
get
(
0
);
if
(
total
!=
null
){
total
.
setAreaId
(
0
);
total
.
setAreaName
(
"合计/均值"
);
vo
.
setTotal
(
total
);
}
}
if
(
params
.
getChannel
()
!=
null
&&
params
.
getChannel
()
==
1
&&
params
.
getLevel
()
==
levelVo
.
getLevel
()){
if
(
params
.
getChannel
()
!=
null
&&
params
.
getChannel
()
==
1
&&
params
.
getLevel
()
==
levelVo
.
getLevel
()){
params
.
setCountType
(
3
);
//无归属
params
.
setCountType
(
3
);
//无归属
ServiceResponse
<
Page
<
GradeConsumeAreaDTO
>>
response2
=
consumeStructureApiService
.
pageGradeConsumeArea
(
params
);
ServiceResponse
<
Page
<
GradeConsumeAreaDTO
>>
response2
=
consumeStructureApiService
.
pageGradeConsumeArea
(
params
);
if
(
response2
.
isSuccess
()
&&
response2
.
getResult
()
!=
null
&&
CollectionUtils
.
isNotEmpty
(
response2
.
getResult
().
getResult
())){
this
.
goDownComponent
.
parseWgs
(
response2
,
vo
);
GradeConsumeAreaDTO
wgs
=
response2
.
getResult
().
getResult
().
get
(
0
);
if
(
wgs
!=
null
){
wgs
.
setAreaName
(
"无归属"
);
wgs
.
setAreaId
(-
1
);
vo
.
setWgs
(
wgs
);
}
}
}
}
return
RestResponse
.
success
(
vo
);
return
RestResponse
.
success
(
vo
);
}
}
public
Page
<
GradeConsumeAreaDTO
>
parseGradeConsumeArea
(
Page
<
GradeConsumeAreaDTO
>
page
,
Integer
channel
,
Integer
enterpriseId
,
Integer
level
,
Integer
maxLevel
){
if
(
page
!=
null
&&
CollectionUtils
.
isNotEmpty
(
page
.
getResult
())){
if
(
channel
==
null
){
//全渠道
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
-
1
);
if
(
StoreChannelEnum
.
OFFLINE
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getAreaId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
OFFLINE
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
GICMALL
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getAreaId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
GICMALL
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
GICMALL
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
WMMALL
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getAreaId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
WMMALL
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
WMMALL
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
TIANMAO
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getAreaId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
TIANMAO
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
TIANMAO
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
});
}
if
(
channel
==
StoreChannelEnum
.
GICMALL
.
getChannel
()){
List
<
ShopDTO
>
result
=
shopApiService
.
getAllShopByEnterpriseIdAndName
(
enterpriseId
,
null
,
ShopTypeEnum
.
MALL_SHOP
.
getCode
()).
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result
)){
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
-
1
);
for
(
ShopDTO
shopDTO
:
result
){
if
(
baseSalesDTO
.
getId
().
equals
(
shopDTO
.
getId
())){
baseSalesDTO
.
setAreaName
(
shopDTO
.
getName
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
}
}
});
}
}
if
(
channel
==
StoreChannelEnum
.
WMMALL
.
getChannel
()){
List
<
WmStoreDTO
>
result1
=
wmStoreApiService
.
listWmStore
(
enterpriseId
,
null
).
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result1
)){
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
-
1
);
for
(
WmStoreDTO
dto
:
result1
){
if
(
baseSalesDTO
.
getId
().
equals
(
dto
.
getWmMallStoreId
()+
""
)){
baseSalesDTO
.
setAreaName
(
dto
.
getWmMainAccount
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
}
}
});
}
}
if
(
channel
==
StoreChannelEnum
.
OFFLINE
.
getChannel
()){
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
);
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
level
<
maxLevel
?
1
:
0
);
});
}
}
return
page
;
}
@RequestMapping
(
"get-grade-consume-group"
)
@RequestMapping
(
"get-grade-consume-group"
)
public
RestResponse
queryAgeConsumeShare
(
GradeConsumeAreaQO
params
)
{
public
RestResponse
queryAgeConsumeShare
(
GradeConsumeAreaQO
params
)
{
log
.
info
(
"消费构成-等级-等级段参数:{}"
,
JSON
.
toJSONString
(
params
));
log
.
info
(
"消费构成-等级-等级段参数:{}"
,
JSON
.
toJSONString
(
params
));
...
@@ -364,122 +163,23 @@ public class ConsumeStructureController {
...
@@ -364,122 +163,23 @@ public class ConsumeStructureController {
@RequestMapping
(
"get-birth-consume-area"
)
@RequestMapping
(
"get-birth-consume-area"
)
public
RestResponse
pageWhetherConsumeArea
(
BirthConsumeAreaQO
params
)
{
public
RestResponse
pageWhetherConsumeArea
(
BirthConsumeAreaQO
params
)
{
log
.
info
(
"消费构成-生日会员-区域参数:{}"
,
JSON
.
toJSONString
(
params
));
log
.
info
(
"消费构成-生日会员-区域参数:{}"
,
JSON
.
toJSONString
(
params
));
params
.
setOnlineStoreIdList
(
storeSearchUtils
.
onLineStoreSearch
(
params
.
getUserId
(),
params
.
getEnterpriseId
(),
params
.
getSearchJson
()));
params
.
setStoreInfoIdList
(
storeSearchUtils
.
storeSearch
(
params
.
getUserId
(),
params
.
getEnterpriseId
(),
params
.
getSearchJson
()));
params
.
setGroupIdList
(
storeSearchUtils
.
getChildrenStoreGroupIdList
(
params
.
getParentId
()));
BaseSalesVo
vo
=
new
BaseSalesVo
();
BaseSalesVo
vo
=
new
BaseSalesVo
();
Integer
maxLevel
=
0
;
LevelVo
levelVo
=
this
.
goDownComponent
.
setValue
(
params
,
vo
);
/******线下渠道需要点击下钻,该值只会在线下时才会使用********/
Integer
maxLevel
=
levelVo
.
getMaxLevel
();
LevelVo
levelVo
=
this
.
storeSearchUtils
.
getLevel
(
params
.
getUserId
(),
params
.
getEnterpriseId
(),
params
.
getSearchJson
());
maxLevel
=
levelVo
.
getMaxLevel
();
if
(
params
.
getLevel
()
==
null
){
params
.
setLevel
(
levelVo
.
getLevel
());
}
/***********如果是线下的第一层级,需要展示切换层级按钮*************/
if
(
params
.
getChannel
()
==
StoreChannelEnum
.
OFFLINE
.
getChannel
()
&&
params
.
getLevel
()
==
levelVo
.
getLevel
()){
vo
.
setChangeLevel
(
1
);
}
if
(
params
.
getChannel
()
==
null
){
vo
.
setLevelName
(
"所有渠道"
);
}
else
if
(
params
.
getChannel
()
==
StoreChannelEnum
.
OFFLINE
.
getChannel
()){
vo
.
setLevelName
(
LevelUtil
.
getLevelName
(
params
.
getLevel
()));
}
else
{
vo
.
setLevelName
(
"店铺层级"
);
}
params
.
setCountType
(
1
);
params
.
setCountType
(
1
);
ServiceResponse
<
Page
<
BirthConsumeAreaDTO
>>
pageServiceResponse
=
consumeStructureApiService
.
pageBirthConsumeArea
(
params
);
ServiceResponse
<
Page
<
BirthConsumeAreaDTO
>>
pageServiceResponse
=
consumeStructureApiService
.
pageBirthConsumeArea
(
params
);
vo
.
setPage
(
this
.
parseBirthConsumeAre
a
(
pageServiceResponse
.
getResult
(),
params
.
getChannel
(),
params
.
getEnterpriseId
(),
params
.
getLevel
(),
maxLevel
));
vo
.
setPage
(
this
.
goDownComponent
.
parseDat
a
(
pageServiceResponse
.
getResult
(),
params
.
getChannel
(),
params
.
getEnterpriseId
(),
params
.
getLevel
(),
maxLevel
));
params
.
setCountType
(
2
);
params
.
setCountType
(
2
);
ServiceResponse
<
Page
<
BirthConsumeAreaDTO
>>
response1
=
consumeStructureApiService
.
pageBirthConsumeArea
(
params
);
ServiceResponse
<
Page
<
BirthConsumeAreaDTO
>>
response1
=
consumeStructureApiService
.
pageBirthConsumeArea
(
params
);
if
(
response1
.
isSuccess
()
&&
response1
.
getResult
()
!=
null
&&
CollectionUtils
.
isNotEmpty
(
response1
.
getResult
().
getResult
())){
this
.
goDownComponent
.
parseTotal
(
response1
,
vo
);
BirthConsumeAreaDTO
total
=
response1
.
getResult
().
getResult
().
get
(
0
);
if
(
total
!=
null
){
total
.
setAreaId
(
0
);
total
.
setAreaName
(
"合计/均值"
);
vo
.
setTotal
(
total
);
}
}
if
(
params
.
getChannel
()
!=
null
&&
params
.
getChannel
()
==
1
&&
params
.
getLevel
()
==
levelVo
.
getLevel
()){
if
(
params
.
getChannel
()
!=
null
&&
params
.
getChannel
()
==
1
&&
params
.
getLevel
()
==
levelVo
.
getLevel
()){
params
.
setCountType
(
3
);
//无归属
params
.
setCountType
(
3
);
//无归属
ServiceResponse
<
Page
<
BirthConsumeAreaDTO
>>
response2
=
consumeStructureApiService
.
pageBirthConsumeArea
(
params
);
ServiceResponse
<
Page
<
BirthConsumeAreaDTO
>>
response2
=
consumeStructureApiService
.
pageBirthConsumeArea
(
params
);
if
(
response2
.
isSuccess
()
&&
response2
.
getResult
()
!=
null
&&
CollectionUtils
.
isNotEmpty
(
response2
.
getResult
().
getResult
())){
this
.
goDownComponent
.
parseWgs
(
response2
,
vo
);
BirthConsumeAreaDTO
wgs
=
response2
.
getResult
().
getResult
().
get
(
0
);
if
(
wgs
!=
null
){
wgs
.
setAreaName
(
"无归属"
);
wgs
.
setAreaId
(-
1
);
vo
.
setWgs
(
wgs
);
}
}
}
}
return
RestResponse
.
success
(
vo
);
return
RestResponse
.
success
(
vo
);
}
}
public
Page
<
BirthConsumeAreaDTO
>
parseBirthConsumeArea
(
Page
<
BirthConsumeAreaDTO
>
page
,
Integer
channel
,
Integer
enterpriseId
,
Integer
level
,
Integer
maxLevel
){
if
(
page
!=
null
&&
CollectionUtils
.
isNotEmpty
(
page
.
getResult
())){
if
(
channel
==
null
){
//全渠道
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
-
1
);
if
(
StoreChannelEnum
.
OFFLINE
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getAreaId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
OFFLINE
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
GICMALL
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getAreaId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
GICMALL
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
GICMALL
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
WMMALL
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getAreaId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
WMMALL
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
WMMALL
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
TIANMAO
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getAreaId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
TIANMAO
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
TIANMAO
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
});
}
if
(
channel
==
StoreChannelEnum
.
GICMALL
.
getChannel
()){
List
<
ShopDTO
>
result
=
shopApiService
.
getAllShopByEnterpriseIdAndName
(
enterpriseId
,
null
,
ShopTypeEnum
.
MALL_SHOP
.
getCode
()).
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result
)){
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
-
1
);
for
(
ShopDTO
shopDTO
:
result
){
if
(
baseSalesDTO
.
getId
().
equals
(
shopDTO
.
getId
())){
baseSalesDTO
.
setAreaName
(
shopDTO
.
getName
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
}
}
});
}
}
if
(
channel
==
StoreChannelEnum
.
WMMALL
.
getChannel
()){
List
<
WmStoreDTO
>
result1
=
wmStoreApiService
.
listWmStore
(
enterpriseId
,
null
).
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result1
)){
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
-
1
);
for
(
WmStoreDTO
dto
:
result1
){
if
(
baseSalesDTO
.
getId
().
equals
(
dto
.
getWmMallStoreId
()+
""
)){
baseSalesDTO
.
setAreaName
(
dto
.
getWmMainAccount
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
}
}
});
}
}
if
(
channel
==
StoreChannelEnum
.
OFFLINE
.
getChannel
()){
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
);
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
level
<
maxLevel
?
1
:
0
);
});
}
}
return
page
;
}
@RequestMapping
(
"get-old-consume-rate"
)
@RequestMapping
(
"get-old-consume-rate"
)
public
RestResponse
getOldConsumeRate
(
NewOldConsumeRateQO
params
)
{
public
RestResponse
getOldConsumeRate
(
NewOldConsumeRateQO
params
)
{
log
.
info
(
"消费构成-新老会员-占比参数:{}"
,
JSON
.
toJSONString
(
params
));
log
.
info
(
"消费构成-新老会员-占比参数:{}"
,
JSON
.
toJSONString
(
params
));
...
@@ -510,122 +210,23 @@ public class ConsumeStructureController {
...
@@ -510,122 +210,23 @@ public class ConsumeStructureController {
@RequestMapping
(
"get-old-consume-area"
)
@RequestMapping
(
"get-old-consume-area"
)
public
RestResponse
queryGradeConsumeArea
(
NewOldConsumeAreaQO
params
)
{
public
RestResponse
queryGradeConsumeArea
(
NewOldConsumeAreaQO
params
)
{
log
.
info
(
"消费构成-新老会员-区域参数:{}"
,
JSON
.
toJSONString
(
params
));
log
.
info
(
"消费构成-新老会员-区域参数:{}"
,
JSON
.
toJSONString
(
params
));
params
.
setOnlineStoreIdList
(
storeSearchUtils
.
onLineStoreSearch
(
params
.
getUserId
(),
params
.
getEnterpriseId
(),
params
.
getSearchJson
()));
params
.
setStoreInfoIdList
(
storeSearchUtils
.
storeSearch
(
params
.
getUserId
(),
params
.
getEnterpriseId
(),
params
.
getSearchJson
()));
params
.
setGroupIdList
(
storeSearchUtils
.
getChildrenStoreGroupIdList
(
params
.
getParentId
()));
BaseSalesVo
vo
=
new
BaseSalesVo
();
BaseSalesVo
vo
=
new
BaseSalesVo
();
Integer
maxLevel
=
0
;
LevelVo
levelVo
=
this
.
goDownComponent
.
setValue
(
params
,
vo
);
/******线下渠道需要点击下钻,该值只会在线下时才会使用********/
Integer
maxLevel
=
levelVo
.
getMaxLevel
();
LevelVo
levelVo
=
this
.
storeSearchUtils
.
getLevel
(
params
.
getUserId
(),
params
.
getEnterpriseId
(),
params
.
getSearchJson
());
maxLevel
=
levelVo
.
getMaxLevel
();
if
(
params
.
getLevel
()
==
null
){
params
.
setLevel
(
levelVo
.
getLevel
());
}
/***********如果是线下的第一层级,需要展示切换层级按钮*************/
if
(
params
.
getChannel
()
==
StoreChannelEnum
.
OFFLINE
.
getChannel
()
&&
params
.
getLevel
()
==
levelVo
.
getLevel
()){
vo
.
setChangeLevel
(
1
);
}
if
(
params
.
getChannel
()
==
null
){
vo
.
setLevelName
(
"所有渠道"
);
}
else
if
(
params
.
getChannel
()
==
StoreChannelEnum
.
OFFLINE
.
getChannel
()){
vo
.
setLevelName
(
LevelUtil
.
getLevelName
(
params
.
getLevel
()));
}
else
{
vo
.
setLevelName
(
"店铺层级"
);
}
params
.
setCountType
(
1
);
params
.
setCountType
(
1
);
ServiceResponse
<
Page
<
NewOldConsumeAreaDTO
>>
pageServiceResponse
=
consumeStructureApiService
.
pageNewOldConsumeArea
(
params
);
ServiceResponse
<
Page
<
NewOldConsumeAreaDTO
>>
pageServiceResponse
=
consumeStructureApiService
.
pageNewOldConsumeArea
(
params
);
vo
.
setPage
(
this
.
parseNewOldConsumeAre
a
(
pageServiceResponse
.
getResult
(),
params
.
getChannel
(),
params
.
getEnterpriseId
(),
params
.
getLevel
(),
maxLevel
));
vo
.
setPage
(
this
.
goDownComponent
.
parseDat
a
(
pageServiceResponse
.
getResult
(),
params
.
getChannel
(),
params
.
getEnterpriseId
(),
params
.
getLevel
(),
maxLevel
));
params
.
setCountType
(
2
);
params
.
setCountType
(
2
);
ServiceResponse
<
Page
<
NewOldConsumeAreaDTO
>>
response1
=
consumeStructureApiService
.
pageNewOldConsumeArea
(
params
);
ServiceResponse
<
Page
<
NewOldConsumeAreaDTO
>>
response1
=
consumeStructureApiService
.
pageNewOldConsumeArea
(
params
);
if
(
response1
.
isSuccess
()
&&
response1
.
getResult
()
!=
null
&&
CollectionUtils
.
isNotEmpty
(
response1
.
getResult
().
getResult
())){
this
.
goDownComponent
.
parseTotal
(
response1
,
vo
);
NewOldConsumeAreaDTO
total
=
response1
.
getResult
().
getResult
().
get
(
0
);
if
(
total
!=
null
){
total
.
setAreaId
(
0
);
total
.
setAreaName
(
"合计/均值"
);
vo
.
setTotal
(
total
);
}
}
if
(
params
.
getChannel
()
!=
null
&&
params
.
getChannel
()
==
1
&&
params
.
getLevel
()
==
levelVo
.
getLevel
()){
if
(
params
.
getChannel
()
!=
null
&&
params
.
getChannel
()
==
1
&&
params
.
getLevel
()
==
levelVo
.
getLevel
()){
params
.
setCountType
(
3
);
//无归属
params
.
setCountType
(
3
);
//无归属
ServiceResponse
<
Page
<
NewOldConsumeAreaDTO
>>
response2
=
consumeStructureApiService
.
pageNewOldConsumeArea
(
params
);
ServiceResponse
<
Page
<
NewOldConsumeAreaDTO
>>
response2
=
consumeStructureApiService
.
pageNewOldConsumeArea
(
params
);
if
(
response2
.
isSuccess
()
&&
response2
.
getResult
()
!=
null
&&
CollectionUtils
.
isNotEmpty
(
response2
.
getResult
().
getResult
())){
this
.
goDownComponent
.
parseWgs
(
response2
,
vo
);
NewOldConsumeAreaDTO
wgs
=
response2
.
getResult
().
getResult
().
get
(
0
);
if
(
wgs
!=
null
){
wgs
.
setAreaName
(
"无归属"
);
wgs
.
setAreaId
(-
1
);
vo
.
setWgs
(
wgs
);
}
}
}
}
return
RestResponse
.
success
(
vo
);
return
RestResponse
.
success
(
vo
);
}
}
public
Page
<
NewOldConsumeAreaDTO
>
parseNewOldConsumeArea
(
Page
<
NewOldConsumeAreaDTO
>
page
,
Integer
channel
,
Integer
enterpriseId
,
Integer
level
,
Integer
maxLevel
){
if
(
page
!=
null
&&
CollectionUtils
.
isNotEmpty
(
page
.
getResult
())){
if
(
channel
==
null
){
//全渠道
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
-
1
);
if
(
StoreChannelEnum
.
OFFLINE
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getAreaId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
OFFLINE
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
GICMALL
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getAreaId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
GICMALL
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
GICMALL
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
WMMALL
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getAreaId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
WMMALL
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
WMMALL
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
TIANMAO
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getAreaId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
TIANMAO
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
TIANMAO
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
});
}
if
(
channel
==
StoreChannelEnum
.
GICMALL
.
getChannel
()){
List
<
ShopDTO
>
result
=
shopApiService
.
getAllShopByEnterpriseIdAndName
(
enterpriseId
,
null
,
ShopTypeEnum
.
MALL_SHOP
.
getCode
()).
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result
)){
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
-
1
);
for
(
ShopDTO
shopDTO
:
result
){
if
(
baseSalesDTO
.
getId
().
equals
(
shopDTO
.
getId
())){
baseSalesDTO
.
setAreaName
(
shopDTO
.
getName
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
}
}
});
}
}
if
(
channel
==
StoreChannelEnum
.
WMMALL
.
getChannel
()){
List
<
WmStoreDTO
>
result1
=
wmStoreApiService
.
listWmStore
(
enterpriseId
,
null
).
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result1
)){
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
-
1
);
for
(
WmStoreDTO
dto
:
result1
){
if
(
baseSalesDTO
.
getId
().
equals
(
dto
.
getWmMallStoreId
()+
""
)){
baseSalesDTO
.
setAreaName
(
dto
.
getWmMainAccount
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
}
}
});
}
}
if
(
channel
==
StoreChannelEnum
.
OFFLINE
.
getChannel
()){
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
);
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
level
<
maxLevel
?
1
:
0
);
});
}
}
return
page
;
}
@RequestMapping
(
"get-whether-consume-rate"
)
@RequestMapping
(
"get-whether-consume-rate"
)
public
RestResponse
getWhetherConsumeRate
(
WhetherConsumeRateQO
params
)
{
public
RestResponse
getWhetherConsumeRate
(
WhetherConsumeRateQO
params
)
{
log
.
info
(
"消费构成-是否会员-占比参数:{}"
,
JSON
.
toJSONString
(
params
));
log
.
info
(
"消费构成-是否会员-占比参数:{}"
,
JSON
.
toJSONString
(
params
));
...
@@ -656,119 +257,20 @@ public class ConsumeStructureController {
...
@@ -656,119 +257,20 @@ public class ConsumeStructureController {
@RequestMapping
(
"get-whether-consume-area"
)
@RequestMapping
(
"get-whether-consume-area"
)
public
RestResponse
pageWhetherConsumeArea
(
WhetherConsumeAreaQO
params
)
{
public
RestResponse
pageWhetherConsumeArea
(
WhetherConsumeAreaQO
params
)
{
log
.
info
(
"消费构成-是否会员-区域参数:{}"
,
JSON
.
toJSONString
(
params
));
log
.
info
(
"消费构成-是否会员-区域参数:{}"
,
JSON
.
toJSONString
(
params
));
params
.
setOnlineStoreIdList
(
storeSearchUtils
.
onLineStoreSearch
(
params
.
getUserId
(),
params
.
getEnterpriseId
(),
params
.
getSearchJson
()));
params
.
setStoreInfoIdList
(
storeSearchUtils
.
storeSearch
(
params
.
getUserId
(),
params
.
getEnterpriseId
(),
params
.
getSearchJson
()));
params
.
setGroupIdList
(
storeSearchUtils
.
getChildrenStoreGroupIdList
(
params
.
getParentId
()));
BaseSalesVo
vo
=
new
BaseSalesVo
();
BaseSalesVo
vo
=
new
BaseSalesVo
();
Integer
maxLevel
=
0
;
LevelVo
levelVo
=
this
.
goDownComponent
.
setValue
(
params
,
vo
);
/******线下渠道需要点击下钻,该值只会在线下时才会使用********/
Integer
maxLevel
=
levelVo
.
getMaxLevel
();
LevelVo
levelVo
=
this
.
storeSearchUtils
.
getLevel
(
params
.
getUserId
(),
params
.
getEnterpriseId
(),
params
.
getSearchJson
());
maxLevel
=
levelVo
.
getMaxLevel
();
if
(
params
.
getLevel
()
==
null
){
params
.
setLevel
(
levelVo
.
getLevel
());
}
/***********如果是线下的第一层级,需要展示切换层级按钮*************/
if
(
params
.
getChannel
()
==
StoreChannelEnum
.
OFFLINE
.
getChannel
()
&&
params
.
getLevel
()
==
levelVo
.
getLevel
()){
vo
.
setChangeLevel
(
1
);
}
if
(
params
.
getChannel
()
==
null
){
vo
.
setLevelName
(
"所有渠道"
);
}
else
if
(
params
.
getChannel
()
==
StoreChannelEnum
.
OFFLINE
.
getChannel
()){
vo
.
setLevelName
(
LevelUtil
.
getLevelName
(
params
.
getLevel
()));
}
else
{
vo
.
setLevelName
(
"店铺层级"
);
}
params
.
setCountType
(
1
);
params
.
setCountType
(
1
);
ServiceResponse
<
Page
<
WhetherConsumeAreaDTO
>>
pageServiceResponse
=
consumeStructureApiService
.
pageWhetherConsumeArea
(
params
);
ServiceResponse
<
Page
<
WhetherConsumeAreaDTO
>>
pageServiceResponse
=
consumeStructureApiService
.
pageWhetherConsumeArea
(
params
);
vo
.
setPage
(
this
.
parseWhetherConsumeAre
a
(
pageServiceResponse
.
getResult
(),
params
.
getChannel
(),
params
.
getEnterpriseId
(),
params
.
getLevel
(),
maxLevel
));
vo
.
setPage
(
this
.
goDownComponent
.
parseDat
a
(
pageServiceResponse
.
getResult
(),
params
.
getChannel
(),
params
.
getEnterpriseId
(),
params
.
getLevel
(),
maxLevel
));
params
.
setCountType
(
2
);
params
.
setCountType
(
2
);
ServiceResponse
<
Page
<
WhetherConsumeAreaDTO
>>
response1
=
consumeStructureApiService
.
pageWhetherConsumeArea
(
params
);
ServiceResponse
<
Page
<
WhetherConsumeAreaDTO
>>
response1
=
consumeStructureApiService
.
pageWhetherConsumeArea
(
params
);
if
(
response1
.
isSuccess
()
&&
response1
.
getResult
()
!=
null
&&
CollectionUtils
.
isNotEmpty
(
response1
.
getResult
().
getResult
())){
this
.
goDownComponent
.
parseTotal
(
response1
,
vo
);
WhetherConsumeAreaDTO
total
=
response1
.
getResult
().
getResult
().
get
(
0
);
if
(
total
!=
null
){
total
.
setAreaId
(
0
);
total
.
setAreaName
(
"合计/均值"
);
vo
.
setTotal
(
total
);
}
}
if
(
params
.
getChannel
()
!=
null
&&
params
.
getChannel
()
==
1
&&
params
.
getLevel
()
==
levelVo
.
getLevel
()){
if
(
params
.
getChannel
()
!=
null
&&
params
.
getChannel
()
==
1
&&
params
.
getLevel
()
==
levelVo
.
getLevel
()){
params
.
setCountType
(
3
);
//无归属
params
.
setCountType
(
3
);
//无归属
ServiceResponse
<
Page
<
WhetherConsumeAreaDTO
>>
response2
=
consumeStructureApiService
.
pageWhetherConsumeArea
(
params
);
ServiceResponse
<
Page
<
WhetherConsumeAreaDTO
>>
response2
=
consumeStructureApiService
.
pageWhetherConsumeArea
(
params
);
if
(
response2
.
isSuccess
()
&&
response2
.
getResult
()
!=
null
&&
CollectionUtils
.
isNotEmpty
(
response2
.
getResult
().
getResult
())){
this
.
goDownComponent
.
parseWgs
(
response2
,
vo
);
WhetherConsumeAreaDTO
wgs
=
response2
.
getResult
().
getResult
().
get
(
0
);
if
(
wgs
!=
null
){
wgs
.
setAreaName
(
"无归属"
);
wgs
.
setAreaId
(-
1
);
vo
.
setWgs
(
wgs
);
}
}
}
}
return
RestResponse
.
success
(
vo
);
return
RestResponse
.
success
(
vo
);
}
}
public
Page
<
WhetherConsumeAreaDTO
>
parseWhetherConsumeArea
(
Page
<
WhetherConsumeAreaDTO
>
page
,
Integer
channel
,
Integer
enterpriseId
,
Integer
level
,
Integer
maxLevel
){
if
(
page
!=
null
&&
CollectionUtils
.
isNotEmpty
(
page
.
getResult
())){
if
(
channel
==
null
){
//全渠道
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
-
1
);
if
(
StoreChannelEnum
.
OFFLINE
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getAreaId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
OFFLINE
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
GICMALL
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getAreaId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
GICMALL
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
GICMALL
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
WMMALL
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getAreaId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
WMMALL
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
WMMALL
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
TIANMAO
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getAreaId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
TIANMAO
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
TIANMAO
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
});
}
if
(
channel
==
StoreChannelEnum
.
GICMALL
.
getChannel
()){
List
<
ShopDTO
>
result
=
shopApiService
.
getAllShopByEnterpriseIdAndName
(
enterpriseId
,
null
,
ShopTypeEnum
.
MALL_SHOP
.
getCode
()).
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result
)){
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
-
1
);
for
(
ShopDTO
shopDTO
:
result
){
if
(
baseSalesDTO
.
getId
().
equals
(
shopDTO
.
getId
())){
baseSalesDTO
.
setAreaName
(
shopDTO
.
getName
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
}
}
});
}
}
if
(
channel
==
StoreChannelEnum
.
WMMALL
.
getChannel
()){
List
<
WmStoreDTO
>
result1
=
wmStoreApiService
.
listWmStore
(
enterpriseId
,
null
).
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result1
)){
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
-
1
);
for
(
WmStoreDTO
dto
:
result1
){
if
(
baseSalesDTO
.
getId
().
equals
(
dto
.
getWmMallStoreId
()+
""
)){
baseSalesDTO
.
setAreaName
(
dto
.
getWmMainAccount
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
}
}
});
}
}
if
(
channel
==
StoreChannelEnum
.
OFFLINE
.
getChannel
()){
page
.
getResult
().
stream
().
forEach
(
baseSalesDTO
->
{
baseSalesDTO
.
setLevel
(
level
);
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
level
<
maxLevel
?
1
:
0
);
});
}
}
return
page
;
}
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/controller/GoDownComponent.java
0 → 100644
View file @
aa343331
package
com
.
gic
.
cloud
.
web
.
controller
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.cloud.web.auth.DataAuthUtils
;
import
com.gic.cloud.web.constant.StoreChannelEnum
;
import
com.gic.cloud.web.utils.LevelUtil
;
import
com.gic.cloud.web.vo.BaseSalesVo
;
import
com.gic.cloud.web.vo.LevelVo
;
import
com.gic.data.api.dto.BaseDTO
;
import
com.gic.data.api.dto.BaseSalesDTO
;
import
com.gic.data.api.qo.common.CommonQO
;
import
com.gic.enterprise.dto.WmStoreDTO
;
import
com.gic.enterprise.service.WmStoreApiService
;
import
com.gic.mall.share.api.dto.shop.ShopDTO
;
import
com.gic.mall.share.api.enums.ShopTypeEnum
;
import
com.gic.mall.share.api.service.ShopApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
@Component
public
class
GoDownComponent
{
@Autowired
private
ShopApiService
shopApiService
;
@Autowired
private
WmStoreApiService
wmStoreApiService
;
@Autowired
private
StoreSearchUtils
storeSearchUtils
;
@Autowired
private
DataAuthUtils
dataAuthUtils
;
public
void
parseTotal
(
ServiceResponse
<?>
response
,
BaseSalesVo
vo
){
if
(
response
.
isSuccess
()
&&
response
.
getResult
()
!=
null
){
Page
<
BaseDTO
>
page
=
(
Page
<
BaseDTO
>)
response
.
getResult
();
if
(
CollectionUtils
.
isEmpty
(
page
.
getResult
())){
return
;
}
BaseDTO
total
=
page
.
getResult
().
get
(
0
);
if
(
total
!=
null
){
total
.
setAreaId
(
"0"
);
total
.
setAreaName
(
"合计/均值"
);
vo
.
setTotal
(
total
);
}
}
}
public
void
parseWgs
(
ServiceResponse
<?>
response
,
BaseSalesVo
vo
){
if
(
response
.
isSuccess
()
&&
response
.
getResult
()
!=
null
){
Page
<
BaseDTO
>
page
=
(
Page
<
BaseDTO
>)
response
.
getResult
();
if
(
CollectionUtils
.
isEmpty
(
page
.
getResult
())){
return
;
}
BaseDTO
wgs
=
page
.
getResult
().
get
(
0
);
if
(
wgs
!=
null
){
wgs
.
setAreaName
(
"无归属"
);
wgs
.
setAreaId
(
"-1"
);
vo
.
setWgs
(
wgs
);
}
}
}
public
LevelVo
setValue
(
CommonQO
params
,
BaseSalesVo
vo
){
params
.
setOnlineStoreIdList
(
storeSearchUtils
.
onLineStoreSearch
(
params
.
getUserId
(),
params
.
getEnterpriseId
(),
params
.
getSearchJson
()));
params
.
setStoreInfoIdList
(
storeSearchUtils
.
storeSearch
(
params
.
getUserId
(),
params
.
getEnterpriseId
(),
params
.
getSearchJson
()));
params
.
setGroupIdList
(
storeSearchUtils
.
getChildrenStoreGroupIdList
(
params
.
getParentId
()));
params
.
setMemberCardIdList
(
dataAuthUtils
.
getMbrAreaId
(
params
.
getUserId
(),
params
.
getEnterpriseId
()));
/******线下渠道需要点击下钻,该值只会在线下时才会使用********/
LevelVo
levelVo
=
this
.
storeSearchUtils
.
getLevel
(
params
.
getUserId
(),
params
.
getEnterpriseId
(),
params
.
getSearchJson
());
if
(
params
.
getLevel
()
==
null
){
params
.
setLevel
(
levelVo
.
getLevel
());
}
/***********如果是线下的第一层级,需要展示切换层级按钮*************/
if
(
params
.
getChannel
()
==
StoreChannelEnum
.
OFFLINE
.
getChannel
()
&&
params
.
getLevel
()
==
levelVo
.
getLevel
()){
vo
.
setChangeLevel
(
1
);
}
if
(
params
.
getChannel
()
==
null
){
vo
.
setLevelName
(
"所有渠道"
);
}
else
if
(
params
.
getChannel
()
==
StoreChannelEnum
.
OFFLINE
.
getChannel
()){
vo
.
setLevelName
(
LevelUtil
.
getLevelName
(
params
.
getLevel
()));
}
else
{
vo
.
setLevelName
(
"店铺层级"
);
}
return
levelVo
;
}
public
Page
<?>
parseData
(
Page
<?>
page
,
Integer
channel
,
Integer
enterpriseId
,
Integer
level
,
Integer
maxLevel
){
if
(
page
!=
null
&&
CollectionUtils
.
isNotEmpty
(
page
.
getResult
())){
if
(
channel
==
null
){
//全渠道
page
.
getResult
().
stream
().
forEach
(
b
->
{
BaseDTO
baseSalesDTO
=
(
BaseDTO
)
b
;
baseSalesDTO
.
setLevel
(
level
-
1
);
if
(
StoreChannelEnum
.
OFFLINE
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getId
())){
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
OFFLINE
.
getMessage
());
baseSalesDTO
.
setName
(
StoreChannelEnum
.
OFFLINE
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
GICMALL
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getId
())){
baseSalesDTO
.
setName
(
StoreChannelEnum
.
GICMALL
.
getMessage
());
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
GICMALL
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
GICMALL
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
WMMALL
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getId
())){
baseSalesDTO
.
setName
(
StoreChannelEnum
.
WMMALL
.
getMessage
());
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
WMMALL
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
WMMALL
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
if
(
StoreChannelEnum
.
TIANMAO
.
getChannel
()
==
Integer
.
valueOf
(
baseSalesDTO
.
getId
())){
baseSalesDTO
.
setName
(
StoreChannelEnum
.
TIANMAO
.
getMessage
());
baseSalesDTO
.
setAreaName
(
StoreChannelEnum
.
TIANMAO
.
getMessage
());
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
TIANMAO
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
1
);
}
});
}
if
(
channel
==
StoreChannelEnum
.
GICMALL
.
getChannel
()){
List
<
ShopDTO
>
result
=
shopApiService
.
getAllShopByEnterpriseIdAndName
(
enterpriseId
,
null
,
ShopTypeEnum
.
MALL_SHOP
.
getCode
()).
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result
)){
page
.
getResult
().
stream
().
forEach
(
b
->
{
BaseDTO
baseSalesDTO
=
(
BaseDTO
)
b
;
baseSalesDTO
.
setLevel
(
level
-
1
);
for
(
ShopDTO
shopDTO
:
result
){
if
(
baseSalesDTO
instanceof
BaseSalesDTO
){
if
(
baseSalesDTO
.
getId
().
equals
(
shopDTO
.
getId
()+
""
)){
baseSalesDTO
.
setName
(
shopDTO
.
getName
());
baseSalesDTO
.
setChannel
(
channel
);
}
}
else
{
if
(
baseSalesDTO
.
getAreaId
().
equals
(
shopDTO
.
getId
()+
""
)){
baseSalesDTO
.
setAreaName
(
shopDTO
.
getName
());
baseSalesDTO
.
setChannel
(
channel
);
}
}
}
});
}
}
if
(
channel
==
StoreChannelEnum
.
WMMALL
.
getChannel
()){
List
<
WmStoreDTO
>
result1
=
wmStoreApiService
.
listWmStore
(
enterpriseId
,
null
).
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result1
)){
page
.
getResult
().
stream
().
forEach
(
b
->
{
BaseDTO
baseSalesDTO
=
(
BaseDTO
)
b
;
baseSalesDTO
.
setLevel
(
level
-
1
);
for
(
WmStoreDTO
dto
:
result1
){
if
(
baseSalesDTO
instanceof
BaseSalesDTO
){
if
(
baseSalesDTO
.
getId
().
equals
(
dto
.
getWmMallStoreId
()+
""
)){
baseSalesDTO
.
setName
(
dto
.
getWmMainAccount
());
baseSalesDTO
.
setChannel
(
channel
);
}
}
else
{
if
(
baseSalesDTO
.
getAreaId
().
equals
(
dto
.
getWmMallStoreId
()+
""
)){
baseSalesDTO
.
setAreaName
(
dto
.
getWmMainAccount
());
baseSalesDTO
.
setChannel
(
channel
);
}
}
}
});
}
}
if
(
channel
==
StoreChannelEnum
.
OFFLINE
.
getChannel
()){
page
.
getResult
().
stream
().
forEach
(
b
->
{
BaseDTO
baseSalesDTO
=
(
BaseDTO
)
b
;
baseSalesDTO
.
setLevel
(
level
);
baseSalesDTO
.
setChannel
(
StoreChannelEnum
.
OFFLINE
.
getChannel
());
baseSalesDTO
.
setHasChildren
(
level
<
maxLevel
?
1
:
0
);
});
}
}
return
page
;
}
}
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