客户批量绑定价格套餐

This commit is contained in:
wuweihua
2026-10-10 09:40:49 +08:00
parent 037d4b7cdf
commit 899589cf87
8 changed files with 358 additions and 1 deletions
@@ -29,6 +29,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="throwRatio" column="throw_ratio" />
<result property="creditEd" column="credit_ed" />
<result property="productCodes" column="product_codes" />
<result property="priceSetId" column="price_set_id" />
<result property="priceSetName" column="price_set_name" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
@@ -54,7 +56,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
c.product_codes, c.remark,
c.create_by, c.create_time, c.update_by, c.update_time, c.del_flag,
su.nick_name as sales_user_nick_name
su.nick_name as sales_user_nick_name,
cps.price_set_id, ps.price_set_name
from ctr_customer c
<!-- 老系统同步数据 sales_user_id 存员工工号(=sys_user.user_name);
BMS 手工新建数据可能存数字 user_id,两种都要能关联上。
@@ -62,6 +65,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_user su
on su.del_flag = '0'
and (su.user_name = c.sales_user_id or su.user_id = c.sales_user_id + 0)
<!-- 客户套餐绑定:uk_customer_one_set 保证一客户至多一条,不会放大行数 -->
left join prc_customer_price_set cps on cps.customer_id = c.customer_id
left join prc_price_set ps on ps.price_set_id = cps.price_set_id
</sql>
<select id="selectBmsCustomerList" parameterType="BmsCustomer" resultMap="BmsCustomerResult">