| @@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.FieldFill; | |||||
| import com.baomidou.mybatisplus.annotation.TableField; | import com.baomidou.mybatisplus.annotation.TableField; | ||||
| import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; | ||||
| import com.baomidou.mybatisplus.annotation.TableLogic; | import com.baomidou.mybatisplus.annotation.TableLogic; | ||||
| import com.fasterxml.jackson.databind.PropertyNamingStrategy; | |||||
| import com.fasterxml.jackson.databind.annotation.JsonNaming; | |||||
| import com.ruoyi.common.core.web.domain.BaseEntity; | import com.ruoyi.common.core.web.domain.BaseEntity; | ||||
| import java.io.Serializable; | import java.io.Serializable; | ||||
| @@ -16,6 +18,7 @@ import java.util.List; | |||||
| * @author makejava | * @author makejava | ||||
| * @since 2023-11-07 15:08:22 | * @since 2023-11-07 15:08:22 | ||||
| */ | */ | ||||
| @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class) | |||||
| public class Experiment extends BaseEntity implements Serializable { | public class Experiment extends BaseEntity implements Serializable { | ||||
| private static final long serialVersionUID = 409135817108439880L; | private static final long serialVersionUID = 409135817108439880L; | ||||
| @TableId | @TableId | ||||
| @@ -1,5 +1,8 @@ | |||||
| package com.ruoyi.platform.domain; | package com.ruoyi.platform.domain; | ||||
| import com.fasterxml.jackson.databind.PropertyNamingStrategy; | |||||
| import com.fasterxml.jackson.databind.annotation.JsonNaming; | |||||
| import java.io.Serializable; | import java.io.Serializable; | ||||
| import java.util.Date; | import java.util.Date; | ||||
| @@ -9,6 +12,7 @@ import java.util.Date; | |||||
| * @author makejava | * @author makejava | ||||
| * @since 2023-11-09 09:48:36 | * @since 2023-11-09 09:48:36 | ||||
| */ | */ | ||||
| @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class) | |||||
| public class ExperimentIns implements Serializable { | public class ExperimentIns implements Serializable { | ||||
| private static final long serialVersionUID = 623464560240790680L; | private static final long serialVersionUID = 623464560240790680L; | ||||
| @@ -1,5 +1,8 @@ | |||||
| package com.ruoyi.platform.domain; | package com.ruoyi.platform.domain; | ||||
| import com.fasterxml.jackson.databind.PropertyNamingStrategy; | |||||
| import com.fasterxml.jackson.databind.annotation.JsonNaming; | |||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.io.Serializable; | import java.io.Serializable; | ||||
| @@ -9,6 +12,7 @@ import java.io.Serializable; | |||||
| * @author Xidaray | * @author Xidaray | ||||
| * @since 2023-11-28 16:24:19 | * @since 2023-11-28 16:24:19 | ||||
| */ | */ | ||||
| @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class) | |||||
| public class Models implements Serializable { | public class Models implements Serializable { | ||||
| private static final long serialVersionUID = -59896385986032571L; | private static final long serialVersionUID = -59896385986032571L; | ||||
| @@ -2,6 +2,8 @@ package com.ruoyi.platform.domain; | |||||
| import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; | ||||
| import com.fasterxml.jackson.annotation.JsonFormat; | import com.fasterxml.jackson.annotation.JsonFormat; | ||||
| import com.fasterxml.jackson.databind.PropertyNamingStrategy; | |||||
| import com.fasterxml.jackson.databind.annotation.JsonNaming; | |||||
| import com.ruoyi.platform.handler.BaseMetaObjectHandler; | import com.ruoyi.platform.handler.BaseMetaObjectHandler; | ||||
| import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
| @@ -17,6 +19,7 @@ import java.util.Date; | |||||
| */ | */ | ||||
| @Component | @Component | ||||
| @Table(name = "workflow") | @Table(name = "workflow") | ||||
| @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class) | |||||
| public class Workflow extends BaseMetaObjectHandler implements Serializable { | public class Workflow extends BaseMetaObjectHandler implements Serializable { | ||||
| private static final long serialVersionUID = -28387946419827568L; | private static final long serialVersionUID = -28387946419827568L; | ||||
| /** | /** | ||||
| @@ -74,6 +74,8 @@ public interface ComponentDao { | |||||
| */ | */ | ||||
| int insertOrUpdateBatch(@Param("entities") List<Component> entities); | int insertOrUpdateBatch(@Param("entities") List<Component> entities); | ||||
| /** | /** | ||||
| * 修改数据 | * 修改数据 | ||||
| * | * | ||||
| @@ -145,15 +145,20 @@ public class ComponentServiceImpl implements ComponentService { | |||||
| //将object转成string类型 | //将object转成string类型 | ||||
| component = ConvertUtil.entityToVo(componentVo,Component.class); | component = ConvertUtil.entityToVo(componentVo,Component.class); | ||||
| Gson gson = new Gson(); | |||||
| component.setEnvVirables(componentVo.getEnvVirables().toString()); | |||||
| component.setInParameters(componentVo.getInParameters().toString()); | |||||
| component.setOutParameters(componentVo.getOutParameters().toString()); | |||||
| String inParameters= gson.toJson(componentVo.getInParameters(), LinkedHashMap.class); | |||||
| String outParameters = gson.toJson(componentVo.getOutParameters(), LinkedHashMap.class); | |||||
| String envVariable = gson.toJson(componentVo.getEnvVirables(), LinkedHashMap.class); | |||||
| component.setEnvVirables(envVariable); | |||||
| component.setInParameters(inParameters); | |||||
| component.setOutParameters(outParameters); | |||||
| LoginUser loginUser = SecurityUtils.getLoginUser(); | LoginUser loginUser = SecurityUtils.getLoginUser(); | ||||
| component.setUpdateBy(loginUser.getUsername()); | component.setUpdateBy(loginUser.getUsername()); | ||||
| component.setUpdateTime(new Date()); | component.setUpdateTime(new Date()); | ||||
| this.componentDao.update(component); | this.componentDao.update(component); | ||||
| return this.queryById(component.getId()); | return this.queryById(component.getId()); | ||||
| } | } | ||||
| /** | /** | ||||
| @@ -94,6 +94,7 @@ | |||||
| and update_time = #{experiment.updateTime} | and update_time = #{experiment.updateTime} | ||||
| </if> | </if> | ||||
| </where> | </where> | ||||
| order by update_time DESC | |||||
| limit #{pageable.offset}, #{pageable.pageSize} | limit #{pageable.offset}, #{pageable.pageSize} | ||||
| </select> | </select> | ||||
| @@ -118,6 +118,7 @@ | |||||
| and update_time = #{experimentIns.updateTime} | and update_time = #{experimentIns.updateTime} | ||||
| </if> | </if> | ||||
| </where> | </where> | ||||
| order by update_time DESC | |||||
| limit #{pageable.offset}, #{pageable.pageSize} | limit #{pageable.offset}, #{pageable.pageSize} | ||||
| </select> | </select> | ||||
| @@ -54,6 +54,7 @@ | |||||
| and update_time = #{workflow.updateTime} | and update_time = #{workflow.updateTime} | ||||
| </if> | </if> | ||||
| </where> | </where> | ||||
| order by update_time DESC | |||||
| limit #{pageable.offset}, #{pageable.pageSize} | limit #{pageable.offset}, #{pageable.pageSize} | ||||
| </select> | </select> | ||||