From bfd18dce39a71c891323ae09dc27321440a576fe Mon Sep 17 00:00:00 2001 From: xiang2lin <251481237@qq.com> Date: Thu, 8 May 2025 08:50:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0flow=5Fid=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sys/flow/entity/SysFlowStepEntity.xml | 529 +++++++++--------- 1 file changed, 280 insertions(+), 249 deletions(-) diff --git a/base-service/src/main/java/com/hzya/frame/sys/flow/entity/SysFlowStepEntity.xml b/base-service/src/main/java/com/hzya/frame/sys/flow/entity/SysFlowStepEntity.xml index 795c9c7a..adc6a741 100644 --- a/base-service/src/main/java/com/hzya/frame/sys/flow/entity/SysFlowStepEntity.xml +++ b/base-service/src/main/java/com/hzya/frame/sys/flow/entity/SysFlowStepEntity.xml @@ -2,280 +2,311 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + id - ,create_user_id + ,create_user_id ,create_time ,modify_user_id ,modify_time ,sts ,step ,step_type - ,description + ,flowId + ,description ,api_name ,action_type ,app_id ,api_id ,nifi_app_id ,nifi_api_id - ,sort_mode - - - + select + + from sys_flow_step + + and id = #{id} + and create_user_id = #{create_user_id} + and create_time = #{create_time} + and modify_user_id = #{modify_user_id} + and modify_time = #{modify_time} + and sts = #{sts} + and step = #{step} + and step_type = #{stepType} + and flow_id = #{flowId} + and description = #{description} + and api_name = #{apiName} + and action_type = #{actionType} + and app_id = #{appId} + and api_id = #{apiId} + and nifi_app_id = #{nifiAppId} + and nifi_api_id = #{nifiApiId} + and sort_mode = #{sortMode} and sts='Y' - - order by sorts asc - order by ${sort} ${order} - - - - + + + - + select + + from sys_flow_step + + and id like concat('%',#{id},'%') + and create_user_id like + concat('%',#{create_user_id},'%') + + and create_time like concat('%',#{create_time},'%') + and modify_user_id like + concat('%',#{modify_user_id},'%') + + and modify_time like concat('%',#{modify_time},'%') + and sts like concat('%',#{sts},'%') + and step like concat('%',#{step},'%') + and step_type like concat('%',#{stepType},'%') + and flow_id like concat('%',#{flowId},'%') + and description like concat('%',#{description},'%') + + and api_name like concat('%',#{apiName},'%') + and action_type like concat('%',#{actionType},'%') + and app_id like concat('%',#{appId},'%') + and api_id like concat('%',#{apiId},'%') + and nifi_app_id like concat('%',#{nifiAppId},'%') + and nifi_api_id like concat('%',#{nifiApiId},'%') + and sort_mode like concat('%',#{sortMode},'%') and sts='Y' - - order by sorts asc - order by ${sort} ${order} - + + order by sorts asc + order by ${sort} ${order} + - - + select + + from sys_flow_step + + or id = #{id} + or create_user_id = #{create_user_id} + or create_time = #{create_time} + or modify_user_id = #{modify_user_id} + or modify_time = #{modify_time} + or sts = #{sts} + or step = #{step} + or step_type = #{stepType} + or flow_id = #{flowId} + or description = #{description} + or api_name = #{apiName} + or action_type = #{actionType} + or app_id = #{appId} + or api_id = #{apiId} + or nifi_app_id = #{nifiAppId} + or nifi_api_id = #{nifiApiId} + or sort_mode = #{sortMode} and sts='Y' - - order by sorts asc - order by ${sort} ${order} - + + order by sorts asc + order by ${sort} ${order} + - - - insert into sys_flow_step( - - id , - 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( + + id , + 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 , sorts, - sts, - - )values( - - #{id} , - #{create_user_id} , - #{create_time} , - #{modify_user_id} , - #{modify_time} , - #{sts} , - #{step} , - #{stepType} , - #{description} , - #{apiName} , - #{actionType} , - #{appId} , - #{apiId} , - #{nifiAppId} , - #{nifiApiId} , - #{sortMode} , - COALESCE((select (max(IFNULL( a.sorts, 0 )) + 1) as sort from sys_flow_step a WHERE a.sts = 'Y' ),1), - 'Y', - - ) - - - - 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) - values - - (#{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, step_type, description, api_name, action_type, app_id, api_id, nifi_app_id, nifi_api_id, sort_mode) - values - - (#{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}) - - on duplicate key update - create_user_id = values(create_user_id), - create_time = values(create_time), - modify_user_id = values(modify_user_id), - modify_time = values(modify_time), - sts = values(sts), - step = values(step), - step_type = values(step_type), - description = values(description), - api_name = values(api_name), - action_type = values(action_type), - app_id = values(app_id), - api_id = values(api_id), - nifi_app_id = values(nifi_app_id), - nifi_api_id = values(nifi_api_id), - sort_mode = values(sort_mode) - - -update sys_flow_step set - - 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 = #{stepType}, - description = #{description}, - api_name = #{apiName}, - action_type = #{actionType}, - app_id = #{appId}, - api_id = #{apiId}, - nifi_app_id = #{nifiAppId}, - nifi_api_id = #{nifiApiId}, - sort_mode = #{sortMode}, - -where id = #{id} - - - -update sys_flow_step set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} -where id = #{id} - - - -update sys_flow_step set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} - - and id = #{id} - and sts = #{sts} - and step = #{step} - and step_type = #{stepType} - and description = #{description} - and api_name = #{apiName} - and action_type = #{actionType} - and app_id = #{appId} - and api_id = #{apiId} - and nifi_app_id = #{nifiAppId} - and nifi_api_id = #{nifiApiId} - and sort_mode = #{sortMode} + sts, + + )values( + + #{id} , + #{create_user_id} , + #{create_time} , + #{modify_user_id} , + #{modify_time} , + #{sts} , + #{step} , + #{stepType} , + #{flowId} , + #{description} , + #{apiName} , + #{actionType} , + #{appId} , + #{apiId} , + #{nifiAppId} , + #{nifiApiId} , + #{sortMode} , + COALESCE((select (max(IFNULL( a.sorts, 0 )) + 1) as sort from sys_flow_step a + WHERE a.sts = 'Y' ),1), + + 'Y', + + ) + + + + 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 + + (#{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') + + + + + 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 + + (#{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}) + + on duplicate key update + create_user_id = values(create_user_id), + create_time = values(create_time), + modify_user_id = values(modify_user_id), + modify_time = values(modify_time), + 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), + app_id = values(app_id), + api_id = values(api_id), + nifi_app_id = values(nifi_app_id), + nifi_api_id = values(nifi_api_id), + sort_mode = values(sort_mode) + + + + update sys_flow_step set + + 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 = #{stepType}, + flow_id = #{flowId}, + description = #{description}, + api_name = #{apiName}, + action_type = #{actionType}, + app_id = #{appId}, + api_id = #{apiId}, + nifi_app_id = #{nifiAppId}, + nifi_api_id = #{nifiApiId}, + sort_mode = #{sortMode}, + + where id = #{id} + + + + update sys_flow_step + set sts= 'N', + modify_time = #{modify_time}, + modify_user_id = #{modify_user_id} + where id = #{id} + + + + update sys_flow_step set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} + + and id = #{id} + and sts = #{sts} + and step = #{step} + and step_type = #{stepType} + and flow_id = #{flowId} + and description = #{description} + and api_name = #{apiName} + and action_type = #{actionType} + and app_id = #{appId} + and api_id = #{apiId} + and nifi_app_id = #{nifiAppId} + and nifi_api_id = #{nifiApiId} + and sort_mode = #{sortMode} and sts='Y' - - - - - delete from sys_flow_step where id = #{id} - + + + + + delete + from sys_flow_step + where id = #{id} +