Commit dfbf5dc8 by 徐高华

门店分组查询包含子分组

parent ff269726
......@@ -28,6 +28,7 @@ import com.gic.commons.util.EntityUtil;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.enterprise.api.dto.StoreDTO;
import com.gic.enterprise.api.dto.StoreSearchDTO;
import com.gic.enterprise.api.service.StoreGroupService;
import com.gic.enterprise.api.service.StoreService;
import com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO;
import com.gic.haoban.common.utils.AuthWebRequestUtil;
......@@ -57,6 +58,8 @@ public class HmStoreController {
private HmQrcodeApiService hmQrcodeApiService;
@Autowired
private StoreService storeService;
@Autowired
private StoreGroupService storeGroupService ;
/**
*
......@@ -74,7 +77,7 @@ public class HmStoreController {
WebLoginDTO loginUser = AuthWebRequestUtil.getLoginUser();
String enterpriseId = loginUser.getEnterpriseId();
String wxEnterpriseId = loginUser.getWxEnterpriseId();
// 分组id
// 分组id [多个,号分割]
String storeGroupId = request.getParameter("storeGroupId");
// 门店参数
String storeSearchParams = request.getParameter("storeSearchParams");
......@@ -84,9 +87,16 @@ public class HmStoreController {
params.put("enterpriseId", enterpriseId);
// 2线上
params.put("status", 2);
params.put("storeGroupId", storeGroupId);
// 是否显示子分组(1显示,其余不显示)
params.put("showChildren", 1);
if(StringUtils.isNotBlank(storeGroupId) && storeGroupId.contains(",")) {
List<String> storeGroupIds = Arrays.asList(storeGroupId.split(",")) ;
List<String> groupIds = storeGroupService.getStoreGroupIdsByParentGroupId(enterpriseId, storeGroupIds);
logger.info("分组的数量={}",groupIds.size());
params.put("storeGroupIdList", groupIds);
}else {
params.put("storeGroupId", storeGroupId);
// 是否显示子分组(1显示,其余不显示)
params.put("showChildren", 1);
}
// 只获取导购和店长
params.put("clerkTypeList", Arrays.asList(1, 0));
if (StringUtils.isNotBlank(storeSearchParams)) {
......
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