处理退款是扣库存
This commit is contained in:
@ -201,6 +201,7 @@ public class WechatController {
|
||||
storeOrder.setRefundStatus(OrderInfoEnum.REFUND_STATUS_2.getValue());
|
||||
storeOrder.setRefundPrice(refundFee);
|
||||
orderService.updateById(storeOrder);
|
||||
orderService.retrunStock(orderId);
|
||||
return WxPayNotifyResponse.success("处理成功!");
|
||||
} catch (WxPayException | IllegalAccessException e) {
|
||||
log.error(e.getMessage());
|
||||
|
@ -288,4 +288,7 @@ public interface YxStoreOrderService extends BaseService<YxStoreOrder>{
|
||||
* @return map
|
||||
*/
|
||||
Map<String,Object> chartCount();
|
||||
|
||||
|
||||
void retrunStock(String orderId);
|
||||
}
|
||||
|
@ -67,6 +67,7 @@ import co.yixiang.modules.order.vo.OrderDataVo;
|
||||
import co.yixiang.modules.order.vo.ShoperOrderTimeDataVo;
|
||||
import co.yixiang.modules.order.vo.UserOrderCountVo;
|
||||
import co.yixiang.modules.order.vo.YxStoreOrderQueryVo;
|
||||
import co.yixiang.modules.product.domain.YxStoreProduct;
|
||||
import co.yixiang.modules.product.domain.YxStoreProductReply;
|
||||
import co.yixiang.modules.product.service.YxStoreProductReplyService;
|
||||
import co.yixiang.modules.product.service.YxStoreProductService;
|
||||
@ -692,6 +693,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
|
||||
price.doubleValue(),
|
||||
NumberUtil.add(price,userQueryVo.getNowMoney()).doubleValue(),
|
||||
"订单退款到余额"+price+"元",orderQueryVo.getId().toString());
|
||||
this.retrunStock(orderQueryVo.getOrderId());
|
||||
}
|
||||
|
||||
orderStatusService.create(orderQueryVo.getId(),OrderLogEnum.REFUND_ORDER_SUCCESS.getValue(),"退款给用户:"+price +"元");
|
||||
@ -2124,6 +2126,14 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void retrunStock(String orderId) {
|
||||
YxStoreOrderQueryVo order = this.getOrderInfo(orderId,null);
|
||||
this.regressionIntegral(order);
|
||||
this.regressionStock(order);
|
||||
this.regressionCoupon(order);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryAll(YxStoreOrderQueryCriteria criteria, Pageable pageable) {
|
||||
getPage(pageable);
|
||||
|
Reference in New Issue
Block a user