fax():合并代码并补全功能
parent
77d901bd4d
commit
344f380c91
|
@ -79,13 +79,13 @@ public class ActivityTeamInfoController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 根据ID查询详情
|
||||
* 根据活动ID查询商品拼团信息
|
||||
* @param id 活动ID
|
||||
* @return 活动详情
|
||||
* @return 商品拼团信息
|
||||
*/
|
||||
@GetMapping("/teamList/{id}")
|
||||
@GetMapping("/ActivityTeamList/{id}")
|
||||
public Result<List<ActivityTeamInfo>> teamList(@PathVariable("id") Long id){
|
||||
List<ActivityTeamInfo> activityTeamInfoList= activityTeamInfoService.teamList(id);
|
||||
List<ActivityTeamInfo> activityTeamInfoList= activityTeamInfoService.ActivityTeamList(id);
|
||||
return Result.success(activityTeamInfoList);
|
||||
}
|
||||
|
||||
|
|
|
@ -41,11 +41,11 @@ public interface ActivityTeamInfoService extends IService<ActivityTeamInfo> {
|
|||
boolean update(ActivityTeamInfoUpdModel activityTeamInfoUpdModel);
|
||||
|
||||
/**
|
||||
* 根据活动ID查询详情
|
||||
* @param id id
|
||||
* @return 查询详情
|
||||
* 根据活动ID查询商品拼团信息
|
||||
* @param id 活动ID
|
||||
* @return 商品拼团信息
|
||||
*/
|
||||
List<ActivityTeamInfo> teamList(Long id);
|
||||
List<ActivityTeamInfo> ActivityTeamList(Long id);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
|
|||
public Result<String> save(ActivityTeamInfoSaveReq activityTeamInfoSaveReq) {
|
||||
ActivityTeamInfo activityTeamInfo = ActivityTeamInfo.buildModel(activityTeamInfoSaveReq);
|
||||
//添加返回主键ID
|
||||
Assert.isTrue(this.save(activityTeamInfo),StringUtils.format("添加商品拼团错误",activityTeamInfoSaveReq));
|
||||
Assert.isTrue(this.save(activityTeamInfo),StringUtils.format("添加商品错误",activityTeamInfoSaveReq));
|
||||
List<ActivityInfoSkuAddReq> projectSkuList = activityTeamInfoSaveReq.getTeamProjectSkuInfoAddReqList();
|
||||
|
||||
List<ActivityTeamProductSkuInfo> teamProductSkuInfoList = projectSkuList.stream().map(projectSkuModel -> {
|
||||
|
@ -96,7 +96,7 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
|
|||
.teamPrice(projectSkuModel.getTeamPrice())
|
||||
.build();
|
||||
})
|
||||
.filter(Objects::nonNull) // 过滤掉null值
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
activityTeamProductSkuInfoService.saveBatch(teamProductSkuInfoList);
|
||||
|
@ -130,12 +130,12 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
|
|||
}
|
||||
|
||||
/**
|
||||
* 根据ID查询详情
|
||||
* 根据活动ID查询商品拼团信息
|
||||
* @param id 活动ID
|
||||
* @return 查询详情
|
||||
* @return 商品拼团信息
|
||||
*/
|
||||
@Override
|
||||
public List<ActivityTeamInfo> teamList(Long id) {
|
||||
public List<ActivityTeamInfo> ActivityTeamList(Long id) {
|
||||
LambdaQueryWrapper<ActivityTeamInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ActivityTeamInfo::getId,id);
|
||||
List<ActivityTeamInfo> list = this.list(queryWrapper);
|
||||
|
|
Loading…
Reference in New Issue