|
|
|
@ -174,6 +174,8 @@ public class CustomerViewService {
|
|
|
|
|
*/
|
|
|
|
|
public CustomerViewVO selectCustomerViewMain(Long userId, String selectStartTime, String selectEndTime, String startTime, String endTime){
|
|
|
|
|
CustomerViewVO customerViewVO = new CustomerViewVO();
|
|
|
|
|
//会员总数
|
|
|
|
|
Long vipCount = 0L;
|
|
|
|
|
//shopIds
|
|
|
|
|
List<Long> shopIdList = new ArrayList<>();
|
|
|
|
|
PrivilageRoleDO privilageRoleDO = privilageRoleDOMapper.selectRoleByUserId(userId);
|
|
|
|
@ -183,6 +185,7 @@ public class CustomerViewService {
|
|
|
|
|
//店长
|
|
|
|
|
if(privilageRoleDO.getCode().equals(RoleEnum.ROLE_CODE_DZ.getRoleCode())) {
|
|
|
|
|
shopIdList = poiStoreStaffDOMapper.selectByUserId(userId);
|
|
|
|
|
vipCount = opVipDOMapper.selectVipCountByStoreIds(shopIdList);
|
|
|
|
|
}
|
|
|
|
|
//运营人员
|
|
|
|
|
else if (privilageRoleDO.getCode().equals(RoleEnum.ROLE_CODE_YYRY.getRoleCode())) {
|
|
|
|
@ -192,10 +195,12 @@ public class CustomerViewService {
|
|
|
|
|
//查询零售公司的门店
|
|
|
|
|
List<PoiStore> list1 = retailCompanyService.selectShopByCompany(pm.get(0).getOrgId());
|
|
|
|
|
shopIdList = list1.stream().map(PoiStore::getId).collect(Collectors.toList());
|
|
|
|
|
vipCount = opVipDOMapper.selectVipCountByStoreIds(shopIdList);
|
|
|
|
|
}
|
|
|
|
|
//管理员/总运营人员
|
|
|
|
|
else if (privilageRoleDO.getCode().equals(RoleEnum.ROLE_CODE_GLY.getRoleCode()) || privilageRoleDO.getCode().equals(RoleEnum.ROLE_CODE_ALL_YYRY.getRoleCode())) {
|
|
|
|
|
shopIdList = poiStoreStaffDOMapper.selectAllShopId(null,null);
|
|
|
|
|
vipCount = opVipDOMapper.selectVipCountNew();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(CollectionUtils.isEmpty(shopIdList)){
|
|
|
|
@ -204,8 +209,7 @@ public class CustomerViewService {
|
|
|
|
|
//柱状图好友趋势图
|
|
|
|
|
List<OpCustomer> customerList = opCustomerDOMapper.selectCustomerList(shopIdList, null, null, startTime, endTime);
|
|
|
|
|
|
|
|
|
|
//会员总数
|
|
|
|
|
Long vipCount = opVipDOMapper.selectVipCountNew();
|
|
|
|
|
|
|
|
|
|
customerViewVO.setAllVipCount(vipCount);
|
|
|
|
|
|
|
|
|
|
//设置趋势柱状图list
|
|
|
|
|