Sfoglia il codice sorgente

周分红改为整条线

dos 2 mesi fa
parent
commit
9baa0fd5e1

+ 6 - 0
game-business/src/main/java/com/game/business/service/IAppUserCountService.java

@@ -11,9 +11,15 @@ import java.util.Date;
 public interface IAppUserCountService extends IService<AppUserCount> {
 
 
+    /**
+     * 查询下级代理(直属下级)
+     * */
     public List<AppUserCount> getAppUserCount(long userId,String beginTime,String endTIme);
 
 
+    /**
+     * 查询下级代理(整条线)
+     * */
     public List<AppUserCount> getAppUserCountNew(long userId,String beginTime,String endTIme);
 
     public void createAppUserCount(AppUserCount appUserCount);

+ 3 - 2
game-business/src/main/java/com/game/business/task/AppUserCountTask.java

@@ -258,11 +258,12 @@ public class AppUserCountTask {
             if (null != list && list.size() > 0) {
                 list.forEach(appUser -> {
                     //查询用户所有下级本周盈亏
-                    LambdaQueryWrapper<AppUserCount> queryWrapper = new LambdaQueryWrapper<>();
+                    /*LambdaQueryWrapper<AppUserCount> queryWrapper = new LambdaQueryWrapper<>();
                     queryWrapper.ge(AppUserCount::getStrDate, beginTime);
                     queryWrapper.le(AppUserCount::getStrDate, endTime);
                     queryWrapper.eq(AppUserCount::getAgentUserId, appUser.getUserid());
-                    List<AppUserCount> appUserCountList = appUserCountService.list(queryWrapper);
+                    List<AppUserCount> appUserCountList = appUserCountService.list(queryWrapper);*/
+                    List<AppUserCount> appUserCountList = appUserCountService.getAppUserCountNew(appUser.getUserid(),DateUtil.format(beginTime,"yyyy-MM-dd"),DateUtil.format(endTime,"yyyy-MM-dd"));
                     if (null != appUserCountList && appUserCountList.size() > 0) {
                         //游戏输钱
                         double loseAmount = appUserCountList.stream().mapToDouble(e -> e.getGameLoseAmount()).sum();