|
@@ -0,0 +1,50 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<mapper namespace="com.fire.admin.mapper.BankCardMapper">
|
|
|
+
|
|
|
+ <resultMap id="bankCardResultMap" type="com.fire.dto.BankCard">
|
|
|
+ <id column="card_no" property="cardNo"/>
|
|
|
+ <result column="bank_deposit" property="bankDeposit"/>
|
|
|
+ <result column="account" property="account"/>
|
|
|
+ <result column="supplier_id" property="supplierId"/>
|
|
|
+ <result column="creator" property="creator"/>
|
|
|
+ <result column="create_time" property="createTime"/>
|
|
|
+ <result column="updator" property="updator"/>
|
|
|
+ <result column="update_time" property="updateTime"/>
|
|
|
+ <result column="distinguish" property="distinguish"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="common_field">
|
|
|
+ card_no,
|
|
|
+ bank_deposit,
|
|
|
+ account,
|
|
|
+ supplier_id,
|
|
|
+ creator,
|
|
|
+ create_time,
|
|
|
+ updator,
|
|
|
+ update_time,
|
|
|
+ distinguish
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="getBankCardList" resultMap="bankCardResultMap">
|
|
|
+ SELECT <include refid="common_field"/>
|
|
|
+ FROM bank_card
|
|
|
+ <where>
|
|
|
+ <if test="supplierId !=null">
|
|
|
+ supplier_id = #{supplierId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="saveBankCards">
|
|
|
+ INSERT INTO bank_card
|
|
|
+ (card_no, bank_deposit, account, supplier_id, creator, create_time,updator,update_time,distinguish)
|
|
|
+ VALUES
|
|
|
+ <foreach collection="bankCards" item="item" open="(" close=")" separator=",">
|
|
|
+ (#{item.cardNo}, #{item.bankDeposit}, #{item.account},
|
|
|
+ #{item.supplierId}, #{item.creator},#{item.createTime},
|
|
|
+ #{item.updator},#{item.updateTime},#{distinguish});
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+</mapper>
|