Commit 73a7ccbd754fb1b77470fda682d6514a02d30b3a
1 parent
6d00b027
【代码优化】拼团活动:优化拼团活动列表的获取
Showing
7 changed files
with
72 additions
and
138 deletions
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/combination/CombinationActivityController.java
| 1 | 1 | package cn.iocoder.yudao.module.promotion.controller.admin.combination; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 7 | import cn.iocoder.yudao.module.product.api.spu.ProductSpuApi; |
| ... | ... | @@ -22,15 +23,15 @@ import org.springframework.security.access.prepost.PreAuthorize; |
| 22 | 23 | import org.springframework.validation.annotation.Validated; |
| 23 | 24 | import org.springframework.web.bind.annotation.*; |
| 24 | 25 | |
| 25 | -import java.util.Collection; | |
| 26 | +import java.util.Collections; | |
| 26 | 27 | import java.util.List; |
| 27 | 28 | import java.util.Map; |
| 28 | 29 | import java.util.Set; |
| 29 | -import java.util.stream.Collectors; | |
| 30 | 30 | |
| 31 | 31 | import static cn.hutool.core.collection.CollectionUtil.newArrayList; |
| 32 | 32 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 33 | -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.*; | |
| 33 | +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; | |
| 34 | +import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; | |
| 34 | 35 | |
| 35 | 36 | @Tag(name = "管理后台 - 拼团活动") |
| 36 | 37 | @RestController |
| ... | ... | @@ -89,28 +90,21 @@ public class CombinationActivityController { |
| 89 | 90 | return success(CombinationActivityConvert.INSTANCE.convert(activity, products)); |
| 90 | 91 | } |
| 91 | 92 | |
| 92 | - @GetMapping("/detail-list") | |
| 93 | - @Operation(summary = "获得拼团活动详情列表") | |
| 94 | - @Parameter(name = "ids", description = "拼团活动编号列表", required = true, example = "[1,2,3]") | |
| 95 | - @PreAuthorize("@ss.hasPermission('product:spu:query')") | |
| 96 | - public CommonResult<List<CombinationActivityRespVO>> getCombinationActivityDetailList(@RequestParam("ids") Collection<Long> ids) { | |
| 97 | - // 查询拼团活动列表 | |
| 98 | - List<CombinationActivityDO> activities = combinationActivityService.getCombinationActivityListByIds(ids); | |
| 99 | - | |
| 100 | - // 转换活动列表 | |
| 101 | - List<CombinationActivityRespVO> activityVOs = CombinationActivityConvert.INSTANCE.convertList(activities); | |
| 102 | - | |
| 103 | - // 获取拼团产品列表 | |
| 104 | - Set<Long> activityIds = activities.stream().map(CombinationActivityDO::getId).collect(Collectors.toSet()); | |
| 105 | - List<CombinationProductDO> productList = combinationActivityService.getCombinationProductListByActivityIds(activityIds); | |
| 106 | - | |
| 107 | - // 创建SPU和产品的映射 | |
| 108 | - Map<Long, List<CombinationProductDO>> productMap = convertMultiMap(productList, CombinationProductDO::getActivityId); | |
| 109 | - | |
| 110 | - // 往活动VO赋值产品列表 | |
| 111 | - activityVOs.forEach(vo -> vo.setProducts(CombinationActivityConvert.INSTANCE.convertList2(productMap.get(vo.getId())))); | |
| 112 | - | |
| 113 | - return success(activityVOs); | |
| 93 | + @GetMapping("/list-by-ids") | |
| 94 | + @Operation(summary = "获得拼团活动列表,基于活动编号数组") | |
| 95 | + @Parameter(name = "ids", description = "活动编号数组", required = true, example = "[1024, 1025]") | |
| 96 | + public CommonResult<List<CombinationActivityRespVO>> getCombinationActivityListByIds(@RequestParam("ids") List<Long> ids) { | |
| 97 | + // 1. 获得开启的活动列表 | |
| 98 | + List<CombinationActivityDO> activityList = combinationActivityService.getCombinationActivityListByIds(ids); | |
| 99 | + activityList.removeIf(activity -> CommonStatusEnum.isDisable(activity.getStatus())); | |
| 100 | + if (CollUtil.isEmpty(activityList)) { | |
| 101 | + return success(Collections.emptyList()); | |
| 102 | + } | |
| 103 | + // 2. 拼接返回 | |
| 104 | + List<CombinationProductDO> productList = combinationActivityService.getCombinationProductListByActivityIds( | |
| 105 | + convertList(activityList, CombinationActivityDO::getId)); | |
| 106 | + List<ProductSpuRespDTO> spuList = productSpuApi.getSpuList(convertList(activityList, CombinationActivityDO::getSpuId)); | |
| 107 | + return success(CombinationActivityConvert.INSTANCE.convertList(activityList, productList, spuList)); | |
| 114 | 108 | } |
| 115 | 109 | |
| 116 | 110 | @GetMapping("/page") | ... | ... |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/combination/vo/activity/CombinationActivityRespVO.java
| ... | ... | @@ -27,4 +27,14 @@ public class CombinationActivityRespVO extends CombinationActivityBaseVO { |
| 27 | 27 | @Schema(description = "拼团商品", requiredMode = Schema.RequiredMode.REQUIRED) |
| 28 | 28 | private List<CombinationProductRespVO> products; |
| 29 | 29 | |
| 30 | + @Schema(description = "商品 SPU 名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "一个白菜") | |
| 31 | + private String spuName; // 从 SPU 的 name 读取 | |
| 32 | + @Schema(description = "商品图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") | |
| 33 | + private String picUrl; // 从 SPU 的 picUrl 读取 | |
| 34 | + @Schema(description = "商品市场价,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "50") | |
| 35 | + private Integer marketPrice; // 从 SPU 的 marketPrice 读取 | |
| 36 | + | |
| 37 | + @Schema(description = "拼团金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") | |
| 38 | + private Integer combinationPrice; // 从 products 获取最小 price 读取 | |
| 39 | + | |
| 30 | 40 | } | ... | ... |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/AppCombinationActivityController.java
| 1 | 1 | package cn.iocoder.yudao.module.promotion.controller.app.combination; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | -import cn.hutool.core.collection.ListUtil; | |
| 5 | 4 | import cn.hutool.core.util.ObjectUtil; |
| 6 | 5 | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| 7 | 6 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| ... | ... | @@ -15,28 +14,20 @@ import cn.iocoder.yudao.module.promotion.convert.combination.CombinationActivity |
| 15 | 14 | import cn.iocoder.yudao.module.promotion.dal.dataobject.combination.CombinationActivityDO; |
| 16 | 15 | import cn.iocoder.yudao.module.promotion.dal.dataobject.combination.CombinationProductDO; |
| 17 | 16 | import cn.iocoder.yudao.module.promotion.service.combination.CombinationActivityService; |
| 18 | -import com.google.common.cache.CacheLoader; | |
| 19 | -import com.google.common.cache.LoadingCache; | |
| 20 | 17 | import io.swagger.v3.oas.annotations.Operation; |
| 21 | 18 | import io.swagger.v3.oas.annotations.Parameter; |
| 22 | 19 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 20 | +import jakarta.annotation.Resource; | |
| 23 | 21 | import org.springframework.validation.annotation.Validated; |
| 24 | 22 | import org.springframework.web.bind.annotation.GetMapping; |
| 25 | 23 | import org.springframework.web.bind.annotation.RequestMapping; |
| 26 | 24 | import org.springframework.web.bind.annotation.RequestParam; |
| 27 | 25 | import org.springframework.web.bind.annotation.RestController; |
| 28 | 26 | |
| 29 | -import jakarta.annotation.Resource; | |
| 30 | - | |
| 31 | -import java.time.Duration; | |
| 32 | -import java.util.ArrayList; | |
| 33 | -import java.util.Collection; | |
| 34 | 27 | import java.util.Collections; |
| 35 | 28 | import java.util.List; |
| 36 | -import java.util.stream.Collectors; | |
| 37 | 29 | |
| 38 | 30 | import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; |
| 39 | -import static cn.iocoder.yudao.framework.common.util.cache.CacheUtils.buildAsyncReloadingCache; | |
| 40 | 31 | import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList; |
| 41 | 32 | |
| 42 | 33 | @Tag(name = "用户 APP - 拼团活动") |
| ... | ... | @@ -45,45 +36,12 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. |
| 45 | 36 | @Validated |
| 46 | 37 | public class AppCombinationActivityController { |
| 47 | 38 | |
| 48 | - /** | |
| 49 | - * {@link AppCombinationActivityRespVO} 缓存,通过它异步刷新 {@link #getCombinationActivityList0(Integer)} 所要的首页数据 | |
| 50 | - */ | |
| 51 | - private final LoadingCache<Integer, List<AppCombinationActivityRespVO>> combinationActivityListCache = buildAsyncReloadingCache(Duration.ofSeconds(10L), | |
| 52 | - new CacheLoader<Integer, List<AppCombinationActivityRespVO>>() { | |
| 53 | - | |
| 54 | - @Override | |
| 55 | - public List<AppCombinationActivityRespVO> load(Integer count) { | |
| 56 | - return getCombinationActivityList0(count); | |
| 57 | - } | |
| 58 | - | |
| 59 | - }); | |
| 60 | - | |
| 61 | 39 | @Resource |
| 62 | 40 | private CombinationActivityService activityService; |
| 63 | 41 | |
| 64 | 42 | @Resource |
| 65 | 43 | private ProductSpuApi spuApi; |
| 66 | 44 | |
| 67 | - @GetMapping("/list") | |
| 68 | - @Operation(summary = "获得拼团活动列表", description = "用于小程序首页") | |
| 69 | - @Parameter(name = "count", description = "需要展示的数量", example = "6") | |
| 70 | - public CommonResult<List<AppCombinationActivityRespVO>> getCombinationActivityList( | |
| 71 | - @RequestParam(name = "count", defaultValue = "6") Integer count) { | |
| 72 | - return success(combinationActivityListCache.getUnchecked(count)); | |
| 73 | - } | |
| 74 | - | |
| 75 | - private List<AppCombinationActivityRespVO> getCombinationActivityList0(Integer count) { | |
| 76 | - List<CombinationActivityDO> activityList = activityService.getCombinationActivityListByCount(count); | |
| 77 | - if (CollUtil.isEmpty(activityList)) { | |
| 78 | - return Collections.emptyList(); | |
| 79 | - } | |
| 80 | - // 拼接返回 | |
| 81 | - List<CombinationProductDO> productList = activityService.getCombinationProductListByActivityIds( | |
| 82 | - convertList(activityList, CombinationActivityDO::getId)); | |
| 83 | - List<ProductSpuRespDTO> spuList = spuApi.getSpuList(convertList(activityList, CombinationActivityDO::getSpuId)); | |
| 84 | - return CombinationActivityConvert.INSTANCE.convertAppList(activityList, productList, spuList); | |
| 85 | - } | |
| 86 | - | |
| 87 | 45 | @GetMapping("/page") |
| 88 | 46 | @Operation(summary = "获得拼团活动分页") |
| 89 | 47 | public CommonResult<PageResult<AppCombinationActivityRespVO>> getCombinationActivityPage(PageParam pageParam) { |
| ... | ... | @@ -98,6 +56,23 @@ public class AppCombinationActivityController { |
| 98 | 56 | return success(CombinationActivityConvert.INSTANCE.convertAppPage(pageResult, productList, spuList)); |
| 99 | 57 | } |
| 100 | 58 | |
| 59 | + @GetMapping("/list-by-ids") | |
| 60 | + @Operation(summary = "获得拼团活动列表,基于活动编号数组") | |
| 61 | + @Parameter(name = "ids", description = "活动编号数组", required = true, example = "[1024, 1025]") | |
| 62 | + public CommonResult<List<AppCombinationActivityRespVO>> getCombinationActivityListByIds(@RequestParam("ids") List<Long> ids) { | |
| 63 | + // 1. 获得开启的活动列表 | |
| 64 | + List<CombinationActivityDO> activityList = activityService.getCombinationActivityListByIds(ids); | |
| 65 | + activityList.removeIf(activity -> CommonStatusEnum.isDisable(activity.getStatus())); | |
| 66 | + if (CollUtil.isEmpty(activityList)) { | |
| 67 | + return success(Collections.emptyList()); | |
| 68 | + } | |
| 69 | + // 2. 拼接返回 | |
| 70 | + List<CombinationProductDO> productList = activityService.getCombinationProductListByActivityIds( | |
| 71 | + convertList(activityList, CombinationActivityDO::getId)); | |
| 72 | + List<ProductSpuRespDTO> spuList = spuApi.getSpuList(convertList(activityList, CombinationActivityDO::getSpuId)); | |
| 73 | + return success(CombinationActivityConvert.INSTANCE.convertAppList(activityList, productList, spuList)); | |
| 74 | + } | |
| 75 | + | |
| 101 | 76 | @GetMapping("/get-detail") |
| 102 | 77 | @Operation(summary = "获得拼团活动明细") |
| 103 | 78 | @Parameter(name = "id", description = "活动编号", required = true, example = "1024") |
| ... | ... | @@ -114,38 +89,4 @@ public class AppCombinationActivityController { |
| 114 | 89 | return success(CombinationActivityConvert.INSTANCE.convert3(activity, products)); |
| 115 | 90 | } |
| 116 | 91 | |
| 117 | - @GetMapping("/detail-list") | |
| 118 | - @Operation(summary = "获得拼团活动明细") | |
| 119 | - @Parameter(name = "ids", description = "活动编号列表", required = true, example = "[1024, 1025]") | |
| 120 | - public CommonResult<List<AppCombinationActivityDetailRespVO>> getCombinationActivityDetailList(@RequestParam("ids") Collection<Long> ids) { | |
| 121 | - // 1. 获取活动 | |
| 122 | - List<CombinationActivityDO> combinationActivityDOList = activityService.getCombinationActivityListByIds(ids); | |
| 123 | - | |
| 124 | - // 过滤掉无效的活动 | |
| 125 | - List<CombinationActivityDO> validActivities = combinationActivityDOList.stream() | |
| 126 | - .filter(combinationActivityDO -> combinationActivityDO != null && | |
| 127 | - !ObjectUtil.equal(combinationActivityDO.getStatus(), CommonStatusEnum.DISABLE.getStatus())) | |
| 128 | - .toList(); | |
| 129 | - | |
| 130 | - // 如果没有有效的活动,返回空列表 | |
| 131 | - if (validActivities.isEmpty()) { | |
| 132 | - return success(ListUtil.empty()); | |
| 133 | - } | |
| 134 | - | |
| 135 | - // 2. 构建结果列表 | |
| 136 | - List<AppCombinationActivityDetailRespVO> detailRespVOList = new ArrayList<>(); | |
| 137 | - for (CombinationActivityDO activity : validActivities) { | |
| 138 | - // 获取活动商品 | |
| 139 | - List<CombinationProductDO> products = activityService.getCombinationProductsByActivityId(activity.getId()); | |
| 140 | - | |
| 141 | - // 调用转换方法并添加到结果列表 | |
| 142 | - AppCombinationActivityDetailRespVO detailRespVO = CombinationActivityConvert.INSTANCE.convert3(activity, products); | |
| 143 | - detailRespVOList.add(detailRespVO); | |
| 144 | - } | |
| 145 | - | |
| 146 | - // 3. 返回转换后的结果 | |
| 147 | - return success(detailRespVOList); | |
| 148 | - } | |
| 149 | - | |
| 150 | - | |
| 151 | 92 | } | ... | ... |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/activity/AppCombinationActivityRespVO.java
| ... | ... | @@ -19,15 +19,14 @@ public class AppCombinationActivityRespVO { |
| 19 | 19 | @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") |
| 20 | 20 | private Long spuId; |
| 21 | 21 | |
| 22 | + @Schema(description = "商品 SPU 名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "一个白菜") | |
| 23 | + private String spuName; // 从 SPU 的 name 读取 | |
| 22 | 24 | @Schema(description = "商品图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") |
| 23 | - // 从 SPU 的 picUrl 读取 | |
| 24 | - private String picUrl; | |
| 25 | - | |
| 25 | + private String picUrl; // 从 SPU 的 picUrl 读取 | |
| 26 | 26 | @Schema(description = "商品市场价,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "50") |
| 27 | - // 从 SPU 的 marketPrice 读取 | |
| 28 | - private Integer marketPrice; | |
| 27 | + private Integer marketPrice; // 从 SPU 的 marketPrice 读取 | |
| 29 | 28 | |
| 30 | 29 | @Schema(description = "拼团金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") |
| 31 | - private Integer combinationPrice; | |
| 30 | + private Integer combinationPrice; // 从 products 获取最小 price 读取 | |
| 32 | 31 | |
| 33 | 32 | } | ... | ... |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/convert/combination/CombinationActivityConvert.java
| ... | ... | @@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil; |
| 4 | 4 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 5 | 5 | import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; |
| 6 | 6 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| 7 | +import cn.iocoder.yudao.framework.common.util.object.BeanUtils; | |
| 7 | 8 | import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO; |
| 8 | 9 | import cn.iocoder.yudao.module.product.api.sku.dto.ProductSkuRespDTO; |
| 9 | 10 | import cn.iocoder.yudao.module.product.api.spu.dto.ProductSpuRespDTO; |
| ... | ... | @@ -127,40 +128,42 @@ public interface CombinationActivityConvert { |
| 127 | 128 | .setSpuName(spu.getName()).setPicUrl(sku.getPicUrl()); |
| 128 | 129 | } |
| 129 | 130 | |
| 130 | - List<AppCombinationActivityRespVO> convertAppList(List<CombinationActivityDO> list); | |
| 131 | - | |
| 132 | - default List<AppCombinationActivityRespVO> convertAppList(List<CombinationActivityDO> list, | |
| 133 | - List<CombinationProductDO> productList, | |
| 134 | - List<ProductSpuRespDTO> spuList) { | |
| 135 | - List<AppCombinationActivityRespVO> activityList = convertAppList(list); | |
| 131 | + default List<CombinationActivityRespVO> convertList(List<CombinationActivityDO> list, | |
| 132 | + List<CombinationProductDO> productList, | |
| 133 | + List<ProductSpuRespDTO> spuList) { | |
| 134 | + List<CombinationActivityRespVO> activityList = BeanUtils.toBean(list, CombinationActivityRespVO.class); | |
| 136 | 135 | Map<Long, ProductSpuRespDTO> spuMap = convertMap(spuList, ProductSpuRespDTO::getId); |
| 137 | 136 | Map<Long, List<CombinationProductDO>> productMap = convertMultiMap(productList, CombinationProductDO::getActivityId); |
| 138 | 137 | return CollectionUtils.convertList(activityList, item -> { |
| 139 | 138 | // 设置 product 信息 |
| 140 | 139 | item.setCombinationPrice(getMinValue(productMap.get(item.getId()), CombinationProductDO::getCombinationPrice)); |
| 141 | 140 | // 设置 SPU 信息 |
| 142 | - findAndThen(spuMap, item.getSpuId(), spu -> item.setPicUrl(spu.getPicUrl()).setMarketPrice(spu.getMarketPrice())); | |
| 141 | + findAndThen(spuMap, item.getSpuId(), spu -> item.setSpuName(spu.getName()) | |
| 142 | + .setPicUrl(spu.getPicUrl()).setMarketPrice(spu.getMarketPrice())); | |
| 143 | 143 | return item; |
| 144 | 144 | }); |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | - PageResult<AppCombinationActivityRespVO> convertAppPage(PageResult<CombinationActivityDO> result); | |
| 148 | - | |
| 149 | - default PageResult<AppCombinationActivityRespVO> convertAppPage(PageResult<CombinationActivityDO> result, | |
| 150 | - List<CombinationProductDO> productList, | |
| 151 | - List<ProductSpuRespDTO> spuList) { | |
| 152 | - PageResult<AppCombinationActivityRespVO> appPage = convertAppPage(result); | |
| 147 | + default List<AppCombinationActivityRespVO> convertAppList(List<CombinationActivityDO> list, | |
| 148 | + List<CombinationProductDO> productList, | |
| 149 | + List<ProductSpuRespDTO> spuList) { | |
| 150 | + List<AppCombinationActivityRespVO> activityList = BeanUtils.toBean(list, AppCombinationActivityRespVO.class); | |
| 153 | 151 | Map<Long, ProductSpuRespDTO> spuMap = convertMap(spuList, ProductSpuRespDTO::getId); |
| 154 | 152 | Map<Long, List<CombinationProductDO>> productMap = convertMultiMap(productList, CombinationProductDO::getActivityId); |
| 155 | - List<AppCombinationActivityRespVO> list = CollectionUtils.convertList(appPage.getList(), item -> { | |
| 153 | + return CollectionUtils.convertList(activityList, item -> { | |
| 156 | 154 | // 设置 product 信息 |
| 157 | 155 | item.setCombinationPrice(getMinValue(productMap.get(item.getId()), CombinationProductDO::getCombinationPrice)); |
| 158 | 156 | // 设置 SPU 信息 |
| 159 | - findAndThen(spuMap, item.getSpuId(), spu -> item.setPicUrl(spu.getPicUrl()).setMarketPrice(spu.getMarketPrice())); | |
| 157 | + findAndThen(spuMap, item.getSpuId(), spu -> item.setSpuName(spu.getName()) | |
| 158 | + .setPicUrl(spu.getPicUrl()).setMarketPrice(spu.getMarketPrice())); | |
| 160 | 159 | return item; |
| 161 | 160 | }); |
| 162 | - appPage.setList(list); | |
| 163 | - return appPage; | |
| 161 | + } | |
| 162 | + | |
| 163 | + default PageResult<AppCombinationActivityRespVO> convertAppPage(PageResult<CombinationActivityDO> result, | |
| 164 | + List<CombinationProductDO> productList, | |
| 165 | + List<ProductSpuRespDTO> spuList) { | |
| 166 | + return new PageResult<>(convertAppList(result.getList(), productList, spuList), result.getTotal()); | |
| 164 | 167 | } |
| 165 | 168 | |
| 166 | 169 | AppCombinationActivityDetailRespVO convert2(CombinationActivityDO combinationActivity); | ... | ... |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/combination/CombinationActivityService.java
| ... | ... | @@ -103,14 +103,6 @@ public interface CombinationActivityService { |
| 103 | 103 | /** |
| 104 | 104 | * 获取正在进行的活动分页数据 |
| 105 | 105 | * |
| 106 | - * @param count 需要的数量 | |
| 107 | - * @return 拼团活动分页 | |
| 108 | - */ | |
| 109 | - List<CombinationActivityDO> getCombinationActivityListByCount(Integer count); | |
| 110 | - | |
| 111 | - /** | |
| 112 | - * 获取正在进行的活动分页数据 | |
| 113 | - * | |
| 114 | 106 | * @param pageParam 分页请求 |
| 115 | 107 | * @return 拼团活动分页 |
| 116 | 108 | */ | ... | ... |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/combination/CombinationActivityServiceImpl.java
| ... | ... | @@ -226,11 +226,6 @@ public class CombinationActivityServiceImpl implements CombinationActivityServic |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | @Override |
| 229 | - public List<CombinationActivityDO> getCombinationActivityListByCount(Integer count) { | |
| 230 | - return combinationActivityMapper.selectListByStatus(CommonStatusEnum.ENABLE.getStatus(), count); | |
| 231 | - } | |
| 232 | - | |
| 233 | - @Override | |
| 234 | 229 | public PageResult<CombinationActivityDO> getCombinationActivityPage(PageParam pageParam) { |
| 235 | 230 | return combinationActivityMapper.selectPage(pageParam, CommonStatusEnum.ENABLE.getStatus()); |
| 236 | 231 | } | ... | ... |