Commit 92c3307b by 林永健

refactor(security): 优化存量门店权限过滤逻辑

- 新增门店号列表参数支持,完善品牌省份筛选功能
- MerchantMapper.xml中增加对门店号列表的SQL过滤支持
- 统一使用getMerchantIds方法替代旧权限接口,提升权限控制一致性
- 重构权限过滤逻辑,覆盖多种用户角色权限与业务场景
- 添加门店类型与经营品类权限过滤,增强权限精细化管理
- 修正权限过滤中无权限数据的判断逻辑,避免误判
- 优化省份ID解析和区域权限逻辑,处理空值和格式问题
- ServiceMerchantMapper.xml更新,增加销售人员信息查询支持
- 代码中日志改进,便于权限范围排查和调试
- CommonUtil新增isNoPermissionAndNoEmpty辅助函数,提升代码复用性
1 parent f3b42eff
......@@ -19,6 +19,8 @@ public class CarBrandProvinceRequestDTO implements Serializable {
private List<Integer> firstBrandIdList;
@ApiModelProperty(notes = "省份")
private List<Integer> provinceIds;
@ApiModelProperty(notes = "门店号列表")
private List<Integer> merchantNoList;
@ApiModelProperty(notes = "门店名称")
private String merchantName;
......
......@@ -1239,6 +1239,12 @@
<if test="merchantName != null and merchantName != '' ">
AND pm.merchant_name LIKE CONCAT('%',#{merchantName},'%')
</if>
<if test="merchantNoList != null and merchantNoList.size() > 0">
AND pm.merchantNo IN
<foreach collection="merchantNoList" item="item" separator="," index="index" open="(" close=")">
#{item}
</foreach>
</if>
AND pmb.del_flag = 0
ORDER BY pm.id;
</select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!