|
@@ -4,9 +4,11 @@ import cn.hutool.core.date.DateUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.game.business.domain.AppGame;
|
|
|
import com.game.business.domain.AppGameLottery;
|
|
|
import com.game.business.mapper.AppGameLotteryMapper;
|
|
|
import com.game.business.service.IAppGameLotteryService;
|
|
|
+import com.game.business.service.IAppGameService;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -21,6 +23,9 @@ public class AppGameLotteryServiceImpl extends ServiceImpl<AppGameLotteryMapper,
|
|
|
@Autowired
|
|
|
private AppGameLotteryMapper appGameLotteryMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IAppGameService gameService;
|
|
|
+
|
|
|
@Override
|
|
|
public long selectCount(Long classId, Long gameId, String gameDate) {
|
|
|
LambdaQueryWrapper<AppGameLottery> queryLotteryWrapper = Wrappers.lambdaQuery();;
|
|
@@ -180,4 +185,30 @@ public class AppGameLotteryServiceImpl extends ServiceImpl<AppGameLotteryMapper,
|
|
|
}
|
|
|
return reslut;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Date getLeakDate(Long gameId, String gameDate) {
|
|
|
+ Date curGameDate = null;
|
|
|
+ AppGameLottery history = appGameLotteryMapper.leakInfo(gameId,gameDate);
|
|
|
+ if(null != history && history.getIsLottery().intValue() != 0){
|
|
|
+ curGameDate = history.getGameRecordDate();
|
|
|
+ }else{
|
|
|
+ AppGameLottery history2 = appGameLotteryMapper.leakInfo2(gameId,gameDate);
|
|
|
+ if(null != history2 && history2.getIsLottery().intValue() != 0){
|
|
|
+ curGameDate = history2.getGameRecordDate();
|
|
|
+ }else{
|
|
|
+ String time = DateUtil.format(new Date(),"yyyy-").concat(gameDate);
|
|
|
+ if(time.split("\\:").length > 2){
|
|
|
+ curGameDate = DateUtil.parse(time,"yyyy-MM-dd HH:mm:ss");
|
|
|
+ }else{
|
|
|
+ curGameDate = DateUtil.parse(time,"yyyy-MM-dd HH:mm");
|
|
|
+ }
|
|
|
+ AppGame game = gameService.selectAppGameById(gameId);
|
|
|
+ if(null != game && StringUtils.isNotBlank(game.getGameExpand1())){
|
|
|
+ curGameDate = DateUtil.offsetSecond(curGameDate,Integer.parseInt(game.getGameExpand1()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return curGameDate;
|
|
|
+ }
|
|
|
}
|