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

TResourceOperationMapper.xml 14 KiB

1周前
1周前
1周前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  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="fid" />
  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="jydxlx" column="JYDXLX" />
  17. <result property="jydxmc" column="JYDXMC" />
  18. <result property="jydxzjlx" column="JYDXZJLX" />
  19. <result property="jydxzjhm" column="JYDXZJHM" />
  20. <result property="sfqdht" column="SFQDHT" />
  21. <result property="jykssj" column="JYKSSJ" />
  22. <result property="jyjssj" column="JYJSSJ" />
  23. <result property="cbje" column="CBJE" />
  24. <result property="dxje" column="DXJE" />
  25. <result property="sqje" column="SQJE" />
  26. <result property="nsy" column="NSY" />
  27. <result property="bzxx" column="BZXX" />
  28. <result property="dkImg" column="dk_img" />
  29. <result property="surveyStatus" column="survey_status" />
  30. <result property="importCode" column="import_code" />
  31. <result property="deptName" column="dept_name" />
  32. <result property="createBy" column="create_by" />
  33. <result property="createTime" column="create_time" />
  34. <result property="updateBy" column="update_by" />
  35. <result property="updateTime" column="update_time" />
  36. </resultMap>
  37. <sql id="selectTResourceOperationVo">
  38. select fid, DKBM, DKMC, DKDZ, DKXZ, DKNZ, DKBZ, JYMJ, JYFS, JYDXLX, JYDXMC, JYDXZJLX, JYDXZJHM, SFQDHT, JYKSSJ, JYJSSJ, CBJE, DXJE, SQJE, NSY, BZXX, dk_img, survey_status, import_code, dept_name, create_by, create_time, update_by, update_time from t_resource_operation
  39. </sql>
  40. <select id="selectTResourceOperationList" parameterType="TResourceOperation" resultMap="TResourceOperationResult">
  41. <include refid="selectTResourceOperationVo"/>
  42. <where>
  43. <if test="dkbm != null and dkbm != ''"> and DKBM = #{dkbm}</if>
  44. <if test="dkmc != null and dkmc != ''"> and DKMC = #{dkmc}</if>
  45. <if test="jyfs != null and jyfs != ''"> and JYFS = #{jyfs}</if>
  46. <if test="jydxlx != null and jydxlx != ''"> and JYDXLX = #{jydxlx}</if>
  47. <if test="jydxmc != null and jydxmc != ''"> and JYDXMC = #{jydxmc}</if>
  48. <if test="jydxzjlx != null and jydxzjlx != ''"> and JYDXZJLX = #{jydxzjlx}</if>
  49. <if test="jydxzjhm != null and jydxzjhm != ''"> and JYDXZJHM = #{jydxzjhm}</if>
  50. <if test="sfqdht != null and sfqdht != ''"> and SFQDHT = #{sfqdht}</if>
  51. <if test="surveyStatus != null and surveyStatus != ''"> and survey_status = #{surveyStatus}</if>
  52. <if test="importCode != null and importCode != ''"> and import_code like concat(#{importCode}, '%')</if>
  53. </where>
  54. </select>
  55. <select id="selectTResourceOperationById" parameterType="Long" resultMap="TResourceOperationResult">
  56. <include refid="selectTResourceOperationVo"/>
  57. where fid = #{id}
  58. </select>
  59. <select id="selectTResourceOperationByDkbm" parameterType="String" resultMap="TResourceOperationResult">
  60. <include refid="selectTResourceOperationVo"/>
  61. where dkbm = #{dkbm}
  62. </select>
  63. <insert id="insertTResourceOperation" parameterType="TResourceOperation" useGeneratedKeys="true" keyProperty="id">
  64. insert into t_resource_operation
  65. <trim prefix="(" suffix=")" suffixOverrides=",">
  66. <if test="dkbm != null and dkbm != ''">DKBM,</if>
  67. <if test="dkmc != null and dkmc != ''">DKMC,</if>
  68. <if test="dkdz != null">DKDZ,</if>
  69. <if test="dkxz != null">DKXZ,</if>
  70. <if test="dknz != null">DKNZ,</if>
  71. <if test="dkbz != null">DKBZ,</if>
  72. <if test="jymj != null">JYMJ,</if>
  73. <if test="jyfs != null">JYFS,</if>
  74. <if test="jydxlx != null">JYDXLX,</if>
  75. <if test="jydxmc != null">JYDXMC,</if>
  76. <if test="jydxzjlx != null">JYDXZJLX,</if>
  77. <if test="jydxzjhm != null">JYDXZJHM,</if>
  78. <if test="sfqdht != null">SFQDHT,</if>
  79. <if test="jykssj != null">JYKSSJ,</if>
  80. <if test="jyjssj != null">JYJSSJ,</if>
  81. <if test="cbje != null">CBJE,</if>
  82. <if test="dxje != null">DXJE,</if>
  83. <if test="sqje != null">SQJE,</if>
  84. <if test="nsy != null">NSY,</if>
  85. <if test="bzxx != null">BZXX,</if>
  86. <if test="dkImg != null">dk_img,</if>
  87. <if test="surveyStatus != null and surveyStatus != ''">survey_status,</if>
  88. <if test="importCode != null and importCode != ''">import_code,</if>
  89. <if test="deptName != null">dept_name,</if>
  90. <if test="createBy != null and createBy != ''">create_by,</if>
  91. <if test="createTime != null">create_time,</if>
  92. <if test="updateBy != null">update_by,</if>
  93. <if test="updateTime != null">update_time,</if>
  94. </trim>
  95. <trim prefix="values (" suffix=")" suffixOverrides=",">
  96. <if test="dkbm != null and dkbm != ''">#{dkbm},</if>
  97. <if test="dkmc != null and dkmc != ''">#{dkmc},</if>
  98. <if test="dkdz != null">#{dkdz},</if>
  99. <if test="dkxz != null">#{dkxz},</if>
  100. <if test="dknz != null">#{dknz},</if>
  101. <if test="dkbz != null">#{dkbz},</if>
  102. <if test="jymj != null">#{jymj},</if>
  103. <if test="jyfs != null">#{jyfs},</if>
  104. <if test="jydxlx != null">#{jydxlx},</if>
  105. <if test="jydxmc != null">#{jydxmc},</if>
  106. <if test="jydxzjlx != null">#{jydxzjlx},</if>
  107. <if test="jydxzjhm != null">#{jydxzjhm},</if>
  108. <if test="sfqdht != null">#{sfqdht},</if>
  109. <if test="jykssj != null">#{jykssj},</if>
  110. <if test="jyjssj != null">#{jyjssj},</if>
  111. <if test="cbje != null">#{cbje},</if>
  112. <if test="dxje != null">#{dxje},</if>
  113. <if test="sqje != null">#{sqje},</if>
  114. <if test="nsy != null">#{nsy},</if>
  115. <if test="bzxx != null">#{bzxx},</if>
  116. <if test="dkImg != null">#{dkImg},</if>
  117. <if test="surveyStatus != null and surveyStatus != ''">#{surveyStatus},</if>
  118. <if test="importCode != null and importCode != ''">#{importCode},</if>
  119. <if test="deptName != null">#{deptName},</if>
  120. <if test="createBy != null and createBy != ''">#{createBy},</if>
  121. <if test="createTime != null">#{createTime},</if>
  122. <if test="updateBy != null">#{updateBy},</if>
  123. <if test="updateTime != null">#{updateTime},</if>
  124. </trim>
  125. </insert>
  126. <insert id="insertTResourceOperationBatch" parameterType="list" useGeneratedKeys="true" keyProperty="id">
  127. insert into t_resource_operation
  128. <trim prefix="(" suffix=")" suffixOverrides=",">
  129. DKBM,
  130. DKMC,
  131. DKDZ,
  132. DKXZ,
  133. DKNZ,
  134. DKBZ,
  135. JYMJ,
  136. JYFS,
  137. JYDXLX,
  138. JYDXMC,
  139. JYDXZJLX,
  140. JYDXZJHM,
  141. SFQDHT,
  142. JYKSSJ,
  143. JYJSSJ,
  144. CBJE,
  145. DXJE,
  146. SQJE,
  147. NSY,
  148. BZXX,
  149. dk_img,
  150. survey_status,
  151. import_code,
  152. dept_name,
  153. create_by,
  154. create_time,
  155. update_by,
  156. update_time,
  157. </trim>
  158. values
  159. <foreach item="item" collection="list" separator="," >
  160. <trim prefix="(" suffix=")" suffixOverrides=",">
  161. #{item.dkbm},
  162. #{item.dkmc},
  163. #{item.dkdz},
  164. #{item.dkxz},
  165. #{item.dknz},
  166. #{item.dkbz},
  167. #{item.jymj},
  168. #{item.jyfs},
  169. #{item.jydxlx},
  170. #{item.jydxmc},
  171. #{item.jydxzjlx},
  172. #{item.jydxzjhm},
  173. #{item.sfqdht},
  174. #{item.jykssj},
  175. #{item.jyjssj},
  176. #{item.cbje},
  177. #{item.dxje},
  178. #{item.sqje},
  179. #{item.nsy},
  180. #{item.bzxx},
  181. #{item.dkImg},
  182. #{item.surveyStatus},
  183. #{item.importCode},
  184. #{item.deptName},
  185. #{item.createBy},
  186. #{item.createTime},
  187. #{item.updateBy},
  188. #{item.updateTime},
  189. </trim>
  190. </foreach>
  191. </insert>
  192. <update id="updateTResourceOperation" parameterType="TResourceOperation">
  193. update t_resource_operation
  194. <trim prefix="SET" suffixOverrides=",">
  195. <if test="dkbm != null and dkbm != ''">DKBM = #{dkbm},</if>
  196. <if test="dkmc != null and dkmc != ''">DKMC = #{dkmc},</if>
  197. <if test="dkdz != null">DKDZ = #{dkdz},</if>
  198. <if test="dkxz != null">DKXZ = #{dkxz},</if>
  199. <if test="dknz != null">DKNZ = #{dknz},</if>
  200. <if test="dkbz != null">DKBZ = #{dkbz},</if>
  201. <if test="jymj != null">JYMJ = #{jymj},</if>
  202. <if test="jyfs != null">JYFS = #{jyfs},</if>
  203. <if test="jydxlx != null">JYDXLX = #{jydxlx},</if>
  204. <if test="jydxmc != null">JYDXMC = #{jydxmc},</if>
  205. <if test="jydxzjlx != null">JYDXZJLX = #{jydxzjlx},</if>
  206. <if test="jydxzjhm != null">JYDXZJHM = #{jydxzjhm},</if>
  207. <if test="sfqdht != null">SFQDHT = #{sfqdht},</if>
  208. <if test="jykssj != null">JYKSSJ = #{jykssj},</if>
  209. <if test="jyjssj != null">JYJSSJ = #{jyjssj},</if>
  210. <if test="cbje != null">CBJE = #{cbje},</if>
  211. <if test="dxje != null">DXJE = #{dxje},</if>
  212. <if test="sqje != null">SQJE = #{sqje},</if>
  213. <if test="nsy != null">NSY = #{nsy},</if>
  214. <if test="bzxx != null">BZXX = #{bzxx},</if>
  215. <if test="dkImg != null">dk_img = #{dkImg},</if>
  216. <if test="surveyStatus != null and surveyStatus != ''">survey_status = #{surveyStatus},</if>
  217. <if test="importCode != null and importCode != ''">import_code = #{importCode},</if>
  218. <if test="deptName != null">dept_name = #{deptName},</if>
  219. <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
  220. <if test="createTime != null">create_time = #{createTime},</if>
  221. <if test="updateBy != null">update_by = #{updateBy},</if>
  222. <if test="updateTime != null">update_time = #{updateTime},</if>
  223. </trim>
  224. where fid = #{id}
  225. </update>
  226. <!--批量更新-->
  227. <update id="updateTResourceOperationBatch" parameterType="list" >
  228. <foreach collection="list" item="item" index="index" open="" close="" separator=";">
  229. update t_resource_operation
  230. <set>
  231. <if test="item.dkbm != null and item.dkbm != ''">DKBM = #{item.dkbm},</if>
  232. <if test="item.dkmc != null and item.dkmc != ''">DKMC = #{item.dkmc},</if>
  233. <if test="item.dkdz != null">DKDZ = #{item.dkdz},</if>
  234. <if test="item.dkxz != null">DKXZ = #{item.dkxz},</if>
  235. <if test="item.dknz != null">DKNZ = #{item.dknz},</if>
  236. <if test="item.dkbz != null">DKBZ = #{item.dkbz},</if>
  237. <if test="item.jymj != null">JYMJ = #{item.jymj},</if>
  238. <if test="item.jyfs != null">JYFS = #{item.jyfs},</if>
  239. <if test="item.jydxlx != null">JYDXLX = #{item.jydxlx},</if>
  240. <if test="item.jydxmc != null">JYDXMC = #{item.jydxmc},</if>
  241. <if test="item.jydxzjlx != null">JYDXZJLX = #{item.jydxzjlx},</if>
  242. <if test="item.jydxzjhm != null">JYDXZJHM = #{item.jydxzjhm},</if>
  243. <if test="item.sfqdht != null">SFQDHT = #{item.sfqdht},</if>
  244. <if test="item.jykssj != null">JYKSSJ = #{item.jykssj},</if>
  245. <if test="item.jyjssj != null">JYJSSJ = #{item.jyjssj},</if>
  246. <if test="item.cbje != null">CBJE = #{item.cbje},</if>
  247. <if test="item.dxje != null">DXJE = #{item.dxje},</if>
  248. <if test="item.sqje != null">SQJE = #{item.sqje},</if>
  249. <if test="item.nsy != null">NSY = #{item.nsy},</if>
  250. <if test="item.bzxx != null">BZXX = #{item.bzxx},</if>
  251. <if test="item.dkImg != null">dk_img = #{item.dkImg},</if>
  252. <if test="item.surveyStatus != null and item.surveyStatus != ''">survey_status = #{item.surveyStatus},</if>
  253. <if test="item.importCode != null and item.importCode != ''">import_code = #{item.importCode},</if>
  254. <if test="item.deptName != null">dept_name = #{item.deptName},</if>
  255. <if test="item.createBy != null and item.createBy != ''">create_by = #{item.createBy},</if>
  256. <if test="item.createTime != null">create_time = #{item.createTime},</if>
  257. <if test="item.updateBy != null">update_by = #{item.updateBy},</if>
  258. <if test="item.updateTime != null">update_time = #{item.updateTime},</if>
  259. </set>
  260. where fid = #{item.id}
  261. </foreach>
  262. </update>
  263. <delete id="deleteTResourceOperationById" parameterType="Long">
  264. delete from t_resource_operation where fid = #{id}
  265. </delete>
  266. <delete id="deleteTResourceOperationByIds" parameterType="String">
  267. delete from t_resource_operation where fid in
  268. <foreach item="id" collection="array" open="(" separator="," close=")">
  269. #{id}
  270. </foreach>
  271. </delete>
  272. <delete id="deleteByCode" parameterType="String">
  273. delete from t_resource_operation where import_code = #{importCode}
  274. </delete>
  275. </mapper>