推广部分小修改
This commit is contained in:
@@ -8,6 +8,7 @@ import cn.pluss.platform.entity.UserApp;
|
||||
import cn.pluss.platform.entity.UserPromotion;
|
||||
import cn.pluss.platform.exception.MsgException;
|
||||
import cn.pluss.platform.mapper.MerchantProfitMapper;
|
||||
import cn.pluss.platform.mapper.UserAppMapper;
|
||||
import cn.pluss.platform.mapper.UserPromotionMapper;
|
||||
import cn.pluss.platform.merchantOrder.MerchantOrderStatisticsService;
|
||||
import cn.pluss.platform.merchantProfit.MerchantProfitService;
|
||||
@@ -49,6 +50,8 @@ public class PromoterMainPageServiceImpl implements MainPageService {
|
||||
private MerchantProfitMapper merchantProfitMapper;
|
||||
@Resource
|
||||
private UserPromotionMapper userPromotionMapper;
|
||||
@Resource
|
||||
private UserAppMapper userAppMapper;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getSpreadData(String userId) {
|
||||
@@ -91,11 +94,7 @@ public class PromoterMainPageServiceImpl implements MainPageService {
|
||||
BigDecimal todaySum = merchantProfitMapper.getTodaySum(userId);
|
||||
|
||||
//今日新增商户数
|
||||
QueryWrapper<UserApp> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("parentId", queryUserApp.getUserId());
|
||||
queryWrapper.in("merchantAuditStatus", 3, 4);
|
||||
queryWrapper.between("createDt", DateUtils.getDayBegin(), DateUtils.getDayEnd());
|
||||
Integer newMerchantCount = userAppService.getUserAppWithChannelStatus(queryWrapper);
|
||||
Integer newMerchantCount = userAppMapper.selectUserAppWithChannelStatusCountV2(userId, DateUtils.getDayBegin(), DateUtils.getDayEnd());
|
||||
//直属商户交易
|
||||
BigDecimal consumeFee = merchantProfitMapper.getConsumeFee(userId);
|
||||
//团队商户交易
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package cn.pluss.platform.merchantProfit.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.pluss.platform.api.PageInfo;
|
||||
import cn.pluss.platform.constants.Constant;
|
||||
import cn.pluss.platform.entity.*;
|
||||
import cn.pluss.platform.enums.BstLevelCode;
|
||||
@@ -30,6 +31,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@Service
|
||||
@@ -124,12 +126,13 @@ public class MerchantProfitServiceImpl extends ServiceImpl<MerchantProfitMapper,
|
||||
default:
|
||||
throw new MsgException("身份错误");
|
||||
}
|
||||
List<MerchantProfitVO> teamList = merchantProfitMapper.getTeamList(typeCode, userId, page,size,name);
|
||||
|
||||
// PageInfo<MerchantProfitVO> teamList= merchantProfitMapper.getTeamList(typeCode, userId, page,size,name);
|
||||
|
||||
Integer countChild = merchantProfitMapper.getCountChild(userId, typeCode);
|
||||
//商户列表
|
||||
if ("MC".equals(typeCode)) {
|
||||
List<MerchantProfitVO> teamList = merchantProfitMapper.getTeamList(typeCode, userId,name);
|
||||
for (MerchantProfitVO values : teamList) {
|
||||
if (values.getMerchantCode() != null) {
|
||||
String merchantCode = values.getMerchantCode();
|
||||
@@ -156,17 +159,21 @@ public class MerchantProfitServiceImpl extends ServiceImpl<MerchantProfitMapper,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
teamList = teamList.stream().skip(page * size).limit(size).collect(Collectors.toList());
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
hashMap.put("total", countChild);
|
||||
hashMap.put("teamList", teamList);
|
||||
return hashMap;
|
||||
}
|
||||
//团队管理
|
||||
List<MerchantProfitVO> teamList = merchantProfitMapper.getTeamList(typeCode, userId,name);
|
||||
for (MerchantProfitVO values : teamList) {
|
||||
values.setYestedayConsumeFee(mapperOrderMapper.getPlatformAmtYestday(values.getMerchantCode(),
|
||||
values.setCurrentMonth(mapperOrderMapper.getPlatformAmtYestday(values.getMerchantCode(),
|
||||
DateUtils.getBeginDayOfMonth(), DateUtils.getEndDayOfMonth()));
|
||||
values.setConsumeFee(mapperOrderMapper.getAmountData(values.getMerchantCode()));
|
||||
}
|
||||
teamList = teamList.stream().skip(page * size).limit(size).collect(Collectors.toList());
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
hashMap.put("total", countChild);
|
||||
hashMap.put("teamList", teamList);
|
||||
|
||||
Reference in New Issue
Block a user