Browse Source

组件新增字段

pull/51/head
西大锐 1 year ago
parent
commit
63ddf436f4
1 changed files with 18 additions and 8 deletions
  1. +18
    -8
      ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ComponentDaoMapper.xml

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

@@ -16,6 +16,7 @@
<result property="mountPath" column="mount_path" jdbcType="VARCHAR"/>
<result property="inParameters" column="in_parameters" jdbcType="VARCHAR"/>
<result property="outParameters" column="out_parameters" jdbcType="VARCHAR"/>
<result property="availableRange" column="available_range" jdbcType="INTEGER"/>
<result property="description" column="description" jdbcType="VARCHAR"/>
<result property="iconPath" column="icon_path" jdbcType="VARCHAR"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
@@ -28,7 +29,7 @@
<!--查询单个-->
<select id="queryById" resultMap="ComponentMap">
select
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
id,category_id,component_name,component_Label,images,working_directory,command,env_virables,resources_standard,control_strategy,mount_path,in_parameters,out_parameters,available_range,description,icon_path,create_by,create_time,update_by,update_time,state
from component
where id = #{id} and state = 1
</select>
@@ -42,7 +43,7 @@
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="ComponentMap">
select
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
id,category_id,component_name,component_Label,images,working_directory,command,env_virables,resources_standard,control_strategy,mount_path,in_parameters,out_parameters,available_range,description,icon_path,create_by,create_time,update_by,update_time,state
from component
<where>
state = 1
@@ -85,6 +86,9 @@
<if test="component.outParameters != null and component.outParameters != ''">
and out_parameters = #{component.outParameters}
</if>
<if test="component.availableRange != null">
and available_range = #{component.availableRange}
</if>
<if test="component.description != null and component.description != ''">
and description = #{component.description}
</if>
@@ -155,6 +159,9 @@
<if test="component.outParameters != null and component.outParameters != ''">
and out_parameters = #{component.outParameters}
</if>
<if test="component.availableRange != null">
and available_range = #{component.availableRange}
</if>
<if test="component.description != null and component.description != ''">
and description = #{component.description}
</if>
@@ -190,23 +197,23 @@

<!--新增所有列-->
<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,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 into component(category_id,component_name,component_Label,images,working_directory,command,env_virables,resources_standard,control_strategy,mount_path,in_parameters,out_parameters,available_range,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.availableRange},#{component.description},#{component.iconPath},#{component.createBy},#{component.createTime},#{component.updateBy},#{component.updateTime},#{component.state})
</insert>

<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into component(category_idcomponent_namecomponent_labelimagesworking_directorycommandenv_virablesresources_standardcontrol_strategymount_pathin_parametersout_parameterscreate_bycreate_timeupdate_byupdate_timestate)
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,available_range,description,icon_path,create_by,create_time,update_by,update_time,state)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.categoryId}#{entity.componentName}#{entity.componentLabel}#{entity.images}#{entity.workingDirectory}#{entity.command}#{entity.envVirables}#{entity.resourcesStandard}#{entity.controlStrategy}#{entity.mountPath}#{entity.inParameters}#{entity.outParameters}#{entity.createBy}#{entity.createTime}#{entity.updateBy}#{entity.updateTime}#{entity.state})
(#{entity.categoryId},#{entity.componentName},#{entity.componentLabel},#{entity.images},#{entity.workingDirectory},#{entity.command},#{entity.envVirables},#{entity.resourcesStandard},#{entity.controlStrategy},#{entity.mountPath},#{entity.inParameters},#{entity.outParameters},#{entity.availableRange},#{entity.createBy},#{entity.createTime},#{entity.updateBy},#{entity.updateTime},#{entity.state})
</foreach>
</insert>

<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into component(category_idcomponent_namecomponent_labelimagesworking_directorycommandenv_virablesresources_standardcontrol_strategymount_pathin_parametersout_parameterscreate_bycreate_timeupdate_byupdate_timestate)
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,available_range,description,icon_path,create_by,create_time,update_by,update_time,state)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.categoryId}#{entity.componentName}#{entity.componentId}#{entity.images}#{entity.workingDirectory}#{entity.command}#{entity.envVirables}#{entity.resourcesStandard}#{entity.controlStrategy}#{entity.mountPath}#{entity.inParameters}#{entity.outParameters}#{entity.createBy}#{entity.createTime}#{entity.updateBy}#{entity.updateTime}#{entity.state})
(#{entity.categoryId},#{entity.componentName},#{entity.componentLabel},#{entity.images},#{entity.workingDirectory},#{entity.command},#{entity.envVirables},#{entity.resourcesStandard},#{entity.controlStrategy},#{entity.mountPath},#{entity.inParameters},#{entity.outParameters},#{entity.availableRange},#{entity.createBy},#{entity.createTime},#{entity.updateBy},#{entity.updateTime},#{entity.state})
</foreach>
on duplicate key update
category_id = values(category_id)component_name = values(component_name)component_id = values(component_id)images = values(images)working_directory = values(working_directory)command = values(command)env_virables = values(env_virables)resources_standard = values(resources_standard)control_strategy = values(control_strategy)mount_path = values(mount_path)in_parameters = values(in_parameters)out_parameters = values(out_parameters)create_by = values(create_by)create_time = values(create_time)update_by = values(update_by)update_time = values(update_time)state = values(state)
@@ -255,6 +262,9 @@ category_id = values(category_id)component_name = values(component_name)componen
<if test="component.outParameters != null and component.outParameters != ''">
out_parameters = #{component.outParameters},
</if>
<if test="component.availableRange != null">
available_range = #{component.availableRange},
</if>
<if test="component.description != null and component.description != ''">
description = #{component.description},
</if>


Loading…
Cancel
Save