fix
This commit is contained in:
@@ -4,10 +4,14 @@ import com.tailbet.model.dto.BetDTO;
|
|||||||
import com.tailbet.model.dto.GameOperateDTO;
|
import com.tailbet.model.dto.GameOperateDTO;
|
||||||
import com.tailbet.model.dto.HistoryQueryDTO;
|
import com.tailbet.model.dto.HistoryQueryDTO;
|
||||||
import com.tailbet.model.dto.SetDigitDTO;
|
import com.tailbet.model.dto.SetDigitDTO;
|
||||||
|
import com.tailbet.model.entity.BetOrder;
|
||||||
|
import com.tailbet.model.entity.GameRound;
|
||||||
|
import com.tailbet.model.vo.DigitTrialVo;
|
||||||
import com.tailbet.model.vo.R;
|
import com.tailbet.model.vo.R;
|
||||||
import com.tailbet.model.vo.UserContext;
|
import com.tailbet.model.vo.UserContext;
|
||||||
import com.tailbet.service.IBetService;
|
import com.tailbet.service.IBetService;
|
||||||
import com.tailbet.service.IGameService;
|
import com.tailbet.service.IGameService;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -28,7 +32,7 @@ public class GameController {
|
|||||||
* 开始游戏(群主)
|
* 开始游戏(群主)
|
||||||
*/
|
*/
|
||||||
@PostMapping("/start")
|
@PostMapping("/start")
|
||||||
public R<?> startGame(@RequestBody GameOperateDTO dto) {
|
public R<GameRound> startGame(@RequestBody GameOperateDTO dto) {
|
||||||
try {
|
try {
|
||||||
Long userId = UserContext.getUserId();
|
Long userId = UserContext.getUserId();
|
||||||
var round = gameService.startGame(dto.getGroupId(), userId);
|
var round = gameService.startGame(dto.getGroupId(), userId);
|
||||||
@@ -42,7 +46,7 @@ public class GameController {
|
|||||||
* 结束接注(群主)
|
* 结束接注(群主)
|
||||||
*/
|
*/
|
||||||
@PostMapping("/end")
|
@PostMapping("/end")
|
||||||
public R<?> endBet(@RequestBody GameOperateDTO dto) {
|
public R<GameRound> endBet(@RequestBody GameOperateDTO dto) {
|
||||||
try {
|
try {
|
||||||
Long userId = UserContext.getUserId();
|
Long userId = UserContext.getUserId();
|
||||||
var round = gameService.endBet(dto.getGroupId(), userId);
|
var round = gameService.endBet(dto.getGroupId(), userId);
|
||||||
@@ -56,11 +60,11 @@ public class GameController {
|
|||||||
* 停止自动连开
|
* 停止自动连开
|
||||||
*/
|
*/
|
||||||
@PostMapping("/stop")
|
@PostMapping("/stop")
|
||||||
public R<?> stopAutoNext(@RequestBody GameOperateDTO dto) {
|
public R<Void> stopAutoNext(@RequestBody GameOperateDTO dto) {
|
||||||
try {
|
try {
|
||||||
Long userId = UserContext.getUserId();
|
Long userId = UserContext.getUserId();
|
||||||
gameService.stopAutoNext(dto.getGroupId(), userId);
|
gameService.stopAutoNext(dto.getGroupId(), userId);
|
||||||
return R.ok("已停止自动连开");
|
return R.ok();
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
return R.fail(e.getMessage());
|
return R.fail(e.getMessage());
|
||||||
}
|
}
|
||||||
@@ -70,13 +74,13 @@ public class GameController {
|
|||||||
* 下注
|
* 下注
|
||||||
*/
|
*/
|
||||||
@PostMapping("/bet")
|
@PostMapping("/bet")
|
||||||
public R<?> bet(@RequestBody BetDTO dto) {
|
public R<BetOrder> bet(@RequestBody BetDTO dto) {
|
||||||
try {
|
try {
|
||||||
Long userId = UserContext.getUserId();
|
Long userId = UserContext.getUserId();
|
||||||
var bet = betService.placeBet(userId, dto.getGroupId(),
|
var bet = betService.placeBet(userId, dto.getGroupId(),
|
||||||
dto.getClientMsgId(), dto.getPlayType(), dto.getBetAmount());
|
dto.getClientMsgId(), dto.getPlayType(), dto.getBetAmount());
|
||||||
if (bet == null) {
|
if (bet == null) {
|
||||||
return R.ok("假人下注已记录");
|
return R.ok();
|
||||||
}
|
}
|
||||||
return R.ok(bet);
|
return R.ok(bet);
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
@@ -88,9 +92,9 @@ public class GameController {
|
|||||||
* 尾数试算
|
* 尾数试算
|
||||||
*/
|
*/
|
||||||
@GetMapping("/bet/trial")
|
@GetMapping("/bet/trial")
|
||||||
public R<?> trialDigit(Long groupId, Long roundId) {
|
public R<List<DigitTrialVo>> trialDigit(Long groupId, Long roundId) {
|
||||||
try {
|
try {
|
||||||
List<IGameService.DigitTrial> trials = gameService.trialDigit(groupId, roundId);
|
List<DigitTrialVo> trials = gameService.trialDigit(groupId, roundId);
|
||||||
return R.ok(trials);
|
return R.ok(trials);
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
return R.fail(e.getMessage());
|
return R.fail(e.getMessage());
|
||||||
@@ -101,7 +105,7 @@ public class GameController {
|
|||||||
* 开奖历史
|
* 开奖历史
|
||||||
*/
|
*/
|
||||||
@GetMapping("/history")
|
@GetMapping("/history")
|
||||||
public R<?> history(HistoryQueryDTO query) {
|
public R<Page<com.tailbet.model.entity.DrawRecord>> history(HistoryQueryDTO query) {
|
||||||
var page = gameService.getHistory(query.getGroupId(), query.getPageNum(), query.getPageSize());
|
var page = gameService.getHistory(query.getGroupId(), query.getPageNum(), query.getPageSize());
|
||||||
return R.ok(page);
|
return R.ok(page);
|
||||||
}
|
}
|
||||||
@@ -110,13 +114,13 @@ public class GameController {
|
|||||||
* 设置尾数(白名单用户)
|
* 设置尾数(白名单用户)
|
||||||
*/
|
*/
|
||||||
@PostMapping("/digit/set")
|
@PostMapping("/digit/set")
|
||||||
public R<?> setDigit(@RequestBody SetDigitDTO dto) {
|
public R<Void> setDigit(@RequestBody SetDigitDTO dto) {
|
||||||
try {
|
try {
|
||||||
Long userId = UserContext.getUserId();
|
Long userId = UserContext.getUserId();
|
||||||
gameService.setTargetDigit(dto.getGroupId(), dto.getDigit(), userId);
|
gameService.setTargetDigit(dto.getGroupId(), dto.getDigit(), userId);
|
||||||
return R.ok("尾数已设置");
|
return R.ok();
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
return R.fail(e.getMessage());
|
return R.fail(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,12 +24,12 @@ public class OpsController {
|
|||||||
* 加积分
|
* 加积分
|
||||||
*/
|
*/
|
||||||
@PostMapping("/points/add")
|
@PostMapping("/points/add")
|
||||||
public R<?> addPoints(@RequestBody PointsDTO dto) {
|
public R<Void> addPoints(@RequestBody PointsDTO dto) {
|
||||||
try {
|
try {
|
||||||
Long operatorId = UserContext.getUserId();
|
Long operatorId = UserContext.getUserId();
|
||||||
pointsService.addPoints(dto.getUserId(), dto.getAmount(),
|
pointsService.addPoints(dto.getUserId(), dto.getAmount(),
|
||||||
IPointsService.TYPE_OPS_ADD, null, operatorId, dto.getRemark());
|
IPointsService.TYPE_OPS_ADD, null, operatorId, dto.getRemark());
|
||||||
return R.ok("加分成功");
|
return R.ok();
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
return R.fail(e.getMessage());
|
return R.fail(e.getMessage());
|
||||||
}
|
}
|
||||||
@@ -39,13 +39,13 @@ public class OpsController {
|
|||||||
* 减积分
|
* 减积分
|
||||||
*/
|
*/
|
||||||
@PostMapping("/points/sub")
|
@PostMapping("/points/sub")
|
||||||
public R<?> subPoints(@RequestBody PointsDTO dto) {
|
public R<Void> subPoints(@RequestBody PointsDTO dto) {
|
||||||
try {
|
try {
|
||||||
Long operatorId = UserContext.getUserId();
|
Long operatorId = UserContext.getUserId();
|
||||||
boolean success = pointsService.subPoints(dto.getUserId(), dto.getAmount(),
|
boolean success = pointsService.subPoints(dto.getUserId(), dto.getAmount(),
|
||||||
IPointsService.TYPE_OPS_SUB, null, operatorId, dto.getRemark());
|
IPointsService.TYPE_OPS_SUB, null, operatorId, dto.getRemark());
|
||||||
if (success) {
|
if (success) {
|
||||||
return R.ok("减分成功");
|
return R.ok();
|
||||||
}
|
}
|
||||||
return R.fail("余额不足或用户不存在");
|
return R.fail("余额不足或用户不存在");
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
@@ -57,13 +57,13 @@ public class OpsController {
|
|||||||
* 拉入群
|
* 拉入群
|
||||||
*/
|
*/
|
||||||
@PostMapping("/group/pull")
|
@PostMapping("/group/pull")
|
||||||
public R<?> pullGroup(@RequestBody PullGroupDTO dto) {
|
public R<Void> pullGroup(@RequestBody PullGroupDTO dto) {
|
||||||
try {
|
try {
|
||||||
Long operatorId = UserContext.getUserId();
|
Long operatorId = UserContext.getUserId();
|
||||||
groupService.pullUser(dto.getGroupId(), dto.getUserId(), operatorId);
|
groupService.pullUser(dto.getGroupId(), dto.getUserId(), operatorId);
|
||||||
return R.ok("拉群成功");
|
return R.ok();
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
return R.fail(e.getMessage());
|
return R.fail(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package com.tailbet.controller;
|
|||||||
|
|
||||||
import com.tailbet.model.dto.ReceiveRpDTO;
|
import com.tailbet.model.dto.ReceiveRpDTO;
|
||||||
import com.tailbet.model.dto.SendRpDTO;
|
import com.tailbet.model.dto.SendRpDTO;
|
||||||
|
import com.tailbet.model.entity.RedPacket;
|
||||||
|
import com.tailbet.model.entity.RedPacketRecv;
|
||||||
import com.tailbet.model.vo.R;
|
import com.tailbet.model.vo.R;
|
||||||
import com.tailbet.model.vo.UserContext;
|
import com.tailbet.model.vo.UserContext;
|
||||||
import com.tailbet.service.IRedPacketService;
|
import com.tailbet.service.IRedPacketService;
|
||||||
@@ -22,7 +24,7 @@ public class RedPacketController {
|
|||||||
* 发红包
|
* 发红包
|
||||||
*/
|
*/
|
||||||
@PostMapping("/send")
|
@PostMapping("/send")
|
||||||
public R<?> sendRp(@RequestBody SendRpDTO dto) {
|
public R<RedPacket> sendRp(@RequestBody SendRpDTO dto) {
|
||||||
try {
|
try {
|
||||||
Long userId = UserContext.getUserId();
|
Long userId = UserContext.getUserId();
|
||||||
var rp = redPacketService.sendRp(userId, dto.getGroupId(),
|
var rp = redPacketService.sendRp(userId, dto.getGroupId(),
|
||||||
@@ -37,7 +39,7 @@ public class RedPacketController {
|
|||||||
* 领红包
|
* 领红包
|
||||||
*/
|
*/
|
||||||
@PostMapping("/receive")
|
@PostMapping("/receive")
|
||||||
public R<?> receiveRp(@RequestBody ReceiveRpDTO dto) {
|
public R<RedPacketRecv> receiveRp(@RequestBody ReceiveRpDTO dto) {
|
||||||
try {
|
try {
|
||||||
Long userId = UserContext.getUserId();
|
Long userId = UserContext.getUserId();
|
||||||
var recv = redPacketService.receiveRp(dto.getRpId(), userId);
|
var recv = redPacketService.receiveRp(dto.getRpId(), userId);
|
||||||
@@ -51,8 +53,8 @@ public class RedPacketController {
|
|||||||
* 获取红包详情
|
* 获取红包详情
|
||||||
*/
|
*/
|
||||||
@GetMapping("/detail")
|
@GetMapping("/detail")
|
||||||
public R<?> detail(Long rpId) {
|
public R<RedPacket> detail(Long rpId) {
|
||||||
var rp = redPacketService.getById(rpId);
|
var rp = redPacketService.getById(rpId);
|
||||||
return R.ok(rp);
|
return R.ok(rp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.tailbet.model.dto.LoginDTO;
|
|||||||
import com.tailbet.model.dto.RegisterDTO;
|
import com.tailbet.model.dto.RegisterDTO;
|
||||||
import com.tailbet.model.dto.UpdateUserDTO;
|
import com.tailbet.model.dto.UpdateUserDTO;
|
||||||
import com.tailbet.model.vo.LoginUserVo;
|
import com.tailbet.model.vo.LoginUserVo;
|
||||||
|
import com.tailbet.model.vo.LoginVo;
|
||||||
import com.tailbet.model.vo.R;
|
import com.tailbet.model.vo.R;
|
||||||
import com.tailbet.model.vo.UserContext;
|
import com.tailbet.model.vo.UserContext;
|
||||||
import com.tailbet.service.IUserService;
|
import com.tailbet.service.IUserService;
|
||||||
@@ -24,10 +25,10 @@ public class UserController {
|
|||||||
* 注册
|
* 注册
|
||||||
*/
|
*/
|
||||||
@PostMapping("/register")
|
@PostMapping("/register")
|
||||||
public R<?> register(@RequestBody RegisterDTO dto) {
|
public R<Void> register(@RequestBody RegisterDTO dto) {
|
||||||
try {
|
try {
|
||||||
userService.register(dto.getUsername(), dto.getPassword());
|
userService.register(dto.getUsername(), dto.getPassword());
|
||||||
return R.ok("注册成功");
|
return R.ok();
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
return R.fail(e.getMessage());
|
return R.fail(e.getMessage());
|
||||||
}
|
}
|
||||||
@@ -37,10 +38,12 @@ public class UserController {
|
|||||||
* 登录
|
* 登录
|
||||||
*/
|
*/
|
||||||
@PostMapping("/login")
|
@PostMapping("/login")
|
||||||
public R<?> login(@RequestBody LoginDTO dto) {
|
public R<LoginVo> login(@RequestBody LoginDTO dto) {
|
||||||
try {
|
try {
|
||||||
String token = userService.login(dto.getUsername(), dto.getPassword());
|
String token = userService.login(dto.getUsername(), dto.getPassword());
|
||||||
return R.ok("登录成功", java.util.Map.of("token", token));
|
LoginVo vo = new LoginVo();
|
||||||
|
vo.setToken(token);
|
||||||
|
return R.ok("登录成功", vo);
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
return R.fail(e.getMessage());
|
return R.fail(e.getMessage());
|
||||||
}
|
}
|
||||||
@@ -50,7 +53,7 @@ public class UserController {
|
|||||||
* 获取当前用户信息
|
* 获取当前用户信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("/info")
|
@GetMapping("/info")
|
||||||
public R<?> getInfo() {
|
public R<LoginUserVo> getInfo() {
|
||||||
LoginUserVo user = UserContext.getUser();
|
LoginUserVo user = UserContext.getUser();
|
||||||
return R.ok(user);
|
return R.ok(user);
|
||||||
}
|
}
|
||||||
@@ -59,11 +62,11 @@ public class UserController {
|
|||||||
* 更新用户信息
|
* 更新用户信息
|
||||||
*/
|
*/
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
public R<?> update(@RequestBody UpdateUserDTO dto) {
|
public R<Void> update(@RequestBody UpdateUserDTO dto) {
|
||||||
try {
|
try {
|
||||||
Long userId = UserContext.getUserId();
|
Long userId = UserContext.getUserId();
|
||||||
userService.updateUserInfo(userId, dto);
|
userService.updateUserInfo(userId, dto);
|
||||||
return R.ok("更新成功");
|
return R.ok();
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
return R.fail(e.getMessage());
|
return R.fail(e.getMessage());
|
||||||
}
|
}
|
||||||
@@ -73,8 +76,8 @@ public class UserController {
|
|||||||
* 退出登录
|
* 退出登录
|
||||||
*/
|
*/
|
||||||
@PostMapping("/logout")
|
@PostMapping("/logout")
|
||||||
public R<?> logout() {
|
public R<Void> logout() {
|
||||||
// 可以在这里清理Redis中的token
|
// 可以在这里清理Redis中的token
|
||||||
return R.ok("退出成功");
|
return R.ok();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.tailbet.model.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 尾数试算结果
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DigitTrialVo {
|
||||||
|
private int digit;
|
||||||
|
private String playWin;
|
||||||
|
private int totalBet;
|
||||||
|
private long totalAward;
|
||||||
|
private long profit;
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.tailbet.model.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录返回
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LoginVo {
|
||||||
|
/**
|
||||||
|
* token
|
||||||
|
*/
|
||||||
|
private String token;
|
||||||
|
}
|
||||||
@@ -2,10 +2,10 @@ package com.tailbet.openim;
|
|||||||
|
|
||||||
import com.tailbet.model.dto.OpenIMCallbackDTO;
|
import com.tailbet.model.dto.OpenIMCallbackDTO;
|
||||||
import com.tailbet.model.vo.R;
|
import com.tailbet.model.vo.R;
|
||||||
import com.tailbet.service.BetService;
|
import com.tailbet.service.IBetService;
|
||||||
import com.tailbet.service.GameService;
|
import com.tailbet.service.IGameService;
|
||||||
import com.tailbet.service.RedPacketService;
|
import com.tailbet.service.IRedPacketService;
|
||||||
import com.tailbet.service.GroupService;
|
import com.tailbet.service.IGroupService;
|
||||||
import com.tailbet.openim.OpenIMClient;
|
import com.tailbet.openim.OpenIMClient;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -20,10 +20,10 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class OpenIMCallbackController {
|
public class OpenIMCallbackController {
|
||||||
|
|
||||||
private final BetService betService;
|
private final IBetService betService;
|
||||||
private final GameService gameService;
|
private final IGameService gameService;
|
||||||
private final RedPacketService redPacketService;
|
private final IRedPacketService redPacketService;
|
||||||
private final GroupService groupService;
|
private final IGroupService groupService;
|
||||||
private final OpenIMClient openIMClient;
|
private final OpenIMClient openIMClient;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.tailbet.model.entity.GameRound;
|
|||||||
import com.tailbet.model.entity.DrawRecord;
|
import com.tailbet.model.entity.DrawRecord;
|
||||||
import com.tailbet.model.entity.BetOrder;
|
import com.tailbet.model.entity.BetOrder;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.tailbet.model.vo.DigitTrialVo;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@@ -23,17 +24,7 @@ public interface IGameService {
|
|||||||
BigDecimal ODDS_SIZE = new BigDecimal("1");
|
BigDecimal ODDS_SIZE = new BigDecimal("1");
|
||||||
BigDecimal ODDS_DIGIT = new BigDecimal("2");
|
BigDecimal ODDS_DIGIT = new BigDecimal("2");
|
||||||
|
|
||||||
/**
|
|
||||||
* 尾数试算结果
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
class DigitTrial {
|
|
||||||
private int digit;
|
|
||||||
private String playWin;
|
|
||||||
private int totalBet;
|
|
||||||
private long totalAward;
|
|
||||||
private long profit;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取群当前进行中的局
|
* 获取群当前进行中的局
|
||||||
@@ -68,7 +59,7 @@ public interface IGameService {
|
|||||||
/**
|
/**
|
||||||
* 尾数试算
|
* 尾数试算
|
||||||
*/
|
*/
|
||||||
List<DigitTrial> trialDigit(Long groupId, Long roundId);
|
List<DigitTrialVo> trialDigit(Long groupId, Long roundId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判定是否中奖
|
* 判定是否中奖
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.tailbet.model.entity.BetOrder;
|
|||||||
import com.tailbet.model.entity.DrawRecord;
|
import com.tailbet.model.entity.DrawRecord;
|
||||||
import com.tailbet.model.entity.GameRound;
|
import com.tailbet.model.entity.GameRound;
|
||||||
import com.tailbet.model.entity.Group;
|
import com.tailbet.model.entity.Group;
|
||||||
|
import com.tailbet.model.vo.DigitTrialVo;
|
||||||
import com.tailbet.service.IGameService;
|
import com.tailbet.service.IGameService;
|
||||||
import com.tailbet.service.IPointsService;
|
import com.tailbet.service.IPointsService;
|
||||||
import com.tailbet.service.IAuditService;
|
import com.tailbet.service.IAuditService;
|
||||||
@@ -180,7 +181,7 @@ public class GameServiceImpl implements IGameService {
|
|||||||
* 尾数试算
|
* 尾数试算
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<IGameService.DigitTrial> trialDigit(Long groupId, Long roundId) {
|
public List<DigitTrialVo> trialDigit(Long groupId, Long roundId) {
|
||||||
GameRound round;
|
GameRound round;
|
||||||
if (roundId != null) {
|
if (roundId != null) {
|
||||||
round = gameRoundMapper.selectById(roundId);
|
round = gameRoundMapper.selectById(roundId);
|
||||||
@@ -198,9 +199,9 @@ public class GameServiceImpl implements IGameService {
|
|||||||
.eq(BetOrder::getIsFake, 0));
|
.eq(BetOrder::getIsFake, 0));
|
||||||
|
|
||||||
// 计算0-9各尾数的庄家利润
|
// 计算0-9各尾数的庄家利润
|
||||||
java.util.List<IGameService.DigitTrial> result = new java.util.ArrayList<>();
|
java.util.List<DigitTrialVo> result = new java.util.ArrayList<>();
|
||||||
for (int d = 0; d <= 9; d++) {
|
for (int d = 0; d <= 9; d++) {
|
||||||
IGameService.DigitTrial trial = new IGameService.DigitTrial();
|
DigitTrialVo trial = new DigitTrialVo();
|
||||||
trial.setDigit(d);
|
trial.setDigit(d);
|
||||||
trial.setPlayWin(getPlayWinDesc(d));
|
trial.setPlayWin(getPlayWinDesc(d));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user