diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/convert/combination/CombinationActivityConvert.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/convert/combination/CombinationActivityConvert.java index 6e73510e96..7977d8fa90 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/convert/combination/CombinationActivityConvert.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/convert/combination/CombinationActivityConvert.java @@ -68,20 +68,19 @@ public interface CombinationActivityConvert { List convertList2(List productDOs); - // TODO @puhui999:参数改成 activity、product 会不会干净一点哈 @Mappings({ @Mapping(target = "id", ignore = true), - @Mapping(target = "activityId", source = "activityDO.id"), - @Mapping(target = "spuId", source = "activityDO.spuId"), - @Mapping(target = "skuId", source = "vo.skuId"), - @Mapping(target = "activePrice", source = "vo.activePrice"), - @Mapping(target = "activityStartTime", source = "activityDO.startTime"), - @Mapping(target = "activityEndTime", source = "activityDO.endTime") + @Mapping(target = "activityId", source = "activity.id"), + @Mapping(target = "spuId", source = "activity.spuId"), + @Mapping(target = "skuId", source = "product.skuId"), + @Mapping(target = "activePrice", source = "product.activePrice"), + @Mapping(target = "activityStartTime", source = "activity.startTime"), + @Mapping(target = "activityEndTime", source = "activity.endTime") }) - CombinationProductDO convert(CombinationActivityDO activityDO, CombinationProductBaseVO vo); + CombinationProductDO convert(CombinationActivityDO activity, CombinationProductBaseVO product); - default List convertList(List products, CombinationActivityDO activityDO) { - return CollectionUtils.convertList(products, item -> convert(activityDO, item).setActivityStatus(activityDO.getStatus())); + default List convertList(List products, CombinationActivityDO activity) { + return CollectionUtils.convertList(products, item -> convert(activity, item).setActivityStatus(activity.getStatus())); } default List convertList(List updateProductVOs, diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/convert/seckill/seckillactivity/SeckillActivityConvert.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/convert/seckill/seckillactivity/SeckillActivityConvert.java index 65f3b9b0cb..43b114bde5 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/convert/seckill/seckillactivity/SeckillActivityConvert.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/convert/seckill/seckillactivity/SeckillActivityConvert.java @@ -56,22 +56,21 @@ public interface SeckillActivityConvert { return convert1(seckillActivity).setProducts(convertList2(seckillProducts)); } - // TODO @puhui999:参数改成 activity、product 会不会干净一点哈 @Mappings({ @Mapping(target = "id", ignore = true), - @Mapping(target = "activityId", source = "activityDO.id"), - @Mapping(target = "configIds", source = "activityDO.configIds"), - @Mapping(target = "spuId", source = "activityDO.spuId"), - @Mapping(target = "skuId", source = "vo.skuId"), - @Mapping(target = "seckillPrice", source = "vo.seckillPrice"), - @Mapping(target = "stock", source = "vo.stock"), - @Mapping(target = "activityStartTime", source = "activityDO.startTime"), - @Mapping(target = "activityEndTime", source = "activityDO.endTime") + @Mapping(target = "activityId", source = "activity.id"), + @Mapping(target = "configIds", source = "activity.configIds"), + @Mapping(target = "spuId", source = "activity.spuId"), + @Mapping(target = "skuId", source = "product.skuId"), + @Mapping(target = "seckillPrice", source = "product.seckillPrice"), + @Mapping(target = "stock", source = "product.stock"), + @Mapping(target = "activityStartTime", source = "activity.startTime"), + @Mapping(target = "activityEndTime", source = "activity.endTime") }) - SeckillProductDO convert(SeckillActivityDO activityDO, SeckillProductBaseVO vo); + SeckillProductDO convert(SeckillActivityDO activity, SeckillProductBaseVO product); - default List convertList(List products, SeckillActivityDO activityDO) { - return CollectionUtils.convertList(products, item -> convert(activityDO, item).setActivityStatus(activityDO.getStatus())); + default List convertList(List products, SeckillActivityDO activity) { + return CollectionUtils.convertList(products, item -> convert(activity, item).setActivityStatus(activity.getStatus())); } List convertList2(List productDOs);