|
@@ -0,0 +1,95 @@
|
|
|
+<?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.ruoyi.system.mapper.SysBpmNodeScriptMapper">
|
|
|
+
|
|
|
+ <resultMap type="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="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" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectSysBpmNodeScriptVo">
|
|
|
+ select id, script_key, script_function_name, script_name, script_function_code, script_type, script_description, del_flag, create_by, create_time, update_by, update_time from sys_bpm_node_script
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectSysBpmNodeScriptList" parameterType="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>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectSysBpmNodeScriptById" parameterType="Long" resultMap="SysBpmNodeScriptResult">
|
|
|
+ <include refid="selectSysBpmNodeScriptVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertSysBpmNodeScript" parameterType="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="createBy != null">create_by,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ <if test="updateTime != null">update_time,</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="createBy != null">#{createBy},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ '0'
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateSysBpmNodeScript" parameterType="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="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</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>
|
|
|
+</mapper>
|