mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 15:21:53 +08:00
代码优化
This commit is contained in:
parent
c935312bf8
commit
efd0a86007
@ -89,13 +89,13 @@ public class CombinationActivityController {
|
||||
return success(CombinationActivityConvert.INSTANCE.convert(activity, products));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@GetMapping("/detail-list")
|
||||
@Operation(summary = "获得拼团活动详情列表")
|
||||
@Parameter(name = "combinationActivityIds", description = "拼团活动编号列表", required = true, example = "[1,2,3]")
|
||||
@Parameter(name = "ids", description = "拼团活动编号列表", required = true, example = "[1,2,3]")
|
||||
@PreAuthorize("@ss.hasPermission('product:spu:query')")
|
||||
public CommonResult<List<CombinationActivityRespVO>> getCombinationActivityDetailList(@RequestParam("combinationActivityIds") Collection<Long> combinationActivityIds) {
|
||||
public CommonResult<List<CombinationActivityRespVO>> getCombinationActivityDetailList(@RequestParam("ids") Collection<Long> ids) {
|
||||
// 查询拼团活动列表
|
||||
List<CombinationActivityDO> activities = combinationActivityService.getCombinationActivityListByIds(combinationActivityIds);
|
||||
List<CombinationActivityDO> activities = combinationActivityService.getCombinationActivityListByIds(ids);
|
||||
|
||||
// 转换活动列表
|
||||
List<CombinationActivityRespVO> activityVOs = CombinationActivityConvert.INSTANCE.convertList(activities);
|
||||
|
@ -113,12 +113,12 @@ public class AppCombinationActivityController {
|
||||
return success(CombinationActivityConvert.INSTANCE.convert3(activity, products));
|
||||
}
|
||||
|
||||
@GetMapping("/get-detail-list")
|
||||
@GetMapping("/detail-list")
|
||||
@Operation(summary = "获得拼团活动明细")
|
||||
@Parameter(name = "combinationActivityIds", description = "活动编号列表", required = true, example = "[1024, 1025]")
|
||||
public CommonResult<List<AppCombinationActivityDetailRespVO>> getCombinationActivityDetailList(@RequestParam("combinationActivityIds") Collection<Long> combinationActivityIds) {
|
||||
@Parameter(name = "ids", description = "活动编号列表", required = true, example = "[1024, 1025]")
|
||||
public CommonResult<List<AppCombinationActivityDetailRespVO>> getCombinationActivityDetailList(@RequestParam("ids") Collection<Long> ids) {
|
||||
// 1. 获取活动
|
||||
List<CombinationActivityDO> combinationActivityDOList = activityService.getCombinationActivityListByIds(combinationActivityIds);
|
||||
List<CombinationActivityDO> combinationActivityDOList = activityService.getCombinationActivityListByIds(ids);
|
||||
|
||||
// 过滤掉无效的活动
|
||||
List<CombinationActivityDO> validActivities = combinationActivityDOList.stream()
|
||||
|
Loading…
Reference in New Issue
Block a user