Commit 5f59706c by 徐高华

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

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