|
@@ -19,6 +19,7 @@ import com.game.business.vo.AppGameLotteryVO;
|
|
|
import com.game.business.vo.AppUserAgentVO;
|
|
|
import com.game.common.annotation.Anonymous;
|
|
|
import com.game.common.annotation.Log;
|
|
|
+import com.game.common.annotation.RepeatSubmit;
|
|
|
import com.game.common.core.controller.BaseController;
|
|
|
import com.game.common.core.domain.HttpRet;
|
|
|
import com.game.common.core.domain.HttpRetPageArr;
|
|
@@ -182,16 +183,16 @@ public class AppGameLotteryController extends BaseController{
|
|
|
@PostMapping("/addLottery")
|
|
|
@ApiOperation(value = "手动开奖", notes = "手动开奖")
|
|
|
@Log(title = "手动开奖", businessType = BusinessType.UPDATE)
|
|
|
- public HttpRet<Boolean> addLottery(@RequestBody AppGameLottery appGameLottery) throws Exception {
|
|
|
+ public R<Boolean> addLottery(@RequestBody AppGameLottery appGameLottery) throws Exception {
|
|
|
|
|
|
Long userId = SecurityUtils.getUserId();
|
|
|
|
|
|
if(userId == null){
|
|
|
- return HttpRet.fail("权限不足,请联系管理员");
|
|
|
+ return R.fail("权限不足,请联系管理员");
|
|
|
}
|
|
|
|
|
|
if(userId != 10013 && SecurityUtils.getLoginUser().isBusUser()){ //app用户只有10013能发
|
|
|
- return HttpRet.fail("权限不足,请联系管理员");
|
|
|
+ return R.fail("权限不足,请联系管理员");
|
|
|
}
|
|
|
|
|
|
if(StringUtils.isNotBlank(appGameLottery.getGameDate())){
|
|
@@ -200,12 +201,17 @@ public class AppGameLotteryController extends BaseController{
|
|
|
|
|
|
AppGameLottery dbAppGameLottery = appGameLotteryService.selectLottery(appGameLottery.getClassId(), appGameLottery.getGameId(), appGameLottery.getGameDate());
|
|
|
if(dbAppGameLottery != null && dbAppGameLottery.getIsLottery() == 1){
|
|
|
- return HttpRet.fail("该游戏,当前期已自动开奖过了,不能手动开奖");
|
|
|
+ return R.fail("该游戏,当前期已自动开奖过了,不能手动开奖");
|
|
|
}
|
|
|
|
|
|
appGameLottery.setIsLottery(1);
|
|
|
String time = DateUtil.format(new Date(),"yyyy-").concat(appGameLottery.getGameDate());
|
|
|
- appGameLottery.setGameRecordDate(DateUtil.parse(time,"yyyy-MM-dd HH:mm"));
|
|
|
+ if(time.split("\\:").length > 2){
|
|
|
+ appGameLottery.setGameRecordDate(DateUtil.parse(time,"yyyy-MM-dd HH:mm:ss"));
|
|
|
+ }else{
|
|
|
+ appGameLottery.setGameRecordDate(DateUtil.parse(time,"yyyy-MM-dd HH:mm"));
|
|
|
+ }
|
|
|
+
|
|
|
boolean flg = false;
|
|
|
if(dbAppGameLottery == null){
|
|
|
flg = appGameLotteryService.save(appGameLottery);
|
|
@@ -220,7 +226,18 @@ public class AppGameLotteryController extends BaseController{
|
|
|
if(flg){
|
|
|
appGameLotteryTask.updateLottery(appGameLottery);
|
|
|
}
|
|
|
- return HttpRet.success("手动开奖成功",true);
|
|
|
+ return R.ok(true,"手动开奖成功");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @PostMapping("/leakLottery")
|
|
|
+ @ApiOperation(value = "修补数据", notes = "修补数据")
|
|
|
+ @Log(title = "修补数据", businessType = BusinessType.UPDATE)
|
|
|
+ @RepeatSubmit(message = "频繁操作,请稍后再试")
|
|
|
+ public R leakLottery() throws Exception {
|
|
|
+
|
|
|
+ appGameLotteryService.leakLottery();
|
|
|
+ return R.ok(true,"修补数据成功");
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -250,6 +267,17 @@ public class AppGameLotteryController extends BaseController{
|
|
|
util.exportExcel(response, list, "游戏开奖记录数据");
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取游戏开奖记录详细信息
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('business:lottery:query')")
|
|
|
+ @GetMapping(value = "/lotteryInfo/{id}")
|
|
|
+ @ApiOperation(value = "查询漏奖数据", notes = "查询漏奖数据")
|
|
|
+ public R<AppGameLottery> lotteryInfo(@PathVariable("id") Long id)
|
|
|
+ {
|
|
|
+ return R.ok(appGameLotteryService.leakInfo(id));
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获取游戏开奖记录详细信息
|
|
|
*/
|