SDJL_Mapper.xml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- 核三框架升级自动生成mapper文件 -->
  3. <!-- SDJL表牵涉到的sql文件 -->
  4. <!DOCTYPE mapper
  5. PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
  6. "http://ibatis.apache.org/dtd/ibatis-3-mapper.dtd">
  7. <mapper namespace="SDJL">
  8. <!-- SDJL 全字段 -->
  9. <sql id="SDJL_COL">
  10. SDJLID,YWGLH,YWXTID,YWLBID,JBR,JBSJ,SDZTID,
  11. SDZT
  12. </sql>
  13. <!-- SDJL 选择字段 -->
  14. <sql id="SDJL_COLSEL">
  15. <trim suffixOverrides=",">
  16. <if test="SDJLID != null">
  17. SDJLID,
  18. </if>
  19. <if test="YWGLH != null">
  20. YWGLH,
  21. </if>
  22. <if test="YWXTID != null">
  23. YWXTID,
  24. </if>
  25. <if test="YWLBID != null">
  26. YWLBID,
  27. </if>
  28. <if test="JBR != null">
  29. JBR,
  30. </if>
  31. <if test="JBSJ != null">
  32. JBSJ,
  33. </if>
  34. <if test="SDZTID != null">
  35. SDZTID,
  36. </if>
  37. <if test="SDZT != null">
  38. SDZT
  39. </if>
  40. </trim>
  41. </sql>
  42. <!-- SDJL 记录数 -->
  43. <select id="SDJL_CNT" parameterType="hashmap" resultType="long">
  44. select count(1)
  45. from SDJL
  46. <where>
  47. <if test="SDJLID != null">
  48. and SDJLID=#{SDJLID}
  49. </if>
  50. <if test="YWGLH != null">
  51. and YWGLH=#{YWGLH}
  52. </if>
  53. <if test="YWXTID != null">
  54. and YWXTID=#{YWXTID}
  55. </if>
  56. <if test="YWLBID != null">
  57. and YWLBID=#{YWLBID}
  58. </if>
  59. <if test="JBR != null">
  60. and JBR=#{JBR}
  61. </if>
  62. <if test="JBSJ != null">
  63. and JBSJ=#{JBSJ}
  64. </if>
  65. <if test="SDZTID != null">
  66. and SDZTID=#{SDZTID}
  67. </if>
  68. <if test="SDZT != null">
  69. and SDZT=#{SDZT}
  70. </if>
  71. </where>
  72. </select>
  73. <!-- SDJL 全字段查询 -->
  74. <select id="SDJL_Q" parameterType="hashmap" resultType="hashmap">
  75. select
  76. <include refid="SDJL_COL" /> <!--引用前边定义的所有字段 -->
  77. from SDJL
  78. <where>
  79. <if test="SDJLID != null">
  80. and SDJLID=#{SDJLID}
  81. </if>
  82. <if test="YWGLH != null">
  83. and YWGLH=#{YWGLH}
  84. </if>
  85. <if test="YWXTID != null">
  86. and YWXTID=#{YWXTID}
  87. </if>
  88. <if test="YWLBID != null">
  89. and YWLBID=#{YWLBID}
  90. </if>
  91. <if test="JBR != null">
  92. and JBR=#{JBR}
  93. </if>
  94. <if test="JBSJ != null">
  95. and JBSJ=#{JBSJ}
  96. </if>
  97. <if test="SDZTID != null">
  98. and SDZTID=#{SDZTID}
  99. </if>
  100. <if test="SDZT != null">
  101. and SDZT=#{SDZT}
  102. </if>
  103. </where>
  104. </select>
  105. <!-- SDJL 选择查询 -->
  106. <select id="SDJL_QS" parameterType="hashmap" resultType="hashmap">
  107. select
  108. <include refid="SDJL_COLSEL" /> <!--引用前边定义的所有字段 -->
  109. from SDJL
  110. <where>
  111. <if test="SDJLID != null">
  112. and SDJLID=#{SDJLID}
  113. </if>
  114. <if test="YWGLH != null">
  115. and YWGLH=#{YWGLH}
  116. </if>
  117. <if test="YWXTID != null">
  118. and YWXTID=#{YWXTID}
  119. </if>
  120. <if test="YWLBID != null">
  121. and YWLBID=#{YWLBID}
  122. </if>
  123. <if test="JBR != null">
  124. and JBR=#{JBR}
  125. </if>
  126. <if test="JBSJ != null">
  127. and JBSJ=#{JBSJ}
  128. </if>
  129. <if test="SDZTID != null">
  130. and SDZTID=#{SDZTID}
  131. </if>
  132. <if test="SDZT != null">
  133. and SDZT=#{SDZT}
  134. </if>
  135. </where>
  136. </select>
  137. <!-- SDJL 插入 -->
  138. <insert id="SDJL_I" parameterType="hashmap">
  139. insert into SDJL (
  140. SDJLID,YWGLH,YWXTID,YWLBID,JBR,JBSJ,SDZTID,
  141. SDZT
  142. ) values (
  143. #{SDJLID},#{YWGLH},#{YWXTID},#{YWLBID},#{JBR},#{JBSJ},#{SDZTID},
  144. #{SDZT}
  145. )
  146. </insert>
  147. <!-- SDJL 插入-类型映射 -->
  148. <insert id="SDJL_IT" parameterType="hashmap">
  149. insert into SDJL (
  150. SDJLID,YWGLH,YWXTID,YWLBID,JBR,JBSJ,SDZTID,
  151. SDZT
  152. ) values (
  153. #{SDJLID ,javaType=long,jdbcType=NUMERIC},#{YWGLH ,javaType=string,jdbcType=VARCHAR},
  154. #{YWXTID ,javaType=long,jdbcType=NUMERIC},#{YWLBID ,javaType=long,jdbcType=NUMERIC},#{JBR ,javaType=string,jdbcType=VARCHAR},
  155. #{JBSJ ,javaType=long,jdbcType=NUMERIC},#{SDZTID ,javaType=long,jdbcType=NUMERIC},#{SDZT ,javaType=string,jdbcType=VARCHAR}
  156. )
  157. </insert>
  158. <!-- SDJL 选择字段插入 -->
  159. <insert id="SDJL_IS" parameterType="hashmap">
  160. insert into SDJL (
  161. <trim suffixOverrides=",">
  162. <if test="SDJLID != null">SDJLID,</if>
  163. <if test="YWGLH != null">YWGLH,</if>
  164. <if test="YWXTID != null">YWXTID,</if>
  165. <if test="YWLBID != null">YWLBID,</if>
  166. <if test="JBR != null">JBR,</if>
  167. <if test="JBSJ != null">JBSJ,</if>
  168. <if test="SDZTID != null">SDZTID,</if>
  169. <if test="SDZT != null">SDZT,</if>
  170. </trim>
  171. ) values (
  172. <trim suffixOverrides=",">
  173. <if test="SDJLID != null">#{SDJLID},</if>
  174. <if test="YWGLH != null">#{YWGLH},</if>
  175. <if test="YWXTID != null">#{YWXTID},</if>
  176. <if test="YWLBID != null">#{YWLBID},</if>
  177. <if test="JBR != null">#{JBR},</if>
  178. <if test="JBSJ != null">#{JBSJ},</if>
  179. <if test="SDZTID != null">#{SDZTID},</if>
  180. <if test="SDZT != null">#{SDZT},</if>
  181. </trim>
  182. )
  183. </insert>
  184. <!-- SDJL 修改 -->
  185. <update id="SDJL_U" parameterType="hashmap">
  186. update SDJL
  187. set
  188. SDJLID= #{SDJLID},YWGLH= #{YWGLH},YWXTID= #{YWXTID},
  189. YWLBID= #{YWLBID},JBR= #{JBR},JBSJ= #{JBSJ},SDZTID= #{SDZTID},
  190. SDZT= #{SDZT}
  191. where
  192. SDJLID = #{SDJLID}
  193. </update>
  194. <!-- SDJL 选择修改 -->
  195. <update id="SDJL_US" parameterType="hashmap">
  196. update SDJL
  197. set
  198. <trim suffixOverrides=",">
  199. <if test="SDJLID != null">SDJLID=#{SDJLID},</if>
  200. <if test="YWGLH != null">YWGLH=#{YWGLH},</if>
  201. <if test="YWXTID != null">YWXTID=#{YWXTID},</if>
  202. <if test="YWLBID != null">YWLBID=#{YWLBID},</if>
  203. <if test="JBR != null">JBR=#{JBR},</if>
  204. <if test="JBSJ != null">JBSJ=#{JBSJ},</if>
  205. <if test="SDZTID != null">SDZTID=#{SDZTID},</if>
  206. <if test="SDZT != null">SDZT=#{SDZT},</if>
  207. </trim>
  208. where
  209. SDJLID = #{SDJLID}
  210. </update>
  211. <!-- SDJL 删除 -->
  212. <delete id="SDJL_D" parameterType="hashmap">
  213. delete from SDJL
  214. <where>
  215. SDJLID = #{SDJLID}
  216. </where>
  217. </delete>
  218. <!-- SDJL 序列 -->
  219. <select id="SDJLID_SEQ" parameterType="hashmap" resultType="string">
  220. select seq_sdjlid.nextval from dual
  221. </select>
  222. </mapper>