|
@@ -228,13 +228,14 @@ 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);
|
|
|
|
|
//门槛金额是分
|
|
//门槛金额是分
|
|
|
BigDecimal money = num.multiply(distributePointsExchangeMoney.getMoney());
|
|
BigDecimal money = num.multiply(distributePointsExchangeMoney.getMoney());
|
|
|
BigDecimal fourHundred = BigDecimal.valueOf(4 * 100 * 100);
|
|
BigDecimal fourHundred = BigDecimal.valueOf(4 * 100 * 100);
|
|
|
if (money.compareTo(fourHundred) > 0) {
|
|
if (money.compareTo(fourHundred) > 0) {
|
|
|
money = fourHundred;
|
|
money = fourHundred;
|
|
|
|
|
+ points = fourHundred.divide(distributePointsExchangeMoney.getMoney()).multiply(min);
|
|
|
}
|
|
}
|
|
|
|
|
+ Integer update = userMapper.subPoints(user.getId(), points);
|
|
|
if (update == 1) {
|
|
if (update == 1) {
|
|
|
TransferAccountsReq req = new TransferAccountsReq();
|
|
TransferAccountsReq req = new TransferAccountsReq();
|
|
|
req.setMoney(money);
|
|
req.setMoney(money);
|
|
@@ -246,7 +247,7 @@ public class DistributePopularizeController {
|
|
|
DistributeMoneyApply distributeMoneyApply = new DistributeMoneyApply();
|
|
DistributeMoneyApply distributeMoneyApply = new DistributeMoneyApply();
|
|
|
distributeMoneyApply.setUserId(userId);
|
|
distributeMoneyApply.setUserId(userId);
|
|
|
distributeMoneyApply.setPoints(points);
|
|
distributeMoneyApply.setPoints(points);
|
|
|
- distributeMoneyApply.setMoney(num.multiply(distributePointsExchangeMoney.getMoney()));
|
|
|
|
|
|
|
+ distributeMoneyApply.setMoney(money);
|
|
|
distributeMoneyApply.setAccount(applyMoneyReq.getAccount());
|
|
distributeMoneyApply.setAccount(applyMoneyReq.getAccount());
|
|
|
distributeMoneyApply.setRealName(applyMoneyReq.getRealName());
|
|
distributeMoneyApply.setRealName(applyMoneyReq.getRealName());
|
|
|
AlipayResponse alipayResponse = orderService.transferAccounts(req);
|
|
AlipayResponse alipayResponse = orderService.transferAccounts(req);
|