|
|
@@ -65,14 +65,7 @@ public class InformationController {
|
|
|
*/
|
|
|
@GetMapping("/get/category")
|
|
|
public Result<List<InformationCategory>> getInformationCategory() {
|
|
|
- List<InformationCategory> list = informationCategoryService.list(Wrappers.lambdaQuery(InformationCategory.class).orderByAsc(InformationCategory::getSortBy));
|
|
|
- list.forEach(category -> {
|
|
|
- int count = informationService.count(Wrappers.lambdaQuery(Information.class).apply("JSON_CONTAINS(category_ids,'\"" + category.getId() + "\"')").eq(Information::getStatus, true).eq(Information::getDeleted, true));
|
|
|
- if (count == 0){
|
|
|
- list.remove(category);
|
|
|
- }
|
|
|
- });
|
|
|
- return GatewayResponse.SUCCESS.newBuilder().toResult(list);
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult(informationCategoryService.getInformationCategory());
|
|
|
}
|
|
|
|
|
|
/**
|