退款新增总额

This commit is contained in:
liyj 2025-11-06 09:34:32 +08:00
parent 4814ca202d
commit 0c15b2c034
3 changed files with 7 additions and 3 deletions

View File

@ -36,6 +36,10 @@ public class ProductQuantityConsumption {
@TableField(value = "quantity",updateStrategy = FieldStrategy.NOT_EMPTY) @TableField(value = "quantity",updateStrategy = FieldStrategy.NOT_EMPTY)
private BigDecimal quantity; private BigDecimal quantity;
@ApiModelProperty("订单总额")
@TableField(value = "sale_amount",updateStrategy = FieldStrategy.NOT_EMPTY)
private BigDecimal saleAmount;
@ApiModelProperty("消费状态0-未消费1-已消费") @ApiModelProperty("消费状态0-未消费1-已消费")
@TableField(value = "status",updateStrategy = FieldStrategy.NOT_EMPTY) @TableField(value = "status",updateStrategy = FieldStrategy.NOT_EMPTY)
private Integer status; private Integer status;

View File

@ -1526,7 +1526,7 @@ public class ShopOrderReturnServiceImpl extends BaseServiceImpl<ShopOrderReturnM
Map<String, Integer> stockDeltaMap = new HashMap<>(); Map<String, Integer> stockDeltaMap = new HashMap<>();
String item_src_id = productItem.getItem_src_id(); String item_src_id = productItem.getItem_src_id();
stockDeltaMap.put(item_src_id + "-" + shopOrderItem.getOrder_id()+"-"+shopOrderItem.getItem_unit_price(), returnNum); stockDeltaMap.put(item_src_id + "-" + shopOrderItem.getOrder_id()+"-"+shopOrderItem.getItem_unit_price(), returnNum);
syncThirdDataService.incrProductStockToRedis(stockDeltaMap); syncThirdDataService.incrProductStockToRedis(stockDeltaMap,shopOrderReturn.getReturn_refund_amount());
logger.info("退货返回给思迅,存入redis成功,item_src_id:{},订单号:{},数量:{}", item_src_id, shopOrderReturn.getOrder_id(), returnNum); logger.info("退货返回给思迅,存入redis成功,item_src_id:{},订单号:{},数量:{}", item_src_id, shopOrderReturn.getOrder_id(), returnNum);
} else { } else {
logger.warn("退货数量为空无法增加库存订单项ID: {}", orderItemId); logger.warn("退货数量为空无法增加库存订单项ID: {}", orderItemId);

View File

@ -1179,7 +1179,7 @@ public class SFExpressApiServiceImpl implements SFExpressApiService {
String item_src_id = shopOrderItem.getItem_src_id(); String item_src_id = shopOrderItem.getItem_src_id();
Integer order_item_quantity = shopOrderItem.getOrder_item_quantity(); Integer order_item_quantity = shopOrderItem.getOrder_item_quantity();
stockDeltaMap.put(item_src_id + "-" + shopStoreSfOrder.getShop_order_id()+"-"+shopOrderItem.getItem_unit_price(), -order_item_quantity); stockDeltaMap.put(item_src_id + "-" + shopStoreSfOrder.getShop_order_id()+"-"+shopOrderItem.getItem_unit_price(), -order_item_quantity);
syncThirdDataService.incrProductStockToRedis(stockDeltaMap); syncThirdDataService.incrProductStockToRedis(stockDeltaMap,null);
} }
} }
//出库扣减思迅库存end //出库扣减思迅库存end
@ -1348,7 +1348,7 @@ public class SFExpressApiServiceImpl implements SFExpressApiService {
String item_src_id = shopOrderItem.getItem_src_id(); String item_src_id = shopOrderItem.getItem_src_id();
Integer order_item_quantity = shopOrderItem.getOrder_item_quantity(); Integer order_item_quantity = shopOrderItem.getOrder_item_quantity();
stockDeltaMap.put(item_src_id + "-" + shopOrderItem.getOrder_id()+"-"+shopOrderItem.getItem_unit_price(), -order_item_quantity); stockDeltaMap.put(item_src_id + "-" + shopOrderItem.getOrder_id()+"-"+shopOrderItem.getItem_unit_price(), -order_item_quantity);
syncThirdDataService.incrProductStockToRedis(stockDeltaMap); syncThirdDataService.incrProductStockToRedis(stockDeltaMap,null);
} }
} }
return CommonResult.success("操作成功"); return CommonResult.success("操作成功");