fix: 完善订单发货逻辑、重构砍价活动、完善拼团记录创建逻辑
This commit is contained in:
parent
651725e3e8
commit
e2a8f7b389
|
@ -68,20 +68,19 @@ public interface CombinationActivityConvert {
|
||||||
|
|
||||||
List<CombinationProductRespVO> convertList2(List<CombinationProductDO> productDOs);
|
List<CombinationProductRespVO> convertList2(List<CombinationProductDO> productDOs);
|
||||||
|
|
||||||
// TODO @puhui999:参数改成 activity、product 会不会干净一点哈
|
|
||||||
@Mappings({
|
@Mappings({
|
||||||
@Mapping(target = "id", ignore = true),
|
@Mapping(target = "id", ignore = true),
|
||||||
@Mapping(target = "activityId", source = "activityDO.id"),
|
@Mapping(target = "activityId", source = "activity.id"),
|
||||||
@Mapping(target = "spuId", source = "activityDO.spuId"),
|
@Mapping(target = "spuId", source = "activity.spuId"),
|
||||||
@Mapping(target = "skuId", source = "vo.skuId"),
|
@Mapping(target = "skuId", source = "product.skuId"),
|
||||||
@Mapping(target = "activePrice", source = "vo.activePrice"),
|
@Mapping(target = "activePrice", source = "product.activePrice"),
|
||||||
@Mapping(target = "activityStartTime", source = "activityDO.startTime"),
|
@Mapping(target = "activityStartTime", source = "activity.startTime"),
|
||||||
@Mapping(target = "activityEndTime", source = "activityDO.endTime")
|
@Mapping(target = "activityEndTime", source = "activity.endTime")
|
||||||
})
|
})
|
||||||
CombinationProductDO convert(CombinationActivityDO activityDO, CombinationProductBaseVO vo);
|
CombinationProductDO convert(CombinationActivityDO activity, CombinationProductBaseVO product);
|
||||||
|
|
||||||
default List<CombinationProductDO> convertList(List<? extends CombinationProductBaseVO> products, CombinationActivityDO activityDO) {
|
default List<CombinationProductDO> convertList(List<? extends CombinationProductBaseVO> products, CombinationActivityDO activity) {
|
||||||
return CollectionUtils.convertList(products, item -> convert(activityDO, item).setActivityStatus(activityDO.getStatus()));
|
return CollectionUtils.convertList(products, item -> convert(activity, item).setActivityStatus(activity.getStatus()));
|
||||||
}
|
}
|
||||||
|
|
||||||
default List<CombinationProductDO> convertList(List<CombinationProductUpdateReqVO> updateProductVOs,
|
default List<CombinationProductDO> convertList(List<CombinationProductUpdateReqVO> updateProductVOs,
|
||||||
|
|
|
@ -56,22 +56,21 @@ public interface SeckillActivityConvert {
|
||||||
return convert1(seckillActivity).setProducts(convertList2(seckillProducts));
|
return convert1(seckillActivity).setProducts(convertList2(seckillProducts));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO @puhui999:参数改成 activity、product 会不会干净一点哈
|
|
||||||
@Mappings({
|
@Mappings({
|
||||||
@Mapping(target = "id", ignore = true),
|
@Mapping(target = "id", ignore = true),
|
||||||
@Mapping(target = "activityId", source = "activityDO.id"),
|
@Mapping(target = "activityId", source = "activity.id"),
|
||||||
@Mapping(target = "configIds", source = "activityDO.configIds"),
|
@Mapping(target = "configIds", source = "activity.configIds"),
|
||||||
@Mapping(target = "spuId", source = "activityDO.spuId"),
|
@Mapping(target = "spuId", source = "activity.spuId"),
|
||||||
@Mapping(target = "skuId", source = "vo.skuId"),
|
@Mapping(target = "skuId", source = "product.skuId"),
|
||||||
@Mapping(target = "seckillPrice", source = "vo.seckillPrice"),
|
@Mapping(target = "seckillPrice", source = "product.seckillPrice"),
|
||||||
@Mapping(target = "stock", source = "vo.stock"),
|
@Mapping(target = "stock", source = "product.stock"),
|
||||||
@Mapping(target = "activityStartTime", source = "activityDO.startTime"),
|
@Mapping(target = "activityStartTime", source = "activity.startTime"),
|
||||||
@Mapping(target = "activityEndTime", source = "activityDO.endTime")
|
@Mapping(target = "activityEndTime", source = "activity.endTime")
|
||||||
})
|
})
|
||||||
SeckillProductDO convert(SeckillActivityDO activityDO, SeckillProductBaseVO vo);
|
SeckillProductDO convert(SeckillActivityDO activity, SeckillProductBaseVO product);
|
||||||
|
|
||||||
default List<SeckillProductDO> convertList(List<? extends SeckillProductBaseVO> products, SeckillActivityDO activityDO) {
|
default List<SeckillProductDO> convertList(List<? extends SeckillProductBaseVO> products, SeckillActivityDO activity) {
|
||||||
return CollectionUtils.convertList(products, item -> convert(activityDO, item).setActivityStatus(activityDO.getStatus()));
|
return CollectionUtils.convertList(products, item -> convert(activity, item).setActivityStatus(activity.getStatus()));
|
||||||
}
|
}
|
||||||
|
|
||||||
List<SeckillProductRespVO> convertList2(List<SeckillProductDO> productDOs);
|
List<SeckillProductRespVO> convertList2(List<SeckillProductDO> productDOs);
|
||||||
|
|
Loading…
Reference in New Issue