swagger 推广后台 优化对战百佳历史接口
This commit is contained in:
-7
@@ -32,8 +32,6 @@ import com.ruoyi.game.mahjong.mapper.MahjongRoundMapper;
|
||||
import com.ruoyi.game.mahjong.repository.MahjongCycleRepository;
|
||||
import com.ruoyi.game.mahjong.repository.MahjongRewardPoolCacheRepository;
|
||||
import com.ruoyi.game.mahjong.service.MahjongDistributionService;
|
||||
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;
|
||||
@@ -49,7 +47,6 @@ import java.util.stream.Collectors;
|
||||
* 与玫瑰女郎逐行同构,差异:只有 normal 一个模式、桶 16 档、封顶 500x、game_type = MAHJONG。
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "麻将胡了后台")
|
||||
@RestController
|
||||
@RequestMapping("/admin/mahjong")
|
||||
public class MahjongAdminController extends BaseController {
|
||||
@@ -71,7 +68,6 @@ public class MahjongAdminController extends BaseController {
|
||||
|
||||
// ==================== 箱子配置 ====================
|
||||
|
||||
@ApiOperation("箱子列表(含各身份目标/实时 RTP 与一轮总回合)")
|
||||
@GetMapping("/box/list")
|
||||
public R boxList(@RequestParam(defaultValue = "1") int pageNum,
|
||||
@RequestParam(defaultValue = "10") int pageSize,
|
||||
@@ -154,7 +150,6 @@ public class MahjongAdminController extends BaseController {
|
||||
}
|
||||
|
||||
/** 某箱某身份的桶分布:含 convergeCount(收敛账本) + fixedRounds/convergeRounds(按该身份分布反推) */
|
||||
@ApiOperation("某箱某身份的倍率桶分布")
|
||||
@GetMapping("/box/buckets/{boxId}")
|
||||
public R boxBuckets(@PathVariable Long boxId,
|
||||
@RequestParam(required = false, defaultValue = "common") String audience) {
|
||||
@@ -174,7 +169,6 @@ public class MahjongAdminController extends BaseController {
|
||||
}
|
||||
|
||||
@Log(title = "箱子配置", action = "保存", businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("保存某箱某身份的倍率桶分布(items 为固定池回合,反推回写总回合)")
|
||||
@PostMapping("/box/buckets/save")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public R boxBucketsSave(@RequestBody Map<String, Object> params) {
|
||||
@@ -189,7 +183,6 @@ public class MahjongAdminController extends BaseController {
|
||||
}
|
||||
|
||||
@Log(title = "箱子配置", action = "重算分布", businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("按目标 RTP 重算某箱某身份分布")
|
||||
@PostMapping("/box/buckets/calc")
|
||||
public R calcDistribution(@RequestBody Map<String, Object> params) {
|
||||
Long boxId = asLong(params.get("boxId"));
|
||||
|
||||
-7
@@ -19,8 +19,6 @@ import com.ruoyi.game.mahjong.mapper.MahjongPrizeOrnamentMapper;
|
||||
import com.ruoyi.game.mahjong.mapper.MahjongRecordMapper;
|
||||
import com.ruoyi.game.mahjong.service.MahjongGameService;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
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.*;
|
||||
@@ -30,7 +28,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
/** 客户端接口:Base = {host}/api/mahjong,全部 POST + JSON + token 鉴权(对齐设计方案 §7) */
|
||||
@Slf4j
|
||||
@Api(tags = "麻将胡了游戏")
|
||||
@RestController
|
||||
@RequestMapping("/api/mahjong")
|
||||
public class MahjongClientController extends BaseController {
|
||||
@@ -44,7 +41,6 @@ public class MahjongClientController extends BaseController {
|
||||
/** 进行中的局不展示:结算时 settle_source=start,播完末帧才改 finish;超过单局缓存 TTL(30分钟) 视为已结束兜底 */
|
||||
private static final long IN_PROGRESS_MS = 30 * 60 * 1000L;
|
||||
|
||||
@ApiOperation("获取箱子列表")
|
||||
@PostMapping("/boxes")
|
||||
public R boxes() {
|
||||
List<MahjongBox> list = boxMapper.selectList(new LambdaQueryWrapper<MahjongBox>()
|
||||
@@ -65,7 +61,6 @@ public class MahjongClientController extends BaseController {
|
||||
return R.ok(Map.of("list", boxes));
|
||||
}
|
||||
|
||||
@ApiOperation("执行旋转(新游戏或继续游戏)")
|
||||
@PostMapping("/dospin")
|
||||
public R dospin(@RequestBody SpinRequest req) {
|
||||
Long userId = getUserId();
|
||||
@@ -91,7 +86,6 @@ public class MahjongClientController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("查询游戏记录(分页;scope: 0全服/1我的,默认1我的;只含已播完的局)")
|
||||
@PostMapping("/records")
|
||||
public R records(@RequestBody(required = false) RecordPageRequest req) {
|
||||
Long userId = getUserId();
|
||||
@@ -169,7 +163,6 @@ public class MahjongClientController extends BaseController {
|
||||
return exterior == null || exterior.isEmpty() ? name : name + " (" + exterior + ")";
|
||||
}
|
||||
|
||||
@ApiOperation("查询是否有进行中的游戏(断线重连)")
|
||||
@PostMapping("/hasActive")
|
||||
public R hasActive() {
|
||||
Long userId = getUserId();
|
||||
|
||||
Reference in New Issue
Block a user