挂账退款bug修复
This commit is contained in:
parent
0bc8095e7c
commit
0e41e455ba
|
|
@ -1514,7 +1514,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||
|
||||
private void returnCoupon(TbOrderInfo orderInfo, boolean resetInfo) {
|
||||
// 返还优惠券
|
||||
if (StrUtil.isNotBlank(orderInfo.getCouponInfoList())) {
|
||||
if (StrUtil.isNotBlank(orderInfo.getCouponInfoList()) && !"null".equals(orderInfo.getCouponInfoList())) {
|
||||
OrderInfoCouponInfoDTO couponInfoDTO = JSONObject.parseObject(orderInfo.getCouponInfoList(), OrderInfoCouponInfoDTO.class);
|
||||
ArrayList<Integer> couponIds = new ArrayList<>();
|
||||
couponInfoDTO.getProductCoupon().forEach(item -> {
|
||||
|
|
@ -3104,11 +3104,13 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||
.eq(TbOrderDetail::getStatus, TableConstant.OrderInfo.Status.CLOSED));
|
||||
if (count == 0) {
|
||||
returnCoupon(orderInfo, true);
|
||||
if (orderInfo.getMemberId() != null && orderInfo.getPointsNum() != null) {
|
||||
// 返还积分
|
||||
memberPointsService.addPoints(Long.valueOf(orderInfo.getMemberId()), orderInfo.getPointsNum(),
|
||||
"用户退款订单积分返还: " + orderInfo.getPointsNum() + "积分", Long.valueOf(orderInfo.getId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
orderInfoMapper.updateById(orderInfo);
|
||||
// 打印退款小票
|
||||
// producer.printMechine(newOrderInfo.getId().toString());
|
||||
|
|
|
|||
Loading…
Reference in New Issue