|
@@ -505,12 +505,12 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
|
|
|
}
|
|
|
|
|
|
|
|
|
- Long payPoints = createReqVO.getPayIntegral();
|
|
|
+ BigDecimal payPoints = createReqVO.getPayIntegral();
|
|
|
|
|
|
if (payPoints == null) {
|
|
|
- payPoints = 0L;
|
|
|
+ payPoints = BigDecimal.valueOf(0);
|
|
|
} else {
|
|
|
- payPoints = payPoints * DistriConstants.INTEGRAL_PAGE2DB;
|
|
|
+ payPoints = BigDecimal.valueOf(payPoints.longValue() * DistriConstants.INTEGRAL_PAGE2DB);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -519,7 +519,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
|
|
|
|
|
|
TradePriceCalculateRespBO tradePriceCalculateRespBO = calculatePriceWithPoints(userId, createReqVO);
|
|
|
|
|
|
- List<Integer> dividePoints = TradePriceCalculatorHelper.dividePrice(tradePriceCalculateRespBO.getItems(), integral2Money(payPoints));
|
|
|
+ List<Integer> dividePoints = TradePriceCalculatorHelper.dividePrice(tradePriceCalculateRespBO.getItems(), integral2Money(payPoints.longValue()));
|
|
|
|
|
|
Map<Long, TradePriceCalculateRespBO.OrderItem> itemPayPointsMap = new HashMap<>();
|
|
|
|
|
@@ -636,7 +636,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
|
|
|
}
|
|
|
|
|
|
|
|
|
- if (payPoints > 0) {
|
|
|
+ if (payPoints.compareTo(BigDecimal.valueOf(0L)) >= 0) {
|
|
|
for (Map<String, Object> m : orderMapList) {
|
|
|
TradeOrderDO order = (TradeOrderDO) (m.get("order"));
|
|
|
Long tradeOrderId = order.getId();
|