|
|
@ -315,13 +315,13 @@ public class StorePromotionDataService {
|
|
|
|
Integer newCusNumLast = null;
|
|
|
|
Integer newCusNumLast = null;
|
|
|
|
Integer rankNo = null;
|
|
|
|
Integer rankNo = null;
|
|
|
|
Integer differFromChampion = null;
|
|
|
|
Integer differFromChampion = null;
|
|
|
|
switch (roleCode) {
|
|
|
|
|
|
|
|
// 店长
|
|
|
|
|
|
|
|
case Constants.WX_USER_ROLE_SHOP_MANAGER:
|
|
|
|
|
|
|
|
Long storeId = storePromotionDataDOMapper.selectStoreIdByUserId(userId);
|
|
|
|
Long storeId = storePromotionDataDOMapper.selectStoreIdByUserId(userId);
|
|
|
|
if (storeId == null) {
|
|
|
|
if (storeId == null) {
|
|
|
|
break;
|
|
|
|
return storePromotionDataDO;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (roleCode) {
|
|
|
|
|
|
|
|
// 店长
|
|
|
|
|
|
|
|
case Constants.WX_USER_ROLE_SHOP_MANAGER:
|
|
|
|
cusNum = storePromotionDataDOMapper.selectWxSumCusNumByCondition(null, storeId, null, null, Constants.STORE_SELLER_CUS_RELATION_TYPE_VALID);
|
|
|
|
cusNum = storePromotionDataDOMapper.selectWxSumCusNumByCondition(null, storeId, null, null, Constants.STORE_SELLER_CUS_RELATION_TYPE_VALID);
|
|
|
|
newCusNum = storePromotionDataDOMapper.selectWxSumCusNumByCondition(null, storeId, startDate, endDate, Constants.STORE_SELLER_CUS_RELATION_TYPE_VALID);
|
|
|
|
newCusNum = storePromotionDataDOMapper.selectWxSumCusNumByCondition(null, storeId, startDate, endDate, Constants.STORE_SELLER_CUS_RELATION_TYPE_VALID);
|
|
|
|
newCusNumLast = storePromotionDataDOMapper.selectWxSumCusNumByCondition(null, storeId, lastStartDate, lastEndDate, Constants.STORE_SELLER_CUS_RELATION_TYPE_VALID);
|
|
|
|
newCusNumLast = storePromotionDataDOMapper.selectWxSumCusNumByCondition(null, storeId, lastStartDate, lastEndDate, Constants.STORE_SELLER_CUS_RELATION_TYPE_VALID);
|
|
|
@ -367,7 +367,7 @@ public class StorePromotionDataService {
|
|
|
|
newCusNum = storePromotionDataDOMapper.selectWxSumCusNumByCondition(userId, null, startDate, endDate, null);
|
|
|
|
newCusNum = storePromotionDataDOMapper.selectWxSumCusNumByCondition(userId, null, startDate, endDate, null);
|
|
|
|
newCusNumLast = storePromotionDataDOMapper.selectWxSumCusNumByCondition(userId, null, lastStartDate, lastEndDate, null);
|
|
|
|
newCusNumLast = storePromotionDataDOMapper.selectWxSumCusNumByCondition(userId, null, lastStartDate, lastEndDate, null);
|
|
|
|
// 店铺排名
|
|
|
|
// 店铺排名
|
|
|
|
List<StorePromotionDataDO> staffRankNoList = storePromotionDataDOMapper.selectStaffRankNo(startDate, endDate);
|
|
|
|
List<StorePromotionDataDO> staffRankNoList = storePromotionDataDOMapper.selectStaffRankNo(startDate, endDate, storeId);
|
|
|
|
if (CollectionUtils.isNotEmpty(staffRankNoList)) {
|
|
|
|
if (CollectionUtils.isNotEmpty(staffRankNoList)) {
|
|
|
|
for (int i = 0; i < staffRankNoList.size(); i++) {
|
|
|
|
for (int i = 0; i < staffRankNoList.size(); i++) {
|
|
|
|
if (staffRankNoList.get(i).getUserId().equals(userId.toString())) {
|
|
|
|
if (staffRankNoList.get(i).getUserId().equals(userId.toString())) {
|
|
|
|