查询标签的parent由前端来传

This commit is contained in:
zzpay 2024-12-25 19:30:41 +08:00
parent ee334d89ce
commit 2572fb27da
2 changed files with 5 additions and 2 deletions

View File

@ -81,7 +81,7 @@ public class TagController {
return PageObject.failedPage(500, "服务端错误,请联系系统管理员!"); return PageObject.failedPage(500, "服务端错误,请联系系统管理员!");
} }
return tagService.queryTag(6L, needChildren, keyword, exclude, page, size, orderBy, direction); return tagService.queryTag(parent, needChildren, keyword, exclude, page, size, orderBy, direction);
} }
@GetMapping("/source") @GetMapping("/source")

View File

@ -113,8 +113,11 @@ public class TagService {
* @return * @return
*/ */
public ResultObject<Void> sourceCreate(Long parentId, String name) { public ResultObject<Void> sourceCreate(Long parentId, String name) {
List<Tag> tagList = tagMapper.queryTag(parentId, name, null, "create_time", null);
if(tagList!=null && tagList.size()>0){
return ResultObject.failed("该标签已存在");
}
/** /**
* 目前来源标签写死为1 * 目前来源标签写死为1
* id=1的初始化的时候就是来源标签 * id=1的初始化的时候就是来源标签