Commit d1ca647e by 陶光胜

Merge branch 'developer' of…

Merge branch 'developer' of http://115.159.76.241/base_platform_enterprise/gic-data-cloud into developer
parents e2be2312 02fc0b23
......@@ -65,8 +65,8 @@ public class DataExplainController {
}
@RequestMapping("/list-data-explain")
public RestResponse listDataExplain(DataExplainQo dataExplainQO) {
ServiceResponse<Page<DataExplainDTO>> serviceResponse = dataExplainApiService.listDataExplain(dataExplainQO);
public RestResponse listDataExplain(DataExplainQo dataExplainQo) {
ServiceResponse<Page<DataExplainDTO>> serviceResponse = dataExplainApiService.listDataExplain(dataExplainQo);
return ResultControllerUtils.commonResult(serviceResponse);
}
......
......@@ -46,8 +46,8 @@ public class IndexController {
@RequestMapping("/save-index")
public RestResponse saveIndex(IndexQo indexQO, String relModuleIds) {
IndexDTO indexDTO = EntityUtil.changeEntityByJSON(IndexDTO.class, indexQO);
public RestResponse saveIndex(IndexQo indexQo, String relModuleIds) {
IndexDTO indexDTO = EntityUtil.changeEntityByJSON(IndexDTO.class, indexQo);
if (indexDTO.getClassifyType() == null ||
StringUtils.isBlank(indexDTO.getCode()) ||
StringUtils.isBlank(indexDTO.getName()) ||
......@@ -90,14 +90,14 @@ public class IndexController {
}
@RequestMapping("/list-index")
public RestResponse listIndex(IndexQo indexQO) {
ServiceResponse<Page<IndexDTO>> serviceResponse = indexApiService.listIndex(indexQO);
public RestResponse listIndex(IndexQo indexQo) {
ServiceResponse<Page<IndexDTO>> serviceResponse = indexApiService.listIndex(indexQo);
return ResultControllerUtils.commonResult(serviceResponse);
}
@RequestMapping("/list-all-index")
public RestResponse listAllIndex(IndexQo indexQO) {
ServiceResponse<List<IndexDTO>> serviceResponse = indexApiService.listAllIndex(indexQO);
public RestResponse listAllIndex(IndexQo indexQo) {
ServiceResponse<List<IndexDTO>> serviceResponse = indexApiService.listAllIndex(indexQo);
return ResultControllerUtils.commonResult(serviceResponse);
}
......
......@@ -74,8 +74,8 @@ public interface TabDataExplainMapper {
* @Title: listDataExplain

* @Description:

* @author zhiwj
* @param dataExplainQO
* @param dataExplainQo
* @return com.github.pagehelper.Page<com.gic.cloud.entity.TabDataExplain>


*/
Page<TabDataExplain> listDataExplain(DataExplainQo dataExplainQO);
Page<TabDataExplain> listDataExplain(DataExplainQo dataExplainQo);
}
\ No newline at end of file
......@@ -74,8 +74,8 @@ public interface TabIndexMapper {
* @Title: listIndex

* @Description:

* @author guojuxing
* @param indexQO
* @param indexQo
* @return com.github.pagehelper.Page<com.gic.cloud.entity.TabIndex>


*/
Page<TabIndex> listIndex(IndexQo indexQO);
Page<TabIndex> listIndex(IndexQo indexQo);
}
\ No newline at end of file
......@@ -60,20 +60,20 @@ public interface DataExplainService {
* @Title: listDataExplain

* @Description:

* @author zhiwj
* @param dataExplainQO
* @param dataExplainQo
* @return com.github.pagehelper.Page<com.gic.cloud.entity.TabDataExplain>


*/
Page<TabDataExplain> listDataExplain(DataExplainQo dataExplainQO);
Page<TabDataExplain> listDataExplain(DataExplainQo dataExplainQo);
/**
* 查询数据解读列表数据
* @Title: listAllDataExplain

* @Description:

* @author zhiwj
* @param dataExplainQO
* @param dataExplainQo
* @return java.util.List<com.gic.cloud.entity.TabDataExplain>


*/
List<TabDataExplain> listAllDataExplain(DataExplainQo dataExplainQO);
List<TabDataExplain> listAllDataExplain(DataExplainQo dataExplainQo);
/**
* 删除数据解读
......
......@@ -71,20 +71,20 @@ public interface IndexService {
* @Title: listIndex

* @Description:

* @author zhiwj
* @param indexQO
* @param indexQo
* @return com.github.pagehelper.Page<com.gic.cloud.entity.TabIndex>


*/
Page<TabIndex> listIndex(IndexQo indexQO);
Page<TabIndex> listIndex(IndexQo indexQo);
/**
* 查询指标字典
* @Title: listAllIndex

* @Description:

* @author zhiwj
* @param indexQO
* @param indexQo
* @return java.util.List<com.gic.cloud.entity.TabIndex>


*/
List<TabIndex> listAllIndex(IndexQo indexQO);
List<TabIndex> listAllIndex(IndexQo indexQo);
/**
* 删除指标字典
......
......@@ -54,14 +54,14 @@ public class DataExplainServiceImpl implements DataExplainService {
}
@Override
public Page<TabDataExplain> listDataExplain(DataExplainQo dataExplainQO) {
PageHelper.startPage(dataExplainQO.getCurrentPage(), dataExplainQO.getPageSize());
return tabDataExplainMapper.listDataExplain(dataExplainQO);
public Page<TabDataExplain> listDataExplain(DataExplainQo dataExplainQo) {
PageHelper.startPage(dataExplainQo.getCurrentPage(), dataExplainQo.getPageSize());
return tabDataExplainMapper.listDataExplain(dataExplainQo);
}
@Override
public List<TabDataExplain> listAllDataExplain(DataExplainQo dataExplainQO) {
return tabDataExplainMapper.listDataExplain(dataExplainQO);
public List<TabDataExplain> listAllDataExplain(DataExplainQo dataExplainQo) {
return tabDataExplainMapper.listDataExplain(dataExplainQo);
}
@Override
......
......@@ -73,22 +73,22 @@ public class IndexServiceImpl implements IndexService {
}
@Override
public Page<TabIndex> listIndex(IndexQo indexQO) {
PageHelper.startPage(indexQO.getCurrentPage(), indexQO.getPageSize());
if (StringUtils.isNotBlank(indexQO.getModuleId())) {
List<Integer> indexIdList = indexModuleRelService.listBusinessIdByModuleIds(Arrays.asList(indexQO.getModuleId().split(",")));
indexQO.setIndexIdList(indexIdList);
public Page<TabIndex> listIndex(IndexQo indexQo) {
PageHelper.startPage(indexQo.getCurrentPage(), indexQo.getPageSize());
if (StringUtils.isNotBlank(indexQo.getModuleId())) {
List<Integer> indexIdList = indexModuleRelService.listBusinessIdByModuleIds(Arrays.asList(indexQo.getModuleId().split(",")));
indexQo.setIndexIdList(indexIdList);
}
if (indexQO.getIndexGroupId() != null) {
List<Integer> indexGroupIdList = indexGroupService.listChildIndexGroup(indexQO.getIndexGroupId());
indexQO.setIndexGroupIdList(indexGroupIdList);
if (indexQo.getIndexGroupId() != null) {
List<Integer> indexGroupIdList = indexGroupService.listChildIndexGroup(indexQo.getIndexGroupId());
indexQo.setIndexGroupIdList(indexGroupIdList);
}
return tabIndexMapper.listIndex(indexQO);
return tabIndexMapper.listIndex(indexQo);
}
@Override
public List<TabIndex> listAllIndex(IndexQo indexQO) {
return tabIndexMapper.listIndex(indexQO);
public List<TabIndex> listAllIndex(IndexQo indexQo) {
return tabIndexMapper.listIndex(indexQo);
}
@Override
......@@ -101,15 +101,15 @@ public class IndexServiceImpl implements IndexService {
@Override
public TabIndex getByIndexCode(String moduleId, String indexCode) {
IndexQo indexQO = new IndexQo();
IndexQo indexQo = new IndexQo();
PageHelper.startPage(1, 1);
List<Integer> indexIdList = indexModuleRelService.listBusinessIdByModuleIds(Collections.singletonList(moduleId));
if (CollectionUtils.isEmpty(indexIdList)) {
return null;
}
indexQO.setIndexIdList(indexIdList);
indexQO.setCode(indexCode);
Page<TabIndex> page = tabIndexMapper.listIndex(indexQO);
indexQo.setIndexIdList(indexIdList);
indexQo.setCode(indexCode);
Page<TabIndex> page = tabIndexMapper.listIndex(indexQo);
if (CollectionUtils.isEmpty(page)) {
return null;
} else {
......
......@@ -79,8 +79,8 @@ public class DataExplainApiServiceImpl implements DataExplainApiService {
}
@Override
public ServiceResponse<Page<DataExplainDTO>> listDataExplain(DataExplainQo dataExplainQO) {
com.github.pagehelper.Page<TabDataExplain> listDataExplain = this.dataExplainService.listDataExplain(dataExplainQO);
public ServiceResponse<Page<DataExplainDTO>> listDataExplain(DataExplainQo dataExplainQo) {
com.github.pagehelper.Page<TabDataExplain> listDataExplain = this.dataExplainService.listDataExplain(dataExplainQo);
Page<DataExplainDTO> dtoPage = PageHelperUtils.changePageHelperToCurrentPage(listDataExplain, DataExplainDTO.class);
return EnterpriseServiceResponse.success(dtoPage);
}
......@@ -121,9 +121,9 @@ public class DataExplainApiServiceImpl implements DataExplainApiService {
@Override
public ServiceResponse<DataExplainDTO> listByModule(String moduleId) {
DataExplainQo dataExplainQO = new DataExplainQo();
dataExplainQO.setModuleId(moduleId);
List<TabDataExplain> dataExplainList = dataExplainService.listAllDataExplain(dataExplainQO);
DataExplainQo dataExplainQo = new DataExplainQo();
dataExplainQo.setModuleId(moduleId);
List<TabDataExplain> dataExplainList = dataExplainService.listAllDataExplain(dataExplainQo);
if (CollectionUtils.isNotEmpty(dataExplainList)) {
return EnterpriseServiceResponse.success(EntityUtil.changeEntityByJSON(DataExplainDTO.class, dataExplainList.get(0)));
} else {
......
......@@ -104,9 +104,9 @@ public class IndexApiServiceImpl implements IndexApiService {
}
if (StringUtils.isNotBlank(indexDTO.getRelTopLevel())) {
List<Integer> idsList = Stream.of(indexDTO.getRelTopLevel().split(GlobalInfo.FLAG_COMMA)).map(Integer::valueOf).collect(Collectors.toList());
IndexQo indexQO = new IndexQo();
indexQO.setIndexIdList(idsList);
List<TabIndex> indexList = this.indexService.listAllIndex(indexQO);
IndexQo indexQo = new IndexQo();
indexQo.setIndexIdList(idsList);
List<TabIndex> indexList = this.indexService.listAllIndex(indexQo);
String repTopLevelName = Optional.ofNullable(indexList).orElse(Collections.emptyList())
.stream().map(TabIndex::getName).collect(Collectors.joining(","));
indexDTO.setRelTopLevelName(repTopLevelName);
......@@ -115,13 +115,13 @@ public class IndexApiServiceImpl implements IndexApiService {
}
@Override
public ServiceResponse<Page<IndexDTO>> listIndex(IndexQo indexQO) {
com.github.pagehelper.Page<TabIndex> indexList = indexService.listIndex(indexQO);
Page<IndexDTO> indexDTOPage = PageHelperUtils.changePageHelperToCurrentPage(indexList, IndexDTO.class);
public ServiceResponse<Page<IndexDTO>> listIndex(IndexQo indexQo) {
com.github.pagehelper.Page<TabIndex> indexList = indexService.listIndex(indexQo);
Page<IndexDTO> indexDtoPage = PageHelperUtils.changePageHelperToCurrentPage(indexList, IndexDTO.class);
if (CollectionUtils.isNotEmpty(indexList)) {
List<Integer> indexIdList = indexList.stream().map(TabIndex::getIndexId).collect(Collectors.toList());
Map<Integer, List<String>> moduleIdByBusinessIdMap = indexModuleRelService.groupModuleIdByBusinessIds(indexIdList, LogAndUpdateTipsTypeEnum.INDEX.getCode());
List<IndexDTO> indexDTOList = indexDTOPage.getResult();
List<IndexDTO> indexDTOList = indexDtoPage.getResult();
HashMap<Integer, String> cache = new HashMap<>(16);
for (IndexDTO indexDTO : indexDTOList) {
indexDTO.setRelModuleIdList(moduleIdByBusinessIdMap.get(indexDTO.getIndexId()));
......@@ -131,7 +131,7 @@ public class IndexApiServiceImpl implements IndexApiService {
}
}
}
return EnterpriseServiceResponse.success(indexDTOPage);
return EnterpriseServiceResponse.success(indexDtoPage);
}
private String getIndexGroupName(HashMap<Integer, String> cache, Integer indexGroupId) {
......@@ -147,8 +147,8 @@ public class IndexApiServiceImpl implements IndexApiService {
}
@Override
public ServiceResponse<List<IndexDTO>> listAllIndex(IndexQo indexQO) {
List<TabIndex> tabIndices = indexService.listAllIndex(indexQO);
public ServiceResponse<List<IndexDTO>> listAllIndex(IndexQo indexQo) {
List<TabIndex> tabIndices = indexService.listAllIndex(indexQo);
List<IndexDTO> dtoList = EntityUtil.changeEntityListByJSON(IndexDTO.class, tabIndices);
return EnterpriseServiceResponse.success(dtoList);
}
......@@ -183,9 +183,9 @@ public class IndexApiServiceImpl implements IndexApiService {
@Override
public ServiceResponse<List<IndexDTO>> listByModule(String moduleId) {
IndexQo indexQO = new IndexQo();
indexQO.setModuleId(moduleId);
List<TabIndex> indexList = indexService.listAllIndex(indexQO);
IndexQo indexQo = new IndexQo();
indexQo.setModuleId(moduleId);
List<TabIndex> indexList = indexService.listAllIndex(indexQo);
return EnterpriseServiceResponse.success(EntityUtil.changeEntityListByJSON(IndexDTO.class, indexList));
}
}
......@@ -54,7 +54,7 @@ public class BaseSalesController {
Integer maxLevel = 0;
/******线下渠道需要点击下钻,该值只会在线下时才会使用********/
LevelVo levelVo = this.storeSearchUtils.getLevel(qo.getUserId(), qo.getEnterpriseId(), qo.getSearchJSON());
LevelVo levelVo = this.storeSearchUtils.getLevel(qo.getUserId(), qo.getEnterpriseId(), qo.getSearchJson());
maxLevel = levelVo.getMaxLevel();
if(qo.getLevel() == null){
qo.setLevel(levelVo.getLevel());
......@@ -68,18 +68,18 @@ public class BaseSalesController {
/****首页进入基础页面时,如果渠道为空,根据当前条件判断渠道,channel==null表示多渠道***/
if(qo.getChannel() == null){
/**********设置层级名称,只有在首次进入页面会展示,下钻均显示返回上一级*********/
Integer newChannel = this.storeSearchUtils.getChannel(qo.getUserId(), qo.getEnterpriseId(), qo.getSearchJSON());
Integer newChannel = this.storeSearchUtils.getChannel(qo.getUserId(), qo.getEnterpriseId(), qo.getSearchJson());
qo.setChannel(newChannel);
}
/***********如果是线下的第一层级或者门店导购层级,需要展示切换层级按钮*************/
boolean isFirstLevel = (qo.getChannel() == StoreChannelEnum.OFFLINE.getChannel().intValue() && qo.getLevel().intValue() == levelVo.getLevel())
boolean isFirstLevel = (StoreChannelEnum.OFFLINE.getChannel().equals(qo.getChannel()) && qo.getLevel().intValue() == levelVo.getLevel())
|| (qo.getLevel() == 7 || qo.getLevel() == 8);
if(isFirstLevel){
vo.setChangeLevel(1);
}
if(qo.getChannel() == null){
vo.setLevelName("所有渠道");
} else if(qo.getChannel() == StoreChannelEnum.OFFLINE.getChannel().intValue()){
} else if(StoreChannelEnum.OFFLINE.getChannel().equals(qo.getChannel())){
vo.setLevelName(LevelUtil.getLevelName(qo.getLevel()));
} else {
vo.setLevelName("店铺层级");
......@@ -92,9 +92,9 @@ public class BaseSalesController {
vo.setPage(this.goDownComponent.parseData(response.getResult(), qo.getChannel(), qo.getEnterpriseId(), qo.getLevel(), maxLevel));
//合计
dto.setCountType(2);
Integer wgs = storeSearchUtils.isWgs(qo.getUserId(), qo.getEnterpriseId(), qo.getSearchJSON());
Integer wgs = storeSearchUtils.isWgs(qo.getUserId(), qo.getEnterpriseId(), qo.getSearchJson());
/**所有渠道或者线下渠道第一层级 合计算上无归属数据**/
boolean isContainNoOwnership = (qo.getChannel() == null || (qo.getChannel() == StoreChannelEnum.OFFLINE.getChannel().intValue() && qo.getLevel().intValue() == levelVo.getLevel())) && wgs == 1;
boolean isContainNoOwnership = (qo.getChannel() == null || (StoreChannelEnum.OFFLINE.getChannel().equals(qo.getChannel()) && qo.getLevel().intValue() == levelVo.getLevel())) && wgs == 1;
if(isContainNoOwnership){
dto.getStoreInfoIdList().add(-1);
dto.getOnLine().add("-1");
......@@ -118,8 +118,8 @@ public class BaseSalesController {
}
private void setCommonBaseDTO(BaseSalesParamsDTO dto, BaseSalesParamQo qo, List<Integer> childrenStoreGroupIdList) {
List<Integer> list = this.storeSearchUtils.storeSearch(qo.getUserId(), qo.getEnterpriseId(), qo.getSearchJSON());
List<String> onLine = this.storeSearchUtils.onLineStoreSearch(qo.getUserId(), qo.getEnterpriseId(), qo.getSearchJSON());
List<Integer> list = this.storeSearchUtils.storeSearch(qo.getUserId(), qo.getEnterpriseId(), qo.getSearchJson());
List<String> onLine = this.storeSearchUtils.onLineStoreSearch(qo.getUserId(), qo.getEnterpriseId(), qo.getSearchJson());
List<Long> mbrAreaIdList = this.dataAuthUtils.getMbrAreaId(qo.getUserId(), qo.getEnterpriseId());
dto.setChannel(qo.getChannel());
......
......@@ -56,20 +56,20 @@ public class IndexController {
}
@RequestMapping("index-sales")
public RestResponse indexSales(Integer userId, Integer enterpriseId, String searchJSON,
public RestResponse indexSales(Integer userId, Integer enterpriseId, String searchJson,
DateTypeQo dateTypeQo, String mbrAreaId, Integer dataType){
List<Integer> list = this.storeSearchUtils.storeSearch(userId, enterpriseId, searchJSON);
List<String> onLine = this.storeSearchUtils.onLineStoreSearch(userId, enterpriseId, searchJSON);
List<Integer> list = this.storeSearchUtils.storeSearch(userId, enterpriseId, searchJson);
List<String> onLine = this.storeSearchUtils.onLineStoreSearch(userId, enterpriseId, searchJson);
ServiceResponse<IndexSalesDTO> indexSales = this.indexSalesApiService.getIndexSales(enterpriseId, list, onLine,
StringUtils.isNoneBlank(mbrAreaId) ? Long.valueOf(mbrAreaId) : null, dateTypeQo.getType(), dateTypeQo.getDate(), dataType);
return RestResponse.success(EntityUtil.changeEntityByJSON(IndexSalesVo.class, indexSales.getResult()));
}
@RequestMapping("index-member")
public RestResponse indexMember(Integer userId, Integer enterpriseId, String searchJSON,
public RestResponse indexMember(Integer userId, Integer enterpriseId, String searchJson,
DateTypeQo dateTypeQo, String mbrAreaId){
List<Integer> list = this.storeSearchUtils.storeSearch(userId, enterpriseId, searchJSON);
List<String> onLine = this.storeSearchUtils.onLineStoreSearch(userId, enterpriseId, searchJSON);
List<Integer> list = this.storeSearchUtils.storeSearch(userId, enterpriseId, searchJson);
List<String> onLine = this.storeSearchUtils.onLineStoreSearch(userId, enterpriseId, searchJson);
List<Long> mbrAreaIdList = this.dataAuthUtils.getMbrAreaId(userId, enterpriseId);
ServiceResponse<IndexMemberDTO> indexMember = this.indexSalesApiService.getIndexMember(enterpriseId, list, onLine,
StringUtils.isNoneBlank(mbrAreaId) ? Long.valueOf(mbrAreaId) : null,
......@@ -78,10 +78,10 @@ public class IndexController {
}
@RequestMapping("index-consume")
public RestResponse indexConsume(Integer userId, Integer enterpriseId, String searchJSON,
public RestResponse indexConsume(Integer userId, Integer enterpriseId, String searchJson,
DateTypeQo dateTypeQo, String mbrAreaId){
List<Integer> list = this.storeSearchUtils.storeSearch(userId, enterpriseId, searchJSON);
List<String> onLine = this.storeSearchUtils.onLineStoreSearch(userId, enterpriseId, searchJSON);
List<Integer> list = this.storeSearchUtils.storeSearch(userId, enterpriseId, searchJson);
List<String> onLine = this.storeSearchUtils.onLineStoreSearch(userId, enterpriseId, searchJson);
List<Long> mbrAreaIdList = this.dataAuthUtils.getMbrAreaId(userId, enterpriseId);
ServiceResponse<IndexMemberOrderCntDTO> response1 = this.indexSalesApiService.getIndexMemberOrderCnt(enterpriseId, list, onLine,
StringUtils.isNoneBlank(mbrAreaId) ? Long.valueOf(mbrAreaId) : null,
......@@ -101,11 +101,11 @@ public class IndexController {
log.info("birthOrderCnt:{}", JSON.toJSONString(birthOrderCnt));
IndexConsume consume = new IndexConsume();
if(response1.isSuccess() && response1.getResult() != null && response2.getResult() != null){
IndexMemberOrderCntDTO indexMemberOrderCntDTO1 = response1.getResult();
IndexMemberOrderCntDTO indexMemberOrderCntDTO2 = response2.getResult();
consume.setMemberRate(DataFormatUtils.rate(indexMemberOrderCntDTO2.getOrderCnt(), indexMemberOrderCntDTO1.getOrderCnt()));
String divide = DataFormatUtils.divide(DataFormatUtils.divideDouble(indexMemberOrderCntDTO2.getOrderCnt(), indexMemberOrderCntDTO1.getOrderCntHb()),
DataFormatUtils.divideDouble(indexMemberOrderCntDTO2.getOrderCnt(), indexMemberOrderCntDTO1.getOrderCntHb()));
IndexMemberOrderCntDTO indexMemberOrderCntDto1 = response1.getResult();
IndexMemberOrderCntDTO indexMemberOrderCntDto2 = response2.getResult();
consume.setMemberRate(DataFormatUtils.rate(indexMemberOrderCntDto2.getOrderCnt(), indexMemberOrderCntDto1.getOrderCnt()));
String divide = DataFormatUtils.divide(DataFormatUtils.divideDouble(indexMemberOrderCntDto2.getOrderCnt(), indexMemberOrderCntDto1.getOrderCntHb()),
DataFormatUtils.divideDouble(indexMemberOrderCntDto2.getOrderCnt(), indexMemberOrderCntDto1.getOrderCntHb()));
consume.setMemberHb(divide);
}
if(oldOrderCnt.isSuccess() && oldOrderCnt.getResult() != null){
......@@ -140,8 +140,8 @@ public class IndexController {
}
@RequestMapping("get-level")
public RestResponse getLevel(Integer userId, Integer enterpriseId, String searchJSON){
LevelVo level = this.storeSearchUtils.getLevel(userId, enterpriseId, searchJSON);
public RestResponse getLevel(Integer userId, Integer enterpriseId, String searchJson){
LevelVo level = this.storeSearchUtils.getLevel(userId, enterpriseId, searchJson);
List<LevelNameVo> list = new ArrayList<>();
LevelNameVo vo1 = new LevelNameVo(1, "第一层级", 1 >= level.getLevel() && 1 <= level.getMaxLevel() ? 1: 0);
LevelNameVo vo2 = new LevelNameVo(2, "第二层级", 2 >= level.getLevel() && 2 <= level.getMaxLevel() ? 1: 0);
......
......@@ -56,9 +56,9 @@ public class MemberCloudDataController {
* @return com.gic.commons.webapi.reponse.RestResponse


*/
@RequestMapping("get-member-distribution-trend")
public RestResponse queryMemberDistributionTrend(MemberDistributionTrendQO params) {
public RestResponse queryMemberDistributionTrend(MemberDistributionTrendQoAbstract params) {
log.info("会员分布-趋势参数:{}", JSON.toJSONString(params));
params.setStoreInfoIdList(storeSearchUtils.storeSearch(params.getUserId(), params.getEnterpriseId(), params.getSearchJSON()));
params.setStoreInfoIdList(storeSearchUtils.storeSearch(params.getUserId(), params.getEnterpriseId(), params.getSearchJson()));
params.setMemberCardIdList(dataAuthUtils.getMbrAreaId(params.getUserId(), params.getEnterpriseId()));
params.setOnlineStoreIdList(new ArrayList<>());
goDownComponent.setValueTotal(params);
......@@ -66,7 +66,7 @@ public class MemberCloudDataController {
}
@RequestMapping("get-member-distribution-area")
public RestResponse pageMemberDistributionArea(MemberDistributionAreaQO params) {
public RestResponse pageMemberDistributionArea(MemberDistributionAreaQoAbstract params) {
log.info("会员分布-区域参数:{}", JSON.toJSONString(params));
params.setOnlineStoreIdList(new ArrayList<>());
......@@ -95,7 +95,7 @@ public class MemberCloudDataController {
}
@RequestMapping("get-member-recruit-area")
public RestResponse pageMemberRecruitArea(MemberRecruitAreaQO params) {
public RestResponse pageMemberRecruitArea(MemberRecruitAreaQoAbstract params) {
log.info("会员招募-区域参数:{}", JSON.toJSONString(params));
params.setOnlineStoreIdList(new ArrayList<>());
......@@ -123,50 +123,50 @@ public class MemberCloudDataController {
}
@RequestMapping("get-member-portrait")
public RestResponse queryMemberBasicPortrait(MemberPortraitQO params) {
public RestResponse queryMemberBasicPortrait(MemberPortraitQoAbstract params) {
log.info("会员基础画像参数:{}", JSON.toJSONString(params));
params.setOnlineStoreIdList(new ArrayList<>());
params.setStoreInfoIdList(storeSearchUtils.storeSearch(params.getUserId(), params.getEnterpriseId(), params.getSearchJSON()));
params.setStoreInfoIdList(storeSearchUtils.storeSearch(params.getUserId(), params.getEnterpriseId(), params.getSearchJson()));
params.setMemberCardIdList(dataAuthUtils.getMbrAreaId(params.getUserId(), params.getEnterpriseId()));
goDownComponent.setValueTotal(params);
return ResultControllerUtils.commonResult(memberCloudDataApiService.queryMemberBasicPortrait(params));
}
@RequestMapping("get-member-portrait-overview")
public RestResponse getMemberPortraitOverview(MemberPortraitQO params) {
public RestResponse getMemberPortraitOverview(MemberPortraitQoAbstract params) {
log.info("会员画像-概况参数:{}", JSON.toJSONString(params));
params.setOnlineStoreIdList(new ArrayList<>());
params.setStoreInfoIdList(storeSearchUtils.storeSearch(params.getUserId(), params.getEnterpriseId(), params.getSearchJSON()));
params.setStoreInfoIdList(storeSearchUtils.storeSearch(params.getUserId(), params.getEnterpriseId(), params.getSearchJson()));
params.setMemberCardIdList(dataAuthUtils.getMbrAreaId(params.getUserId(), params.getEnterpriseId()));
goDownComponent.setValueTotal(params);
return ResultControllerUtils.commonResult(memberCloudDataApiService.getMemberPortraitOverview(params));
}
@RequestMapping("get-member-custom-portrait")
public RestResponse queryMemberCustomPortrait(MemberCustomPortraitQO params) {
public RestResponse queryMemberCustomPortrait(MemberCustomPortraitQoAbstract params) {
log.info("会员自定义画像参数:{}", JSON.toJSONString(params));
params.setOnlineStoreIdList(new ArrayList<>());
params.setStoreInfoIdList(storeSearchUtils.storeSearch(params.getUserId(), params.getEnterpriseId(), params.getSearchJSON()));
params.setStoreInfoIdList(storeSearchUtils.storeSearch(params.getUserId(), params.getEnterpriseId(), params.getSearchJson()));
params.setMemberCardIdList(dataAuthUtils.getMbrAreaId(params.getUserId(), params.getEnterpriseId()));
goDownComponent.setValueTotal(params);
return ResultControllerUtils.commonResult(memberCloudDataApiService.queryMemberCustomPortrait(params));
}
@RequestMapping("get-member-recruit-overview")
public RestResponse getMemberRecruitOverview(MemberOverviewQO params) {
public RestResponse getMemberRecruitOverview(MemberOverviewQoAbstract params) {
log.info("会员概况-会员招募概况参数:{}", JSON.toJSONString(params));
params.setOnlineStoreIdList(new ArrayList<>());
params.setStoreInfoIdList(storeSearchUtils.storeSearch(params.getUserId(), params.getEnterpriseId(), params.getSearchJSON()));
params.setStoreInfoIdList(storeSearchUtils.storeSearch(params.getUserId(), params.getEnterpriseId(), params.getSearchJson()));
params.setMemberCardIdList(dataAuthUtils.getMbrAreaId(params.getUserId(), params.getEnterpriseId()));
goDownComponent.setValueTotal(params);
return ResultControllerUtils.commonResult(memberCloudDataApiService.getMemberRecruitOverview(params));
}
@RequestMapping("get-member-recruit-trend")
public RestResponse queryMemberRecruitTrend(MemberOverviewQO params) {
public RestResponse queryMemberRecruitTrend(MemberOverviewQoAbstract params) {
log.info("会员概况-会员招募趋势参数:{}", JSON.toJSONString(params));
params.setOnlineStoreIdList(new ArrayList<>());
params.setStoreInfoIdList(storeSearchUtils.storeSearch(params.getUserId(), params.getEnterpriseId(), params.getSearchJSON()));
params.setStoreInfoIdList(storeSearchUtils.storeSearch(params.getUserId(), params.getEnterpriseId(), params.getSearchJson()));
params.setMemberCardIdList(dataAuthUtils.getMbrAreaId(params.getUserId(), params.getEnterpriseId()));
goDownComponent.setValueTotal(params);
return ResultControllerUtils.commonResult(memberCloudDataApiService.queryMemberRecruitTrend(params));
......@@ -208,11 +208,11 @@ public class MemberCloudDataController {
@RequestMapping("get-member-custom-portrait-field")
public RestResponse getMemberCustomPortraitField(MemberCustomPortraitQO params) {
public RestResponse getMemberCustomPortraitField(MemberCustomPortraitQoAbstract params) {
log.info("会员自定义画像-字段筛选参数:{}", JSON.toJSONString(params));
params.setOnlineStoreIdList(new ArrayList<>());
Integer enterpriseId = params.getEnterpriseId();
params.setStoreInfoIdList(storeSearchUtils.storeSearch(params.getUserId(), params.getEnterpriseId(), params.getSearchJSON()));
params.setStoreInfoIdList(storeSearchUtils.storeSearch(params.getUserId(), params.getEnterpriseId(), params.getSearchJson()));
params.setMemberCardIdList(dataAuthUtils.getMbrAreaId(params.getUserId(), params.getEnterpriseId()));
goDownComponent.setValueTotal(params);
ServiceResponse<List<MemberCustomPortraitDTO>> fieldListRes = memberCloudDataApiService.listCustomField(params);
......@@ -230,7 +230,7 @@ public class MemberCloudDataController {
}
@RequestMapping("get-member-basic-portrait-field")
public RestResponse getMemberBasicPortraitField(MemberCustomPortraitQO params) {
public RestResponse getMemberBasicPortraitField(MemberCustomPortraitQoAbstract params) {
log.info("会员基础画像-字段筛选参数:{}", JSON.toJSONString(params));
Integer enterpriseId = params.getEnterpriseId();
List<EnterprisePortraitRelDTO> list = new ArrayList<>(6);
......
package com.gic.cloud.web.controller;
import com.gic.cloud.web.auth.DataAuthUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -8,8 +7,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSON;
import com.gic.cloud.web.auth.DataAuthUtils;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.data.api.qo.performanceoverview.PerformanceOverviewQO;
import com.gic.data.api.qo.performanceoverview.PerformanceOverviewQoAbstract;
import com.gic.data.api.service.performanceoverview.PerformanceOverviewApiService;
import com.gic.enterprise.utils.ResultControllerUtils;
/**
......@@ -33,10 +33,10 @@ public class PerformanceOverviewController {
@RequestMapping("get-performance-overview")
public RestResponse selectPerformanceOverview(PerformanceOverviewQO params) {
public RestResponse selectPerformanceOverview(PerformanceOverviewQoAbstract 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.setOnlineStoreIdList(storeSearchUtils.onLineStoreSearch(params.getUserId(), params.getEnterpriseId(), params.getSearchJson()));
params.setStoreInfoIdList(storeSearchUtils.storeSearch(params.getUserId(), params.getEnterpriseId(), params.getSearchJson()));
params.setMemberCardIdList(dataAuthUtils.getMbrAreaId(params.getUserId(), params.getEnterpriseId()));
goDownComponent.setValueTotal(params);
return ResultControllerUtils.commonResult(performanceOverviewApiService.selectPerformanceOverview(params));
......
......@@ -323,7 +323,7 @@ public class StoreWidgetController {
storeSearchDTO.setEnterpriseId(enterpriseId);
storeSearchDTO.setStoreInfoIds(StringUtils.join(storeAuth.getStoreInfoIdList(), " "));
Page<StoreDTO> result = this.storeApiService.listStore(storeSearchDTO, pageNum, pageSize).getResult();
Map<Integer, AttentionStoreDTO> attentionStoreDTOMap = this.storeAttentionApiService.getAllAttenttionStore(userId, enterpriseId).getResult();
Map<Integer, AttentionStoreDTO> attentionStoreDtoMap = this.storeAttentionApiService.getAllAttenttionStore(userId, enterpriseId).getResult();
page.setTotalCount(result.getTotalCount());
page.setTotalPage(result.getTotalPage());
if(CollectionUtils.isNotEmpty(result.getResult())){
......@@ -334,7 +334,7 @@ public class StoreWidgetController {
searchVo.setName(storeDTO.getStoreName());
searchVo.setIdChain((map.get(storeDTO.getStoreGroupId()) != null ? map.get(storeDTO.getStoreGroupId()).getIdChain() : "") + storeDTO.getStoreInfoId()+"_");
searchVo.setNameChain((map.get(storeDTO.getStoreGroupId())!= null ? map.get(storeDTO.getStoreGroupId()).getNameChain() : "") + storeDTO.getStoreName() + "/");
searchVo.setHasAttention(attentionStoreDTOMap.get(storeDTO.getStoreInfoId()) == null ? 0 : 1);
searchVo.setHasAttention(attentionStoreDtoMap.get(storeDTO.getStoreInfoId()) == null ? 0 : 1);
storeSearchVoList.add(searchVo);
}
page.setResult(storeSearchVoList);
......@@ -355,7 +355,7 @@ public class StoreWidgetController {
List<StoreSearchVo> list = new ArrayList<>();
List<OnLineStore> onlineStoreList = onlineStore.getList();
for(OnLineStore onLineStore : onlineStoreList){
if(onLineStore.getChannel() == StoreChannelEnum.GICMALL.getChannel().intValue()){
if(StoreChannelEnum.GICMALL.getChannel().equals(onLineStore.getChannel())){
List<ShopDTO> result = shopApiService.getAllShopByEnterpriseIdAndName(enterpriseId, search, ShopTypeEnum.MALL_SHOP.getCode()).getResult();
if(CollectionUtils.isNotEmpty(result)){
for(ShopDTO dto : result){
......@@ -372,7 +372,7 @@ public class StoreWidgetController {
}
}
}
if(onLineStore.getChannel() == StoreChannelEnum.WMMALL.getChannel().intValue()){
if(StoreChannelEnum.WMMALL.getChannel().equals(onLineStore.getChannel())){
List<WmStoreDTO> result1 = wmStoreApiService.listWmStore(enterpriseId, search).getResult();
if(CollectionUtils.isNotEmpty(result1)){
for(WmStoreDTO wmStoreDTO : result1){
......@@ -397,10 +397,10 @@ public class StoreWidgetController {
}
@RequestMapping("get-store-count")
public RestResponse getStoreCount(String searchJSON, Integer userId, Integer enterpriseId){
List<Integer> list = this.storeSearchUtils.storeSearch(userId, enterpriseId, searchJSON);
List<String> stringList = this.storeSearchUtils.onLineStoreSearch(userId, enterpriseId, searchJSON);
log.info("getStoreCount:{},{},{},{},{}", searchJSON, userId, enterpriseId, list.size(), stringList.size());
public RestResponse getStoreCount(String searchJson, Integer userId, Integer enterpriseId){
List<Integer> list = this.storeSearchUtils.storeSearch(userId, enterpriseId, searchJson);
List<String> stringList = this.storeSearchUtils.onLineStoreSearch(userId, enterpriseId, searchJson);
log.info("getStoreCount:{},{},{},{},{}", searchJson, userId, enterpriseId, list.size(), stringList.size());
return RestResponse.success(list.size() + stringList.size());
}
......@@ -430,7 +430,7 @@ public class StoreWidgetController {
private List<OnLineStoreVo> listOnLineStore(List<String> storeIdList, Integer type, Integer enterpriseId){
List<OnLineStoreVo> list = new ArrayList<>();
if(type == StoreChannelEnum.GICMALL.getChannel().intValue()){
if(StoreChannelEnum.GICMALL.getChannel().equals(type)){
List<ShopDTO> result = shopApiService.getAllShopByEnterpriseIdAndName(enterpriseId, null, ShopTypeEnum.MALL_SHOP.getCode()).getResult();
if(CollectionUtils.isNotEmpty(result)){
for(ShopDTO dto : result){
......@@ -445,7 +445,7 @@ public class StoreWidgetController {
}
}
}
}else if(type == StoreChannelEnum.WMMALL.getChannel().intValue()){
}else if(StoreChannelEnum.WMMALL.getChannel().equals(type)){
List<WmStoreDTO> result = wmStoreApiService.listWmStore(enterpriseId).getResult();
if(CollectionUtils.isNotEmpty(result)){
for(WmStoreDTO wmStoreDTO : result){
......
......@@ -10,7 +10,7 @@ public class BaseSalesParamQo {
private Integer channel;
private Integer userId;
private Integer enterpriseId;
private String searchJSON;
private String searchJson;
private Integer type;
private String date;
private String mbrAreaId;
......@@ -45,12 +45,13 @@ public class BaseSalesParamQo {
this.enterpriseId = enterpriseId;
}
public String getSearchJSON() {
return searchJSON;
public String getSearchJson() {
return searchJson;
}
public void setSearchJSON(String searchJSON) {
this.searchJSON = searchJSON;
public BaseSalesParamQo setSearchJson(String searchJson) {
this.searchJson = searchJson;
return this;
}
public Integer getType() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment