123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.zkqy.system.mapper.SysBpmNodeScriptMapper">
- <resultMap type="com.zkqy.system.domain.SysBpmNodeScript" id="SysBpmNodeScriptResult">
- <result property="id" column="id" />
- <result property="scriptKey" column="script_key" />
- <result property="scriptFunctionName" column="script_function_name" />
- <result property="scriptName" column="script_name" />
- <result property="scriptFunctionCode" column="script_function_code" />
- <result property="scriptType" column="script_type" />
- <result property="scriptDescription" column="script_description" />
- <result property="industryType" column="industry_type"/>
- <result property="tableName" column="table_name"/>
- <result property="delFlag" column="del_flag" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="scriptState" column="script_state" />
- <result property="tenantId" column="tenant_id" />
- <result property="pageUpload" column="page_upload" />
- </resultMap>
- <sql id="selectSysBpmNodeScriptVo">
- select id, script_key, script_function_name, script_name, script_function_code, script_type, script_description, industry_type,
- table_name, del_flag, create_by, create_time, update_by, update_time,tenant_id,script_state,tenant_id,page_upload from sys_bpm_node_script
- </sql>
- <select id="selectSysBpmNodeScriptList" parameterType="com.zkqy.system.domain.SysBpmNodeScript" resultMap="SysBpmNodeScriptResult">
- <include refid="selectSysBpmNodeScriptVo"/>
- where del_flag = '0'
- <if test="scriptKey != null and scriptKey != ''"> and script_key = #{scriptKey}</if>
- <if test="scriptFunctionName != null and scriptFunctionName != ''"> and script_function_name like concat('%', #{scriptFunctionName}, '%')</if>
- <if test="scriptName != null and scriptName != ''"> and script_name like concat('%', #{scriptName}, '%')</if>
- <if test="scriptFunctionCode != null and scriptFunctionCode != ''"> and script_function_code = #{scriptFunctionCode}</if>
- <if test="scriptType != null "> and script_type = #{scriptType}</if>
- <if test="scriptDescription != null and scriptDescription != ''"> and script_description = #{scriptDescription}</if>
- <if test="industryType != null"> and industry_type = #{industryType}</if>
- <if test="tableName != null and tableName != ''"> and `table_name` like concat('%', #{tableName}, '%')</if>
- <if test="tenantId != null and tenantId != ''"> and tenant_id like concat('%', #{tenantId}, '%')</if>
- order by create_time desc
- </select>
- <select id="selectSysBpmNodeScriptById" parameterType="Long" resultMap="SysBpmNodeScriptResult">
- <include refid="selectSysBpmNodeScriptVo"/>
- where id = #{id}
- </select>
- <insert id="insertSysBpmNodeScript" parameterType="com.zkqy.system.domain.SysBpmNodeScript" useGeneratedKeys="true" keyProperty="id">
- insert into sys_bpm_node_script
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="scriptKey != null">script_key,</if>
- <if test="scriptFunctionName != null">script_function_name,</if>
- <if test="scriptName != null">script_name,</if>
- <if test="scriptFunctionCode != null">script_function_code,</if>
- <if test="scriptType != null">script_type,</if>
- <if test="scriptDescription != null">script_description,</if>
- <if test="industryType != null">industry_type,</if>
- <if test="tableName != null">`table_name`,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="tenantId != null">tenant_id,</if>
- del_flag
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="scriptKey != null">#{scriptKey},</if>
- <if test="scriptFunctionName != null">#{scriptFunctionName},</if>
- <if test="scriptName != null">#{scriptName},</if>
- <if test="scriptFunctionCode != null">#{scriptFunctionCode},</if>
- <if test="scriptType != null">#{scriptType},</if>
- <if test="scriptDescription != null">#{scriptDescription},</if>
- <if test="industryType != null">#{industryType},</if>
- <if test="tableName != null">#{tableName},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="tenantId != null">#{tenantId},</if>
- '0'
- </trim>
- </insert>
- <update id="updateSysBpmNodeScript" parameterType="com.zkqy.system.domain.SysBpmNodeScript">
- update sys_bpm_node_script
- <trim prefix="SET" suffixOverrides=",">
- <if test="scriptKey != null">script_key = #{scriptKey},</if>
- <if test="scriptFunctionName != null">script_function_name = #{scriptFunctionName},</if>
- <if test="scriptName != null">script_name = #{scriptName},</if>
- <if test="scriptFunctionCode != null">script_function_code = #{scriptFunctionCode},</if>
- <if test="scriptType != null">script_type = #{scriptType},</if>
- <if test="scriptDescription != null">script_description = #{scriptDescription},</if>
- <if test="industryType != null">industry_type = #{industryType},</if>
- <if test="tableName != null">`table_name` = #{tableName},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="tenantId != null">tenant_id = #{tenantId},</if>
- <if test="scriptState != null">script_state = #{scriptState},</if>
- <if test="pageUpload!=null and pageUpload!=''">page_upload=#{pageUpload}</if>
- </trim>
- where id = #{id}
- </update>
- <update id="deleteSysBpmNodeScriptById" parameterType="Long">
- update sys_bpm_node_script set del_flag = '2' where id = #{id}
- </update>
- <update id="deleteSysBpmNodeScriptByIds" parameterType="String">
- update sys_bpm_node_script set del_flag = '2' where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </update>
- <update id="updateSysBpmNodeScriptByScriptKey">
- update sys_bpm_node_script
- <trim prefix="SET" suffixOverrides=",">
- <if test="scriptState != null">script_state = #{scriptState},</if>
- <if test="scriptFunctionName != null">script_function_name = #{scriptFunctionName},</if>
- <if test="scriptName != null">script_name = #{scriptName},</if>
- <if test="scriptFunctionCode != null">script_function_code = #{scriptFunctionCode},</if>
- <if test="scriptType != null">script_type = #{scriptType},</if>
- <if test="scriptDescription != null">script_description = #{scriptDescription},</if>
- <if test="industryType != null">industry_type = #{industryType},</if>
- <if test="tableName != null">`table_name` = #{tableName},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="tenantId != null">tenant_id = #{tenantId},</if>
- <if test="pageUpload!=null and pageUpload!='' ">page_upload=#{pageUpload}</if>
- </trim>
- where script_key = #{scriptKey}
- </update>
- <select id="selectSysBpmNodeScriptByScriptKey" parameterType="String" resultMap="SysBpmNodeScriptResult">
- <include refid="selectSysBpmNodeScriptVo"/>
- where script_key = #{scriptKey} and del_flag = '0'
- </select>
- <select id="selectSysBpmNodeScriptByScriptKeys" resultMap="SysBpmNodeScriptResult">
- <include refid="selectSysBpmNodeScriptVo"/>
- where del_flag = '0' and script_key in
- <foreach collection="scriptKeys" item="scriptKey" open="(" close=")" separator=",">
- #{scriptKey}
- </foreach>
- </select>
- <select id="selectSysBpmNodeScriptListByTenantId" resultType="com.zkqy.system.domain.SysBpmNodeScript">
- select id, script_key, script_function_name, script_name, script_function_code, script_type, script_description, industry_type,table_name, del_flag, create_by, create_time, update_by, update_time,tenant_id,script_state from sys_bpm_node_script
- where del_flag = '0'
- <if test="scriptKey != null and scriptKey != ''"> and script_key = #{scriptKey}</if>
- <if test="scriptFunctionName != null and scriptFunctionName != ''"> and script_function_name like concat('%', #{scriptFunctionName}, '%')</if>
- <if test="scriptName != null and scriptName != ''"> and script_name like concat('%', #{scriptName}, '%')</if>
- <if test="scriptFunctionCode != null and scriptFunctionCode != ''"> and script_function_code = #{scriptFunctionCode}</if>
- <if test="scriptType != null "> and script_type = #{scriptType}</if>
- <if test="scriptDescription != null and scriptDescription != ''"> and script_description = #{scriptDescription}</if>
- <if test="industryType != null"> and industry_type = #{industryType}</if>
- <if test="tableName != null and tableName != ''"> and `table_name` like concat('%', #{tableName}, '%')</if>
- <if test="tenantId != null and tenantId != ''"> and tenant_id like concat('%', #{tenantId}, '%')</if>
- order by create_time desc
- </select>
- <select id="selectSysBpmNodeScriptListIn" resultMap="SysBpmNodeScriptResult">
- <include refid="selectSysBpmNodeScriptVo"/>
- where del_flag = '0' and id in
- <foreach collection="list" item="id" open="(" close=")" separator=",">
- #{id}
- </foreach>
- </select>
- </mapper>
|