nili 6 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 nickname;
private String avatar; private String avatar;
private String wxOpenId; private String wxOpenId;
private Integer money;//分,已提现金额 private Integer money;//分,已提现金额,含冻结金额
private Integer realMoney;//分,已到账金额
private String pwd; private String pwd;
private String inviteCode; private String inviteCode;
private Integer upUid; 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}") @Update("update matrix_user set money = money + #{cent} where id = #{userId}")
int incMoney(int userId, int cent); 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}") @Update("update matrix_user set income = income + #{ecpmReal} where id = #{userId}")
int incIncome(int userId, long ecpmReal); 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 nickname;
public String avatar; public String avatar;
public Integer money;//分,已提现金额 public Integer money;//分,已提现金额
public Integer realMoney;//分,已到账金额
public String aliPayAccount; public String aliPayAccount;
public Long income;//ecpm和,分 public Long income;//ecpm和,分
public Long goldCoin;//金币 public Long goldCoin;//金币
@ -33,6 +34,7 @@ public class UserBo {
this.nickname = u.getNickname(); this.nickname = u.getNickname();
this.avatar = u.getAvatar(); this.avatar = u.getAvatar();
this.money = u.getMoney(); this.money = u.getMoney();
this.realMoney = u.getRealMoney();
this.goldCoin = u.getIncome() - (u.getMoney() * 1000); this.goldCoin = u.getIncome() - (u.getMoney() * 1000);
this.wxOpenId = u.getWxOpenId(); this.wxOpenId = u.getWxOpenId();
this.createdAt = u.getCreatedAt().getTime(); 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); moneyRecordMapper.updateTransResult(r.getId(), r);
if (!success) { if (!success) {
userMapper.incMoney(r.getUserId(), -r.getCent()); 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元"); Assert.isTrue(cent >= 10, "至少提0.1元");
MatrixUser u = userMapper.selectById(uid); MatrixUser u = userMapper.selectById(uid);
Assert.isTrue(u != null, "非法请求"); Assert.isTrue(u != null, "非法请求");
Assert.isTrue((u.getMoney() + cent) * 1000L <= u.getIncome(), "余额不足"); Assert.isTrue((u.getMoney() + cent) * 1000L <= u.getIncome(), "金币不足");
String aliPayAccount = u.getAliPayAccount(); String aliPayAccount = u.getAliPayAccount();
Assert.isTrue(StringUtils.hasText(aliPayAccount), "请先绑定支付宝账号"); Assert.isTrue(StringUtils.hasText(aliPayAccount), "请先绑定支付宝账号");
Assert.isTrue(StringUtils.hasText(u.getName()), "请先填写支付宝实名姓名"); 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 @RestController
@RequestMapping("/api/admin") @RequestMapping("/api/admin")
@Tag(name = "admin") @Tag(name = "admin")
@Hidden //@Hidden
public class AdminController { public class AdminController {
@Resource @Resource

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

@ -18,7 +18,7 @@ import java.util.List;
@RestController @RestController
@RequestMapping("/api/admin/device") @RequestMapping("/api/admin/device")
@Tag(name = "device") @Tag(name = "device")
@Hidden //@Hidden
public class DeviceController { public class DeviceController {
@Autowired @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 @RestController
@RequestMapping("/api/admin/app") @RequestMapping("/api/admin/app")
@Hidden //@Hidden
public class MatrixAppConfigController { public class MatrixAppConfigController {
@Autowired @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 @RestController
@RequestMapping("/api/admin/money") @RequestMapping("/api/admin/money")
@Hidden //@Hidden
public class MatrixMoneyController { public class MatrixMoneyController {
@Autowired @Autowired
private MatrixMoneyService matrixMoneyService; 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 @RestController
@RequestMapping("/api/admin/user") @RequestMapping("/api/admin/user")
@Hidden //@Hidden
public class MatrixUserController { public class MatrixUserController {
@Autowired @Autowired
private MatrixUserService userService; private MatrixUserService userService;

Loading…
Cancel
Save