Преглед изворни кода

Merge remote-tracking branch 'origin/master'

kk пре 1 месец
родитељ
комит
f901d65175

+ 2 - 2
game-business/src/main/java/com/game/business/service/IAppGameBettingService.java

@@ -37,9 +37,9 @@ public interface IAppGameBettingService extends IService<AppGameBetting> {
     List<AppGameBetting> selectListByDate( Long userId, String beginTime, String endTime,Long gameId,String gameDate,Integer isWinner,Integer bettingType);
 
     /**
-     * 根据日期查询投注情况
+     * 根据日期查询余额已开奖投注
      * */
-    List<AppGameBetting> selectListByDate( Long userId, String beginTime, String endTime,Long gameId,String gameDate);
+    List<AppGameBetting> selectListIsWinByDate( Long userId, String beginTime, String endTime,Long gameId,String gameDate);
 
     Map<String, BigDecimal> getBettingAmountSum(Long userId);
 

+ 20 - 2
game-business/src/main/java/com/game/business/service/impl/AppGameBettingServiceImpl.java

@@ -127,9 +127,27 @@ public class AppGameBettingServiceImpl extends ServiceImpl<AppGameBettingMapper,
     }
 
     @Override
-    public List<AppGameBetting> selectListByDate(Long userId, String beginTime, String endTime,Long gameId,String gameDate) {
+    public List<AppGameBetting> selectListIsWinByDate(Long userId, String beginTime, String endTime,Long gameId,String gameDate) {
+        LambdaQueryWrapper<AppGameBetting> queryWrapper = Wrappers.lambdaQuery();
         //查询已开奖 余额投注
-        return selectListByDate(userId,beginTime,endTime,gameId,gameDate,0,0);
+        queryWrapper.ne(AppGameBetting::getIsWinning, 0);
+        queryWrapper.eq(AppGameBetting::getBettingType, 0);
+        if(null != userId){
+            queryWrapper.eq(AppGameBetting::getUserId,userId);
+        }
+        if(StringUtils.isNotBlank(beginTime)){
+            queryWrapper.ge(AppGameBetting::getUpdateTime,beginTime);
+        }
+        if(null != gameId){
+            queryWrapper.eq(AppGameBetting::getGameId,gameId);
+        }
+        if(StringUtils.isNotBlank(endTime)){
+            queryWrapper.le(AppGameBetting::getUpdateTime,endTime);
+        }
+        if(StringUtils.isNotBlank(gameDate)){
+            queryWrapper.like(AppGameBetting::getGameDate,gameDate);
+        }
+        return appGameBettingMapper.selectList(queryWrapper);
     }
 
     @Override

+ 1 - 1
game-business/src/main/java/com/game/business/service/impl/AppUserCountServiceImpl.java

@@ -167,7 +167,7 @@ public class AppUserCountServiceImpl extends ServiceImpl<AppUserCountMapper, App
             lastDateStr = DateUtil.format(curDate, "yyyy-MM-dd").concat(" 00:00:00");
         }
         String endTimeStr = DateUtil.format(curDate,"yyyy-MM-dd HH:mm:ss");*/
-        List<AppGameBetting> gameBettingList = appGameBettingService.selectListByDate(null, null, null,gameId,gameDate);
+        List<AppGameBetting> gameBettingList = appGameBettingService.selectListIsWinByDate(null, null, null,gameId,gameDate);
         if (null != gameBettingList && gameBettingList.size() > 0) {
             String finalDateTime = dateTime;
             Date finalCurDate = curDate;

+ 1 - 0
game-business/src/main/java/com/game/business/task/AppAgentGameBettingTask.java

@@ -75,6 +75,7 @@ public class AppAgentGameBettingTask {
             recordCount.setPid(userAgent.getPid());
             recordCount.setCommission(0.00);
             recordCount.setGameRate(0.00);
+            recordCount.setType(0);
             recordCountList.add(recordCount);
             appUserCountService.staticsUserBetting(appGameBetting, recordCountList);
             return;

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

@@ -99,7 +99,7 @@ public class AppUserCountTask {
             List<FinTranRecord> finTranRecordList = finTranRecordService.getUserRecordList(null, dateTime.concat(" 00:00:00"), dateTime.concat(" 23:59:59"));
             List<AppUserLiveDividedRecord> liveDividedRecordList = appUserLiveDividedRecordService.selectByDate(null, dateTime.concat(" 00:00:00"), dateTime.concat(" 23:59:59"));
             List<AppUserGameRecordCount> gameRecordCountList = appUserGameRecordCountService.selectByDate(null, dateTime.concat(" 00:00:00"), dateTime.concat(" 23:59:59"),null,null);
-            List<AppGameBetting> gameBettingList = appGameBettingService.selectListByDate(null, dateTime.concat(" 00:00:00"), dateTime.concat(" 23:59:59"),null,null);
+            List<AppGameBetting> gameBettingList = appGameBettingService.selectListByDate(null, dateTime.concat(" 00:00:00"), dateTime.concat(" 23:59:59"),null,null,null,0);
             Date nowDate = new Date();
             if (null != list && list.size() > 0) {
                 List<AppUserCount> appUserCountList = new ArrayList<>();