Commit e082586f by 陶光胜

Merge branch 'developer' of…

Merge branch 'developer' of http://115.159.76.241/base_platform_enterprise/gic-data-cloud into developer
parents dfaac110 244bc233
package com.gic.cloud.web.controller;
import com.gic.cloud.web.auth.DataAuthUtils;
import com.gic.data.api.qo.consumestructure.AgeConsumeAreaQO;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -19,6 +21,8 @@ public class ConsumeStructureController {
private ConsumeStructureApiService consumeStructureApiService;
@Autowired
private StoreSearchUtils storeSearchUtils;
@Autowired
private DataAuthUtils dataAuthUtils;
/**
* 年龄消费占比(订单人数/订单数/销售额)
......@@ -43,4 +47,17 @@ public class ConsumeStructureController {
params.setStoreInfoIdList(storeSearchUtils.storeSearch(params.getUserId(), params.getEnterpriseId(), params.getSearchJson()));
return ResultControllerUtils.commonResult(consumeStructureApiService.queryAgeConsumeSurvey(params));
}
@RequestMapping("get-age-consume-area")
public RestResponse queryAgeConsumeArea(AgeConsumeAreaQO 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()));
if (params.getLevel() != null) {
params.setLevel(storeSearchUtils.getLevel(params.getUserId(), params.getEnterpriseId(), params.getSearchJson()).getLevel());
}
params.setGroupIdList(storeSearchUtils.getChildrenStoreGroupIdList(params.getParentId()));
params.setMemberCardIdList(dataAuthUtils.getMbrAreaId(params.getUserId(), params.getEnterpriseId()));
return ResultControllerUtils.commonResult(consumeStructureApiService.pageAgeConsumeArea(params));
}
}
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