|
@@ -314,17 +314,20 @@ public class AppGameBettingTask {
|
|
|
|
|
|
try {
|
|
try {
|
|
|
|
|
|
- appGame.setGameDate(gameDate);
|
|
|
|
- appGameService.updateAppGame(appGame);
|
|
|
|
-
|
|
|
|
- AppGameLottery appGameLottery = new AppGameLottery();
|
|
|
|
- appGameLottery.setGameId(appGame.getId());
|
|
|
|
- appGameLottery.setClassId(appGame.getClassifyId());
|
|
|
|
- appGameLottery.setGameDate(gameDate);
|
|
|
|
- appGameLottery.setIsLottery(0);
|
|
|
|
- appGameLottery.setGameRecordDate(new Date());
|
|
|
|
- appGameLotteryService.save(appGameLottery);
|
|
|
|
-
|
|
|
|
|
|
+ AppGameLottery appGameLottery = appGameLotteryService.selectLottery(appGame.getClassifyId(), appGame.getId(), gameDate);
|
|
|
|
+
|
|
|
|
+ if(appGameLottery == null){
|
|
|
|
+ appGame.setGameDate(gameDate);
|
|
|
|
+ appGameService.updateAppGame(appGame);
|
|
|
|
+
|
|
|
|
+ appGameLottery = new AppGameLottery();
|
|
|
|
+ appGameLottery.setGameId(appGame.getId());
|
|
|
|
+ appGameLottery.setClassId(appGame.getClassifyId());
|
|
|
|
+ appGameLottery.setGameDate(gameDate);
|
|
|
|
+ appGameLottery.setIsLottery(0);
|
|
|
|
+ appGameLottery.setGameRecordDate(new Date());
|
|
|
|
+ appGameLotteryService.save(appGameLottery);
|
|
|
|
+ }
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}finally {
|
|
}finally {
|