|
|
|
@ -25,6 +25,19 @@ |
|
|
|
|
<result column="invoice_taxno" jdbcType="VARCHAR" property="invoiceTaxno"/> |
|
|
|
|
<result column="mdm_multicode_json" jdbcType="VARCHAR" property="mdmMulticodeJson"/> |
|
|
|
|
<result column="status" jdbcType="VARCHAR" property="status"/> |
|
|
|
|
<collection property="buyerEntityDetail" ofType="com.dxhy.order.baseservice.module.buyer.model.BuyerEntityDetail"> |
|
|
|
|
<id column="consumer_id" jdbcType="Integer" property="consumerId"/> |
|
|
|
|
<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="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> |
|
|
|
|
|
|
|
|
|
<sql id="Buyer_Base_Column_List"> |
|
|
|
@ -35,28 +48,29 @@ |
|
|
|
|
<bind name="dataType" value="${dataType}"/> |
|
|
|
|
<if test="dataType ==0 "> |
|
|
|
|
SELECT |
|
|
|
|
id, |
|
|
|
|
taxpayer_code, |
|
|
|
|
purchase_name, |
|
|
|
|
address, |
|
|
|
|
phone, |
|
|
|
|
bank_of_deposit, |
|
|
|
|
bank_number, |
|
|
|
|
email, |
|
|
|
|
sjh, |
|
|
|
|
remarks, |
|
|
|
|
create_user_id, |
|
|
|
|
DATE_FORMAT(create_time, '%Y-%m-%d') createTime, |
|
|
|
|
DATE_FORMAT(modify_time, '%Y-%m-%d') modifyTime, |
|
|
|
|
modify_user_id, |
|
|
|
|
ghf_qylx, |
|
|
|
|
xhf_nsrsbh, |
|
|
|
|
xhf_mc, |
|
|
|
|
buyer_code, |
|
|
|
|
create_time, |
|
|
|
|
status |
|
|
|
|
bmi.id, |
|
|
|
|
bmi.taxpayer_code, |
|
|
|
|
bmi.purchase_name, |
|
|
|
|
bmi.address, |
|
|
|
|
bmi.phone, |
|
|
|
|
bmi.bank_of_deposit, |
|
|
|
|
bmi.bank_number, |
|
|
|
|
bmi.email, |
|
|
|
|
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, |
|
|
|
|
bmi.modify_user_id, |
|
|
|
|
bmi.ghf_qylx, |
|
|
|
|
bmi.xhf_nsrsbh, |
|
|
|
|
bmi.xhf_mc, |
|
|
|
|
bmi.buyer_code, |
|
|
|
|
bmi.create_time, |
|
|
|
|
bmi.status, |
|
|
|
|
bmid.* |
|
|
|
|
FROM |
|
|
|
|
buyer_manage_info |
|
|
|
|
buyer_manage_info bmi left join buyer_manage_info_detail bmid on bmi.id = bmid.buyer_manage_id |
|
|
|
|
<where> |
|
|
|
|
<if test="shList != null and shList.size() == 0"> |
|
|
|
|
and xhf_nsrsbh = '' |
|
|
|
@ -274,6 +288,88 @@ |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
</update> |
|
|
|
|
|
|
|
|
|
<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=","> |
|
|
|
|
<!--<if test="consumerId != null">--> |
|
|
|
|
<!--consumer_id,--> |
|
|
|
|
<!--</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> |
|
|
|
|
</insert> |
|
|
|
|
<delete id="deleteBuyerDetail"> |
|
|
|
|
DELETE FROM buyer_manage_info_detail where buyer_manage_info = #{buyerManageId,jdbcType=VARCHAR} |
|
|
|
|
</delete> |
|
|
|
|
|
|
|
|
|
<!-- 插入数据--> |
|
|
|
|
<insert id="insertBuyer" parameterType="com.dxhy.order.baseservice.module.buyer.model.BuyerEntity"> |
|
|
|
|
<bind name="dataType" value="${dataType}"/> |
|
|
|
|