|
|
|
@ -715,7 +715,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
|
|
|
|
|
YxStoreOrder storeOrder = new YxStoreOrder(); |
|
|
|
|
//修改状态
|
|
|
|
|
storeOrder.setId(orderQueryVo.getId()); |
|
|
|
|
if (ShopCommonEnum.AGREE_2.getValue().equals(type)) {//同意退款
|
|
|
|
|
if (ShopCommonEnum.AGREE_2.getValue().equals(type)) {//拒绝退款
|
|
|
|
|
storeOrder.setRefundStatus(OrderInfoEnum.REFUND_STATUS_0.getValue()); |
|
|
|
|
yxStoreOrderMapper.updateById(storeOrder); |
|
|
|
|
StoreAfterSales storeAfterSales = storeAfterSalesService.lambdaQuery() |
|
|
|
@ -759,9 +759,20 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
|
|
|
|
|
storeOrder.setRefundStatus(OrderInfoEnum.REFUND_STATUS_2.getValue()); |
|
|
|
|
storeOrder.setRefundPrice(price); |
|
|
|
|
yxStoreOrderMapper.updateById(storeOrder); |
|
|
|
|
|
|
|
|
|
orderStatusService.create(orderQueryVo.getId(), OrderLogEnum.ORDER_EDIT.getValue(), "退款给用户:" + orderQueryVo.getPayIntegral() + "分"); |
|
|
|
|
orderStatusService.create(orderQueryVo.getId(), OrderLogEnum.ORDER_EDIT.getValue(), "退款给用户:" + orderQueryVo.getPayIntegral() + "积分分"); |
|
|
|
|
this.retrunStock(orderQueryVo.getOrderId()); |
|
|
|
|
//增加判断,如果商品仅使用了积分,也对退款记录做出改变
|
|
|
|
|
if (orderQueryVo.getPayPrice().compareTo(BigDecimal.ZERO)==0){ //如果只使用了积分,付款为0
|
|
|
|
|
StoreAfterSales storeAfterSales = storeAfterSalesService.lambdaQuery() |
|
|
|
|
.eq(StoreAfterSales::getUserId, orderQueryVo.getUid()) |
|
|
|
|
.eq(StoreAfterSales::getOrderCode, orderQueryVo.getOrderId()).one(); |
|
|
|
|
if (ObjectUtil.isNotNull(storeAfterSales)) { |
|
|
|
|
storeAfterSalesService.lambdaUpdate() |
|
|
|
|
.eq(StoreAfterSales::getId, storeAfterSales.getId()) |
|
|
|
|
.set(StoreAfterSales::getState, AfterSalesStatusEnum.STATUS_3.getValue()) |
|
|
|
|
.update(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
orderStatusService.create(orderQueryVo.getId(), OrderLogEnum.REFUND_ORDER_SUCCESS.getValue(), "退款给用户:" + price + "元"); |
|
|
|
|