TASK: library关联分类;

This commit is contained in:
shahaibo
2023-11-14 15:26:54 +08:00
parent 09ebb4ca06
commit 6d673d6f32
2 changed files with 4 additions and 2 deletions

View File

@@ -75,7 +75,7 @@ public class AccountController {
}
@ApiOperation(value = "切换当前用户语言")
@PostMapping("/changeUserLanguage")
@GetMapping("/changeUserLanguage")
public Response<String> changeUserLanguage(String language) {
return Response.success(accountService.changeUserLanguage(language));
}

View File

@@ -139,7 +139,9 @@ public class LibraryServiceImpl extends ServiceImpl<LibraryMapper, Library> impl
for (Long classificationId : query.getClassificationIdList()) {
libraryIdList.addAll(classificationService.getLibraryIdListByClassificationId(classificationId));
}
queryWrapper.lambda().in(Library::getId, libraryIdList);
if (CollectionUtil.isNotEmpty(libraryIdList)) {
queryWrapper.lambda().in(Library::getId, libraryIdList);
}
}
queryWrapper.orderByDesc("id");
IPage<Library> page = getBaseMapper().selectPage(