TASK: 全局异常优化;
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.ai.da.controller;
|
||||
|
||||
import com.ai.da.common.config.exception.BusinessException;
|
||||
import com.ai.da.common.context.UserContext;
|
||||
import com.ai.da.common.response.PageBaseResponse;
|
||||
import com.ai.da.common.response.PageResponse;
|
||||
@@ -75,7 +76,9 @@ public class SavedCollectionController {
|
||||
}
|
||||
List<Long> groupIds = page.getRecords().stream().map(UserLikeGroup::getId).collect(Collectors.toList());
|
||||
List<UserLikeVO> groupDetails = userLikeService.getGroupDetails(groupIds);
|
||||
Assert.notEmpty(groupDetails, "History detail does not exist!");
|
||||
if (CollectionUtils.isEmpty(groupDetails)) {
|
||||
throw new BusinessException("groupDetails.not.found");
|
||||
}
|
||||
Map<Long, List<UserLikeVO>> groupDetailMap = groupDetails.stream()
|
||||
.collect(Collectors.groupingBy(UserLikeVO::getUserLikeGroupId));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user