|
@@ -114,19 +114,15 @@ public class CdKeyMgrController extends BaseController {
|
|
|
queryWrapper.orderByDesc("created_time");
|
|
|
|
|
|
startPage();
|
|
|
- List<CdKeyGroup> cdKeyGroupList = cdKeyGroupService.list(queryWrapper);
|
|
|
- List<CdKeyGroupListVO> cdKeyGroupListVOS = new ArrayList<>();
|
|
|
+ List<CdKeyGroupVO> cdKeyGroupList = cdKeyGroupService.listCdKeyGroupListVO(queryWrapper);
|
|
|
if (CollectionUtils.isNotEmpty(cdKeyGroupList)) {
|
|
|
- cdKeyGroupListVOS = cdKeyGroupList.stream().map(cdKeyGroup -> {
|
|
|
- CdKeyGroupListVO cdKeyGroupListVO = new CdKeyGroupListVO();
|
|
|
- BeanUtils.copyProperties(cdKeyGroup, cdKeyGroupListVO);
|
|
|
- Channel channel = channelService.getById(cdKeyGroup.getChannelId());
|
|
|
- String siteName = channel.getSiteName() == null ? "-- " : channel.getSiteName();
|
|
|
- cdKeyGroupListVO.setSiteName(siteName + "(" + channel.getMobile() + ")");
|
|
|
- return cdKeyGroupListVO;
|
|
|
- }).collect(Collectors.toList());
|
|
|
+ cdKeyGroupList.forEach(cdKeyGroupVO -> {
|
|
|
+ Channel channel = channelService.getById(cdKeyGroupVO.getChannelId());
|
|
|
+ String siteName = channel.getSiteName() == null ? "-- " : channel.getSiteName();
|
|
|
+ cdKeyGroupVO.setSiteName(siteName + "(" + channel.getMobile() + ")");
|
|
|
+ });
|
|
|
}
|
|
|
- return getDataTable(cdKeyGroupListVOS);
|
|
|
+ return getDataTable(cdKeyGroupList);
|
|
|
}
|
|
|
|
|
|
@ApiOperation("兑换码详情")
|