|
@@ -505,12 +505,12 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
|
|
|
}
|
|
|
|
|
|
//消费者在页面录入的,要使用的积分
|
|
|
- BigDecimal payPoints = createReqVO.getPayIntegral();
|
|
|
+ Double payPoints = createReqVO.getPayIntegral();
|
|
|
|
|
|
if (payPoints == null) {
|
|
|
- payPoints = BigDecimal.valueOf(0);
|
|
|
+ payPoints = (double) 0;
|
|
|
} else {//把页面传入的,1积分=1元钱的积分,转换为后台保存到数据库的积分值
|
|
|
- payPoints = BigDecimal.valueOf(payPoints.longValue() * DistriConstants.INTEGRAL_PAGE2DB);
|
|
|
+ payPoints = payPoints * DistriConstants.INTEGRAL_PAGE2DB;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -592,7 +592,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
|
|
|
order.setShopId(shopId);
|
|
|
order.setPayPrice(shopPayPrice);
|
|
|
order.setPayRmb(shopPayPrice);
|
|
|
- order.setPayIntegral(shopPayPoints);
|
|
|
+ order.setPayIntegral(shopPayPoints.doubleValue());
|
|
|
|
|
|
tradeOrderMapper.insert(order);
|
|
|
|
|
@@ -636,12 +636,12 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
|
|
|
}
|
|
|
|
|
|
//如果订单有使用积分,则抵扣用户的积分。add by Ben
|
|
|
- if (payPoints.compareTo(BigDecimal.valueOf(0L)) >= 0) {
|
|
|
+ if (payPoints > 0) {
|
|
|
for (Map<String, Object> m : orderMapList) {
|
|
|
TradeOrderDO order = (TradeOrderDO) (m.get("order"));
|
|
|
Long tradeOrderId = order.getId();
|
|
|
String OrderNum = order.getNo();
|
|
|
- Long payIntegral = order.getPayIntegral();//每个订单使用的积分
|
|
|
+ Long payIntegral = order.getPayIntegral().longValue();//每个订单使用的积分
|
|
|
integralService.updateUserIntegral(userId,userId, CaclEnum.ORDER_PAY_INTEGRAL, payIntegral * (-1), 0L, tradeOrderId, OrderNum);
|
|
|
}
|
|
|
}
|
|
@@ -1303,7 +1303,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
|
|
|
cancelOrder0(order, TradeOrderCancelTypeEnum.MEMBER_CANCEL);
|
|
|
|
|
|
//3.退回订单已支付的积分 add by Ben
|
|
|
- Long payIntegral = order.getPayIntegral();//每个订单使用的积分
|
|
|
+ Long payIntegral = order.getPayIntegral().longValue();//每个订单使用的积分
|
|
|
Long tradeOrderId = order.getId();
|
|
|
String orderNum = order.getNo();
|
|
|
//如果订单有使用积分,则退回积分
|
|
@@ -1334,7 +1334,7 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
|
|
|
getSelf().cancelOrderBySystem(order);
|
|
|
|
|
|
//退回订单已支付的积分 add by Ben
|
|
|
- Long payIntegral = order.getPayIntegral();//每个订单使用的积分
|
|
|
+ Long payIntegral = order.getPayIntegral().longValue();//每个订单使用的积分
|
|
|
Long tradeOrderId = order.getId();
|
|
|
String orderNum = order.getNo();
|
|
|
Long userId = order.getUserId();
|