mirror of https://github.com/halo-dev/halo
parent
1f89ba0ed2
commit
0ade01c518
|
@ -100,6 +100,14 @@ public interface CategoryService extends CrudService<Category, Integer> {
|
||||||
@NonNull
|
@NonNull
|
||||||
List<Category> listAll(Sort sort, boolean queryEncryptCategory);
|
List<Category> listAll(Sort sort, boolean queryEncryptCategory);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List all category not encrypt.
|
||||||
|
*
|
||||||
|
* @param queryEncryptCategory whether to query encryption category
|
||||||
|
* @return list of category.
|
||||||
|
*/
|
||||||
|
List<Category> listAll(boolean queryEncryptCategory);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List all by ids
|
* List all by ids
|
||||||
*
|
*
|
||||||
|
|
|
@ -336,7 +336,7 @@ public class BackupServiceImpl implements BackupService {
|
||||||
data.put("version", HaloConst.HALO_VERSION);
|
data.put("version", HaloConst.HALO_VERSION);
|
||||||
data.put("export_date", DateUtil.now());
|
data.put("export_date", DateUtil.now());
|
||||||
data.put("attachments", attachmentService.listAll());
|
data.put("attachments", attachmentService.listAll());
|
||||||
data.put("categories", categoryService.listAll());
|
data.put("categories", categoryService.listAll(true));
|
||||||
data.put("comment_black_list", commentBlackListService.listAll());
|
data.put("comment_black_list", commentBlackListService.listAll());
|
||||||
data.put("journals", journalService.listAll());
|
data.put("journals", journalService.listAll());
|
||||||
data.put("journal_comments", journalCommentService.listAll());
|
data.put("journal_comments", journalCommentService.listAll());
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class CategoryServiceImpl extends AbstractCrudService<Category, Integer>
|
||||||
|
|
||||||
private PostService postService;
|
private PostService postService;
|
||||||
|
|
||||||
private AuthenticationService authenticationService;
|
private final AuthenticationService authenticationService;
|
||||||
|
|
||||||
public CategoryServiceImpl(CategoryRepository categoryRepository,
|
public CategoryServiceImpl(CategoryRepository categoryRepository,
|
||||||
PostCategoryService postCategoryService,
|
PostCategoryService postCategoryService,
|
||||||
|
@ -481,6 +481,15 @@ public class CategoryServiceImpl extends AbstractCrudService<Category, Integer>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Category> listAll(boolean queryEncryptCategory) {
|
||||||
|
if (queryEncryptCategory) {
|
||||||
|
return super.listAll();
|
||||||
|
} else {
|
||||||
|
return this.listAll();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Category> listAll() {
|
public List<Category> listAll() {
|
||||||
return filterEncryptCategory(super.listAll());
|
return filterEncryptCategory(super.listAll());
|
||||||
|
|
Loading…
Reference in New Issue