This commit is contained in:
chenxudong 2025-03-05 17:07:40 +08:00
commit 314c93efb9
4 changed files with 8 additions and 8 deletions

View File

@ -23,7 +23,7 @@ public class EdTagLibraryController {
private FileTagRelationService fileTagRelationService;
// 新建标签组
@PostMapping("/createGroup")
@GetMapping("/createGroup")
@UserOperation(value="创建了标签组", modelName = UserOperationModuleEnum.TAG)
public ElectromagneticResult<?> createTagGroup(@RequestParam String tagName) {
String createdBy = UserThreadLocal.getUserId();
@ -31,7 +31,7 @@ public class EdTagLibraryController {
}
// 在标签组下新建标签
@PostMapping("/createTag")
@GetMapping("/createTag")
@UserOperation(value="创建了标签", modelName = UserOperationModuleEnum.TAG)
public ElectromagneticResult<?> createTag(@RequestParam String parentId, @RequestParam String tagName) {
String createdBy = UserThreadLocal.getUserId();
@ -39,7 +39,7 @@ public class EdTagLibraryController {
}
// 拖拽修改排序/分组
@PostMapping("/updateOrder")
@GetMapping("/updateOrder")
@UserOperation(value="修改了标签顺序", modelName = UserOperationModuleEnum.TAG)
public ElectromagneticResult<?> updateTagOrder(@RequestParam String tagId, @RequestParam String newParentId, @RequestParam Integer newOrderBy) {
String updatedBy = UserThreadLocal.getUserId();
@ -47,7 +47,7 @@ public class EdTagLibraryController {
}
// 发布标签
@PostMapping("/batchPublish")
@GetMapping("/batchPublish")
@UserOperation(value="发布了标签组", modelName = UserOperationModuleEnum.TAG)
public ElectromagneticResult<?> publishTag(@RequestParam List<String> tagIds) {
return ElectromagneticResultUtil.success(edTagLibraryService.batchPublishTagGroups(tagIds));
@ -68,7 +68,7 @@ public class EdTagLibraryController {
}
// 修改标签组/标签
@PostMapping ("/updateTag")
@GetMapping ("/updateTag")
@UserOperation(value="修改了标签组/标签", modelName = UserOperationModuleEnum.TAG)
public ElectromagneticResult<?> updateTag(@RequestParam String tagId, @RequestParam String tagName) {
String updatedBy = UserThreadLocal.getUserId();

View File

@ -17,5 +17,5 @@ public class TagListVO {
private Integer orderBy; // 排序字段
private Integer isPublished; // 是否已发布0: 未发布, 1: 已发布
private List<EdTagLibrary> childList;
private List<EdTagLibrary> children;
}

View File

@ -1424,7 +1424,7 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
// 设置权限
Map<String, Boolean> permissions = (e.getIsPersonal() == 1)
? permissionService.getPersonalPermission()
: permissionService.getUserPermission(UserThreadLocal.getUserId(), e.getId(), false);
: permissionService.getUserPermission(UserThreadLocal.getUserId(), e.getId(), true);
e.setPermissions(permissions);
});
UserThreadLocal.setSuccessInfo("", "", "查询了收藏列表");

View File

@ -208,7 +208,7 @@ public class EdTagLibraryServiceImpl extends ServiceImpl<EdTagLibraryMapper, EdT
for (EdTagLibrary group : groups) {
TagListVO vo = new TagListVO();
BeanUtils.copyProperties(group, vo);
vo.setChildList(tagsGrouped.getOrDefault(group.getTagId(), new ArrayList<>()));
vo.setChildren(tagsGrouped.getOrDefault(group.getTagId(), new ArrayList<>()));
result.add(vo);
}
UserThreadLocal.setSuccessInfo("", "", "获取了标签数据");