Browse Source

Merge branch 'dev' of https://gitlink.org.cn/ci4s/ci4sManagement-cloud into dev

tags/v20240126
fans 2 years ago
parent
commit
94ab75e1e6
3 changed files with 40 additions and 6 deletions
  1. +14
    -0
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Component.java
  2. +2
    -2
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ComponentServiceImpl.java
  3. +24
    -4
      ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ComponentDaoMapper.xml

+ 14
- 0
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Component.java View File

@@ -74,6 +74,11 @@ public class Component implements Serializable {
* 描述 * 描述
*/ */
private String description; private String description;

/**
* 图标路径
*/
private String iconPath;
/** /**
* 创建者 * 创建者
*/ */
@@ -210,6 +215,15 @@ public class Component implements Serializable {
this.description = description; this.description = description;
} }



public String getIconPath() {
return iconPath;
}

public void setIconPath(String iconPath) {
this.iconPath = iconPath;
}

public String getCreateBy() { public String getCreateBy() {
return createBy; return createBy;
} }


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

@@ -51,10 +51,10 @@ public class ComponentServiceImpl implements ComponentService {
} }


@Override @Override
public List<Map> queryAllGroupedByCategory() {
public List<Map> queryAllGroupedByCategory() {
List<Component> componentList = this.componentDao.queryAll(); List<Component> componentList = this.componentDao.queryAll();
List<Map> result = new ArrayList<>(); List<Map> result = new ArrayList<>();
if (componentList.size()==0){
if (componentList.isEmpty()){
return result; return result;
} }
Map<Integer,List<Component>> groupedComponent = componentList.stream().collect(Collectors.groupingBy(Component::getCategoryId)); Map<Integer,List<Component>> groupedComponent = componentList.stream().collect(Collectors.groupingBy(Component::getCategoryId));


+ 24
- 4
ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ComponentDaoMapper.xml View File

@@ -16,6 +16,8 @@
<result property="mountPath" column="mount_path" jdbcType="VARCHAR"/> <result property="mountPath" column="mount_path" jdbcType="VARCHAR"/>
<result property="inParameters" column="in_parameters" jdbcType="VARCHAR"/> <result property="inParameters" column="in_parameters" jdbcType="VARCHAR"/>
<result property="outParameters" column="out_parameters" jdbcType="VARCHAR"/> <result property="outParameters" column="out_parameters" jdbcType="VARCHAR"/>
<result property="description" column="description" jdbcType="VARCHAR"/>
<result property="iconPath" column="icon_path" jdbcType="VARCHAR"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/> <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/> <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
@@ -26,7 +28,7 @@
<!--查询单个--> <!--查询单个-->
<select id="queryById" resultMap="ComponentMap"> <select id="queryById" resultMap="ComponentMap">
select select
id,category_id,component_name,component_Label,images,working_directory,command,env_virables,resources_standard,control_strategy,mount_path,in_parameters,out_parameters,create_by,create_time,update_by,update_time,state
id,category_id,component_name,component_Label,images,working_directory,command,env_virables,resources_standard,control_strategy,mount_path,in_parameters,out_parameters,description,icon_path,create_by,create_time,update_by,update_time,state
from component from component
where id = #{id} and state = 1 where id = #{id} and state = 1
</select> </select>
@@ -40,7 +42,7 @@
<!--查询指定行数据--> <!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="ComponentMap"> <select id="queryAllByLimit" resultMap="ComponentMap">
select select
id,category_id,component_name,component_Label,images,working_directory,command,env_virables,resources_standard,control_strategy,mount_path,in_parameters,out_parameters,create_by,create_time,update_by,update_time,state
id,category_id,component_name,component_Label,images,working_directory,command,env_virables,resources_standard,control_strategy,mount_path,in_parameters,out_parameters,description,icon_path,create_by,create_time,update_by,update_time,state
from component from component
<where> <where>
state = 1 state = 1
@@ -83,6 +85,12 @@
<if test="component.outParameters != null and component.outParameters != ''"> <if test="component.outParameters != null and component.outParameters != ''">
and out_parameters = #{component.outParameters} and out_parameters = #{component.outParameters}
</if> </if>
<if test="component.description != null and component.description != ''">
and description = #{component.description}
</if>
<if test="component.iconPath != null and component.iconPath != ''">
and icon_path = #{component.iconPath}
</if>
<if test="component.createBy != null and component.createBy != ''"> <if test="component.createBy != null and component.createBy != ''">
and create_by = #{component.createBy} and create_by = #{component.createBy}
</if> </if>
@@ -147,6 +155,12 @@
<if test="component.outParameters != null and component.outParameters != ''"> <if test="component.outParameters != null and component.outParameters != ''">
and out_parameters = #{component.outParameters} and out_parameters = #{component.outParameters}
</if> </if>
<if test="component.description != null and component.description != ''">
and description = #{component.description}
</if>
<if test="component.iconPath != null and component.iconPath != ''">
and icon_path = #{component.iconPath}
</if>
<if test="component.createBy != null and component.createBy != ''"> <if test="component.createBy != null and component.createBy != ''">
and create_by = #{component.createBy} and create_by = #{component.createBy}
</if> </if>
@@ -176,8 +190,8 @@


<!--新增所有列--> <!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true"> <insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into component(category_id,component_name,component_label,images,working_directory,command,env_virables,resources_standard,control_strategy,mount_path,in_parameters,out_parameters,create_by,create_time,update_by,update_time,state)
values (#{component.categoryId},#{component.componentName},#{component.componentLabel},#{component.images},#{component.workingDirectory},#{component.command},#{component.envVirables},#{component.resourcesStandard},#{component.controlStrategy},#{component.mountPath},#{component.inParameters},#{component.outParameters},#{component.createBy},#{component.createTime},#{component.updateBy},#{component.updateTime},#{component.state})
insert into component(category_id,component_name,component_Label,images,working_directory,command,env_virables,resources_standard,control_strategy,mount_path,in_parameters,out_parameters,description,icon_path,create_by,create_time,update_by,update_time,state)
values (#{component.categoryId},#{component.componentName},#{component.componentLabel},#{component.images},#{component.workingDirectory},#{component.command},#{component.envVirables},#{component.resourcesStandard},#{component.controlStrategy},#{component.mountPath},#{component.inParameters},#{component.outParameters},#{component.description},#{component.iconPath},#{component.createBy},#{component.createTime},#{component.updateBy},#{component.updateTime},#{component.state})
</insert> </insert>


<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
@@ -241,6 +255,12 @@ category_id = values(category_id)component_name = values(component_name)componen
<if test="component.outParameters != null and component.outParameters != ''"> <if test="component.outParameters != null and component.outParameters != ''">
out_parameters = #{component.outParameters}, out_parameters = #{component.outParameters},
</if> </if>
<if test="component.description != null and component.description != ''">
description = #{component.description},
</if>
<if test="component.iconPath != null and component.iconPath != ''">
icon_path = #{component.iconPath},
</if>
<if test="component.createBy != null and component.createBy != ''"> <if test="component.createBy != null and component.createBy != ''">
create_by = #{component.createBy}, create_by = #{component.createBy},
</if> </if>


Loading…
Cancel
Save