|
|
|
@ -647,9 +647,8 @@ public class CustomerViewService {
|
|
|
|
|
//店长
|
|
|
|
|
if(privilageRoleDO.getCode().equals(RoleEnum.ROLE_CODE_DZ.getRoleCode())) {
|
|
|
|
|
shopIdList = poiStoreStaffDOMapper.selectByUserId(userId);
|
|
|
|
|
String cpUserId = privilageCpUserStoreDOMapper.selectCpUserIdByStoreId(shopIdList.get(0));
|
|
|
|
|
Long storeAll = privilageCpUserDOMapper.selectStoreCount(cpUserId);
|
|
|
|
|
Long storeDis = privilageCpUserDOMapper.selectDistinctStoreCount(cpUserId);
|
|
|
|
|
Long storeAll = privilageCpUserDOMapper.selectStoresCountById(shopIdList);
|
|
|
|
|
Long storeDis = privilageCpUserDOMapper.selectDistinctStoresCountById(shopIdList);
|
|
|
|
|
|
|
|
|
|
result.setAllCustomer(storeAll);
|
|
|
|
|
result.setAllValidCustomer(storeDis);
|
|
|
|
@ -663,9 +662,8 @@ public class CustomerViewService {
|
|
|
|
|
//查询零售公司的门店
|
|
|
|
|
List<PoiStore> list1 = retailCompanyService.selectShopByCompany(pm.get(0).getOrgId());
|
|
|
|
|
shopIdList = list1.stream().map(PoiStore::getId).collect(Collectors.toList());
|
|
|
|
|
List<String> cpUserIds = privilageCpUserStoreDOMapper.selectCpUserIdsByStoreIds(shopIdList);
|
|
|
|
|
Long all = privilageCpUserDOMapper.selectStoresCount(cpUserIds);
|
|
|
|
|
Long dis = privilageCpUserDOMapper.selectDistinctStoresCount(cpUserIds);
|
|
|
|
|
Long all = privilageCpUserDOMapper.selectStoresCountById(shopIdList);
|
|
|
|
|
Long dis = privilageCpUserDOMapper.selectDistinctStoresCountById(shopIdList);
|
|
|
|
|
|
|
|
|
|
result.setAllCustomer(all);
|
|
|
|
|
result.setAllValidCustomer(dis);
|
|
|
|
|