feat(gao): sync point redemption photo to product stock out
This commit is contained in:
+7
-1
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user