| @@ -64,6 +64,10 @@ public class ActiveLearnServiceImpl implements ActiveLearnService { | |||||
| if (activeLearnByName != null) { | if (activeLearnByName != null) { | ||||
| throw new RuntimeException("实验名称已存在"); | throw new RuntimeException("实验名称已存在"); | ||||
| } | } | ||||
| if (activeLearnVo.getName().length() >= 64) { | |||||
| throw new RuntimeException("实验名称大于最大长度"); | |||||
| } | |||||
| ActiveLearn activeLearn = new ActiveLearn(); | ActiveLearn activeLearn = new ActiveLearn(); | ||||
| BeanUtils.copyProperties(activeLearnVo, activeLearn); | BeanUtils.copyProperties(activeLearnVo, activeLearn); | ||||
| String username = SecurityUtils.getLoginUser().getUsername(); | String username = SecurityUtils.getLoginUser().getUsername(); | ||||
| @@ -15,6 +15,7 @@ import org.springframework.data.domain.Page; | |||||
| import org.springframework.data.domain.PageImpl; | import org.springframework.data.domain.PageImpl; | ||||
| import org.springframework.data.domain.PageRequest; | import org.springframework.data.domain.PageRequest; | ||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
| import org.springframework.transaction.annotation.Transactional; | |||||
| import javax.annotation.Resource; | import javax.annotation.Resource; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| @@ -72,6 +73,7 @@ public class AutoMlInsServiceImpl implements AutoMlInsService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| @Transactional | |||||
| public String batchDelete(List<Long> ids) { | public String batchDelete(List<Long> ids) { | ||||
| for (Long id : ids) { | for (Long id : ids) { | ||||
| String result = removeById(id); | String result = removeById(id); | ||||
| @@ -70,6 +70,11 @@ public class AutoMlServiceImpl implements AutoMlService { | |||||
| if (autoMlByName != null) { | if (autoMlByName != null) { | ||||
| throw new RuntimeException("实验名称已存在"); | throw new RuntimeException("实验名称已存在"); | ||||
| } | } | ||||
| if (autoMlVo.getMlName().length() >= 64) { | |||||
| throw new RuntimeException("实验名称大于最大长度"); | |||||
| } | |||||
| AutoMl autoMl = new AutoMl(); | AutoMl autoMl = new AutoMl(); | ||||
| BeanUtils.copyProperties(autoMlVo, autoMl); | BeanUtils.copyProperties(autoMlVo, autoMl); | ||||
| String username = SecurityUtils.getLoginUser().getUsername(); | String username = SecurityUtils.getLoginUser().getUsername(); | ||||
| @@ -67,6 +67,11 @@ public class RayServiceImpl implements RayService { | |||||
| if (rayByName != null) { | if (rayByName != null) { | ||||
| throw new RuntimeException("实验名称已存在"); | throw new RuntimeException("实验名称已存在"); | ||||
| } | } | ||||
| if (rayVo.getName().length() >= 64) { | |||||
| throw new RuntimeException("实验名称大于最大长度"); | |||||
| } | |||||
| Ray ray = new Ray(); | Ray ray = new Ray(); | ||||
| BeanUtils.copyProperties(rayVo, ray); | BeanUtils.copyProperties(rayVo, ray); | ||||
| String username = SecurityUtils.getLoginUser().getUsername(); | String username = SecurityUtils.getLoginUser().getUsername(); | ||||