增加flow_id字段

This commit is contained in:
xiang2lin 2025-05-08 08:50:07 +08:00
parent 70c6f8adf3
commit bfd18dce39
1 changed files with 280 additions and 249 deletions

View File

@ -11,6 +11,7 @@
<result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="step" column="step" jdbcType="INTEGER"/>
<result property="stepType" column="step_type" jdbcType="VARCHAR"/>
<result property="flowId" column="flow_id" jdbcType="VARCHAR"/>
<result property="description" column="description" jdbcType="VARCHAR"/>
<result property="apiName" column="api_name" jdbcType="VARCHAR"/>
<result property="actionType" column="action_type" jdbcType="VARCHAR"/>
@ -30,6 +31,7 @@
,sts
,step
,step_type
,flowId
,description
,api_name
,action_type
@ -40,7 +42,8 @@
,sort_mode
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-SysFlowStepEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
<select id="entity_list_base" resultMap="get-SysFlowStepEntity-result"
parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
select
<include refid="SysFlowStepEntity_Base_Column_List"/>
from sys_flow_step
@ -53,6 +56,7 @@
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="step != null">and step = #{step}</if>
<if test="stepType != null and stepType != ''">and step_type = #{stepType}</if>
<if test="flowId != null and flowId != ''">and flow_id = #{flowId}</if>
<if test="description != null and description != ''">and description = #{description}</if>
<if test="apiName != null and apiName != ''">and api_name = #{apiName}</if>
<if test="actionType != null and actionType != ''">and action_type = #{actionType}</if>
@ -79,6 +83,7 @@
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="step != null">and step = #{step}</if>
<if test="stepType != null and stepType != ''">and step_type = #{stepType}</if>
<if test="flowId != null and flowId != ''">and flow_id = #{flowId}</if>
<if test="description != null and description != ''">and description = #{description}</if>
<if test="apiName != null and apiName != ''">and api_name = #{apiName}</if>
<if test="actionType != null and actionType != ''">and action_type = #{actionType}</if>
@ -94,20 +99,27 @@
</select>
<!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-SysFlowStepEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
<select id="entity_list_like" resultMap="get-SysFlowStepEntity-result"
parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
select
<include refid="SysFlowStepEntity_Base_Column_List"/>
from sys_flow_step
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if>
<if test="create_user_id != null and create_user_id != ''">and create_user_id like
concat('%',#{create_user_id},'%')
</if>
<if test="create_time != null">and create_time like concat('%',#{create_time},'%')</if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if>
<if test="modify_user_id != null and modify_user_id != ''">and modify_user_id like
concat('%',#{modify_user_id},'%')
</if>
<if test="modify_time != null">and modify_time like concat('%',#{modify_time},'%')</if>
<if test="sts != null and sts != ''">and sts like concat('%',#{sts},'%')</if>
<if test="step != null">and step like concat('%',#{step},'%')</if>
<if test="stepType != null and stepType != ''">and step_type like concat('%',#{stepType},'%')</if>
<if test="description != null and description != ''"> and description like concat('%',#{description},'%') </if>
<if test="flowId != null and flowId != ''">and flow_id like concat('%',#{flowId},'%')</if>
<if test="description != null and description != ''">and description like concat('%',#{description},'%')
</if>
<if test="apiName != null and apiName != ''">and api_name like concat('%',#{apiName},'%')</if>
<if test="actionType != null and actionType != ''">and action_type like concat('%',#{actionType},'%')</if>
<if test="appId != null and appId != ''">and app_id like concat('%',#{appId},'%')</if>
@ -122,7 +134,8 @@
</select>
<!-- 查询列表 字段采用or格式 -->
<select id="SysFlowStepentity_list_or" resultMap="get-SysFlowStepEntity-result" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
<select id="SysFlowStepentity_list_or" resultMap="get-SysFlowStepEntity-result"
parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
select
<include refid="SysFlowStepEntity_Base_Column_List"/>
from sys_flow_step
@ -135,6 +148,7 @@
<if test="sts != null and sts != ''">or sts = #{sts}</if>
<if test="step != null">or step = #{step}</if>
<if test="stepType != null and stepType != ''">or step_type = #{stepType}</if>
<if test="flowId != null and flowId != ''">or flow_id = #{flowId}</if>
<if test="description != null and description != ''">or description = #{description}</if>
<if test="apiName != null and apiName != ''">or api_name = #{apiName}</if>
<if test="actionType != null and actionType != ''">or action_type = #{actionType}</if>
@ -150,7 +164,8 @@
</select>
<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepEntity" keyProperty="id" useGeneratedKeys="true">
<insert id="entity_insert" parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity" keyProperty="id"
useGeneratedKeys="true">
insert into sys_flow_step(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''">id ,</if>
@ -161,6 +176,7 @@
<if test="sts != null and sts != ''">sts ,</if>
<if test="step != null">step ,</if>
<if test="stepType != null and stepType != ''">step_type ,</if>
<if test="flowId != null and flowId != ''">flow_id ,</if>
<if test="description != null and description != ''">description ,</if>
<if test="apiName != null and apiName != ''">api_name ,</if>
<if test="actionType != null and actionType != ''">action_type ,</if>
@ -182,6 +198,7 @@
<if test="sts != null and sts != ''">#{sts} ,</if>
<if test="step != null">#{step} ,</if>
<if test="stepType != null and stepType != ''">#{stepType} ,</if>
<if test="flowId != null and flowId != ''">#{flowId} ,</if>
<if test="description != null and description != ''">#{description} ,</if>
<if test="apiName != null and apiName != ''">#{apiName} ,</if>
<if test="actionType != null and actionType != ''">#{actionType} ,</if>
@ -190,25 +207,30 @@
<if test="nifiAppId != null and nifiAppId != ''">#{nifiAppId} ,</if>
<if test="nifiApiId != null and nifiApiId != ''">#{nifiApiId} ,</if>
<if test="sortMode != null and sortMode != ''">#{sortMode} ,</if>
<if test="sorts == null ">COALESCE((select (max(IFNULL( a.sorts, 0 )) + 1) as sort from sys_flow_step a WHERE a.sts = 'Y' ),1),</if>
<if test="sorts == null ">COALESCE((select (max(IFNULL( a.sorts, 0 )) + 1) as sort from sys_flow_step a
WHERE a.sts = 'Y' ),1),
</if>
<if test="sts == null ">'Y',</if>
</trim>
)
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
insert into sys_flow_step(create_user_id, create_time, modify_user_id, modify_time, sts, step, step_type, description, api_name, action_type, app_id, api_id, nifi_app_id, nifi_api_id, sort_mode, sts)
insert into sys_flow_step(create_user_id, create_time, modify_user_id, modify_time, sts, step,
step_type,flow_id, description, api_name, action_type, app_id, api_id, nifi_app_id, nifi_api_id, sort_mode, sts)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.step},#{entity.stepType},#{entity.description},#{entity.apiName},#{entity.actionType},#{entity.appId},#{entity.apiId},#{entity.nifiAppId},#{entity.nifiApiId},#{entity.sortMode}, 'Y')
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.step},#{entity.stepType},#{entity.flowId},#{entity.description},#{entity.apiName},#{entity.actionType},#{entity.appId},#{entity.apiId},#{entity.nifiAppId},#{entity.nifiApiId},#{entity.sortMode},
'Y')
</foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into sys_flow_step(create_user_id, create_time, modify_user_id, modify_time, sts, step, step_type, description, api_name, action_type, app_id, api_id, nifi_app_id, nifi_api_id, sort_mode)
insert into sys_flow_step(create_user_id, create_time, modify_user_id, modify_time, sts, step, step_type,
flow_id,description, api_name, action_type, app_id, api_id, nifi_app_id, nifi_api_id, sort_mode)
values
<foreach collection="entities" item="entity" separator=",">
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.step},#{entity.stepType},#{entity.description},#{entity.apiName},#{entity.actionType},#{entity.appId},#{entity.apiId},#{entity.nifiAppId},#{entity.nifiApiId},#{entity.sortMode})
(#{entity.create_user_id},#{entity.create_time},#{entity.modify_user_id},#{entity.modify_time},#{entity.sts},#{entity.step},#{entity.stepType},#{entity.flowId},#{entity.description},#{entity.apiName},#{entity.actionType},#{entity.appId},#{entity.apiId},#{entity.nifiAppId},#{entity.nifiApiId},#{entity.sortMode})
</foreach>
on duplicate key update
create_user_id = values(create_user_id),
@ -218,6 +240,7 @@
sts = values(sts),
step = values(step),
step_type = values(step_type),
flow_id = values(flow_id),
description = values(description),
api_name = values(api_name),
action_type = values(action_type),
@ -225,7 +248,8 @@
api_id = values(api_id),
nifi_app_id = values(nifi_app_id),
nifi_api_id = values(nifi_api_id),
sort_mode = values(sort_mode)</insert>
sort_mode = values(sort_mode)
</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
update sys_flow_step set
@ -237,6 +261,7 @@ update sys_flow_step set
<if test="sts != null and sts != ''">sts = #{sts},</if>
<if test="step != null">step = #{step},</if>
<if test="stepType != null and stepType != ''">step_type = #{stepType},</if>
<if test="flowId != null and flowId != ''">flow_id = #{flowId},</if>
<if test="description != null and description != ''">description = #{description},</if>
<if test="apiName != null and apiName != ''">api_name = #{apiName},</if>
<if test="actionType != null and actionType != ''">action_type = #{actionType},</if>
@ -250,7 +275,10 @@ where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
update sys_flow_step set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
update sys_flow_step
set sts= 'N',
modify_time = #{modify_time},
modify_user_id = #{modify_user_id}
where id = #{id}
</update>
<!-- 多条件逻辑删除 -->
@ -261,6 +289,7 @@ update sys_flow_step set sts= 'N' ,modify_time = #{modify_time},modify_user_id
<if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="step != null">and step = #{step}</if>
<if test="stepType != null and stepType != ''">and step_type = #{stepType}</if>
<if test="flowId != null and flowId != ''">and flow_id = #{flowId}</if>
<if test="description != null and description != ''">and description = #{description}</if>
<if test="apiName != null and apiName != ''">and api_name = #{apiName}</if>
<if test="actionType != null and actionType != ''">and action_type = #{actionType}</if>
@ -274,7 +303,9 @@ update sys_flow_step set sts= 'N' ,modify_time = #{modify_time},modify_user_id
</update>
<!--通过主键删除-->
<delete id="entity_delete">
delete from sys_flow_step where id = #{id}
delete
from sys_flow_step
where id = #{id}
</delete>
</mapper>