kk il y a 2 mois
Parent
commit
ed138f9c78

+ 12 - 0
game-business/src/main/java/com/game/business/task/AppGameBettingTask.java

@@ -7,6 +7,7 @@ import com.baomidou.dynamic.datasource.annotation.DSTransactional;
 import com.game.business.domain.*;
 import com.game.business.dto.AppItemCountDTO;
 import com.game.business.service.*;
+import com.game.business.util.Common;
 import com.game.business.util.im.TencentCloudImUtil;
 import com.game.business.vo.AppGameItemBettingVO;
 import com.game.common.constant.finance.FinTranType1;
@@ -78,6 +79,7 @@ public class AppGameBettingTask {
             String gameCode = null;
             String time = null;
             String classCode = null;
+            Integer state = null;
             for (int i = 0; i < dataArry.size(); i++) {
                 JSONObject jsonObject = dataArry.getJSONObject(i);
                 if(jsonObject.containsKey("data")){
@@ -90,6 +92,9 @@ public class AppGameBettingTask {
                 if(jsonObject.containsKey("id")){
                     classCode = jsonObject.getString("id");
                 }
+                if(jsonObject.containsKey("state")){
+                    state = jsonObject.getInteger("state");
+                }
             }
 
             if(classCode == null){
@@ -127,6 +132,13 @@ public class AppGameBettingTask {
 //                    System.out.println("开奖游戏不存在:" + gameCode);
                 return;
             }
+
+            if(gameCode.equals(Common.GAME_FOUR_CODE)){
+                if(state == null || state != 1){
+                    return;
+                }
+            }
+
             AppGame appGame = codeGameMap.get(gameCode).get(0);
             appGame.setGameTime(time);
             appGameService.updateAppGame(appGame);