|
@@ -87,16 +87,21 @@ public class GameOneClient {
|
|
|
record.setGameTypeId(dbGameType.getGameTypeId());
|
|
|
gameRecordService.insertGameRecord(record);
|
|
|
|
|
|
- // 如果是开奖,添加开奖记录
|
|
|
- if(record.getIsLottery() == 1){
|
|
|
- GameLottery gameLottery = new GameLottery();
|
|
|
- gameLottery.setGameTypeId(dbGameType.getGameTypeId());
|
|
|
- gameLottery.setGameDate(record.getGameDate());
|
|
|
- gameLottery.setGameLotteryDate(record.getGameRecordDate());
|
|
|
- gameLottery.setGameLotterySucc(record.getGameLotterySucc());
|
|
|
+ GameLottery gameLottery = new GameLottery();
|
|
|
+ gameLottery.setGameTypeId(dbGameType.getGameTypeId());
|
|
|
+ gameLottery.setGameDate(record.getGameDate());
|
|
|
+
|
|
|
+ GameLottery dbGameLottery = gameLotteryService.selectGameLottery(gameLottery);
|
|
|
+
|
|
|
+ if(dbGameLottery == null){
|
|
|
gameLotteryService.insertGameLottery(gameLottery);
|
|
|
+ }else{
|
|
|
+ if(record.getIsLottery() == 1) {
|
|
|
+ dbGameLottery.setGameLotteryDate(record.getGameRecordDate());
|
|
|
+ dbGameLottery.setGameLotterySucc(record.getGameLotterySucc());
|
|
|
+ gameLotteryService.updateGameLottery(dbGameLottery);
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
System.out.printf("game one 接收数据异常[" + e.getMessage() + "]");
|