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