修改标签时校验有没有重复

This commit is contained in:
zzpay 2024-12-25 19:40:44 +08:00
parent 2572fb27da
commit 7f6de37e2e
1 changed files with 4 additions and 0 deletions

View File

@ -133,7 +133,11 @@ public class TagService {
* @return
*/
public ResultObject<Void> sourceUpdate( String name, Long id) {
List<Tag> tagList = tagMapper.queryTag(null, name, null, "create_time", null);
if(tagList!=null && tagList.size()>0){
return ResultObject.failed("该标签已存在");
}
/**
* 目前来源标签写死为1