From 78cfe0708c518eaa78f76c80a1d5a3bdeda86315 Mon Sep 17 00:00:00 2001 From: Timi Date: Wed, 18 Nov 2026 16:27:58 +0800 Subject: [PATCH] feat(gao): sync point redemption photo to product stock out --- .../implement/GaoPointRedemptionServiceImplement.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointRedemptionServiceImplement.java b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointRedemptionServiceImplement.java index 9259448..7dd9cb1 100644 --- a/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointRedemptionServiceImplement.java +++ b/src/main/java/com/imyeyu/api/modules/gao/service/implement/GaoPointRedemptionServiceImplement.java @@ -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()); }