AccountBankServiceDaoImplMapper.xml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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="accountBankServiceDaoImpl">
  6. <!-- 保存开户行信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveAccountBankInfo" parameterType="Map">
  8. insert into account_bank(
  9. person_name,bank_code,bank_id,bank_name,shop_id,person_tel
  10. ) values (
  11. #{personName},#{bankCode},#{bankId},#{bankName},#{shopId},#{personTel}
  12. )
  13. </insert>
  14. <!-- 查询开户行信息 add by wuxw 2018-07-03 -->
  15. <select id="getAccountBankInfo" parameterType="Map" resultType="Map">
  16. select t.person_name,t.person_name personName,t.bank_code,t.bank_code bankCode,t.bank_id,t.bank_id bankId,t.create_time,t.create_time createTime,t.bank_name,t.bank_name bankName,t.status_cd,t.status_cd statusCd,t.shop_id,t.shop_id shopId,t.person_tel,t.person_tel personTel
  17. from account_bank t
  18. where 1 =1
  19. <if test="personName !=null and personName != ''">
  20. and t.person_name= #{personName}
  21. </if>
  22. <if test="bankCode !=null and bankCode != ''">
  23. and t.bank_code= #{bankCode}
  24. </if>
  25. <if test="bankId !=null and bankId != ''">
  26. and t.bank_id= #{bankId}
  27. </if>
  28. <if test="createTime !=null and createTime != ''">
  29. and t.create_time= #{createTime}
  30. </if>
  31. <if test="bankName !=null and bankName != ''">
  32. and t.bank_name= #{bankName}
  33. </if>
  34. <if test="statusCd !=null and statusCd != ''">
  35. and t.status_cd= #{statusCd}
  36. </if>
  37. <if test="shopId !=null and shopId != ''">
  38. and t.shop_id= #{shopId}
  39. </if>
  40. <if test="personTel !=null and personTel != ''">
  41. and t.person_tel= #{personTel}
  42. </if>
  43. order by t.create_time desc
  44. <if test="page != -1 and page != null ">
  45. limit #{page}, #{row}
  46. </if>
  47. </select>
  48. <!-- 修改开户行信息 add by wuxw 2018-07-03 -->
  49. <update id="updateAccountBankInfo" parameterType="Map">
  50. update account_bank t set t.status_cd = #{statusCd}
  51. <if test="newBId != null and newBId != ''">
  52. ,t.b_id = #{newBId}
  53. </if>
  54. <if test="personName !=null and personName != ''">
  55. , t.person_name= #{personName}
  56. </if>
  57. <if test="bankCode !=null and bankCode != ''">
  58. , t.bank_code= #{bankCode}
  59. </if>
  60. <if test="createTime !=null and createTime != ''">
  61. , t.create_time= #{createTime}
  62. </if>
  63. <if test="bankName !=null and bankName != ''">
  64. , t.bank_name= #{bankName}
  65. </if>
  66. <if test="shopId !=null and shopId != ''">
  67. , t.shop_id= #{shopId}
  68. </if>
  69. <if test="personTel !=null and personTel != ''">
  70. , t.person_tel= #{personTel}
  71. </if>
  72. where 1=1 <if test="bankId !=null and bankId != ''">
  73. and t.bank_id= #{bankId}
  74. </if>
  75. </update>
  76. <!-- 查询开户行数量 add by wuxw 2018-07-03 -->
  77. <select id="queryAccountBanksCount" parameterType="Map" resultType="Map">
  78. select count(1) count
  79. from account_bank t
  80. where 1 =1
  81. <if test="personName !=null and personName != ''">
  82. and t.person_name= #{personName}
  83. </if>
  84. <if test="bankCode !=null and bankCode != ''">
  85. and t.bank_code= #{bankCode}
  86. </if>
  87. <if test="bankId !=null and bankId != ''">
  88. and t.bank_id= #{bankId}
  89. </if>
  90. <if test="createTime !=null and createTime != ''">
  91. and t.create_time= #{createTime}
  92. </if>
  93. <if test="bankName !=null and bankName != ''">
  94. and t.bank_name= #{bankName}
  95. </if>
  96. <if test="statusCd !=null and statusCd != ''">
  97. and t.status_cd= #{statusCd}
  98. </if>
  99. <if test="shopId !=null and shopId != ''">
  100. and t.shop_id= #{shopId}
  101. </if>
  102. <if test="personTel !=null and personTel != ''">
  103. and t.person_tel= #{personTel}
  104. </if>
  105. </select>
  106. </mapper>