|
@@ -120,6 +120,11 @@ public class AppGameBettingController extends BaseController{
|
|
|
|
|
|
|
|
|
|
Integer bettingCount = appGameBettingService.getBettingCount(gameBetting.getUserId(), gameBetting.getGameId(), gameBetting.getGameDate());
|
|
Integer bettingCount = appGameBettingService.getBettingCount(gameBetting.getUserId(), gameBetting.getGameId(), gameBetting.getGameDate());
|
|
|
|
+ if(bettingCount != null && bettingCount > 0){
|
|
|
|
+ if(bettingCount.intValue() > appGame.getBettingCount().intValue()){
|
|
|
|
+ return HttpRet.fail("投注次数已超过限额,无法下单。");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
if(gameBetting.getBettingGameType() == 0){
|
|
if(gameBetting.getBettingGameType() == 0){
|
|
@@ -137,11 +142,11 @@ public class AppGameBettingController extends BaseController{
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- BigDecimal bettingAmountCheck = new BigDecimal("0");
|
|
+ BigDecimal bettingAmountCheck = new BigDecimal("");
|
|
BigDecimal bettingAmountSum = appGameBettingService.getBettingAmount(gameBetting.getUserId(), gameBetting.getGameId(), gameBetting.getGameDate(), gameBetting.getBettingItem());
|
|
BigDecimal bettingAmountSum = appGameBettingService.getBettingAmount(gameBetting.getUserId(), gameBetting.getGameId(), gameBetting.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("投注金额已超过限额,无法下单。");
|
|
}
|
|
}
|
|
|
|
|
|
gameBetting.setBettingMultiple(appGameItem.getItemMultiple());
|
|
gameBetting.setBettingMultiple(appGameItem.getItemMultiple());
|