|
@@ -159,8 +159,9 @@ public class AppGameBettingController extends BaseController{
|
|
|
}
|
|
|
|
|
|
String[] timeArry = appGame.getGameTime().substring(0, 5).split(":");
|
|
|
+ int f = Integer.parseInt(timeArry[0]);
|
|
|
int m = Integer.parseInt(timeArry[1]);
|
|
|
- if(m <= 2){
|
|
|
+ if(f == 0 && m <= 2){
|
|
|
return HttpRet.fail("游戏已封盘,无法下单。");
|
|
|
}
|
|
|
|
|
@@ -181,9 +182,9 @@ public class AppGameBettingController extends BaseController{
|
|
|
appGame.getCode().equals(Common.GAME_SIX_CODE) ||
|
|
|
appGame.getCode().equals(Common.GAME_SEVEN_CODE)){
|
|
|
|
|
|
- List<String> itemList = Arrays.asList(Common.GAME_BETTING_ITEM_LIMIT);
|
|
|
+ List<String> itemList = Arrays.asList(Common.GAME_BETTING_ITEM_SMALL_LIMIT);
|
|
|
|
|
|
- // 当前投注的是否属于特殊固定选项
|
|
|
+ // 当前投注是否属于小倍
|
|
|
if(itemList.contains(gameBetting.getBettingItem())) {
|
|
|
|
|
|
List<String> bettingItemList = appGameBettingService.getBettingItem(gameBetting.getUserId(), gameBetting.getGameId(), appGame.getGameDate());
|
|
@@ -211,6 +212,64 @@ public class AppGameBettingController extends BaseController{
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ }else if(appGame.getCode().equals(Common.GAME_EIGHT_CODE)){
|
|
|
+
|
|
|
+ List<String> itemSmallList = Arrays.asList(Common.GAME_BETTING_ITEM_SMALL_LIMIT);
|
|
|
+
|
|
|
+ List<String> itemBigList = Arrays.asList(Common.GAME_BETTING_ITEM_SMALL_LIMIT);
|
|
|
+
|
|
|
+ List<String> bettingItemList = appGameBettingService.getBettingItem(gameBetting.getUserId(), gameBetting.getGameId(), appGame.getGameDate());
|
|
|
+
|
|
|
+ if (bettingItemList != null && !bettingItemList.isEmpty()) {
|
|
|
+
|
|
|
+ // 当前投注是否属于小倍
|
|
|
+ if(itemSmallList.contains(gameBetting.getBettingItem())) {
|
|
|
+
|
|
|
+ List<String> checkItemList = new ArrayList<>();
|
|
|
+
|
|
|
+ for (int i = 0; i < itemSmallList.size(); i++) {
|
|
|
+ String itemStr = itemSmallList.get(i);
|
|
|
+ if (bettingItemList.contains(itemStr)) {
|
|
|
+ checkItemList.add(itemStr);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(checkItemList.size() >= 3){
|
|
|
+ return HttpRet.fail("当前期投注选项已超过限额,无法下单!");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 当前投注是否已经满足3个投注选项了
|
|
|
+ if (checkItemList.size() == 2) {
|
|
|
+ // 当前投注的是否属于特殊选项重复投注
|
|
|
+ if (!checkItemList.contains(gameBetting.getBettingItem())) {
|
|
|
+ return HttpRet.fail("当前期投注选项已超过限额,无法下单!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 当前投注是否属于大倍
|
|
|
+ }else if(itemBigList.contains(gameBetting.getBettingItem())) {
|
|
|
+
|
|
|
+ List<String> checkItemList = new ArrayList<>();
|
|
|
+
|
|
|
+ for (int i = 0; i < itemSmallList.size(); i++) {
|
|
|
+ String itemStr = itemSmallList.get(i);
|
|
|
+ if (bettingItemList.contains(itemStr)) {
|
|
|
+ checkItemList.add(itemStr);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(checkItemList.size() >= 3){
|
|
|
+ return HttpRet.fail("当前期投注选项已超过限额,无法下单!");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 当前投注是否已经满足3个投注选项了
|
|
|
+ if (checkItemList.size() == 2) {
|
|
|
+ // 当前投注的是否属于特殊选项重复投注
|
|
|
+ if (!checkItemList.contains(gameBetting.getBettingItem())) {
|
|
|
+ return HttpRet.fail("当前期投注选项已超过限额,无法下单!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
BigDecimal gameBettingAmountCheck = new BigDecimal(appGame.getBettingMaxMoney() + "");
|