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()); }