|
@@ -977,12 +977,14 @@ public class FsStoreAfterSalesScrmServiceImpl implements IFsStoreAfterSalesScrmS
|
|
|
* @param fsStoreOrderScrm 订单
|
|
* @param fsStoreOrderScrm 订单
|
|
|
*/
|
|
*/
|
|
|
private void deletePurchaseLimitRecordsForStoreOrder(FsStoreOrderScrm fsStoreOrderScrm) {
|
|
private void deletePurchaseLimitRecordsForStoreOrder(FsStoreOrderScrm fsStoreOrderScrm) {
|
|
|
- Long productId = fsStoreOrderItemMapper.selectProductIdByOrderCode(fsStoreOrderScrm.getOrderCode());
|
|
|
|
|
|
|
+ List<FsStoreOrderItemVO> fsStoreOrderItemVOS = fsStoreOrderItemMapper.selectFsStoreOrderItemListByOrderId(fsStoreOrderScrm.getId());
|
|
|
|
|
+ if (fsStoreOrderItemVOS != null && !fsStoreOrderItemVOS.isEmpty()) {
|
|
|
|
|
+ // 减少限购数量
|
|
|
|
|
+ for (FsStoreOrderItemVO fsStoreOrderItemVO : fsStoreOrderItemVOS) {
|
|
|
|
|
+ purchaseLimitService.decreasePurchaseLimit(fsStoreOrderItemVO.getProductId(), fsStoreOrderScrm.getUserId(), Math.toIntExact(fsStoreOrderItemVO.getNum()));
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- // 减少限购数量
|
|
|
|
|
- Long userId = fsStoreOrderScrm.getUserId();
|
|
|
|
|
- Integer num = Math.toIntExact(fsStoreOrderScrm.getTotalNum());
|
|
|
|
|
- purchaseLimitService.decreasePurchaseLimit(productId, userId, num);
|
|
|
|
|
}
|
|
}
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private FsJstAftersalePushScrmMapper fsJstAftersalePushMapper;
|
|
private FsJstAftersalePushScrmMapper fsJstAftersalePushMapper;
|