|
@@ -126,6 +126,10 @@ public class AppGameBettingController extends BaseController{
|
|
return HttpRet.fail("游戏期号不存在,无法下单。");
|
|
return HttpRet.fail("游戏期号不存在,无法下单。");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if(!appGame.getGameDate().equals(gameBetting.getGameDate())){
|
|
|
|
+ return HttpRet.fail("游戏期号不匹配,无法下单。");
|
|
|
|
+ }
|
|
|
|
+
|
|
if(StringUtils.isBlank(appGame.getGameTime())){
|
|
if(StringUtils.isBlank(appGame.getGameTime())){
|
|
return HttpRet.fail("游戏已封盘,无法下单。");
|
|
return HttpRet.fail("游戏已封盘,无法下单。");
|
|
}
|
|
}
|
|
@@ -140,10 +144,13 @@ public class AppGameBettingController extends BaseController{
|
|
return HttpRet.fail("游戏已封盘,无法下单。");
|
|
return HttpRet.fail("游戏已封盘,无法下单。");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if(appGame.getBettingCount() == null || appGame.getBettingCount() == 0){
|
|
|
|
+ return HttpRet.fail("投注次数已超过限额,无法下单。");
|
|
|
|
+ }
|
|
|
|
|
|
- Integer bettingCount = appGameBettingService.getBettingCount(gameBetting.getUserId(), gameBetting.getGameId(), gameBetting.getGameDate());
|
|
|
|
- if(bettingCount != null && bettingCount > 0){
|
|
|
|
- if(bettingCount.intValue() > appGame.getBettingCount().intValue()){
|
|
|
|
|
|
+ Integer bettingCount = appGameBettingService.getBettingCount(gameBetting.getUserId(), gameBetting.getGameId(), appGame.getGameDate());
|
|
|
|
+ if(bettingCount != null && bettingCount > 0 ){
|
|
|
|
+ if(bettingCount.intValue() >= appGame.getBettingCount().intValue()){
|
|
return HttpRet.fail("投注次数已超过限额,无法下单。");
|
|
return HttpRet.fail("投注次数已超过限额,无法下单。");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -165,7 +172,7 @@ public class AppGameBettingController extends BaseController{
|
|
}
|
|
}
|
|
|
|
|
|
BigDecimal bettingAmountCheck = new BigDecimal(appGameItem.getBettingMoney() + "");
|
|
BigDecimal bettingAmountCheck = new BigDecimal(appGameItem.getBettingMoney() + "");
|
|
- BigDecimal bettingAmountSum = appGameBettingService.getBettingAmount(gameBetting.getUserId(), gameBetting.getGameId(), gameBetting.getGameDate(), gameBetting.getBettingItem());
|
|
|
|
|
|
+ BigDecimal bettingAmountSum = appGameBettingService.getBettingAmount(gameBetting.getUserId(), gameBetting.getGameId(), appGame.getGameDate(), gameBetting.getBettingItem());
|
|
BigDecimal bettingAmountAdd = bettingAmountSum.add(new BigDecimal(gameBetting.getBettingAmount() + ""));
|
|
BigDecimal bettingAmountAdd = bettingAmountSum.add(new BigDecimal(gameBetting.getBettingAmount() + ""));
|
|
if(bettingAmountAdd.compareTo(bettingAmountCheck) == 1){
|
|
if(bettingAmountAdd.compareTo(bettingAmountCheck) == 1){
|
|
return HttpRet.fail("投注金额已超过限额,无法下单。");
|
|
return HttpRet.fail("投注金额已超过限额,无法下单。");
|