swagger 推广后台 优化对战百佳历史接口
This commit is contained in:
-15
@@ -15,8 +15,6 @@ import com.ruoyi.game.wheel.constants.WheelPoolType;
|
||||
import com.ruoyi.game.wheel.service.AdminWheelService;
|
||||
import com.ruoyi.game.wheel.vo.WheelBetRecordVO;
|
||||
import com.ruoyi.game.wheel.vo.WheelPoolAdjustmentVO;
|
||||
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.transaction.annotation.Transactional;
|
||||
@@ -27,7 +25,6 @@ import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Api(tags = "疯狂转盘")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/admin/wheel")
|
||||
@@ -57,20 +54,17 @@ public class AdminWheelController extends BaseController {
|
||||
@Autowired
|
||||
private GameWheelPoolAdjustmentMapper poolAdjustmentMapper;
|
||||
|
||||
@ApiOperation("获取疯狂转盘游戏配置")
|
||||
@GetMapping("/gameconfig")
|
||||
public AjaxResult getGameConfig() {
|
||||
return adminWheelService.getGameConfig();
|
||||
}
|
||||
|
||||
@Log(title = "游戏配置", action = "保存", businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("更新疯狂转盘游戏配置")
|
||||
@PostMapping("/gameconfig")
|
||||
public AjaxResult updateGameConfig(@RequestBody String body) {
|
||||
return adminWheelService.updateGameConfig(body);
|
||||
}
|
||||
|
||||
@ApiOperation("回合记录列表")
|
||||
@GetMapping("/round/list")
|
||||
public TableDataInfo roundList(
|
||||
@RequestParam(required = false) String date,
|
||||
@@ -88,7 +82,6 @@ public class AdminWheelController extends BaseController {
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation("投注记录列表")
|
||||
@GetMapping("/bet/list")
|
||||
public TableDataInfo betList(
|
||||
@RequestParam(required = false) Long roundId,
|
||||
@@ -101,7 +94,6 @@ public class AdminWheelController extends BaseController {
|
||||
|
||||
// ======================== 奖励矩阵 CRUD ========================
|
||||
|
||||
@ApiOperation("奖励矩阵列表")
|
||||
@GetMapping("/matrix/list")
|
||||
public AjaxResult matrixList(
|
||||
@RequestParam(required = false) Integer betAmount,
|
||||
@@ -120,7 +112,6 @@ public class AdminWheelController extends BaseController {
|
||||
}
|
||||
|
||||
@Log(title = "奖励矩阵", action = "保存", businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("保存奖励矩阵行")
|
||||
@PostMapping("/matrix/save")
|
||||
public AjaxResult matrixSave(@RequestBody GameWheelRewardMatrix matrix) {
|
||||
GameWheelRewardMatrix exist = matrix.getId() == null ? null : rewardMatrixMapper.selectById(matrix.getId());
|
||||
@@ -145,7 +136,6 @@ public class AdminWheelController extends BaseController {
|
||||
}
|
||||
|
||||
@Log(title = "奖励矩阵", action = "删除", businessType = BusinessType.DELETE)
|
||||
@ApiOperation("删除奖励矩阵行(软删:置 status=0)")
|
||||
@DeleteMapping("/matrix/delete/{id}")
|
||||
public AjaxResult matrixDelete(@PathVariable Long id) {
|
||||
rewardMatrixMapper.update(null, new LambdaUpdateWrapper<GameWheelRewardMatrix>()
|
||||
@@ -156,7 +146,6 @@ public class AdminWheelController extends BaseController {
|
||||
|
||||
// ======================== 奖池统计 ========================
|
||||
|
||||
@ApiOperation("奖池统计")
|
||||
@GetMapping("/pool/stats")
|
||||
public AjaxResult poolStats() {
|
||||
return AjaxResult.success(adminWheelService.buildPoolStats());
|
||||
@@ -165,7 +154,6 @@ public class AdminWheelController extends BaseController {
|
||||
// ======================== 奖池调节 ========================
|
||||
|
||||
@Log(title = "游戏配置", action = "调整奖池", businessType = BusinessType.GRANT)
|
||||
@ApiOperation("奖池调整(注水/抽水)")
|
||||
@PostMapping("/pool/adjust")
|
||||
@RepeatSubmit(interval = 3000)
|
||||
public AjaxResult adjustPool(@RequestBody Map<String, Object> params) {
|
||||
@@ -173,7 +161,6 @@ public class AdminWheelController extends BaseController {
|
||||
}
|
||||
|
||||
@Log(title = "游戏配置", action = "重置奖池", businessType = BusinessType.CLEAN)
|
||||
@ApiOperation("重置奖池(累计统计与余额一起归零)")
|
||||
@PostMapping("/pool/reset")
|
||||
public AjaxResult resetPool(@RequestBody(required = false) Map<String, Object> params) {
|
||||
Map<String, Object> p = params == null ? Collections.emptyMap() : params;
|
||||
@@ -182,7 +169,6 @@ public class AdminWheelController extends BaseController {
|
||||
return adminWheelService.resetPool(poolType, reason, getUsername());
|
||||
}
|
||||
|
||||
@ApiOperation("奖池调整记录")
|
||||
@GetMapping("/pool/adjustLog")
|
||||
public TableDataInfo adjustLog(@RequestParam(required = false) String poolType) {
|
||||
startPage();
|
||||
@@ -211,7 +197,6 @@ public class AdminWheelController extends BaseController {
|
||||
return target;
|
||||
}
|
||||
|
||||
@ApiOperation("获取奖池余额(含人工调整)")
|
||||
@GetMapping("/pool/balance")
|
||||
public AjaxResult getPoolBalance(@RequestParam(required = false) String poolType) {
|
||||
if (StringUtils.isEmpty(poolType)) {
|
||||
|
||||
-8
@@ -18,8 +18,6 @@ import com.ruoyi.game.wheel.contract.api.response.GetRoundResultsResponse;
|
||||
import com.ruoyi.game.wheel.service.ApiWheelService;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
import com.ruoyi.user.service.ApiUserService;
|
||||
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.validation.annotation.Validated;
|
||||
@@ -29,7 +27,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import java.util.Map;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Api(tags = "疯狂转盘")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/wheel")
|
||||
@@ -55,7 +52,6 @@ public class ApiWheelController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("投注")
|
||||
@PostMapping("/dobet")
|
||||
// 这里**不加** @RepeatSubmit:一局允许同一组合重复下注(最多 50 注),连点两次 5 元 = 两注,
|
||||
// 是正常玩法而不是重复提交;加了会把第二次合法下注挡成"不允许重复提交"。
|
||||
@@ -82,7 +78,6 @@ public class ApiWheelController extends BaseController {
|
||||
return apiWheelService.doBet(request, userId);
|
||||
}
|
||||
|
||||
@ApiOperation("获取最新一期游戏状态")
|
||||
@PostMapping("/last_round_info")
|
||||
public R<GetRoundInfoResponse> getLastRoundInfo(@RequestBody GetLastRoundInfoRequest request) {
|
||||
R loginCheck = checkLogin();
|
||||
@@ -91,7 +86,6 @@ public class ApiWheelController extends BaseController {
|
||||
return apiWheelService.getLastRoundInfo(userId);
|
||||
}
|
||||
|
||||
@ApiOperation("获取玩家的游戏历史记录")
|
||||
@PostMapping("/history_bet_info")
|
||||
public R<GetRoundHistoryResponse> getHistoryBetInfo(@RequestBody GetHistoryBetRequest request) {
|
||||
R loginCheck = checkLogin();
|
||||
@@ -100,7 +94,6 @@ public class ApiWheelController extends BaseController {
|
||||
return apiWheelService.getHistoryBetInfo(request, userId);
|
||||
}
|
||||
|
||||
@ApiOperation("获取疯狂转盘游戏历史记录")
|
||||
@PostMapping("/round_history_bet_info")
|
||||
public R<GetRoundHistoryResponse> getRoundHistoryBetInfo(@RequestBody GetRoundHistoryRequest request) {
|
||||
R loginCheck = checkLogin();
|
||||
@@ -109,7 +102,6 @@ public class ApiWheelController extends BaseController {
|
||||
return apiWheelService.getRoundHistoryInfo(request);
|
||||
}
|
||||
|
||||
@ApiOperation("获取历史开奖结果(每一轮的开奖符号)")
|
||||
@PostMapping("/round_results")
|
||||
public R<GetRoundResultsResponse> getRoundResults(@RequestBody GetRoundResultsRequest request) {
|
||||
R loginCheck = checkLogin();
|
||||
|
||||
Reference in New Issue
Block a user