[update] 基座模型创建/修改 名称不能重复返回错误信息

This commit is contained in:
Liuyang 2025-01-23 18:06:54 +08:00
parent 3f2ac2e513
commit fce716668c

View File

@ -23,8 +23,7 @@ import java.util.List;
import java.util.Map;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.llm.enums.ErrorCodeConstants.BASE_MODEL_NOT_EXISTS;
import static cn.iocoder.yudao.module.llm.enums.ErrorCodeConstants.LABEL_NAME_EXISTS;
import static cn.iocoder.yudao.module.llm.enums.ErrorCodeConstants.*;
/**
* 基座模型 Service 实现类
@ -78,7 +77,7 @@ public class BaseModelServiceImpl implements BaseModelService {
}
List<BaseModelDO> baseModel = baseModelMapper.selectList(wrapper);
if (CollectionUtils.isNotEmpty(baseModel)) {
throw exception(LABEL_NAME_EXISTS);
throw exception(BASE_MODEL_NAME_EXISTS);
}
}