TASK:AiDA模块化
This commit is contained in:
@@ -1188,15 +1188,18 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
|||||||
userLikeGroupQueryWrapper.lambda().in(UserLikeGroup::getProjectId, projectIdSet);
|
userLikeGroupQueryWrapper.lambda().in(UserLikeGroup::getProjectId, projectIdSet);
|
||||||
List<UserLikeGroup> userLikeGroups = userLikeGroupMapper.selectList(userLikeGroupQueryWrapper);
|
List<UserLikeGroup> userLikeGroups = userLikeGroupMapper.selectList(userLikeGroupQueryWrapper);
|
||||||
|
|
||||||
List<Long> groupIds = userLikeGroups.stream().map(UserLikeGroup::getId).collect(Collectors.toList());
|
Map<Long, List<UserLikeVO>> groupDetailMap = new HashMap<>();
|
||||||
List<UserLikeVO> groupDetails = userLikeService.getGroupDetails(groupIds);
|
|
||||||
// if (CollectionUtils.isEmpty(groupDetails)) {
|
if (CollectionUtil.isNotEmpty(userLikeGroups)) {
|
||||||
// throw new BusinessException("groupDetails.not.found");
|
List<Long> groupIds = userLikeGroups.stream().map(UserLikeGroup::getId).collect(Collectors.toList());
|
||||||
// }
|
List<UserLikeVO> groupDetails = userLikeService.getGroupDetails(groupIds);
|
||||||
Map<Long, List<UserLikeVO>> groupDetailMap = groupDetails.stream()
|
|
||||||
.collect(Collectors.groupingBy(UserLikeVO::getUserLikeGroupId));
|
groupDetailMap = groupDetails.stream()
|
||||||
|
.collect(Collectors.groupingBy(UserLikeVO::getUserLikeGroupId));
|
||||||
|
}
|
||||||
|
|
||||||
Account account = accountService.getById(authPrincipalVo.getId());
|
Account account = accountService.getById(authPrincipalVo.getId());
|
||||||
|
Map<Long, List<UserLikeVO>> finalGroupDetailMap = groupDetailMap;
|
||||||
IPage<ProjectVO> convert = page.convert((Function<Project, ProjectVO>) project -> {
|
IPage<ProjectVO> convert = page.convert((Function<Project, ProjectVO>) project -> {
|
||||||
if (project != null) {
|
if (project != null) {
|
||||||
ProjectVO projectVO = CopyUtil.copyObject(project, ProjectVO.class);
|
ProjectVO projectVO = CopyUtil.copyObject(project, ProjectVO.class);
|
||||||
@@ -1209,8 +1212,8 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
|||||||
UserLikeGroupVO userLikeGroupVO = CopyUtil.copyObject(userLikeGroup, UserLikeGroupVO.class);
|
UserLikeGroupVO userLikeGroupVO = CopyUtil.copyObject(userLikeGroup, UserLikeGroupVO.class);
|
||||||
userLikeGroupVO.setAuthor(account.getUserName());
|
userLikeGroupVO.setAuthor(account.getUserName());
|
||||||
//count 和detail
|
//count 和detail
|
||||||
if (groupDetailMap.keySet().contains(userLikeGroupVO.getId())) {
|
if (finalGroupDetailMap.keySet().contains(userLikeGroupVO.getId())) {
|
||||||
List<UserLikeVO> details = groupDetailMap.get(userLikeGroupVO.getId());
|
List<UserLikeVO> details = finalGroupDetailMap.get(userLikeGroupVO.getId());
|
||||||
for (UserLikeVO detail : details) {
|
for (UserLikeVO detail : details) {
|
||||||
TDesignPythonOutfit tDesignPythonOutfit = designPythonOutfitMapper.selectById(detail.getDesignOutfitId());
|
TDesignPythonOutfit tDesignPythonOutfit = designPythonOutfitMapper.selectById(detail.getDesignOutfitId());
|
||||||
detail.setUrl(minioUtil.getPreSignedUrl(tDesignPythonOutfit.getDesignUrl(), 24 * 60));
|
detail.setUrl(minioUtil.getPreSignedUrl(tDesignPythonOutfit.getDesignUrl(), 24 * 60));
|
||||||
|
|||||||
Reference in New Issue
Block a user