Commit 5f59706c by 徐高华

只有开启权限的商户才会查询区经门店列表

parent 1696d416
......@@ -905,7 +905,7 @@ public class StaffApiServiceImpl implements StaffApiService {
return storeRoleDTO;
}
if (storeIds.contains("-1")) {
logger.info("该导购为超管,clerkId={}",clerkId);
logger.info("该导购为所有门店,clerkId={}",clerkId);
String storeWidgetId = this.powerService.getStoreWidgetId(new Date(), clerkId);
int storeCount = 0 ;
String storeId = null ;
......@@ -916,10 +916,6 @@ public class StaffApiServiceImpl implements StaffApiService {
Page<StoreDTO> page = storeWidgetService.getStoreWidgetStore(storeWidgetId, null, clerkDTO.getEnterpriseId(), pageParam, clerkId,null);
storeId = page.getResult().get(0).getStoreId();
storeCount = page.getTotalCount();
}else {
com.gic.api.base.commons.ServiceResponse<List<String>> storeResp = this.storeService.queryStoreIdByEnterprise(clerkDTO.getEnterpriseId(), null) ;
storeCount = storeResp.getResult().size();
storeId = storeResp.getResult().get(0);
}
storeRoleDTO.setStoreId(storeId);
storeRoleDTO.setStoreCount(storeCount);
......
......@@ -1624,8 +1624,8 @@ public class WxStaffController extends WebBaseController {
List<StoreListVO> voList = new ArrayList<>();
int totalCount = 0 ;
List<StoreDTO> storeDTOList = null ;
if(storeIdList.get(0).contains("-1")) {
String storeWidgetId = this.powerService.getStoreWidgetId(new Date(), clerkId);
if(storeIdList.get(0).contains("-1") && StringUtils.isNotBlank(storeWidgetId)) {
logger.info("权限-所有门店storeWidgetId={}",storeWidgetId);
Page<Object> pageParam = new Page<Object>();
pageParam.setCurrentPage(currentPage);
......@@ -1635,12 +1635,6 @@ public class WxStaffController extends WebBaseController {
storeDTOList = page.getResult();
totalCount = page.getTotalCount();
}
}else if(storeIdList.get(0).contains("-1") && StringUtils.isBlank(storeWidgetId)) {
// 未开启分权的商户
ServiceResponse<List<String>> storeResp = this.storeService.queryStoreIdByEnterprise(enterpriseId, null) ;
if(storeResp.isSuccess()) {
storeIdList = storeResp.getResult() ;
}
}else {
totalCount = storeIdList.size();
int start = pageSize * (currentPage-1) ;
......
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