feat: 客户表增加状态字段

release
liufeilong 2 years ago
parent bbd02af0e8
commit 166639357b
  1. 4
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/buyer/model/BuyerEntity.java
  2. 63
      order-management-base-service/src/main/resources/mybatis/mapper/BuyerMapper.xml

@ -119,4 +119,8 @@ public class BuyerEntity implements Serializable {
private String UUID; private String UUID;
private Boolean success; private Boolean success;
/**
* 客户状态(0:冻结;1:非冻结)
*/
private String status;
} }

@ -24,10 +24,11 @@
<result column="invoice_name" jdbcType="VARCHAR" property="invoiceName"/> <result column="invoice_name" jdbcType="VARCHAR" property="invoiceName"/>
<result column="invoice_taxno" jdbcType="VARCHAR" property="invoiceTaxno"/> <result column="invoice_taxno" jdbcType="VARCHAR" property="invoiceTaxno"/>
<result column="mdm_multicode_json" jdbcType="VARCHAR" property="mdmMulticodeJson"/> <result column="mdm_multicode_json" jdbcType="VARCHAR" property="mdmMulticodeJson"/>
<result column="status" jdbcType="VARCHAR" property="status"/>
</resultMap> </resultMap>
<sql id="Buyer_Base_Column_List"> <sql id="Buyer_Base_Column_List">
id,taxpayer_code,purchase_name,address,phone,bank_of_deposit,bank_number,email,sjh,remarks,create_time,create_user_id,modify_time,modify_user_id,ghf_qylx,xhf_nsrsbh,xhf_mc,buyer_code,invoice_name,invoice_taxno,mdm_multicode_json id,taxpayer_code,purchase_name,address,phone,bank_of_deposit,bank_number,email,sjh,remarks,create_time,create_user_id,modify_time,modify_user_id,ghf_qylx,xhf_nsrsbh,xhf_mc,buyer_code,invoice_name,invoice_taxno,mdm_multicode_json,status
</sql> </sql>
<!-- 查询 --> <!-- 查询 -->
<select parameterType="map" id="selectBuyerList" resultMap="BaseResultMap"> <select parameterType="map" id="selectBuyerList" resultMap="BaseResultMap">
@ -52,7 +53,8 @@
xhf_nsrsbh, xhf_nsrsbh,
xhf_mc, xhf_mc,
buyer_code, buyer_code,
create_time create_time,
status
FROM FROM
buyer_manage_info buyer_manage_info
<where> <where>
@ -80,6 +82,10 @@
<if test="map.xhfMc != null and map.xhfMc !='' "> <if test="map.xhfMc != null and map.xhfMc !='' ">
and xhf_mc = #{map.xhfMc,jdbcType=VARCHAR} and xhf_mc = #{map.xhfMc,jdbcType=VARCHAR}
</if> </if>
<!-- 客户状态-->
<if test="map.status != null and map.status !='' ">
and status = #{map.status,jdbcType=VARCHAR}
</if>
<!--购买方纳税人识别号--> <!--购买方纳税人识别号-->
<if test="map.taxpayerCode !=null and map.taxpayerCode !=''"> <if test="map.taxpayerCode !=null and map.taxpayerCode !=''">
and taxpayer_code = #{map.taxpayerCode,jdbcType=VARCHAR} and taxpayer_code = #{map.taxpayerCode,jdbcType=VARCHAR}
@ -121,7 +127,8 @@
xhf_nsrsbh, xhf_nsrsbh,
xhf_mc, xhf_mc,
buyer_code, buyer_code,
rownum as rowno rownum as rowno,
status
FROM FROM
buyer_manage_info buyer_manage_info
<where> <where>
@ -133,6 +140,10 @@
<if test="map.xhfMc != null and map.xhfMc !='' "> <if test="map.xhfMc != null and map.xhfMc !='' ">
and xhf_mc = #{map.xhfMc,jdbcType=VARCHAR} and xhf_mc = #{map.xhfMc,jdbcType=VARCHAR}
</if> </if>
<!-- 客户状态-->
<if test="map.status != null and map.status !='' ">
and status = #{map.status,jdbcType=VARCHAR}
</if>
<if test="shList != null and shList.size() == 0"> <if test="shList != null and shList.size() == 0">
and xhf_nsrsbh = '' and xhf_nsrsbh = ''
</if> </if>
@ -239,6 +250,9 @@
<if test="buyer.mdmMulticodeJson != null "> <if test="buyer.mdmMulticodeJson != null ">
mdm_multicode_json = #{buyer.mdmMulticodeJson,jdbcType=VARCHAR}, mdm_multicode_json = #{buyer.mdmMulticodeJson,jdbcType=VARCHAR},
</if> </if>
<if test="buyer.status != null ">
status = #{buyer.status,jdbcType=VARCHAR},
</if>
</set> </set>
<where> <where>
id = #{buyer.id,jdbcType=VARCHAR} id = #{buyer.id,jdbcType=VARCHAR}
@ -324,6 +338,9 @@
<if test="mdmMulticodeJson != null"> <if test="mdmMulticodeJson != null">
mdm_multicode_json, mdm_multicode_json,
</if> </if>
<if test="status != null">
status,
</if>
</trim> </trim>
@ -394,6 +411,9 @@
<if test="mdmMulticodeJson != null"> <if test="mdmMulticodeJson != null">
#{mdmMulticodeJson,jdbcType=VARCHAR}, #{mdmMulticodeJson,jdbcType=VARCHAR},
</if> </if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
</trim> </trim>
</insert> </insert>
@ -460,6 +480,9 @@
<if test="mdmMulticodeJson != null"> <if test="mdmMulticodeJson != null">
mdm_multicode_json, mdm_multicode_json,
</if> </if>
<if test="status != null">
status,
</if>
</trim> </trim>
@ -511,6 +534,8 @@
</if> </if>
<if test="mdmMulticodeJson != null"> #{mdmMulticodeJson,jdbcType=VARCHAR}, <if test="mdmMulticodeJson != null"> #{mdmMulticodeJson,jdbcType=VARCHAR},
</if> </if>
<if test="status != null"> #{status,jdbcType=VARCHAR},
</if>
</trim> </trim>
on duplicate key update on duplicate key update
<if test="id != null"> <if test="id != null">
@ -570,7 +595,10 @@
invoice_taxno = VALUES(invoice_taxno), invoice_taxno = VALUES(invoice_taxno),
</if> </if>
<if test="mdmMulticodeJson != null"> <if test="mdmMulticodeJson != null">
mdm_multicode_json = VALUES(mdm_multicode_json) mdm_multicode_json = VALUES(mdm_multicode_json),
</if>
<if test="status != null">
status = VALUES(status)
</if> </if>
</insert> </insert>
<insert id="insertBuyerByList"> <insert id="insertBuyerByList">
@ -595,7 +623,8 @@
buyer_code, buyer_code,
invoice_name, invoice_name,
invoice_taxno, invoice_taxno,
mdm_multicode_json mdm_multicode_json,
status
) )
values values
<foreach collection="list" item="item" index="index" <foreach collection="list" item="item" index="index"
@ -621,7 +650,8 @@
#{item.buyerCode,jdbcType=VARCHAR}, #{item.buyerCode,jdbcType=VARCHAR},
#{item.invoiceName,jdbcType=VARCHAR}, #{item.invoiceName,jdbcType=VARCHAR},
#{item.invoiceTaxno,jdbcType=VARCHAR}, #{item.invoiceTaxno,jdbcType=VARCHAR},
#{item.mdmMulticodeJson,jdbcType=VARCHAR} #{item.mdmMulticodeJson,jdbcType=VARCHAR},
#{item.status,jdbcType=VARCHAR}
) )
</foreach> </foreach>
</insert> </insert>
@ -660,6 +690,9 @@
<if test="map.id!=null and map.id!=''"> <if test="map.id!=null and map.id!=''">
AND id !=#{map.id,jdbcType=VARCHAR} AND id !=#{map.id,jdbcType=VARCHAR}
</if> </if>
<if test="map.status!=null and map.status!=''">
AND status =#{map.status,jdbcType=VARCHAR}
</if>
</where> </where>
</select> </select>
@ -687,7 +720,8 @@
to_char(modify_time,'yyyy-MM-dd') as modifyTime, to_char(modify_time,'yyyy-MM-dd') as modifyTime,
</if> </if>
modify_user_id, modify_user_id,
ghf_qylx ghf_qylx,
status
FROM FROM
buyer_manage_info buyer_manage_info
<where> <where>
@ -725,6 +759,9 @@
and rownum &lt;=10 and rownum &lt;=10
</if> </if>
</if> </if>
<if test="status != null and status != ''">
and status = #{status,jdbcType=VARCHAR}
</if>
</where> </where>
</select> </select>
@ -751,7 +788,8 @@
to_char(modify_time,'yyyy-MM-dd') as modifyTime, to_char(modify_time,'yyyy-MM-dd') as modifyTime,
</if> </if>
modify_user_id, modify_user_id,
ghf_qylx ghf_qylx,
status
FROM FROM
buyer_manage_info buyer_manage_info
<where> <where>
@ -764,6 +802,9 @@
<if test="nsrsbh != null and nsrsbh != ''"> <if test="nsrsbh != null and nsrsbh != ''">
and xhf_nsrsbh = #{nsrsbh,jdbcType=VARCHAR} and xhf_nsrsbh = #{nsrsbh,jdbcType=VARCHAR}
</if> </if>
<if test="status != null and status != ''">
and status = #{status,jdbcType=VARCHAR}
</if>
</where> </where>
</select> </select>
@ -816,7 +857,8 @@
ghf_qylx, ghf_qylx,
xhf_nsrsbh, xhf_nsrsbh,
xhf_mc, xhf_mc,
buyer_code buyer_code,
status
FROM FROM
buyer_manage_info buyer_manage_info
<where> <where>
@ -848,6 +890,9 @@
<if test="buyer.id != null and buyer.id != ''"> <if test="buyer.id != null and buyer.id != ''">
and id = #{buyer.id,jdbcType=VARCHAR} and id = #{buyer.id,jdbcType=VARCHAR}
</if> </if>
<if test="buyer.status != null and buyer.status != ''">
and status = #{buyer.status,jdbcType=VARCHAR}
</if>
</where> </where>
</select> </select>
</mapper> </mapper>

Loading…
Cancel
Save