MemberBankMapper.xml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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.up.sell.mapper.MemberBankMapper">
  4. <resultMap id="BaseResultMap" type="com.up.sell.vo.MemberBank">
  5. <id column="id" jdbcType="INTEGER" property="id" />
  6. <result column="card_no" jdbcType="VARCHAR" property="cardNo" />
  7. <result column="bank_id" jdbcType="INTEGER" property="bankId" />
  8. <result column="account_bank" jdbcType="VARCHAR" property="accountBank" />
  9. <result column="account_name" jdbcType="VARCHAR" property="accountName" />
  10. <result column="member_id" jdbcType="INTEGER" property="memberId" />
  11. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  12. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  13. </resultMap>
  14. <sql id="Base_Column_List">
  15. id, card_no, bank_id, account_bank, account_name, member_id, create_time, update_time
  16. </sql>
  17. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  18. select
  19. <include refid="Base_Column_List" />
  20. from member_bank
  21. where id = #{id,jdbcType=INTEGER}
  22. </select>
  23. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  24. delete from member_bank
  25. where id = #{id,jdbcType=INTEGER}
  26. </delete>
  27. <insert id="insert" parameterType="com.up.sell.vo.MemberBank">
  28. insert into member_bank (id, card_no, bank_id,
  29. account_bank, account_name, member_id,
  30. create_time, update_time)
  31. values (#{id,jdbcType=INTEGER}, #{cardNo,jdbcType=VARCHAR}, #{bankId,jdbcType=INTEGER},
  32. #{accountBank,jdbcType=VARCHAR}, #{accountName,jdbcType=VARCHAR}, #{memberId,jdbcType=INTEGER},
  33. #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
  34. </insert>
  35. <insert id="insertSelective" parameterType="com.up.sell.vo.MemberBank">
  36. insert into member_bank
  37. <trim prefix="(" suffix=")" suffixOverrides=",">
  38. <if test="id != null">
  39. id,
  40. </if>
  41. <if test="cardNo != null">
  42. card_no,
  43. </if>
  44. <if test="bankId != null">
  45. bank_id,
  46. </if>
  47. <if test="accountBank != null">
  48. account_bank,
  49. </if>
  50. <if test="accountName != null">
  51. account_name,
  52. </if>
  53. <if test="memberId != null">
  54. member_id,
  55. </if>
  56. <if test="createTime != null">
  57. create_time,
  58. </if>
  59. <if test="updateTime != null">
  60. update_time,
  61. </if>
  62. </trim>
  63. <trim prefix="values (" suffix=")" suffixOverrides=",">
  64. <if test="id != null">
  65. #{id,jdbcType=INTEGER},
  66. </if>
  67. <if test="cardNo != null">
  68. #{cardNo,jdbcType=VARCHAR},
  69. </if>
  70. <if test="bankId != null">
  71. #{bankId,jdbcType=INTEGER},
  72. </if>
  73. <if test="accountBank != null">
  74. #{accountBank,jdbcType=VARCHAR},
  75. </if>
  76. <if test="accountName != null">
  77. #{accountName,jdbcType=VARCHAR},
  78. </if>
  79. <if test="memberId != null">
  80. #{memberId,jdbcType=INTEGER},
  81. </if>
  82. <if test="createTime != null">
  83. #{createTime,jdbcType=TIMESTAMP},
  84. </if>
  85. <if test="updateTime != null">
  86. #{updateTime,jdbcType=TIMESTAMP},
  87. </if>
  88. </trim>
  89. </insert>
  90. <update id="updateByPrimaryKeySelective" parameterType="com.up.sell.vo.MemberBank">
  91. update member_bank
  92. <set>
  93. <if test="cardNo != null">
  94. card_no = #{cardNo,jdbcType=VARCHAR},
  95. </if>
  96. <if test="bankId != null">
  97. bank_id = #{bankId,jdbcType=INTEGER},
  98. </if>
  99. <if test="accountBank != null">
  100. account_bank = #{accountBank,jdbcType=VARCHAR},
  101. </if>
  102. <if test="accountName != null">
  103. account_name = #{accountName,jdbcType=VARCHAR},
  104. </if>
  105. <if test="memberId != null">
  106. member_id = #{memberId,jdbcType=INTEGER},
  107. </if>
  108. <if test="createTime != null">
  109. create_time = #{createTime,jdbcType=TIMESTAMP},
  110. </if>
  111. <if test="updateTime != null">
  112. update_time = #{updateTime,jdbcType=TIMESTAMP},
  113. </if>
  114. </set>
  115. where id = #{id,jdbcType=INTEGER}
  116. </update>
  117. <update id="updateByPrimaryKey" parameterType="com.up.sell.vo.MemberBank">
  118. update member_bank
  119. set card_no = #{cardNo,jdbcType=VARCHAR},
  120. bank_id = #{bankId,jdbcType=INTEGER},
  121. account_bank = #{accountBank,jdbcType=VARCHAR},
  122. account_name = #{accountName,jdbcType=VARCHAR},
  123. member_id = #{memberId,jdbcType=INTEGER},
  124. create_time = #{createTime,jdbcType=TIMESTAMP},
  125. update_time = #{updateTime,jdbcType=TIMESTAMP}
  126. where id = #{id,jdbcType=INTEGER}
  127. </update>
  128. </mapper>