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 { ...@@ -65,8 +65,8 @@ public class DataExplainController {
} }
@RequestMapping("/list-data-explain") @RequestMapping("/list-data-explain")
public RestResponse listDataExplain(DataExplainQo dataExplainQO) { public RestResponse listDataExplain(DataExplainQo dataExplainQo) {
ServiceResponse<Page<DataExplainDTO>> serviceResponse = dataExplainApiService.listDataExplain(dataExplainQO); ServiceResponse<Page<DataExplainDTO>> serviceResponse = dataExplainApiService.listDataExplain(dataExplainQo);
return ResultControllerUtils.commonResult(serviceResponse); return ResultControllerUtils.commonResult(serviceResponse);
} }
......
...@@ -46,8 +46,8 @@ public class IndexController { ...@@ -46,8 +46,8 @@ public class IndexController {
@RequestMapping("/save-index") @RequestMapping("/save-index")
public RestResponse saveIndex(IndexQo indexQO, String relModuleIds) { public RestResponse saveIndex(IndexQo indexQo, String relModuleIds) {
IndexDTO indexDTO = EntityUtil.changeEntityByJSON(IndexDTO.class, indexQO); IndexDTO indexDTO = EntityUtil.changeEntityByJSON(IndexDTO.class, indexQo);
if (indexDTO.getClassifyType() == null || if (indexDTO.getClassifyType() == null ||
StringUtils.isBlank(indexDTO.getCode()) || StringUtils.isBlank(indexDTO.getCode()) ||
StringUtils.isBlank(indexDTO.getName()) || StringUtils.isBlank(indexDTO.getName()) ||
...@@ -90,14 +90,14 @@ public class IndexController { ...@@ -90,14 +90,14 @@ public class IndexController {
} }
@RequestMapping("/list-index") @RequestMapping("/list-index")
public RestResponse listIndex(IndexQo indexQO) { public RestResponse listIndex(IndexQo indexQo) {
ServiceResponse<Page<IndexDTO>> serviceResponse = indexApiService.listIndex(indexQO); ServiceResponse<Page<IndexDTO>> serviceResponse = indexApiService.listIndex(indexQo);
return ResultControllerUtils.commonResult(serviceResponse); return ResultControllerUtils.commonResult(serviceResponse);
} }
@RequestMapping("/list-all-index") @RequestMapping("/list-all-index")
public RestResponse listAllIndex(IndexQo indexQO) { public RestResponse listAllIndex(IndexQo indexQo) {
ServiceResponse<List<IndexDTO>> serviceResponse = indexApiService.listAllIndex(indexQO); ServiceResponse<List<IndexDTO>> serviceResponse = indexApiService.listAllIndex(indexQo);
return ResultControllerUtils.commonResult(serviceResponse); return ResultControllerUtils.commonResult(serviceResponse);
} }
......
...@@ -74,8 +74,8 @@ public interface TabDataExplainMapper { ...@@ -74,8 +74,8 @@ public interface TabDataExplainMapper {
* @Title: listDataExplain
 * @Title: listDataExplain

* @Description: * @Description:

* @author zhiwj 
* @author zhiwj
* @param dataExplainQO * @param dataExplainQo
* @return com.github.pagehelper.Page<com.gic.cloud.entity.TabDataExplain>
 * @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 { ...@@ -74,8 +74,8 @@ public interface TabIndexMapper {
* @Title: listIndex
 * @Title: listIndex

* @Description: * @Description:

* @author guojuxing 
* @author guojuxing
* @param indexQO * @param indexQo
* @return com.github.pagehelper.Page<com.gic.cloud.entity.TabIndex>
 * @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 { ...@@ -60,20 +60,20 @@ public interface DataExplainService {
* @Title: listDataExplain
 * @Title: listDataExplain

* @Description: * @Description:

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


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

* @Description: * @Description:

* @author zhiwj 
* @author zhiwj
* @param dataExplainQO * @param dataExplainQo
* @return java.util.List<com.gic.cloud.entity.TabDataExplain>
 * @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 { ...@@ -71,20 +71,20 @@ public interface IndexService {
* @Title: listIndex
 * @Title: listIndex

* @Description: * @Description:

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


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

* @Description: * @Description:

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


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