增加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

@ -2,280 +2,311 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.sys.flow.dao.impl.SysFlowStepDaoImpl"> <mapper namespace="com.hzya.frame.sys.flow.dao.impl.SysFlowStepDaoImpl">
<resultMap id="get-SysFlowStepEntity-result" type="com.hzya.frame.sys.flow.entity.SysFlowStepEntity" > <resultMap id="get-SysFlowStepEntity-result" type="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
<result property="id" column="id" jdbcType="VARCHAR"/> <result property="id" column="id" jdbcType="VARCHAR"/>
<result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/> <result property="create_user_id" column="create_user_id" jdbcType="VARCHAR"/>
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/> <result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
<result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/> <result property="modify_user_id" column="modify_user_id" jdbcType="VARCHAR"/>
<result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/> <result property="modify_time" column="modify_time" jdbcType="TIMESTAMP"/>
<result property="sts" column="sts" jdbcType="VARCHAR"/> <result property="sts" column="sts" jdbcType="VARCHAR"/>
<result property="step" column="step" jdbcType="INTEGER"/> <result property="step" column="step" jdbcType="INTEGER"/>
<result property="stepType" column="step_type" jdbcType="VARCHAR"/> <result property="stepType" column="step_type" jdbcType="VARCHAR"/>
<result property="description" column="description" jdbcType="VARCHAR"/> <result property="flowId" column="flow_id" jdbcType="VARCHAR"/>
<result property="apiName" column="api_name" jdbcType="VARCHAR"/> <result property="description" column="description" jdbcType="VARCHAR"/>
<result property="actionType" column="action_type" jdbcType="VARCHAR"/> <result property="apiName" column="api_name" jdbcType="VARCHAR"/>
<result property="appId" column="app_id" jdbcType="VARCHAR"/> <result property="actionType" column="action_type" jdbcType="VARCHAR"/>
<result property="apiId" column="api_id" jdbcType="VARCHAR"/> <result property="appId" column="app_id" jdbcType="VARCHAR"/>
<result property="nifiAppId" column="nifi_app_id" jdbcType="VARCHAR"/> <result property="apiId" column="api_id" jdbcType="VARCHAR"/>
<result property="nifiApiId" column="nifi_api_id" jdbcType="VARCHAR"/> <result property="nifiAppId" column="nifi_app_id" jdbcType="VARCHAR"/>
<result property="sortMode" column="sort_mode" jdbcType="VARCHAR"/> <result property="nifiApiId" column="nifi_api_id" jdbcType="VARCHAR"/>
</resultMap> <result property="sortMode" column="sort_mode" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段--> <!-- 查询的字段-->
<sql id = "SysFlowStepEntity_Base_Column_List"> <sql id="SysFlowStepEntity_Base_Column_List">
id id
,create_user_id ,create_user_id
,create_time ,create_time
,modify_user_id ,modify_user_id
,modify_time ,modify_time
,sts ,sts
,step ,step
,step_type ,step_type
,description ,flowId
,description
,api_name ,api_name
,action_type ,action_type
,app_id ,app_id
,api_id ,api_id
,nifi_app_id ,nifi_app_id
,nifi_api_id ,nifi_api_id
,sort_mode ,sort_mode
</sql> </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"
select parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
<include refid="SysFlowStepEntity_Base_Column_List" /> select
from sys_flow_step <include refid="SysFlowStepEntity_Base_Column_List"/>
<trim prefix="where" prefixOverrides="and"> from sys_flow_step
<if test="id != null and id != ''"> and id = #{id} </if> <trim prefix="where" prefixOverrides="and">
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if> <if test="id != null and id != ''">and id = #{id}</if>
<if test="create_time != null"> and create_time = #{create_time} </if> <if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if> <if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if> <if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if> <if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="step != null"> and step = #{step} </if> <if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="stepType != null and stepType != ''"> and step_type = #{stepType} </if> <if test="step != null">and step = #{step}</if>
<if test="description != null and description != ''"> and description = #{description} </if> <if test="stepType != null and stepType != ''">and step_type = #{stepType}</if>
<if test="apiName != null and apiName != ''"> and api_name = #{apiName} </if> <if test="flowId != null and flowId != ''">and flow_id = #{flowId}</if>
<if test="actionType != null and actionType != ''"> and action_type = #{actionType} </if> <if test="description != null and description != ''">and description = #{description}</if>
<if test="appId != null and appId != ''"> and app_id = #{appId} </if> <if test="apiName != null and apiName != ''">and api_name = #{apiName}</if>
<if test="apiId != null and apiId != ''"> and api_id = #{apiId} </if> <if test="actionType != null and actionType != ''">and action_type = #{actionType}</if>
<if test="nifiAppId != null and nifiAppId != ''"> and nifi_app_id = #{nifiAppId} </if> <if test="appId != null and appId != ''">and app_id = #{appId}</if>
<if test="nifiApiId != null and nifiApiId != ''"> and nifi_api_id = #{nifiApiId} </if> <if test="apiId != null and apiId != ''">and api_id = #{apiId}</if>
<if test="sortMode != null and sortMode != ''"> and sort_mode = #{sortMode} </if> <if test="nifiAppId != null and nifiAppId != ''">and nifi_app_id = #{nifiAppId}</if>
<if test="nifiApiId != null and nifiApiId != ''">and nifi_api_id = #{nifiApiId}</if>
<if test="sortMode != null and sortMode != ''">and sort_mode = #{sortMode}</if>
and sts='Y' and sts='Y'
</trim> </trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if> <if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if> <if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select> </select>
<!-- 查询符合条件的数量 --> <!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepEntity"> <select id="entity_count" resultType="Integer" parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
select count(1) from sys_flow_step select count(1) from sys_flow_step
<trim prefix="where" prefixOverrides="and"> <trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''"> and id = #{id} </if> <if test="id != null and id != ''">and id = #{id}</if>
<if test="create_user_id != null and create_user_id != ''"> and create_user_id = #{create_user_id} </if> <if test="create_user_id != null and create_user_id != ''">and create_user_id = #{create_user_id}</if>
<if test="create_time != null"> and create_time = #{create_time} </if> <if test="create_time != null">and create_time = #{create_time}</if>
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id = #{modify_user_id} </if> <if test="modify_user_id != null and modify_user_id != ''">and modify_user_id = #{modify_user_id}</if>
<if test="modify_time != null"> and modify_time = #{modify_time} </if> <if test="modify_time != null">and modify_time = #{modify_time}</if>
<if test="sts != null and sts != ''"> and sts = #{sts} </if> <if test="sts != null and sts != ''">and sts = #{sts}</if>
<if test="step != null"> and step = #{step} </if> <if test="step != null">and step = #{step}</if>
<if test="stepType != null and stepType != ''"> and step_type = #{stepType} </if> <if test="stepType != null and stepType != ''">and step_type = #{stepType}</if>
<if test="description != null and description != ''"> and description = #{description} </if> <if test="flowId != null and flowId != ''">and flow_id = #{flowId}</if>
<if test="apiName != null and apiName != ''"> and api_name = #{apiName} </if> <if test="description != null and description != ''">and description = #{description}</if>
<if test="actionType != null and actionType != ''"> and action_type = #{actionType} </if> <if test="apiName != null and apiName != ''">and api_name = #{apiName}</if>
<if test="appId != null and appId != ''"> and app_id = #{appId} </if> <if test="actionType != null and actionType != ''">and action_type = #{actionType}</if>
<if test="apiId != null and apiId != ''"> and api_id = #{apiId} </if> <if test="appId != null and appId != ''">and app_id = #{appId}</if>
<if test="nifiAppId != null and nifiAppId != ''"> and nifi_app_id = #{nifiAppId} </if> <if test="apiId != null and apiId != ''">and api_id = #{apiId}</if>
<if test="nifiApiId != null and nifiApiId != ''"> and nifi_api_id = #{nifiApiId} </if> <if test="nifiAppId != null and nifiAppId != ''">and nifi_app_id = #{nifiAppId}</if>
<if test="sortMode != null and sortMode != ''"> and sort_mode = #{sortMode} </if> <if test="nifiApiId != null and nifiApiId != ''">and nifi_api_id = #{nifiApiId}</if>
<if test="sortMode != null and sortMode != ''">and sort_mode = #{sortMode}</if>
and sts='Y' and sts='Y'
</trim> </trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if> <if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if> <if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select> </select>
<!-- 分页查询列表 采用like格式 --> <!-- 分页查询列表 采用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"
select parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
<include refid="SysFlowStepEntity_Base_Column_List" /> select
from sys_flow_step <include refid="SysFlowStepEntity_Base_Column_List"/>
<trim prefix="where" prefixOverrides="and"> from sys_flow_step
<if test="id != null and id != ''"> and id like concat('%',#{id},'%') </if> <trim prefix="where" prefixOverrides="and">
<if test="create_user_id != null and create_user_id != ''"> and create_user_id like concat('%',#{create_user_id},'%') </if> <if test="id != null and id != ''">and id like concat('%',#{id},'%')</if>
<if test="create_time != null"> and create_time like concat('%',#{create_time},'%') </if> <if test="create_user_id != null and create_user_id != ''">and create_user_id like
<if test="modify_user_id != null and modify_user_id != ''"> and modify_user_id like concat('%',#{modify_user_id},'%') </if> concat('%',#{create_user_id},'%')
<if test="modify_time != null"> and modify_time like concat('%',#{modify_time},'%') </if> </if>
<if test="sts != null and sts != ''"> and sts like concat('%',#{sts},'%') </if> <if test="create_time != null">and create_time like concat('%',#{create_time},'%')</if>
<if test="step != null"> and step like concat('%',#{step},'%') </if> <if test="modify_user_id != null and modify_user_id != ''">and modify_user_id like
<if test="stepType != null and stepType != ''"> and step_type like concat('%',#{stepType},'%') </if> concat('%',#{modify_user_id},'%')
<if test="description != null and description != ''"> and description like concat('%',#{description},'%') </if> </if>
<if test="apiName != null and apiName != ''"> and api_name like concat('%',#{apiName},'%') </if> <if test="modify_time != null">and modify_time like concat('%',#{modify_time},'%')</if>
<if test="actionType != null and actionType != ''"> and action_type like concat('%',#{actionType},'%') </if> <if test="sts != null and sts != ''">and sts like concat('%',#{sts},'%')</if>
<if test="appId != null and appId != ''"> and app_id like concat('%',#{appId},'%') </if> <if test="step != null">and step like concat('%',#{step},'%')</if>
<if test="apiId != null and apiId != ''"> and api_id like concat('%',#{apiId},'%') </if> <if test="stepType != null and stepType != ''">and step_type like concat('%',#{stepType},'%')</if>
<if test="nifiAppId != null and nifiAppId != ''"> and nifi_app_id like concat('%',#{nifiAppId},'%') </if> <if test="flowId != null and flowId != ''">and flow_id like concat('%',#{flowId},'%')</if>
<if test="nifiApiId != null and nifiApiId != ''"> and nifi_api_id like concat('%',#{nifiApiId},'%') </if> <if test="description != null and description != ''">and description like concat('%',#{description},'%')
<if test="sortMode != null and sortMode != ''"> and sort_mode like concat('%',#{sortMode},'%') </if> </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>
<if test="apiId != null and apiId != ''">and api_id like concat('%',#{apiId},'%')</if>
<if test="nifiAppId != null and nifiAppId != ''">and nifi_app_id like concat('%',#{nifiAppId},'%')</if>
<if test="nifiApiId != null and nifiApiId != ''">and nifi_api_id like concat('%',#{nifiApiId},'%')</if>
<if test="sortMode != null and sortMode != ''">and sort_mode like concat('%',#{sortMode},'%')</if>
and sts='Y' and sts='Y'
</trim> </trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if> <if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if> <if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select> </select>
<!-- 查询列表 字段采用or格式 --> <!-- 查询列表 字段采用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"
select parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
<include refid="SysFlowStepEntity_Base_Column_List" /> select
from sys_flow_step <include refid="SysFlowStepEntity_Base_Column_List"/>
<trim prefix="where" prefixOverrides="and"> from sys_flow_step
<if test="id != null and id != ''"> or id = #{id} </if> <trim prefix="where" prefixOverrides="and">
<if test="create_user_id != null and create_user_id != ''"> or create_user_id = #{create_user_id} </if> <if test="id != null and id != ''">or id = #{id}</if>
<if test="create_time != null"> or create_time = #{create_time} </if> <if test="create_user_id != null and create_user_id != ''">or create_user_id = #{create_user_id}</if>
<if test="modify_user_id != null and modify_user_id != ''"> or modify_user_id = #{modify_user_id} </if> <if test="create_time != null">or create_time = #{create_time}</if>
<if test="modify_time != null"> or modify_time = #{modify_time} </if> <if test="modify_user_id != null and modify_user_id != ''">or modify_user_id = #{modify_user_id}</if>
<if test="sts != null and sts != ''"> or sts = #{sts} </if> <if test="modify_time != null">or modify_time = #{modify_time}</if>
<if test="step != null"> or step = #{step} </if> <if test="sts != null and sts != ''">or sts = #{sts}</if>
<if test="stepType != null and stepType != ''"> or step_type = #{stepType} </if> <if test="step != null">or step = #{step}</if>
<if test="description != null and description != ''"> or description = #{description} </if> <if test="stepType != null and stepType != ''">or step_type = #{stepType}</if>
<if test="apiName != null and apiName != ''"> or api_name = #{apiName} </if> <if test="flowId != null and flowId != ''">or flow_id = #{flowId}</if>
<if test="actionType != null and actionType != ''"> or action_type = #{actionType} </if> <if test="description != null and description != ''">or description = #{description}</if>
<if test="appId != null and appId != ''"> or app_id = #{appId} </if> <if test="apiName != null and apiName != ''">or api_name = #{apiName}</if>
<if test="apiId != null and apiId != ''"> or api_id = #{apiId} </if> <if test="actionType != null and actionType != ''">or action_type = #{actionType}</if>
<if test="nifiAppId != null and nifiAppId != ''"> or nifi_app_id = #{nifiAppId} </if> <if test="appId != null and appId != ''">or app_id = #{appId}</if>
<if test="nifiApiId != null and nifiApiId != ''"> or nifi_api_id = #{nifiApiId} </if> <if test="apiId != null and apiId != ''">or api_id = #{apiId}</if>
<if test="sortMode != null and sortMode != ''"> or sort_mode = #{sortMode} </if> <if test="nifiAppId != null and nifiAppId != ''">or nifi_app_id = #{nifiAppId}</if>
<if test="nifiApiId != null and nifiApiId != ''">or nifi_api_id = #{nifiApiId}</if>
<if test="sortMode != null and sortMode != ''">or sort_mode = #{sortMode}</if>
and sts='Y' and sts='Y'
</trim> </trim>
<if test=" sort == null or sort == ''.toString() "> order by sorts asc</if> <if test=" sort == null or sort == ''.toString() ">order by sorts asc</if>
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if> <if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select> </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"
insert into sys_flow_step( useGeneratedKeys="true">
<trim suffix="" suffixOverrides=","> insert into sys_flow_step(
<if test="id != null and id != ''"> id , </if> <trim suffix="" suffixOverrides=",">
<if test="create_user_id != null and create_user_id != ''"> create_user_id , </if> <if test="id != null and id != ''">id ,</if>
<if test="create_time != null"> create_time , </if> <if test="create_user_id != null and create_user_id != ''">create_user_id ,</if>
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id , </if> <if test="create_time != null">create_time ,</if>
<if test="modify_time != null"> modify_time , </if> <if test="modify_user_id != null and modify_user_id != ''">modify_user_id ,</if>
<if test="sts != null and sts != ''"> sts , </if> <if test="modify_time != null">modify_time ,</if>
<if test="step != null"> step , </if> <if test="sts != null and sts != ''">sts ,</if>
<if test="stepType != null and stepType != ''"> step_type , </if> <if test="step != null">step ,</if>
<if test="description != null and description != ''"> description , </if> <if test="stepType != null and stepType != ''">step_type ,</if>
<if test="apiName != null and apiName != ''"> api_name , </if> <if test="flowId != null and flowId != ''">flow_id ,</if>
<if test="actionType != null and actionType != ''"> action_type , </if> <if test="description != null and description != ''">description ,</if>
<if test="appId != null and appId != ''"> app_id , </if> <if test="apiName != null and apiName != ''">api_name ,</if>
<if test="apiId != null and apiId != ''"> api_id , </if> <if test="actionType != null and actionType != ''">action_type ,</if>
<if test="nifiAppId != null and nifiAppId != ''"> nifi_app_id , </if> <if test="appId != null and appId != ''">app_id ,</if>
<if test="nifiApiId != null and nifiApiId != ''"> nifi_api_id , </if> <if test="apiId != null and apiId != ''">api_id ,</if>
<if test="sortMode != null and sortMode != ''"> sort_mode , </if> <if test="nifiAppId != null and nifiAppId != ''">nifi_app_id ,</if>
<if test="nifiApiId != null and nifiApiId != ''">nifi_api_id ,</if>
<if test="sortMode != null and sortMode != ''">sort_mode ,</if>
<if test="sorts == null ">sorts,</if> <if test="sorts == null ">sorts,</if>
<if test="sts == null ">sts,</if> <if test="sts == null ">sts,</if>
</trim> </trim>
)values( )values(
<trim suffix="" suffixOverrides=","> <trim suffix="" suffixOverrides=",">
<if test="id != null and id != ''"> #{id} ,</if> <if test="id != null and id != ''">#{id} ,</if>
<if test="create_user_id != null and create_user_id != ''"> #{create_user_id} ,</if> <if test="create_user_id != null and create_user_id != ''">#{create_user_id} ,</if>
<if test="create_time != null"> #{create_time} ,</if> <if test="create_time != null">#{create_time} ,</if>
<if test="modify_user_id != null and modify_user_id != ''"> #{modify_user_id} ,</if> <if test="modify_user_id != null and modify_user_id != ''">#{modify_user_id} ,</if>
<if test="modify_time != null"> #{modify_time} ,</if> <if test="modify_time != null">#{modify_time} ,</if>
<if test="sts != null and sts != ''"> #{sts} ,</if> <if test="sts != null and sts != ''">#{sts} ,</if>
<if test="step != null"> #{step} ,</if> <if test="step != null">#{step} ,</if>
<if test="stepType != null and stepType != ''"> #{stepType} ,</if> <if test="stepType != null and stepType != ''">#{stepType} ,</if>
<if test="description != null and description != ''"> #{description} ,</if> <if test="flowId != null and flowId != ''">#{flowId} ,</if>
<if test="apiName != null and apiName != ''"> #{apiName} ,</if> <if test="description != null and description != ''">#{description} ,</if>
<if test="actionType != null and actionType != ''"> #{actionType} ,</if> <if test="apiName != null and apiName != ''">#{apiName} ,</if>
<if test="appId != null and appId != ''"> #{appId} ,</if> <if test="actionType != null and actionType != ''">#{actionType} ,</if>
<if test="apiId != null and apiId != ''"> #{apiId} ,</if> <if test="appId != null and appId != ''">#{appId} ,</if>
<if test="nifiAppId != null and nifiAppId != ''"> #{nifiAppId} ,</if> <if test="apiId != null and apiId != ''">#{apiId} ,</if>
<if test="nifiApiId != null and nifiApiId != ''"> #{nifiApiId} ,</if> <if test="nifiAppId != null and nifiAppId != ''">#{nifiAppId} ,</if>
<if test="sortMode != null and sortMode != ''"> #{sortMode} ,</if> <if test="nifiApiId != null and nifiApiId != ''">#{nifiApiId} ,</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="sortMode != null and sortMode != ''">#{sortMode} ,</if>
<if test="sts == null ">'Y',</if> <if test="sorts == null ">COALESCE((select (max(IFNULL( a.sorts, 0 )) + 1) as sort from sys_flow_step a
</trim> WHERE a.sts = 'Y' ),1),
) </if>
</insert> <if test="sts == null ">'Y',</if>
<!-- 批量新增 --> </trim>
<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>
values <!-- 批量新增 -->
<foreach collection="entities" item="entity" separator=","> <insert id="entityInsertBatch" keyProperty="id" useGeneratedKeys="true">
(#{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') insert into sys_flow_step(create_user_id, create_time, modify_user_id, modify_time, sts, step,
</foreach> step_type,flow_id, description, api_name, action_type, app_id, api_id, nifi_app_id, nifi_api_id, sort_mode, sts)
</insert> values
<!-- 批量新增或者修改--> <foreach collection="entities" item="entity" separator=",">
<insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> (#{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},
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) 'Y')
values </foreach>
<foreach collection="entities" item="entity" separator=","> </insert>
(#{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}) <!-- 批量新增或者修改-->
</foreach> <insert id="entityInsertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
on duplicate key update insert into sys_flow_step(create_user_id, create_time, modify_user_id, modify_time, sts, step, step_type,
create_user_id = values(create_user_id), flow_id,description, api_name, action_type, app_id, api_id, nifi_app_id, nifi_api_id, sort_mode)
create_time = values(create_time), values
modify_user_id = values(modify_user_id), <foreach collection="entities" item="entity" separator=",">
modify_time = values(modify_time), (#{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})
sts = values(sts), </foreach>
step = values(step), on duplicate key update
step_type = values(step_type), create_user_id = values(create_user_id),
description = values(description), create_time = values(create_time),
api_name = values(api_name), modify_user_id = values(modify_user_id),
action_type = values(action_type), modify_time = values(modify_time),
app_id = values(app_id), sts = values(sts),
api_id = values(api_id), step = values(step),
nifi_app_id = values(nifi_app_id), step_type = values(step_type),
nifi_api_id = values(nifi_api_id), flow_id = values(flow_id),
sort_mode = values(sort_mode)</insert> description = values(description),
<!--通过主键修改方法--> api_name = values(api_name),
<update id="entity_update" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepEntity" > action_type = values(action_type),
update sys_flow_step set app_id = values(app_id),
<trim suffix="" suffixOverrides=","> api_id = values(api_id),
<if test="create_user_id != null and create_user_id != ''"> create_user_id = #{create_user_id},</if> nifi_app_id = values(nifi_app_id),
<if test="create_time != null"> create_time = #{create_time},</if> nifi_api_id = values(nifi_api_id),
<if test="modify_user_id != null and modify_user_id != ''"> modify_user_id = #{modify_user_id},</if> sort_mode = values(sort_mode)
<if test="modify_time != null"> modify_time = #{modify_time},</if> </insert>
<if test="sts != null and sts != ''"> sts = #{sts},</if> <!--通过主键修改方法-->
<if test="step != null"> step = #{step},</if> <update id="entity_update" parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
<if test="stepType != null and stepType != ''"> step_type = #{stepType},</if> update sys_flow_step set
<if test="description != null and description != ''"> description = #{description},</if> <trim suffix="" suffixOverrides=",">
<if test="apiName != null and apiName != ''"> api_name = #{apiName},</if> <if test="create_user_id != null and create_user_id != ''">create_user_id = #{create_user_id},</if>
<if test="actionType != null and actionType != ''"> action_type = #{actionType},</if> <if test="create_time != null">create_time = #{create_time},</if>
<if test="appId != null and appId != ''"> app_id = #{appId},</if> <if test="modify_user_id != null and modify_user_id != ''">modify_user_id = #{modify_user_id},</if>
<if test="apiId != null and apiId != ''"> api_id = #{apiId},</if> <if test="modify_time != null">modify_time = #{modify_time},</if>
<if test="nifiAppId != null and nifiAppId != ''"> nifi_app_id = #{nifiAppId},</if> <if test="sts != null and sts != ''">sts = #{sts},</if>
<if test="nifiApiId != null and nifiApiId != ''"> nifi_api_id = #{nifiApiId},</if> <if test="step != null">step = #{step},</if>
<if test="sortMode != null and sortMode != ''"> sort_mode = #{sortMode},</if> <if test="stepType != null and stepType != ''">step_type = #{stepType},</if>
</trim> <if test="flowId != null and flowId != ''">flow_id = #{flowId},</if>
where id = #{id} <if test="description != null and description != ''">description = #{description},</if>
</update> <if test="apiName != null and apiName != ''">api_name = #{apiName},</if>
<!-- 逻辑删除 --> <if test="actionType != null and actionType != ''">action_type = #{actionType},</if>
<update id="entity_logicDelete" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepEntity" > <if test="appId != null and appId != ''">app_id = #{appId},</if>
update sys_flow_step set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} <if test="apiId != null and apiId != ''">api_id = #{apiId},</if>
where id = #{id} <if test="nifiAppId != null and nifiAppId != ''">nifi_app_id = #{nifiAppId},</if>
</update> <if test="nifiApiId != null and nifiApiId != ''">nifi_api_id = #{nifiApiId},</if>
<!-- 多条件逻辑删除 --> <if test="sortMode != null and sortMode != ''">sort_mode = #{sortMode},</if>
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.sys.flow.entity.SysFlowStepEntity" > </trim>
update sys_flow_step set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} where id = #{id}
<trim prefix="where" prefixOverrides="and"> </update>
<if test="id != null and id != ''"> and id = #{id} </if> <!-- 逻辑删除 -->
<if test="sts != null and sts != ''"> and sts = #{sts} </if> <update id="entity_logicDelete" parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
<if test="step != null"> and step = #{step} </if> update sys_flow_step
<if test="stepType != null and stepType != ''"> and step_type = #{stepType} </if> set sts= 'N',
<if test="description != null and description != ''"> and description = #{description} </if> modify_time = #{modify_time},
<if test="apiName != null and apiName != ''"> and api_name = #{apiName} </if> modify_user_id = #{modify_user_id}
<if test="actionType != null and actionType != ''"> and action_type = #{actionType} </if> where id = #{id}
<if test="appId != null and appId != ''"> and app_id = #{appId} </if> </update>
<if test="apiId != null and apiId != ''"> and api_id = #{apiId} </if> <!-- 多条件逻辑删除 -->
<if test="nifiAppId != null and nifiAppId != ''"> and nifi_app_id = #{nifiAppId} </if> <update id="entity_logicDelete_Multi_Condition" parameterType="com.hzya.frame.sys.flow.entity.SysFlowStepEntity">
<if test="nifiApiId != null and nifiApiId != ''"> and nifi_api_id = #{nifiApiId} </if> update sys_flow_step set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
<if test="sortMode != null and sortMode != ''"> and sort_mode = #{sortMode} </if> <trim prefix="where" prefixOverrides="and">
<if test="id != null and id != ''">and id = #{id}</if>
<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>
<if test="appId != null and appId != ''">and app_id = #{appId}</if>
<if test="apiId != null and apiId != ''">and api_id = #{apiId}</if>
<if test="nifiAppId != null and nifiAppId != ''">and nifi_app_id = #{nifiAppId}</if>
<if test="nifiApiId != null and nifiApiId != ''">and nifi_api_id = #{nifiApiId}</if>
<if test="sortMode != null and sortMode != ''">and sort_mode = #{sortMode}</if>
and sts='Y' and sts='Y'
</trim> </trim>
</update> </update>
<!--通过主键删除--> <!--通过主键删除-->
<delete id="entity_delete"> <delete id="entity_delete">
delete from sys_flow_step where id = #{id} delete
</delete> from sys_flow_step
where id = #{id}
</delete>
</mapper> </mapper>