diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java index 2a5304e1..fdf32609 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java @@ -356,7 +356,7 @@ public class DatasetServiceImpl implements DatasetService { for (Field field : fields) { if (field.isAnnotationPresent(CheckDuplicate.class)) { CheckDuplicate annotation = field.getAnnotation(CheckDuplicate.class); - throw new Exception(annotation.value() + "不能重复"); + throw new Exception(field.getName()+ "不能重复"); } } } diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetVersionServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetVersionServiceImpl.java index 66838b20..a510c559 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetVersionServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetVersionServiceImpl.java @@ -162,7 +162,7 @@ public class DatasetVersionServiceImpl implements DatasetVersionService { for (Field field : fields) { if (field.isAnnotationPresent(CheckDuplicate.class)) { CheckDuplicate annotation = field.getAnnotation(CheckDuplicate.class); - throw new Exception(annotation.value() + "不能重复"); + throw new Exception(field.getName() + "不能重复"); } } } diff --git a/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/DatasetDaoMapper.xml b/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/DatasetDaoMapper.xml index c7380588..836361cc 100644 --- a/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/DatasetDaoMapper.xml +++ b/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/DatasetDaoMapper.xml @@ -29,7 +29,7 @@ select id,name,description,available_range,data_type,data_tag,create_by,create_time,update_by,update_time,state from dataset - where name = #{name} and state = 1 + where name = #{name} and state = 1 limit 1