BusJcebLbjghjlMapper.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  3. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  4. <mapper namespace="com.railway.business.catenary.mapper.BusJcebLbjghjlMapper">
  5. <resultMap id="BaseResultMap" type="com.railway.business.catenary.domain.BusJcebLbjghjl">
  6. <result column="id" property="id"/>
  7. <result column="qj" property="qj"/>
  8. <result column="dd" property="dd"/>
  9. <result column="ghq_mc" property="ghqMc"/>
  10. <result column="ghq_ggxh" property="ghqGgxh"/>
  11. <result column="ghq_sccj" property="ghqSccj"/>
  12. <result column="ghh_mc" property="ghhMc"/>
  13. <result column="ghh_ggxh" property="ghhGgxh"/>
  14. <result column="ghh_sccj" property="ghhSccj"/>
  15. <result column="ghyy" property="ghyy"/>
  16. <result column="ghsj" property="ghsj"/>
  17. <result column="czr" property="czr"/>
  18. <result column="remark" property="remark"/>
  19. <result column="submit_state" property="submitState"/>
  20. <result column="del_flag" property="delFlag"/>
  21. <result column="create_by" property="createBy"/>
  22. <result column="create_time" property="createTime"/>
  23. <result column="update_by" property="updateBy"/>
  24. <result column="update_time" property="updateTime"/>
  25. </resultMap>
  26. <sql id="Base_Column_List">
  27. id,
  28. qj,
  29. dd,
  30. ghq_mc,
  31. ghq_ggxh,
  32. ghq_sccj,
  33. ghh_mc,
  34. ghh_ggxh,
  35. ghh_sccj,
  36. ghyy,
  37. ghsj,
  38. czr,
  39. remark,
  40. submit_state,
  41. del_flag,
  42. create_by,
  43. create_time,
  44. update_by,
  45. update_time
  46. </sql>
  47. <insert id="insert" parameterType="com.railway.business.catenary.domain.BusJcebLbjghjl">
  48. <selectKey keyProperty="id" order="BEFORE" resultType="String">
  49. select replace(uuid(), '-', '') from dual
  50. </selectKey>
  51. INSERT INTO bus_jceb_lbjghjl
  52. <trim prefix="(" suffix=")" suffixOverrides=",">
  53. <if test ='null != qj'>
  54. qj,
  55. </if>
  56. <if test ='null != dd'>
  57. dd,
  58. </if>
  59. <if test ='null != ghqMc'>
  60. ghq_mc,
  61. </if>
  62. <if test ='null != ghqGgxh'>
  63. ghq_ggxh,
  64. </if>
  65. <if test ='null != ghqSccj'>
  66. ghq_sccj,
  67. </if>
  68. <if test ='null != ghhMc'>
  69. ghh_mc,
  70. </if>
  71. <if test ='null != ghhGgxh'>
  72. ghh_ggxh,
  73. </if>
  74. <if test ='null != ghhSccj'>
  75. ghh_sccj,
  76. </if>
  77. <if test ='null != ghyy'>
  78. ghyy,
  79. </if>
  80. <if test ='null != ghsj'>
  81. ghsj,
  82. </if>
  83. <if test ='null != czr'>
  84. czr,
  85. </if>
  86. <if test ='null != remark'>
  87. remark,
  88. </if>
  89. <if test ='null != submitState'>
  90. submit_state,
  91. </if>
  92. <if test ='null != delFlag'>
  93. del_flag,
  94. </if>
  95. <if test ='null != createBy'>
  96. create_by,
  97. </if>
  98. <if test ='null != createTime'>
  99. create_time,
  100. </if>
  101. <if test ='null != updateBy'>
  102. update_by,
  103. </if>
  104. <if test ='null != updateTime'>
  105. update_time
  106. </if>
  107. </trim>
  108. <trim prefix="values (" suffix=")" suffixOverrides=",">
  109. <if test ='null != qj'>
  110. #{qj},
  111. </if>
  112. <if test ='null != dd'>
  113. #{dd},
  114. </if>
  115. <if test ='null != ghqMc'>
  116. #{ghqMc},
  117. </if>
  118. <if test ='null != ghqGgxh'>
  119. #{ghqGgxh},
  120. </if>
  121. <if test ='null != ghqSccj'>
  122. #{ghqSccj},
  123. </if>
  124. <if test ='null != ghhMc'>
  125. #{ghhMc},
  126. </if>
  127. <if test ='null != ghhGgxh'>
  128. #{ghhGgxh},
  129. </if>
  130. <if test ='null != ghhSccj'>
  131. #{ghhSccj},
  132. </if>
  133. <if test ='null != ghyy'>
  134. #{ghyy},
  135. </if>
  136. <if test ='null != ghsj'>
  137. #{ghsj},
  138. </if>
  139. <if test ='null != czr'>
  140. #{czr},
  141. </if>
  142. <if test ='null != remark'>
  143. #{remark},
  144. </if>
  145. <if test ='null != submitState'>
  146. #{submitState},
  147. </if>
  148. <if test ='null != delFlag'>
  149. #{delFlag},
  150. </if>
  151. <if test ='null != createBy'>
  152. #{createBy},
  153. </if>
  154. <if test ='null != createTime'>
  155. #{createTime},
  156. </if>
  157. <if test ='null != updateBy'>
  158. #{updateBy},
  159. </if>
  160. <if test ='null != updateTime'>
  161. #{updateTime}
  162. </if>
  163. </trim>
  164. </insert>
  165. <delete id="delete">
  166. UPDATE bus_jceb_lbjghjl
  167. set del_flag='1'
  168. WHERE id = #{id}
  169. </delete>
  170. <update id="update" parameterType="com.railway.business.catenary.domain.BusJcebLbjghjl">
  171. UPDATE bus_jceb_lbjghjl
  172. <set>
  173. <if test ='null != qj'>qj = #{qj},</if>
  174. <if test ='null != dd'>dd = #{dd},</if>
  175. <if test ='null != ghqMc'>ghq_mc = #{ghqMc},</if>
  176. <if test ='null != ghqGgxh'>ghq_ggxh = #{ghqGgxh},</if>
  177. <if test ='null != ghqSccj'>ghq_sccj = #{ghqSccj},</if>
  178. <if test ='null != ghhMc'>ghh_mc = #{ghhMc},</if>
  179. <if test ='null != ghhGgxh'>ghh_ggxh = #{ghhGgxh},</if>
  180. <if test ='null != ghhSccj'>ghh_sccj = #{ghhSccj},</if>
  181. <if test ='null != ghyy'>ghyy = #{ghyy},</if>
  182. <if test ='null != ghsj'>ghsj = #{ghsj},</if>
  183. <if test ='null != czr'>czr = #{czr},</if>
  184. <if test ='null != remark'>remark = #{remark},</if>
  185. <if test ='null != submitState'>submit_state = #{submitState},</if>
  186. <if test ='null != delFlag'>del_flag = #{delFlag},</if>
  187. <if test ='null != createBy'>create_by = #{createBy},</if>
  188. <if test ='null != createTime'>create_time = #{createTime},</if>
  189. <if test ='null != updateBy'>update_by = #{updateBy},</if>
  190. <if test ='null != updateTime'>update_time = #{updateTime}</if>
  191. </set>
  192. WHERE id = #{id}
  193. </update>
  194. <select id="getInfo" resultMap="BaseResultMap">
  195. SELECT
  196. <include refid="Base_Column_List"/>
  197. FROM bus_jceb_lbjghjl
  198. WHERE del_flag='0' and id = #{id}
  199. </select>
  200. <select id="getList" resultMap="BaseResultMap">
  201. SELECT
  202. <include refid="Base_Column_List"/>
  203. FROM bus_jceb_lbjghjl
  204. <where>
  205. del_flag='0'
  206. <if test="qj!=null and qj!=''">
  207. and qj=#{qj}
  208. </if>
  209. <if test="dd!=null and dd!=''">
  210. and dd=#{dd}
  211. </if>
  212. <if test="ghqMc!=null and ghqMc!=''">
  213. and ghq_mc=#{ghqMc}
  214. </if>
  215. <if test="ghqGgxh!=null and ghqGgxh!=''">
  216. and ghq_ggxh=#{ghqGgxh}
  217. </if>
  218. <if test="ghqSccj!=null and ghqSccj!=''">
  219. and ghq_sccj=#{ghqSccj}
  220. </if>
  221. <if test="ghhMc!=null and ghhMc!=''">
  222. and ghh_mc=#{ghhMc}
  223. </if>
  224. <if test="ghhGgxh!=null and ghhGgxh!=''">
  225. and ghh_ggxh=#{ghhGgxh}
  226. </if>
  227. <if test="ghhSccj!=null and ghhSccj!=''">
  228. and ghh_sccj=#{ghhSccj}
  229. </if>
  230. <if test="ghyy!=null and ghyy!=''">
  231. and ghyy=#{ghyy}
  232. </if>
  233. <if test="ghsj!=null and ghsj!=''">
  234. and ghsj=#{ghsj}
  235. </if>
  236. <if test="czr!=null and czr!=''">
  237. and czr=#{czr}
  238. </if>
  239. <if test="remark!=null and remark!=''">
  240. and remark=#{remark}
  241. </if>
  242. <if test="submitState!=null and submitState!=''">
  243. and submit_state=#{submitState}
  244. </if>
  245. <if test="delFlag!=null and delFlag!=''">
  246. and del_flag=#{delFlag}
  247. </if>
  248. <if test="createBy!=null and createBy!=''">
  249. and create_by=#{createBy}
  250. </if>
  251. <if test="createTime!=null and createTime!=''">
  252. and create_time=#{createTime}
  253. </if>
  254. <if test="updateBy!=null and updateBy!=''">
  255. and update_by=#{updateBy}
  256. </if>
  257. <if test="updateTime!=null and updateTime!=''">
  258. and update_time=#{updateTime}
  259. </if>
  260. </where>
  261. </select>
  262. </mapper>