|
|
@@ -152,7 +152,7 @@ public class DistributePopularizeController {
|
|
|
if (user == null) {
|
|
|
throw BusinessRuntimeException.getInstance("请先授权登录");
|
|
|
}
|
|
|
- if (ObjectUtil.hasEmpty(applyMoneyReq.getPhone(), applyMoneyReq.getRealName())) {
|
|
|
+ if (ObjectUtil.hasEmpty(applyMoneyReq.getAccount(), applyMoneyReq.getRealName())) {
|
|
|
throw BusinessRuntimeException.getInstance("必填项不能为空");
|
|
|
}
|
|
|
DistributePointsExchangeMoney distributePointsExchangeMoney = distributePointsExchangeMoneyMapper.selectOne(Wrappers.lambdaQuery(DistributePointsExchangeMoney.class).orderByDesc(DistributePointsExchangeMoney::getPoints).last("limit 1"));
|
|
|
@@ -175,7 +175,7 @@ public class DistributePopularizeController {
|
|
|
distributeMoneyApply.setPoints(points);
|
|
|
distributeMoneyApply.setMoney(num.multiply(distributePointsExchangeMoney.getMoney()));
|
|
|
distributeMoneyApply.setVerifyStatus(DistributeMoneyApply.Status.verifying);
|
|
|
- distributeMoneyApply.setPhone(applyMoneyReq.getPhone());
|
|
|
+ distributeMoneyApply.setAccount(applyMoneyReq.getAccount());
|
|
|
distributeMoneyApply.setRealName(applyMoneyReq.getRealName());
|
|
|
distributeMoneyApplyMapper.insert(distributeMoneyApply);
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(distributeMoneyApply.getMoney().intValue());
|
|
|
@@ -190,4 +190,14 @@ public class DistributePopularizeController {
|
|
|
public Result<DistributePointsExchangeMoney> getThreshold() {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(distributePointsExchangeMoneyMapper.selectOne(Wrappers.lambdaQuery(DistributePointsExchangeMoney.class).last("limit 1")));
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 提现缓存数据
|
|
|
+ */
|
|
|
+ @GetMapping("/get/applyMoney/detail")
|
|
|
+ public Result<DistributeMoneyApply> getLastApplyDetail() {
|
|
|
+ Long userId = StpUserUtil.getLoginIdAsLong();
|
|
|
+ DistributeMoneyApply apply = distributeMoneyApplyMapper.selectOne(Wrappers.lambdaQuery(DistributeMoneyApply.class).eq(DistributeMoneyApply::getUserId, userId).orderByDesc(DistributeMoneyApply::getId).last("limit 1"));
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult(apply);
|
|
|
+ }
|
|
|
}
|