nili 7 months ago
parent
commit
12cd2d09c8
  1. 3
      game-dao/src/main/java/awesome/group/game/dao/bean/MatrixUser.java
  2. 3
      game-dao/src/main/java/awesome/group/game/dao/mapper/MatrixUserMapper.java
  3. 2
      game-service/src/main/java/awesome/group/game/service/bo/citrus/UserBo.java
  4. 2
      game-service/src/main/java/awesome/group/game/service/citrus/ScheduleService.java
  5. 2
      game-service/src/main/java/awesome/group/game/service/citrus/UserService.java
  6. 2
      game-web/src/main/java/awesome/group/game/web/rest/matrix/AdminController.java
  7. 2
      game-web/src/main/java/awesome/group/game/web/rest/matrix/DeviceController.java
  8. 2
      game-web/src/main/java/awesome/group/game/web/rest/matrix/MatrixAppConfigController.java
  9. 2
      game-web/src/main/java/awesome/group/game/web/rest/matrix/MatrixMoneyController.java
  10. 2
      game-web/src/main/java/awesome/group/game/web/rest/matrix/MatrixUserController.java

3
game-dao/src/main/java/awesome/group/game/dao/bean/MatrixUser.java

@ -17,7 +17,8 @@ public class MatrixUser {
private String nickname;
private String avatar;
private String wxOpenId;
private Integer money;//分,已提现金额
private Integer money;//分,已提现金额,含冻结金额
private Integer realMoney;//分,已到账金额
private String pwd;
private String inviteCode;
private Integer upUid;

3
game-dao/src/main/java/awesome/group/game/dao/mapper/MatrixUserMapper.java

@ -16,6 +16,9 @@ public interface MatrixUserMapper extends BaseMapper<MatrixUser> {
@Update("update matrix_user set money = money + #{cent} where id = #{userId}")
int incMoney(int userId, int cent);
@Update("update matrix_user set real_money = real_money + #{cent} where id = #{userId}")
int incRealMoney(int userId, int cent);
@Update("update matrix_user set income = income + #{ecpmReal} where id = #{userId}")
int incIncome(int userId, long ecpmReal);

2
game-service/src/main/java/awesome/group/game/service/bo/citrus/UserBo.java

@ -10,6 +10,7 @@ public class UserBo {
public String nickname;
public String avatar;
public Integer money;//分,已提现金额
public Integer realMoney;//分,已到账金额
public String aliPayAccount;
public Long income;//ecpm和,分
public Long goldCoin;//金币
@ -33,6 +34,7 @@ public class UserBo {
this.nickname = u.getNickname();
this.avatar = u.getAvatar();
this.money = u.getMoney();
this.realMoney = u.getRealMoney();
this.goldCoin = u.getIncome() - (u.getMoney() * 1000);
this.wxOpenId = u.getWxOpenId();
this.createdAt = u.getCreatedAt().getTime();

2
game-service/src/main/java/awesome/group/game/service/citrus/ScheduleService.java

@ -33,6 +33,8 @@ public class ScheduleService {
moneyRecordMapper.updateTransResult(r.getId(), r);
if (!success) {
userMapper.incMoney(r.getUserId(), -r.getCent());
} else {
userMapper.incRealMoney(r.getUserId(), r.getCent());
}
}
}

2
game-service/src/main/java/awesome/group/game/service/citrus/UserService.java

@ -144,7 +144,7 @@ public class UserService {
Assert.isTrue(cent >= 10, "至少提0.1元");
MatrixUser u = userMapper.selectById(uid);
Assert.isTrue(u != null, "非法请求");
Assert.isTrue((u.getMoney() + cent) * 1000L <= u.getIncome(), "余额不足");
Assert.isTrue((u.getMoney() + cent) * 1000L <= u.getIncome(), "金币不足");
String aliPayAccount = u.getAliPayAccount();
Assert.isTrue(StringUtils.hasText(aliPayAccount), "请先绑定支付宝账号");
Assert.isTrue(StringUtils.hasText(u.getName()), "请先填写支付宝实名姓名");

2
game-web/src/main/java/awesome/group/game/web/rest/matrix/AdminController.java

@ -24,7 +24,7 @@ import java.util.List;
@RestController
@RequestMapping("/api/admin")
@Tag(name = "admin")
@Hidden
//@Hidden
public class AdminController {
@Resource

2
game-web/src/main/java/awesome/group/game/web/rest/matrix/DeviceController.java

@ -18,7 +18,7 @@ import java.util.List;
@RestController
@RequestMapping("/api/admin/device")
@Tag(name = "device")
@Hidden
//@Hidden
public class DeviceController {
@Autowired

2
game-web/src/main/java/awesome/group/game/web/rest/matrix/MatrixAppConfigController.java

@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/api/admin/app")
@Hidden
//@Hidden
public class MatrixAppConfigController {
@Autowired

2
game-web/src/main/java/awesome/group/game/web/rest/matrix/MatrixMoneyController.java

@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/api/admin/money")
@Hidden
//@Hidden
public class MatrixMoneyController {
@Autowired
private MatrixMoneyService matrixMoneyService;

2
game-web/src/main/java/awesome/group/game/web/rest/matrix/MatrixUserController.java

@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/api/admin/user")
@Hidden
//@Hidden
public class MatrixUserController {
@Autowired
private MatrixUserService userService;

Loading…
Cancel
Save