fix: 完善订单发货逻辑、重构砍价活动、完善拼团记录创建逻辑

This commit is contained in:
puhui999 2023-08-14 21:26:07 +08:00
parent 651725e3e8
commit e2a8f7b389
2 changed files with 20 additions and 22 deletions

View File

@ -68,20 +68,19 @@ public interface CombinationActivityConvert {
List<CombinationProductRespVO> convertList2(List<CombinationProductDO> productDOs);
// TODO @puhui999参数改成 activityproduct 会不会干净一点哈
@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<CombinationProductDO> convertList(List<? extends CombinationProductBaseVO> products, CombinationActivityDO activityDO) {
return CollectionUtils.convertList(products, item -> convert(activityDO, item).setActivityStatus(activityDO.getStatus()));
default List<CombinationProductDO> convertList(List<? extends CombinationProductBaseVO> products, CombinationActivityDO activity) {
return CollectionUtils.convertList(products, item -> convert(activity, item).setActivityStatus(activity.getStatus()));
}
default List<CombinationProductDO> convertList(List<CombinationProductUpdateReqVO> updateProductVOs,

View File

@ -56,22 +56,21 @@ public interface SeckillActivityConvert {
return convert1(seckillActivity).setProducts(convertList2(seckillProducts));
}
// TODO @puhui999参数改成 activityproduct 会不会干净一点哈
@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<SeckillProductDO> convertList(List<? extends SeckillProductBaseVO> products, SeckillActivityDO activityDO) {
return CollectionUtils.convertList(products, item -> convert(activityDO, item).setActivityStatus(activityDO.getStatus()));
default List<SeckillProductDO> convertList(List<? extends SeckillProductBaseVO> products, SeckillActivityDO activity) {
return CollectionUtils.convertList(products, item -> convert(activity, item).setActivityStatus(activity.getStatus()));
}
List<SeckillProductRespVO> convertList2(List<SeckillProductDO> productDOs);