swagger 推广后台 优化对战百佳历史接口
This commit is contained in:
-7
@@ -5,15 +5,12 @@ import com.ruoyi.reward.contract.admin.request.AdjustRewardPoolRequest;
|
||||
import com.ruoyi.reward.contract.admin.response.QueryGlobalRewardConfig;
|
||||
import com.ruoyi.reward.model.GloalRewardConfig;
|
||||
import com.ruoyi.reward.service.GlobalRewardPoolService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Api(tags = "全局奖池配置")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/admin/globalrewardpool")
|
||||
@@ -21,7 +18,6 @@ public class AdminGlobalRewardPoolController {
|
||||
@Autowired
|
||||
private GlobalRewardPoolService globalRewardPoolService;
|
||||
|
||||
@ApiOperation("获取奖池配置和状态")
|
||||
@GetMapping("/config")
|
||||
public R<QueryGlobalRewardConfig> getGameConfig() {
|
||||
var config = globalRewardPoolService.getGameConfig();
|
||||
@@ -37,7 +33,6 @@ public class AdminGlobalRewardPoolController {
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
@ApiOperation("更新奖池配置")
|
||||
@PostMapping("/config")
|
||||
public R<Void> updateGameConfig(@RequestBody GloalRewardConfig params) {
|
||||
String msg = globalRewardPoolService.updateGameConfig(params);
|
||||
@@ -46,14 +41,12 @@ public class AdminGlobalRewardPoolController {
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ApiOperation("重置奖池缓存")
|
||||
@PostMapping("/reset")
|
||||
public R<?> resetRewardPool() {
|
||||
globalRewardPoolService.resetCache();
|
||||
return R.ok(null, "奖池缓存已清空");
|
||||
}
|
||||
|
||||
@ApiOperation("调整奖池(抽水/放水)")
|
||||
@PostMapping("/adjust")
|
||||
public R<?> adjustRewardPool(@RequestBody AdjustRewardPoolRequest req) {
|
||||
if (req.getAmount() == null || req.getAmount().compareTo(BigDecimal.ZERO) <= 0) {
|
||||
|
||||
Reference in New Issue
Block a user