|
|
|
@ -30,13 +30,11 @@ |
|
|
|
|
<result column="buyer_manage_id" jdbcType="VARCHAR" property="buyerManageId"/> |
|
|
|
|
<result column="bank_name" jdbcType="VARCHAR" property="bankName"/> |
|
|
|
|
<result column="bank_account" jdbcType="VARCHAR" property="bankAccount"/> |
|
|
|
|
<result column="address" jdbcType="VARCHAR" property="address"/> |
|
|
|
|
<result column="phone" jdbcType="VARCHAR" property="phone"/> |
|
|
|
|
<result column="bmid_address" jdbcType="VARCHAR" property="address"/> |
|
|
|
|
<result column="bmid_phone" jdbcType="VARCHAR" property="phone"/> |
|
|
|
|
<result column="default_mark" jdbcType="VARCHAR" property="defaultMark"/> |
|
|
|
|
<result column="create_user" jdbcType="VARCHAR" property="createUser"/> |
|
|
|
|
<result column="update_user" jdbcType="VARCHAR" property="updateUser"/> |
|
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> |
|
|
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> |
|
|
|
|
</collection> |
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
@ -59,8 +57,8 @@ |
|
|
|
|
bmi.sjh, |
|
|
|
|
bmi.remarks, |
|
|
|
|
bmi.create_user_id, |
|
|
|
|
bmi.DATE_FORMAT(create_time, '%Y-%m-%d') createTime, |
|
|
|
|
bmi.DATE_FORMAT(modify_time, '%Y-%m-%d') modifyTime, |
|
|
|
|
DATE_FORMAT(bmi.create_time, '%Y-%m-%d') createTime, |
|
|
|
|
DATE_FORMAT(bmi.modify_time, '%Y-%m-%d') modifyTime, |
|
|
|
|
bmi.modify_user_id, |
|
|
|
|
bmi.ghf_qylx, |
|
|
|
|
bmi.xhf_nsrsbh, |
|
|
|
@ -68,7 +66,16 @@ |
|
|
|
|
bmi.buyer_code, |
|
|
|
|
bmi.create_time, |
|
|
|
|
bmi.status, |
|
|
|
|
bmid.* |
|
|
|
|
bmid.consumer_id, |
|
|
|
|
bmid.buyer_manage_id, |
|
|
|
|
bmid.bank_name, |
|
|
|
|
bmid.bank_account, |
|
|
|
|
bmid.address as bmid_address, |
|
|
|
|
bmid.phone as bmid_phone, |
|
|
|
|
bmid.default_mark, |
|
|
|
|
bmid.create_user, |
|
|
|
|
bmid.update_user |
|
|
|
|
|
|
|
|
|
FROM |
|
|
|
|
buyer_manage_info bmi left join buyer_manage_info_detail bmid on bmi.id = bmid.buyer_manage_id |
|
|
|
|
<where> |
|
|
|
@ -291,83 +298,27 @@ |
|
|
|
|
|
|
|
|
|
<insert id="batchInsertBuyerDetail" parameterType="com.dxhy.order.baseservice.module.buyer.model.BuyerEntityDetail" useGeneratedKeys="true" keyProperty="consumerId"> |
|
|
|
|
<bind name="dataType" value="${dataType}"/> |
|
|
|
|
INSERT INTO buyer_manage_info_detail |
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
|
|
INSERT INTO buyer_manage_info_detail ( |
|
|
|
|
buyer_manage_id,bank_name,bank_account,address,phone,default_mark,create_user,update_user,create_time,update_time |
|
|
|
|
) values |
|
|
|
|
<foreach collection="buyerEntityDetails" item="buyerDetail" index="index" separator=","> |
|
|
|
|
<!--<if test="consumerId != null">--> |
|
|
|
|
<!--consumer_id,--> |
|
|
|
|
<!--#{consumerId,jdbcType=VARCHAR},--> |
|
|
|
|
<!--</if>--> |
|
|
|
|
<if test="buyerManageId != null"> |
|
|
|
|
buyer_manage_id, |
|
|
|
|
</if> |
|
|
|
|
<if test="bankName != null"> |
|
|
|
|
bank_name, |
|
|
|
|
</if> |
|
|
|
|
<if test="bankAccount != null"> |
|
|
|
|
bank_account, |
|
|
|
|
</if> |
|
|
|
|
<if test="address != null"> |
|
|
|
|
address, |
|
|
|
|
</if> |
|
|
|
|
<if test="phone != null"> |
|
|
|
|
phone, |
|
|
|
|
</if> |
|
|
|
|
<if test="defaultMark != null"> |
|
|
|
|
default_mark, |
|
|
|
|
</if> |
|
|
|
|
<if test="createUser != null"> |
|
|
|
|
create_user, |
|
|
|
|
</if> |
|
|
|
|
<if test="updateUser != null"> |
|
|
|
|
update_user, |
|
|
|
|
</if> |
|
|
|
|
<if test="createTime != null"> |
|
|
|
|
create_time, |
|
|
|
|
</if> |
|
|
|
|
<if test="updateTime != null"> |
|
|
|
|
update_time, |
|
|
|
|
</if> |
|
|
|
|
</trim> |
|
|
|
|
<trim prefix="values"> |
|
|
|
|
<foreach collection="buyerEntityDetails" item="buyerDetail" index="index" open="(" separator="," close=")"> |
|
|
|
|
<!--<if test="consumerId != null">--> |
|
|
|
|
<!--#{consumerId,jdbcType=VARCHAR},--> |
|
|
|
|
<!--</if>--> |
|
|
|
|
<if test="buyerManageId != null"> |
|
|
|
|
#{buyerManageId,jdbcType=VARCHAR}, |
|
|
|
|
</if> |
|
|
|
|
<if test="bankName != null"> |
|
|
|
|
#{bankName,jdbcType=VARCHAR}, |
|
|
|
|
</if> |
|
|
|
|
<if test="bankAccount != null"> |
|
|
|
|
#{bankAccount,jdbcType=VARCHAR}, |
|
|
|
|
</if> |
|
|
|
|
<if test="address != null"> |
|
|
|
|
#{address,jdbcType=VARCHAR}, |
|
|
|
|
</if> |
|
|
|
|
<if test="phone != null"> |
|
|
|
|
#{phone,jdbcType=VARCHAR}, |
|
|
|
|
</if> |
|
|
|
|
<if test="defaultMark != null"> |
|
|
|
|
#{defaultMark,jdbcType=VARCHAR}, |
|
|
|
|
</if> |
|
|
|
|
<if test="createUser != null"> |
|
|
|
|
#{createUser,jdbcType=VARCHAR}, |
|
|
|
|
</if> |
|
|
|
|
<if test="updateUser != null"> |
|
|
|
|
#{updateUser,jdbcType=VARCHAR}, |
|
|
|
|
</if> |
|
|
|
|
<if test="createTime != null"> |
|
|
|
|
now(), |
|
|
|
|
</if> |
|
|
|
|
<if test="updateTime != null"> |
|
|
|
|
now(), |
|
|
|
|
</if> |
|
|
|
|
</foreach> |
|
|
|
|
|
|
|
|
|
</trim> |
|
|
|
|
(#{buyerDetail.buyerManageId,jdbcType=VARCHAR}, |
|
|
|
|
#{buyerDetail.bankName,jdbcType=VARCHAR}, |
|
|
|
|
#{buyerDetail.bankAccount,jdbcType=VARCHAR}, |
|
|
|
|
#{buyerDetail.address,jdbcType=VARCHAR}, |
|
|
|
|
#{buyerDetail.phone,jdbcType=VARCHAR}, |
|
|
|
|
#{buyerDetail.defaultMark,jdbcType=VARCHAR}, |
|
|
|
|
#{buyerDetail.createUser,jdbcType=VARCHAR}, |
|
|
|
|
#{buyerDetail.updateUser,jdbcType=VARCHAR}, |
|
|
|
|
now(), |
|
|
|
|
now()) |
|
|
|
|
</foreach> |
|
|
|
|
</insert> |
|
|
|
|
<delete id="deleteBuyerDetail"> |
|
|
|
|
DELETE FROM buyer_manage_info_detail where buyer_manage_info = #{buyerManageId,jdbcType=VARCHAR} |
|
|
|
|
DELETE FROM buyer_manage_info_detail where buyer_manage_id = #{buyerManageId,jdbcType=VARCHAR} |
|
|
|
|
</delete> |
|
|
|
|
|
|
|
|
|
<!-- 插入数据--> |
|
|
|
|