Browse Source

编辑组件接口修改存储格式

tags/v20240126
西大锐 2 years ago
parent
commit
c5c0afed3f
5 changed files with 13 additions and 3 deletions
  1. +2
    -0
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/mapper/ComponentDao.java
  2. +8
    -3
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ComponentServiceImpl.java
  3. +1
    -0
      ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ExperimentDaoMapper.xml
  4. +1
    -0
      ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ExperimentInsDaoMapper.xml
  5. +1
    -0
      ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/WorkflowDaoMapper.xml

+ 2
- 0
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/mapper/ComponentDao.java View File

@@ -74,6 +74,8 @@ public interface ComponentDao {
*/
int insertOrUpdateBatch(@Param("entities") List<Component> entities);



/**
* 修改数据
*


+ 8
- 3
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ComponentServiceImpl.java View File

@@ -145,15 +145,20 @@ public class ComponentServiceImpl implements ComponentService {

//将object转成string类型
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();
component.setUpdateBy(loginUser.getUsername());
component.setUpdateTime(new Date());
this.componentDao.update(component);
return this.queryById(component.getId());

}

/**


+ 1
- 0
ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ExperimentDaoMapper.xml View File

@@ -94,6 +94,7 @@
and update_time = #{experiment.updateTime}
</if>
</where>
order by update_time DESC
limit #{pageable.offset}, #{pageable.pageSize}
</select>



+ 1
- 0
ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ExperimentInsDaoMapper.xml View File

@@ -118,6 +118,7 @@
and update_time = #{experimentIns.updateTime}
</if>
</where>
order by update_time DESC
limit #{pageable.offset}, #{pageable.pageSize}
</select>



+ 1
- 0
ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/WorkflowDaoMapper.xml View File

@@ -54,6 +54,7 @@
and update_time = #{workflow.updateTime}
</if>
</where>
order by update_time DESC
limit #{pageable.offset}, #{pageable.pageSize}
</select>



Loading…
Cancel
Save