|
@@ -173,7 +173,6 @@ public class DistributePopularizeController {
|
|
|
if (user == null) {
|
|
if (user == null) {
|
|
|
throw BusinessRuntimeException.getInstance("请先授权登录");
|
|
throw BusinessRuntimeException.getInstance("请先授权登录");
|
|
|
}
|
|
}
|
|
|
- BigDecimal applyMoney = applyMoneyReq.getMoney();
|
|
|
|
|
if (ObjectUtil.hasEmpty(applyMoneyReq.getAccount(), applyMoneyReq.getRealName())) {
|
|
if (ObjectUtil.hasEmpty(applyMoneyReq.getAccount(), applyMoneyReq.getRealName())) {
|
|
|
throw BusinessRuntimeException.getInstance("必填项不能为空");
|
|
throw BusinessRuntimeException.getInstance("必填项不能为空");
|
|
|
}
|
|
}
|
|
@@ -191,12 +190,11 @@ public class DistributePopularizeController {
|
|
|
BigDecimal num = user.getPoints().divide(min, RoundingMode.DOWN);
|
|
BigDecimal num = user.getPoints().divide(min, RoundingMode.DOWN);
|
|
|
BigDecimal points = min.multiply(num);
|
|
BigDecimal points = min.multiply(num);
|
|
|
Integer update = userMapper.subPoints(user.getId(), points);
|
|
Integer update = userMapper.subPoints(user.getId(), points);
|
|
|
|
|
+ //门槛金额是分
|
|
|
BigDecimal money = num.multiply(distributePointsExchangeMoney.getMoney());
|
|
BigDecimal money = num.multiply(distributePointsExchangeMoney.getMoney());
|
|
|
- if (applyMoney.compareTo(money) > 0) {
|
|
|
|
|
- throw BusinessRuntimeException.getInstance("超过可提现金额");
|
|
|
|
|
- }
|
|
|
|
|
- if (applyMoney.compareTo(BigDecimal.valueOf(4 * 100 * 100)) > 0) {
|
|
|
|
|
- throw BusinessRuntimeException.getInstance("每日可提现金额不超过400");
|
|
|
|
|
|
|
+ BigDecimal fourHundred = BigDecimal.valueOf(4 * 100 * 100);
|
|
|
|
|
+ if (money.compareTo(fourHundred) > 0) {
|
|
|
|
|
+ money = fourHundred;
|
|
|
}
|
|
}
|
|
|
if (update == 1) {
|
|
if (update == 1) {
|
|
|
TransferAccountsReq req = new TransferAccountsReq();
|
|
TransferAccountsReq req = new TransferAccountsReq();
|