feat(gao): sync point redemption photo to product stock out

This commit is contained in:
Timi
2026-11-18 16:27:58 +08:00
parent bdcf32ba26
commit 78cfe0708c
@@ -174,7 +174,13 @@ public class GaoPointRedemptionServiceImplement implements GaoPointRedemptionSer
}
if (selection.product().getProductType() == GaoProduct.ProductType.GOODS) {
GaoStockChangeItem stockItem = stockItem(selection, quantity, baseQuantity);
stockService.outForRedemption(storeId, redemption.getId(), stockItem, requestNo, operatorUserId);
GaoProductStockRecord stockRecord = stockService.outForRedemption(storeId, redemption.getId(), stockItem, requestNo, operatorUserId);
for (Attachment source : attachmentService.listByBizId(Attachment.BizType.GAO_POINT_REDEMPTION, redemption.getId())) {
Attachment copy = attachmentService.clone(source.getId());
copy.setBizType(Attachment.BizType.GAO_STOCK_RECORD);
copy.setBizId(stockRecord.getId());
attachmentService.update(copy);
}
}
return detail(storeId, redemption.getId());
}