Browse Source

自动超参数寻优实验功能开发

dev-ray
chenzhihang 1 year ago
parent
commit
b1a7a3c12e
1 changed files with 7 additions and 12 deletions
  1. +7
    -12
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/RayServiceImpl.java

+ 7
- 12
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/RayServiceImpl.java View File

@@ -43,13 +43,13 @@ public class RayServiceImpl implements RayService {
}
Ray ray = new Ray();
BeanUtils.copyProperties(rayVo, ray);
// String username = SecurityUtils.getLoginUser().getUsername();
String username = "admin";
String username = SecurityUtils.getLoginUser().getUsername();
ray.setCreateBy(username);
ray.setUpdateBy(username);
ray.setDataset(JacksonUtil.toJSONString(rayVo.getDataset()));
ray.setCode(JacksonUtil.toJSONString(rayVo.getCode()));
ray.setParameters(JacksonUtil.toJSONString(rayVo.getParameters()));
ray.setPointsToEvaluate(JacksonUtil.toJSONString(rayVo.getPointsToEvaluate()));
rayDao.save(ray);
return ray;
}
@@ -62,16 +62,11 @@ public class RayServiceImpl implements RayService {
}
Ray ray = new Ray();
BeanUtils.copyProperties(rayVo, ray);
String username = SecurityUtils.getLoginUser().getUsername();
ray.setUpdateBy(username);
String parameters = JacksonUtil.toJSONString(rayVo.getParameters());
ray.setParameters(parameters);
String pointsToEvaluate = JacksonUtil.toJSONString(rayVo.getPointsToEvaluate());
ray.setPointsToEvaluate(pointsToEvaluate);
String datasetJson = JacksonUtil.toJSONString(rayVo.getDataset());
ray.setDataset(datasetJson);
String codeJson = JacksonUtil.toJSONString(rayVo.getCode());
ray.setCode(codeJson);
ray.setUpdateBy(SecurityUtils.getLoginUser().getUsername());
ray.setParameters(JacksonUtil.toJSONString(rayVo.getParameters()));
ray.setPointsToEvaluate(JacksonUtil.toJSONString(rayVo.getPointsToEvaluate()));
ray.setDataset(JacksonUtil.toJSONString(rayVo.getDataset()));
ray.setCode(JacksonUtil.toJSONString(rayVo.getCode()));
rayDao.edit(ray);
return "修改成功";
}


Loading…
Cancel
Save