Quellcode durchsuchen

add betting_type

kk vor 2 Monaten
Ursprung
Commit
3e8c855eb8

+ 3 - 2
game-business/src/main/java/com/game/business/controller/AppGameBettingController.java

@@ -301,10 +301,11 @@ public class AppGameBettingController extends BaseController{
     @PostMapping(value = "/listByGameId")
     @ApiOperation(value = "游戏输赢统计(详情)", notes = "游戏输赢统计(详情)")
     public HttpRetPageArr<AppGameBettingVO> getListByGameId(@RequestParam(name = "gameId") Long gameId, @RequestParam(name = "userId") Long userId,
-                                                            @RequestParam(name = "isWinning") Integer isWinning, @RequestParam(name = "strDate", required = false) String strDate)
+                                                            @RequestParam(name = "isWinning") Integer isWinning, @RequestParam(name = "strDate", required = false) String strDate
+                                                            ,@RequestParam(name = "bettingType", required = false) Integer bettingType)
     {
         startPage();
-        List<AppGameBetting> list = appGameBettingService.selectListByGameId(gameId, userId, isWinning, strDate);
+        List<AppGameBetting> list = appGameBettingService.selectListByGameId(gameId, userId, isWinning, strDate, bettingType);
         List<AppGameBettingVO> resultList = new ArrayList<>();
         if(list != null && !list.isEmpty()){
             AppGameItem appGameItem = new AppGameItem();

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

@@ -16,7 +16,7 @@ public interface IAppGameBettingService extends IService<AppGameBetting> {
 
     List<AppGameBettingDetailsCountVO> getCount(String strDate, Long userId, Integer bettingType);
 
-    List<AppGameBetting> selectListByGameId(Long gameId, Long userId, Integer isWinning, String strDate);
+    List<AppGameBetting> selectListByGameId(Long gameId, Long userId, Integer isWinning, String strDate, Integer bettingType);
 
     /**
      * 根据日期查询投注情况

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

@@ -48,13 +48,16 @@ public class AppGameBettingServiceImpl extends ServiceImpl<AppGameBettingMapper,
     }
 
     @Override
-    public List<AppGameBetting> selectListByGameId(Long gameId, Long userId, Integer isWinning, String strDate) {
+    public List<AppGameBetting> selectListByGameId(Long gameId, Long userId, Integer isWinning, String strDate, Integer bettingType) {
         LambdaQueryWrapper<AppGameBetting> queryWrapper = Wrappers.lambdaQuery();;
         queryWrapper.eq(AppGameBetting::getGameId, gameId);
         queryWrapper.eq(AppGameBetting::getUserId, userId);
         if(isWinning != null && isWinning != -1){
             queryWrapper.eq(AppGameBetting::getIsWinning, isWinning);
         }
+        if(bettingType != null && bettingType != -1){
+            queryWrapper.eq(AppGameBetting::getBettingType, bettingType);
+        }
         if(StringUtils.isNotBlank(strDate)){
             queryWrapper.between(AppGameBetting::getCreateTime, strDate + " 00:00:00", strDate + " 23:59:59");
         }