加销售数据权限控制
This commit is contained in:
@@ -54,6 +54,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
c.product_ids, c.remark,
|
||||
c.create_by, c.create_time, c.update_by, c.update_time, c.del_flag
|
||||
from bms_customer c
|
||||
<!-- 数据权限:销售(仅本人 c.sales_user_id)/销售经理(本部门 su.dept_id);
|
||||
历史迁移数据 sales_user_id 为非数字工号,+0 后不匹配任何 sys_user,仅管理员可见 -->
|
||||
left join sys_user su on su.user_id = c.sales_user_id + 0
|
||||
</sql>
|
||||
|
||||
<select id="selectBmsCustomerList" parameterType="BmsCustomer" resultMap="BmsCustomerResult">
|
||||
@@ -80,6 +83,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="throwRatio != null "> and c.throw_ratio = #{throwRatio}</if>
|
||||
<if test="creditEd != null "> and c.credit_ed = #{creditEd}</if>
|
||||
<if test="productIds != null and productIds != ''"> and c.product_ids = #{productIds}</if>
|
||||
<!-- 数据权限过滤(@DataScope 生成:仅本人= c.sales_user_id=当前用户;本部门= su.dept_id=当前用户部门) -->
|
||||
${params.dataScope}
|
||||
</where>
|
||||
order by c.customer_id desc
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user