SysBpmNodeScriptMapper.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.zkqy.system.mapper.SysBpmNodeScriptMapper">
  6. <resultMap type="com.zkqy.system.domain.SysBpmNodeScript" id="SysBpmNodeScriptResult">
  7. <result property="id" column="id" />
  8. <result property="scriptKey" column="script_key" />
  9. <result property="scriptFunctionName" column="script_function_name" />
  10. <result property="scriptName" column="script_name" />
  11. <result property="scriptFunctionCode" column="script_function_code" />
  12. <result property="scriptType" column="script_type" />
  13. <result property="scriptDescription" column="script_description" />
  14. <result property="industryType" column="industry_type"/>
  15. <result property="tableName" column="table_name"/>
  16. <result property="delFlag" column="del_flag" />
  17. <result property="createBy" column="create_by" />
  18. <result property="createTime" column="create_time" />
  19. <result property="updateBy" column="update_by" />
  20. <result property="updateTime" column="update_time" />
  21. <result property="scriptState" column="script_state" />
  22. <result property="tenantId" column="tenant_id" />
  23. <result property="pageUpload" column="page_upload" />
  24. </resultMap>
  25. <sql id="selectSysBpmNodeScriptVo">
  26. select id, script_key, script_function_name, script_name, script_function_code, script_type, script_description, industry_type,
  27. 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
  28. </sql>
  29. <select id="selectSysBpmNodeScriptList" parameterType="com.zkqy.system.domain.SysBpmNodeScript" resultMap="SysBpmNodeScriptResult">
  30. <include refid="selectSysBpmNodeScriptVo"/>
  31. where del_flag = '0'
  32. <if test="scriptKey != null and scriptKey != ''"> and script_key = #{scriptKey}</if>
  33. <if test="scriptFunctionName != null and scriptFunctionName != ''"> and script_function_name like concat('%', #{scriptFunctionName}, '%')</if>
  34. <if test="scriptName != null and scriptName != ''"> and script_name like concat('%', #{scriptName}, '%')</if>
  35. <if test="scriptFunctionCode != null and scriptFunctionCode != ''"> and script_function_code = #{scriptFunctionCode}</if>
  36. <if test="scriptType != null "> and script_type = #{scriptType}</if>
  37. <if test="scriptDescription != null and scriptDescription != ''"> and script_description = #{scriptDescription}</if>
  38. <if test="industryType != null"> and industry_type = #{industryType}</if>
  39. <if test="tableName != null and tableName != ''"> and `table_name` like concat('%', #{tableName}, '%')</if>
  40. <if test="tenantId != null and tenantId != ''"> and tenant_id like concat('%', #{tenantId}, '%')</if>
  41. order by create_time desc
  42. </select>
  43. <select id="selectSysBpmNodeScriptById" parameterType="Long" resultMap="SysBpmNodeScriptResult">
  44. <include refid="selectSysBpmNodeScriptVo"/>
  45. where id = #{id}
  46. </select>
  47. <insert id="insertSysBpmNodeScript" parameterType="com.zkqy.system.domain.SysBpmNodeScript" useGeneratedKeys="true" keyProperty="id">
  48. insert into sys_bpm_node_script
  49. <trim prefix="(" suffix=")" suffixOverrides=",">
  50. <if test="scriptKey != null">script_key,</if>
  51. <if test="scriptFunctionName != null">script_function_name,</if>
  52. <if test="scriptName != null">script_name,</if>
  53. <if test="scriptFunctionCode != null">script_function_code,</if>
  54. <if test="scriptType != null">script_type,</if>
  55. <if test="scriptDescription != null">script_description,</if>
  56. <if test="industryType != null">industry_type,</if>
  57. <if test="tableName != null">`table_name`,</if>
  58. <if test="createBy != null">create_by,</if>
  59. <if test="createTime != null">create_time,</if>
  60. <if test="tenantId != null">tenant_id,</if>
  61. del_flag
  62. </trim>
  63. <trim prefix="values (" suffix=")" suffixOverrides=",">
  64. <if test="scriptKey != null">#{scriptKey},</if>
  65. <if test="scriptFunctionName != null">#{scriptFunctionName},</if>
  66. <if test="scriptName != null">#{scriptName},</if>
  67. <if test="scriptFunctionCode != null">#{scriptFunctionCode},</if>
  68. <if test="scriptType != null">#{scriptType},</if>
  69. <if test="scriptDescription != null">#{scriptDescription},</if>
  70. <if test="industryType != null">#{industryType},</if>
  71. <if test="tableName != null">#{tableName},</if>
  72. <if test="createBy != null">#{createBy},</if>
  73. <if test="createTime != null">#{createTime},</if>
  74. <if test="tenantId != null">#{tenantId},</if>
  75. '0'
  76. </trim>
  77. </insert>
  78. <update id="updateSysBpmNodeScript" parameterType="com.zkqy.system.domain.SysBpmNodeScript">
  79. update sys_bpm_node_script
  80. <trim prefix="SET" suffixOverrides=",">
  81. <if test="scriptKey != null">script_key = #{scriptKey},</if>
  82. <if test="scriptFunctionName != null">script_function_name = #{scriptFunctionName},</if>
  83. <if test="scriptName != null">script_name = #{scriptName},</if>
  84. <if test="scriptFunctionCode != null">script_function_code = #{scriptFunctionCode},</if>
  85. <if test="scriptType != null">script_type = #{scriptType},</if>
  86. <if test="scriptDescription != null">script_description = #{scriptDescription},</if>
  87. <if test="industryType != null">industry_type = #{industryType},</if>
  88. <if test="tableName != null">`table_name` = #{tableName},</if>
  89. <if test="updateBy != null">update_by = #{updateBy},</if>
  90. <if test="updateTime != null">update_time = #{updateTime},</if>
  91. <if test="tenantId != null">tenant_id = #{tenantId},</if>
  92. <if test="scriptState != null">script_state = #{scriptState},</if>
  93. <if test="pageUpload!=null and pageUpload!=''">page_upload=#{pageUpload}</if>
  94. </trim>
  95. where id = #{id}
  96. </update>
  97. <update id="deleteSysBpmNodeScriptById" parameterType="Long">
  98. update sys_bpm_node_script set del_flag = '2' where id = #{id}
  99. </update>
  100. <update id="deleteSysBpmNodeScriptByIds" parameterType="String">
  101. update sys_bpm_node_script set del_flag = '2' where id in
  102. <foreach item="id" collection="array" open="(" separator="," close=")">
  103. #{id}
  104. </foreach>
  105. </update>
  106. <update id="updateSysBpmNodeScriptByScriptKey">
  107. update sys_bpm_node_script
  108. <trim prefix="SET" suffixOverrides=",">
  109. <if test="scriptState != null">script_state = #{scriptState},</if>
  110. <if test="scriptFunctionName != null">script_function_name = #{scriptFunctionName},</if>
  111. <if test="scriptName != null">script_name = #{scriptName},</if>
  112. <if test="scriptFunctionCode != null">script_function_code = #{scriptFunctionCode},</if>
  113. <if test="scriptType != null">script_type = #{scriptType},</if>
  114. <if test="scriptDescription != null">script_description = #{scriptDescription},</if>
  115. <if test="industryType != null">industry_type = #{industryType},</if>
  116. <if test="tableName != null">`table_name` = #{tableName},</if>
  117. <if test="updateBy != null">update_by = #{updateBy},</if>
  118. <if test="updateTime != null">update_time = #{updateTime},</if>
  119. <if test="tenantId != null">tenant_id = #{tenantId},</if>
  120. <if test="pageUpload!=null and pageUpload!='' ">page_upload=#{pageUpload}</if>
  121. </trim>
  122. where script_key = #{scriptKey}
  123. </update>
  124. <select id="selectSysBpmNodeScriptByScriptKey" parameterType="String" resultMap="SysBpmNodeScriptResult">
  125. <include refid="selectSysBpmNodeScriptVo"/>
  126. where script_key = #{scriptKey} and del_flag = '0'
  127. </select>
  128. <select id="selectSysBpmNodeScriptByScriptKeys" resultMap="SysBpmNodeScriptResult">
  129. <include refid="selectSysBpmNodeScriptVo"/>
  130. where del_flag = '0' and script_key in
  131. <foreach collection="scriptKeys" item="scriptKey" open="(" close=")" separator=",">
  132. #{scriptKey}
  133. </foreach>
  134. </select>
  135. <select id="selectSysBpmNodeScriptListByTenantId" resultType="com.zkqy.system.domain.SysBpmNodeScript">
  136. 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
  137. where del_flag = '0'
  138. <if test="scriptKey != null and scriptKey != ''"> and script_key = #{scriptKey}</if>
  139. <if test="scriptFunctionName != null and scriptFunctionName != ''"> and script_function_name like concat('%', #{scriptFunctionName}, '%')</if>
  140. <if test="scriptName != null and scriptName != ''"> and script_name like concat('%', #{scriptName}, '%')</if>
  141. <if test="scriptFunctionCode != null and scriptFunctionCode != ''"> and script_function_code = #{scriptFunctionCode}</if>
  142. <if test="scriptType != null "> and script_type = #{scriptType}</if>
  143. <if test="scriptDescription != null and scriptDescription != ''"> and script_description = #{scriptDescription}</if>
  144. <if test="industryType != null"> and industry_type = #{industryType}</if>
  145. <if test="tableName != null and tableName != ''"> and `table_name` like concat('%', #{tableName}, '%')</if>
  146. <if test="tenantId != null and tenantId != ''"> and tenant_id like concat('%', #{tenantId}, '%')</if>
  147. order by create_time desc
  148. </select>
  149. <select id="selectSysBpmNodeScriptListIn" resultMap="SysBpmNodeScriptResult">
  150. <include refid="selectSysBpmNodeScriptVo"/>
  151. where del_flag = '0' and id in
  152. <foreach collection="list" item="id" open="(" close=")" separator=",">
  153. #{id}
  154. </foreach>
  155. </select>
  156. </mapper>