|
@@ -159,10 +159,6 @@ public class AppGameBettingTask {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- if(type != 2 && type != 3){
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
JSONArray gameArry = null;
|
|
|
String classCode = null;
|
|
|
for (int i = 0; i < dataArry.size(); i++) {
|
|
@@ -222,19 +218,15 @@ public class AppGameBettingTask {
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
- if(type == 3){
|
|
|
+
|
|
|
+ if(type == 4){
|
|
|
|
|
|
- String redisKey = CacheConstants.GAME_LOTTERY_TASK_CREATE.concat(appGame.getId() + ":" + gameCode);
|
|
|
+ String redisKey = CacheConstants.GAME_LOTTERY_ITEM_MULTIPLE.concat(appGame.getId() + ":" + gameCode);
|
|
|
if(!redisCache.redisTemplate.opsForValue().setIfAbsent(redisKey, 1)){
|
|
|
continue;
|
|
|
}
|
|
|
-
|
|
|
try {
|
|
|
|
|
|
- appGame.setGameDate(gameDate);
|
|
|
- appGameService.updateAppGame(appGame);
|
|
|
-
|
|
|
-
|
|
|
if(gameCode.equals(Common.GAME_ONE_CODE)){
|
|
|
|
|
|
String gameLotteryBet = gameLotteryObject.getString("gameLotteryBet");
|
|
@@ -275,6 +267,26 @@ public class AppGameBettingTask {
|
|
|
appGameItemService.updateAppGameItem(gameItem);
|
|
|
}
|
|
|
}
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }finally {
|
|
|
+ redisCache.redisTemplate.delete(redisKey);
|
|
|
+ }
|
|
|
+
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(type == 3){
|
|
|
+
|
|
|
+ String redisKey = CacheConstants.GAME_LOTTERY_TASK_CREATE.concat(appGame.getId() + ":" + gameCode);
|
|
|
+ if(!redisCache.redisTemplate.opsForValue().setIfAbsent(redisKey, 1)){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ try {
|
|
|
+
|
|
|
+ appGame.setGameDate(gameDate);
|
|
|
+ appGameService.updateAppGame(appGame);
|
|
|
|
|
|
AppGameLottery appGameLottery = new AppGameLottery();
|
|
|
appGameLottery.setGameId(appGame.getId());
|