java后端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

229 行
11 KiB

  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.ruoyi.resource.mapper.TResourceOperationMapper">
  6. <resultMap type="TResourceOperation" id="TResourceOperationResult">
  7. <result property="id" column="id" />
  8. <result property="dkbm" column="dkbm" />
  9. <result property="dkmc" column="dkmc" />
  10. <result property="dkdz" column="dkdz" />
  11. <result property="dkxz" column="dkxz" />
  12. <result property="dknz" column="dknz" />
  13. <result property="dkbz" column="dkbz" />
  14. <result property="jymj" column="jymj" />
  15. <result property="jyfs" column="jyfs" />
  16. <result property="jydxmc" column="jydxmc" />
  17. <result property="jykssj" column="jykssj" />
  18. <result property="jyjssj" column="jyjssj" />
  19. <result property="cbje" column="cbje" />
  20. <result property="bz" column="bz" />
  21. <result property="dkImg" column="dk_img" />
  22. <result property="surveyStatus" column="survey_status" />
  23. <result property="importCode" column="import_code" />
  24. <result property="deptName" column="dept_name" />
  25. <result property="createBy" column="create_by" />
  26. <result property="createTime" column="create_time" />
  27. <result property="updateBy" column="update_by" />
  28. <result property="updateTime" column="update_time" />
  29. </resultMap>
  30. <sql id="selectTResourceOperationVo">
  31. select id, dkbm, dkmc, dkdz, dkxz, dknz, dkbz, jymj, jyfs, jydxmc, jykssj, jyjssj, cbje, bz, dk_img, survey_status, import_code, dept_name, create_by, create_time, update_by, update_time from t_resource_operation
  32. </sql>
  33. <select id="selectTResourceOperationList" parameterType="TResourceOperation" resultMap="TResourceOperationResult">
  34. <include refid="selectTResourceOperationVo"/>
  35. <where>
  36. <if test="dkbm != null and dkbm != ''"> and dkbm = #{dkbm}</if>
  37. <if test="dkmc != null and dkmc != ''"> and dkmc = #{dkmc}</if>
  38. <if test="surveyStatus != null and surveyStatus != ''"> and survey_status = #{surveyStatus}</if>
  39. <if test="importCode != null and importCode != ''"> and import_code like concat('%', #{importCode}, '%')</if>
  40. </where>
  41. </select>
  42. <select id="selectTResourceOperationById" parameterType="Long" resultMap="TResourceOperationResult">
  43. <include refid="selectTResourceOperationVo"/>
  44. where id = #{id}
  45. </select>
  46. <select id="selectTResourceOperationByDkbm" parameterType="String" resultMap="TResourceOperationResult">
  47. <include refid="selectTResourceOperationVo"/>
  48. where dkbm = #{dkbm}
  49. </select>
  50. <insert id="insertTResourceOperation" parameterType="TResourceOperation" useGeneratedKeys="true" keyProperty="id">
  51. insert into t_resource_operation
  52. <trim prefix="(" suffix=")" suffixOverrides=",">
  53. <if test="dkbm != null and dkbm != ''">dkbm,</if>
  54. <if test="dkmc != null and dkmc != ''">dkmc,</if>
  55. <if test="dkdz != null">dkdz,</if>
  56. <if test="dkxz != null">dkxz,</if>
  57. <if test="dknz != null">dknz,</if>
  58. <if test="dkbz != null">dkbz,</if>
  59. <if test="jymj != null">jymj,</if>
  60. <if test="jyfs != null and jyfs != ''">jyfs,</if>
  61. <if test="jydxmc != null and jydxmc != ''">jydxmc,</if>
  62. <if test="jykssj != null and jykssj != ''">jykssj,</if>
  63. <if test="jyjssj != null and jyjssj != ''">jyjssj,</if>
  64. <if test="cbje != null">cbje,</if>
  65. <if test="bz != null">bz,</if>
  66. <if test="dkImg != null">dk_img,</if>
  67. <if test="surveyStatus != null and surveyStatus != ''">survey_status,</if>
  68. <if test="importCode != null and importCode != ''">import_code,</if>
  69. <if test="deptName != null">dept_name,</if>
  70. <if test="createBy != null and createBy != ''">create_by,</if>
  71. <if test="createTime != null">create_time,</if>
  72. <if test="updateBy != null">update_by,</if>
  73. <if test="updateTime != null">update_time,</if>
  74. </trim>
  75. <trim prefix="values (" suffix=")" suffixOverrides=",">
  76. <if test="dkbm != null and dkbm != ''">#{dkbm},</if>
  77. <if test="dkmc != null and dkmc != ''">#{dkmc},</if>
  78. <if test="dkdz != null">#{dkdz},</if>
  79. <if test="dkxz != null">#{dkxz},</if>
  80. <if test="dknz != null">#{dknz},</if>
  81. <if test="dkbz != null">#{dkbz},</if>
  82. <if test="jymj != null">#{jymj},</if>
  83. <if test="jyfs != null and jyfs != ''">#{jyfs},</if>
  84. <if test="jydxmc != null and jydxmc != ''">#{jydxmc},</if>
  85. <if test="jykssj != null and jykssj != ''">#{jykssj},</if>
  86. <if test="jyjssj != null and jyjssj != ''">#{jyjssj},</if>
  87. <if test="cbje != null">#{cbje},</if>
  88. <if test="bz != null">#{bz},</if>
  89. <if test="dkImg != null">#{dkImg},</if>
  90. <if test="surveyStatus != null and surveyStatus != ''">#{surveyStatus},</if>
  91. <if test="importCode != null and importCode != ''">#{importCode},</if>
  92. <if test="deptName != null">#{deptName},</if>
  93. <if test="createBy != null and createBy != ''">#{createBy},</if>
  94. <if test="createTime != null">#{createTime},</if>
  95. <if test="updateBy != null">#{updateBy},</if>
  96. <if test="updateTime != null">#{updateTime},</if>
  97. </trim>
  98. </insert>
  99. <insert id="insertTResourceOperationBatch" parameterType="list" useGeneratedKeys="true" keyProperty="id">
  100. insert into t_resource_operation
  101. <trim prefix="(" suffix=")" suffixOverrides=",">
  102. dkbm,
  103. dkmc,
  104. dkdz,
  105. dkxz,
  106. dknz,
  107. dkbz,
  108. jymj,
  109. jyfs,
  110. jydxmc,
  111. jykssj,
  112. jyjssj,
  113. cbje,
  114. bz,
  115. dk_img,
  116. survey_status,
  117. import_code,
  118. dept_name,
  119. create_by,
  120. create_time,
  121. update_by,
  122. update_time,
  123. </trim>
  124. values
  125. <foreach item="item" collection="list" separator="," >
  126. <trim prefix="(" suffix=")" suffixOverrides=",">
  127. #{item.dkbm},
  128. #{item.dkmc},
  129. #{item.dkdz},
  130. #{item.dkxz},
  131. #{item.dknz},
  132. #{item.dkbz},
  133. #{item.jymj},
  134. #{item.jyfs},
  135. #{item.jydxmc},
  136. #{item.jykssj},
  137. #{item.jyjssj},
  138. #{item.cbje},
  139. #{item.bz},
  140. #{item.dkImg},
  141. #{item.surveyStatus},
  142. #{item.importCode},
  143. #{item.deptName},
  144. #{item.createBy},
  145. #{item.createTime},
  146. #{item.updateBy},
  147. #{item.updateTime},
  148. </trim>
  149. </foreach>
  150. </insert>
  151. <update id="updateTResourceOperation" parameterType="TResourceOperation">
  152. update t_resource_operation
  153. <trim prefix="SET" suffixOverrides=",">
  154. <if test="dkbm != null and dkbm != ''">dkbm = #{dkbm},</if>
  155. <if test="dkmc != null and dkmc != ''">dkmc = #{dkmc},</if>
  156. <if test="dkdz != null">dkdz = #{dkdz},</if>
  157. <if test="dkxz != null">dkxz = #{dkxz},</if>
  158. <if test="dknz != null">dknz = #{dknz},</if>
  159. <if test="dkbz != null">dkbz = #{dkbz},</if>
  160. <if test="jymj != null">jymj = #{jymj},</if>
  161. <if test="jyfs != null and jyfs != ''">jyfs = #{jyfs},</if>
  162. <if test="jydxmc != null and jydxmc != ''">jydxmc = #{jydxmc},</if>
  163. <if test="jykssj != null and jykssj != ''">jykssj = #{jykssj},</if>
  164. <if test="jyjssj != null and jyjssj != ''">jyjssj = #{jyjssj},</if>
  165. <if test="cbje != null">cbje = #{cbje},</if>
  166. <if test="bz != null">bz = #{bz},</if>
  167. <if test="dkImg != null">dk_img = #{dkImg},</if>
  168. <if test="surveyStatus != null and surveyStatus != ''">survey_status = #{surveyStatus},</if>
  169. <if test="importCode != null and importCode != ''">import_code = #{importCode},</if>
  170. <if test="deptName != null">dept_name = #{deptName},</if>
  171. <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
  172. <if test="createTime != null">create_time = #{createTime},</if>
  173. <if test="updateBy != null">update_by = #{updateBy},</if>
  174. <if test="updateTime != null">update_time = #{updateTime},</if>
  175. </trim>
  176. where id = #{id}
  177. </update>
  178. <!--批量更新-->
  179. <update id="updateTResourceOperationBatch" parameterType="list" >
  180. <foreach collection="list" item="item" index="index" open="" close="" separator=";">
  181. update t_resource_operation
  182. <set>
  183. <if test="item.dkbm != null and item.dkbm != ''">dkbm = #{item.dkbm},</if>
  184. <if test="item.dkmc != null and item.dkmc != ''">dkmc = #{item.dkmc},</if>
  185. <if test="item.dkdz != null">dkdz = #{item.dkdz},</if>
  186. <if test="item.dkxz != null">dkxz = #{item.dkxz},</if>
  187. <if test="item.dknz != null">dknz = #{item.dknz},</if>
  188. <if test="item.dkbz != null">dkbz = #{item.dkbz},</if>
  189. <if test="item.jymj != null">jymj = #{item.jymj},</if>
  190. <if test="item.jyfs != null and item.jyfs != ''">jyfs = #{item.jyfs},</if>
  191. <if test="item.jydxmc != null and item.jydxmc != ''">jydxmc = #{item.jydxmc},</if>
  192. <if test="item.jykssj != null and item.jykssj != ''">jykssj = #{item.jykssj},</if>
  193. <if test="item.jyjssj != null and item.jyjssj != ''">jyjssj = #{item.jyjssj},</if>
  194. <if test="item.cbje != null">cbje = #{item.cbje},</if>
  195. <if test="item.bz != null">bz = #{item.bz},</if>
  196. <if test="item.dkImg != null">dk_img = #{item.dkImg},</if>
  197. <if test="item.surveyStatus != null and item.surveyStatus != ''">survey_status = #{item.surveyStatus},</if>
  198. <if test="item.importCode != null and item.importCode != ''">import_code = #{item.importCode},</if>
  199. <if test="item.deptName != null">dept_name = #{item.deptName},</if>
  200. <if test="item.createBy != null and item.createBy != ''">create_by = #{item.createBy},</if>
  201. <if test="item.createTime != null">create_time = #{item.createTime},</if>
  202. <if test="item.updateBy != null">update_by = #{item.updateBy},</if>
  203. <if test="item.updateTime != null">update_time = #{item.updateTime},</if>
  204. </set>
  205. where id = #{item.id}
  206. </foreach>
  207. </update>
  208. <delete id="deleteTResourceOperationById" parameterType="Long">
  209. delete from t_resource_operation where id = #{id}
  210. </delete>
  211. <delete id="deleteTResourceOperationByIds" parameterType="String">
  212. delete from t_resource_operation where id in
  213. <foreach item="id" collection="array" open="(" separator="," close=")">
  214. #{id}
  215. </foreach>
  216. </delete>
  217. </mapper>