BankinformationMapper.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.usoftchina.saas.document.mapper.BankinformationMapper" >
  4. <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Bankinformation" >
  5. <id column="bk_id" property="id" jdbcType="INTEGER" />
  6. <result column="bk_bankcode" property="bk_bankcode" jdbcType="VARCHAR" />
  7. <result column="bk_bankname" property="bk_bankname" jdbcType="VARCHAR" />
  8. <result column="bk_date" property="bk_date" jdbcType="TIMESTAMP" />
  9. <result column="bk_type" property="bk_type" jdbcType="VARCHAR" />
  10. <result column="bk_beginamount" property="bk_beginamount" jdbcType="DOUBLE" />
  11. <result column="bk_thisamount" property="bk_thisamount" jdbcType="DOUBLE" />
  12. <result column="bk_status" property="bk_status" jdbcType="VARCHAR" />
  13. <result column="bk_statuscode" property="bk_statuscode" jdbcType="VARCHAR" />
  14. <result column="bk_recorderid" property="bk_recorderid" jdbcType="INTEGER" />
  15. <result column="bk_recorder" property="bk_recorder" jdbcType="VARCHAR" />
  16. <result column="bk_recorddate" property="bk_recorddate" jdbcType="TIMESTAMP" />
  17. <result column="bk_ym" property="bk_ym" jdbcType="INTEGER" />
  18. <result column="companyid" property="companyId" jdbcType="INTEGER" />
  19. <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
  20. <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
  21. <result column="bk_text1" property="bk_text1" jdbcType="VARCHAR" />
  22. <result column="bk_text2" property="bk_text2" jdbcType="VARCHAR" />
  23. <result column="bk_text3" property="bk_text3" jdbcType="VARCHAR" />
  24. <result column="bk_text4" property="bk_text4" jdbcType="VARCHAR" />
  25. <result column="bk_text5" property="bk_text5" jdbcType="VARCHAR" />
  26. <result column="bk_remark" property="bk_remark" jdbcType="VARCHAR" />
  27. </resultMap>
  28. <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.saas.document.entities.Bankinformation" extends="BaseResultMap" >
  29. <result column="bk_remark" property="bk_remark" jdbcType="LONGVARCHAR" />
  30. </resultMap>
  31. <sql id="Base_Column_List" >
  32. bk_id, bk_bankcode, bk_bankname, bk_date, bk_type, bk_beginamount, bk_thisamount,
  33. bk_status, bk_statuscode, bk_recorderid, bk_recorder, bk_recorddate, bk_ym, companyid,
  34. updaterId, updateTime, bk_text1, bk_text2, bk_text3, bk_text4, bk_text5, bk_remark
  35. </sql>
  36. <sql id="Blob_Column_List" >
  37. bk_remark
  38. </sql>
  39. <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
  40. select
  41. <include refid="Base_Column_List" />
  42. ,
  43. <include refid="Blob_Column_List" />
  44. from bankinformation
  45. where bk_id = #{id,jdbcType=INTEGER}
  46. </select>
  47. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  48. delete from bankinformation
  49. where bk_id = #{id,jdbcType=INTEGER}
  50. </delete>
  51. <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Bankinformation" >
  52. insert into bankinformation (bk_id, bk_bankcode, bk_bankname,
  53. bk_date, bk_type, bk_beginamount,
  54. bk_thisamount, bk_status, bk_statuscode,
  55. bk_recorderid, bk_recorder, bk_recorddate,
  56. bk_ym, companyid, updaterId,
  57. updateTime, bk_text1, bk_text2,
  58. bk_text3, bk_text4, bk_text5,
  59. bk_remark)
  60. values (#{bk_bankcode,jdbcType=VARCHAR}, #{bk_bankname,jdbcType=VARCHAR},
  61. #{bk_date,jdbcType=TIMESTAMP}, #{bk_type,jdbcType=VARCHAR}, #{bk_beginamount,jdbcType=DOUBLE},
  62. #{bk_thisamount,jdbcType=DOUBLE}, #{bk_status,jdbcType=VARCHAR}, #{bk_statuscode,jdbcType=VARCHAR},
  63. #{bk_recorderid,jdbcType=INTEGER}, #{bk_recorder,jdbcType=VARCHAR}, #{bk_recorddate,jdbcType=TIMESTAMP},
  64. #{bk_ym,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER},
  65. #{updateTime,jdbcType=TIMESTAMP}, #{bk_text1,jdbcType=VARCHAR}, #{bk_text2,jdbcType=VARCHAR},
  66. #{bk_text3,jdbcType=VARCHAR}, #{bk_text4,jdbcType=VARCHAR}, #{bk_text5,jdbcType=VARCHAR},
  67. #{bk_remark,jdbcType=LONGVARCHAR})
  68. </insert>
  69. <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Bankinformation" >
  70. insert into bankinformation
  71. <trim prefix="(" suffix=")" suffixOverrides="," >
  72. <if test="bk_bankcode != null" >
  73. bk_bankcode,
  74. </if>
  75. <if test="bk_bankname != null" >
  76. bk_bankname,
  77. </if>
  78. <if test="bk_date != null" >
  79. bk_date,
  80. </if>
  81. <if test="bk_type != null" >
  82. bk_type,
  83. </if>
  84. <if test="bk_beginamount != null" >
  85. bk_beginamount,
  86. </if>
  87. <if test="bk_thisamount != null" >
  88. bk_thisamount,
  89. </if>
  90. <if test="bk_status != null" >
  91. bk_status,
  92. </if>
  93. <if test="bk_statuscode != null" >
  94. bk_statuscode,
  95. </if>
  96. <if test="bk_recorderid != null" >
  97. bk_recorderid,
  98. </if>
  99. <if test="bk_recorder != null" >
  100. bk_recorder,
  101. </if>
  102. <if test="bk_recorddate != null" >
  103. bk_recorddate,
  104. </if>
  105. <if test="bk_ym != null" >
  106. bk_ym,
  107. </if>
  108. <if test="companyId != null" >
  109. companyid,
  110. </if>
  111. <if test="updaterId != null" >
  112. updaterId,
  113. </if>
  114. <if test="updateTime != null" >
  115. updateTime,
  116. </if>
  117. <if test="bk_text1 != null" >
  118. bk_text1,
  119. </if>
  120. <if test="bk_text2 != null" >
  121. bk_text2,
  122. </if>
  123. <if test="bk_text3 != null" >
  124. bk_text3,
  125. </if>
  126. <if test="bk_text4 != null" >
  127. bk_text4,
  128. </if>
  129. <if test="bk_text5 != null" >
  130. bk_text5,
  131. </if>
  132. <if test="bk_remark != null" >
  133. bk_remark,
  134. </if>
  135. </trim>
  136. <trim prefix="values (" suffix=")" suffixOverrides="," >
  137. <if test="bk_bankcode != null" >
  138. #{bk_bankcode,jdbcType=VARCHAR},
  139. </if>
  140. <if test="bk_bankname != null" >
  141. #{bk_bankname,jdbcType=VARCHAR},
  142. </if>
  143. <if test="bk_date != null" >
  144. #{bk_date,jdbcType=TIMESTAMP},
  145. </if>
  146. <if test="bk_type != null" >
  147. #{bk_type,jdbcType=VARCHAR},
  148. </if>
  149. <if test="bk_beginamount != null" >
  150. #{bk_beginamount,jdbcType=DOUBLE},
  151. </if>
  152. <if test="bk_thisamount != null" >
  153. #{bk_thisamount,jdbcType=DOUBLE},
  154. </if>
  155. <if test="bk_status != null" >
  156. #{bk_status,jdbcType=VARCHAR},
  157. </if>
  158. <if test="bk_statuscode != null" >
  159. #{bk_statuscode,jdbcType=VARCHAR},
  160. </if>
  161. <if test="bk_recorderid != null" >
  162. #{bk_recorderid,jdbcType=INTEGER},
  163. </if>
  164. <if test="bk_recorder != null" >
  165. #{bk_recorder,jdbcType=VARCHAR},
  166. </if>
  167. <if test="bk_recorddate != null" >
  168. #{bk_recorddate,jdbcType=TIMESTAMP},
  169. </if>
  170. <if test="bk_ym != null" >
  171. #{bk_ym,jdbcType=INTEGER},
  172. </if>
  173. <if test="companyId != null" >
  174. #{companyId,jdbcType=INTEGER},
  175. </if>
  176. <if test="updaterId != null" >
  177. #{updaterId,jdbcType=INTEGER},
  178. </if>
  179. <if test="updateTime != null" >
  180. #{updateTime,jdbcType=TIMESTAMP},
  181. </if>
  182. <if test="bk_text1 != null" >
  183. #{bk_text1,jdbcType=VARCHAR},
  184. </if>
  185. <if test="bk_text2 != null" >
  186. #{bk_text2,jdbcType=VARCHAR},
  187. </if>
  188. <if test="bk_text3 != null" >
  189. #{bk_text3,jdbcType=VARCHAR},
  190. </if>
  191. <if test="bk_text4 != null" >
  192. #{bk_text4,jdbcType=VARCHAR},
  193. </if>
  194. <if test="bk_text5 != null" >
  195. #{bk_text5,jdbcType=VARCHAR},
  196. </if>
  197. <if test="bk_remark != null" >
  198. #{bk_remark,jdbcType=LONGVARCHAR},
  199. </if>
  200. </trim>
  201. </insert>
  202. <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Bankinformation" >
  203. update bankinformation
  204. <set >
  205. <if test="bk_bankcode != null" >
  206. bk_bankcode = #{bk_bankcode,jdbcType=VARCHAR},
  207. </if>
  208. <if test="bk_bankname != null" >
  209. bk_bankname = #{bk_bankname,jdbcType=VARCHAR},
  210. </if>
  211. <if test="bk_date != null" >
  212. bk_date = #{bk_date,jdbcType=TIMESTAMP},
  213. </if>
  214. <if test="bk_type != null" >
  215. bk_type = #{bk_type,jdbcType=VARCHAR},
  216. </if>
  217. <if test="bk_beginamount != null" >
  218. bk_beginamount = #{bk_beginamount,jdbcType=DOUBLE},
  219. </if>
  220. <if test="bk_thisamount != null" >
  221. bk_thisamount = #{bk_thisamount,jdbcType=DOUBLE},
  222. </if>
  223. <if test="bk_status != null" >
  224. bk_status = #{bk_status,jdbcType=VARCHAR},
  225. </if>
  226. <if test="bk_statuscode != null" >
  227. bk_statuscode = #{bk_statuscode,jdbcType=VARCHAR},
  228. </if>
  229. <if test="bk_recorderid != null" >
  230. bk_recorderid = #{bk_recorderid,jdbcType=INTEGER},
  231. </if>
  232. <if test="bk_recorder != null" >
  233. bk_recorder = #{bk_recorder,jdbcType=VARCHAR},
  234. </if>
  235. <if test="bk_recorddate != null" >
  236. bk_recorddate = #{bk_recorddate,jdbcType=TIMESTAMP},
  237. </if>
  238. <if test="bk_ym != null" >
  239. bk_ym = #{bk_ym,jdbcType=INTEGER},
  240. </if>
  241. <if test="companyId != null" >
  242. companyid = #{companyId,jdbcType=INTEGER},
  243. </if>
  244. <if test="updaterId != null" >
  245. updaterId = #{updaterId,jdbcType=INTEGER},
  246. </if>
  247. <if test="updateTime != null" >
  248. updateTime = #{updateTime,jdbcType=TIMESTAMP},
  249. </if>
  250. <if test="bk_text1 != null" >
  251. bk_text1 = #{bk_text1,jdbcType=VARCHAR},
  252. </if>
  253. <if test="bk_text2 != null" >
  254. bk_text2 = #{bk_text2,jdbcType=VARCHAR},
  255. </if>
  256. <if test="bk_text3 != null" >
  257. bk_text3 = #{bk_text3,jdbcType=VARCHAR},
  258. </if>
  259. <if test="bk_text4 != null" >
  260. bk_text4 = #{bk_text4,jdbcType=VARCHAR},
  261. </if>
  262. <if test="bk_text5 != null" >
  263. bk_text5 = #{bk_text5,jdbcType=VARCHAR},
  264. </if>
  265. <if test="bk_remark != null" >
  266. bk_remark = #{bk_remark,jdbcType=LONGVARCHAR},
  267. </if>
  268. </set>
  269. where bk_id = #{id,jdbcType=INTEGER}
  270. </update>
  271. <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.document.entities.Bankinformation" >
  272. update bankinformation
  273. set bk_bankcode = #{bkBankcode,jdbcType=VARCHAR},
  274. bk_bankname = #{bkBankname,jdbcType=VARCHAR},
  275. bk_date = #{bkDate,jdbcType=TIMESTAMP},
  276. bk_type = #{bkType,jdbcType=VARCHAR},
  277. bk_beginamount = #{bkBeginamount,jdbcType=DOUBLE},
  278. bk_thisamount = #{bkThisamount,jdbcType=DOUBLE},
  279. bk_status = #{bkStatus,jdbcType=VARCHAR},
  280. bk_statuscode = #{bkStatuscode,jdbcType=VARCHAR},
  281. bk_recorderid = #{bkRecorderid,jdbcType=INTEGER},
  282. bk_recorder = #{bkRecorder,jdbcType=VARCHAR},
  283. bk_recorddate = #{bkRecorddate,jdbcType=TIMESTAMP},
  284. bk_ym = #{bkYm,jdbcType=INTEGER},
  285. companyid = #{companyId,jdbcType=INTEGER},
  286. updaterId = #{updaterId,jdbcType=INTEGER},
  287. updateTime = #{updateTime,jdbcType=TIMESTAMP},
  288. bk_text1 = #{bkText1,jdbcType=VARCHAR},
  289. bk_text2 = #{bkText2,jdbcType=VARCHAR},
  290. bk_text3 = #{bkText3,jdbcType=VARCHAR},
  291. bk_text4 = #{bkText4,jdbcType=VARCHAR},
  292. bk_text5 = #{bkText5,jdbcType=VARCHAR},
  293. bk_remark = #{bkRemark,jdbcType=LONGVARCHAR}
  294. where bk_id = #{bkId,jdbcType=INTEGER}
  295. </update>
  296. <select id="selectAll" resultMap="BaseResultMap">
  297. SELECT * FROM bankinformation
  298. </select>
  299. <select id="selectBankinformationBycondition" resultMap="BaseResultMap">
  300. select
  301. <include refid="Base_Column_List" />
  302. from bankinformation
  303. <where>
  304. <if test="con != null">
  305. ${con}
  306. </if>
  307. <if test="companyId != null">
  308. and bankinformation.companyId = #{companyId}
  309. </if>
  310. </where> order by bk_id
  311. </select>
  312. <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
  313. SELECT CONCAT(bk_bankcode,' ',bk_bankname) display,bk_bankname value FROM bankinformation WHERE COMPANYID=#{companyId}
  314. </select>
  315. <select id="selectBankcode" parameterType="java.lang.String" resultType="java.lang.String">
  316. select bk_bankcode from bankinformation where bk_bankcode = #{bk_bankcode,jdbcType=VARCHAR}
  317. </select>
  318. </mapper>