From babe184885880da106767b329d0ea509568eaff4 Mon Sep 17 00:00:00 2001 From: fanzongzhe <285169773@qq.com> Date: Mon, 5 Aug 2024 09:00:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AE=A2=E6=88=B7=E5=95=86?= =?UTF-8?q?=E4=BA=AB=E5=AE=A2=E6=88=B7=E7=AE=A1=E7=90=86=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/func/crmcustomer/CrmCustomerTempQuery.java | 12 ++++++++++-- .../func/crmcustomer/CrmCustomerTempService.java | 14 +++++++++----- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/oms/src/main/java/com/yxt/oms/biz/func/crmcustomer/CrmCustomerTempQuery.java b/oms/src/main/java/com/yxt/oms/biz/func/crmcustomer/CrmCustomerTempQuery.java index 05e176f..4ca39f5 100644 --- a/oms/src/main/java/com/yxt/oms/biz/func/crmcustomer/CrmCustomerTempQuery.java +++ b/oms/src/main/java/com/yxt/oms/biz/func/crmcustomer/CrmCustomerTempQuery.java @@ -49,8 +49,7 @@ public class CrmCustomerTempQuery implements Query { @ApiModelProperty("业务员sid") private String staffSid; - @ApiModelProperty("用户sid") - private String userSid; + @ApiModelProperty("客户sid") private List customerSidList; @@ -65,4 +64,13 @@ public class CrmCustomerTempQuery implements Query { private String staffName; private String useOrgSid; + + private String orgLevelKey;//权限等级 + @ApiModelProperty("菜单路由") + private String menuUrl; + @ApiModelProperty("组织全路径sid") + private String orgPath; + @ApiModelProperty("用户sid") + private String userSid; + private int index; } diff --git a/oms/src/main/java/com/yxt/oms/biz/func/crmcustomer/CrmCustomerTempService.java b/oms/src/main/java/com/yxt/oms/biz/func/crmcustomer/CrmCustomerTempService.java index 0460921..515f5bf 100644 --- a/oms/src/main/java/com/yxt/oms/biz/func/crmcustomer/CrmCustomerTempService.java +++ b/oms/src/main/java/com/yxt/oms/biz/func/crmcustomer/CrmCustomerTempService.java @@ -7,6 +7,8 @@ import com.yxt.common.base.utils.HttpStatusEnum; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; +import com.yxt.oms.biz.func.commonmethod.CommonMethod; +import com.yxt.oms.biz.func.commonmethod.DataRule; import com.yxt.oms.biz.func.crmfile.CommonAppendixSelectQuery; import com.yxt.oms.biz.func.crmfile.CommonAppendixVo; import com.yxt.oms.biz.func.crmfile.CommonAttachTypeEnum; @@ -68,12 +70,14 @@ public class CrmCustomerTempService { private DictCommonFeign dictCommonFeign; @Resource private SysOrganizationFeign sysOrganizationFeign; - + @Autowired + private CommonMethod commonMethod; public ResultBean> listPageVo(PagerQuery pq) { - if (StringUtils.isNotBlank(pq.getParams().getUserSid())) { - String staffSid = sysUserFeign.selectBySid(pq.getParams().getUserSid()).getData().getStaffSid(); - pq.getParams().setStaffSid(staffSid); - } + //通用组装方法 根据用户sid、菜单、组织全路径sid 获取组装参数 + CrmCustomerTempQuery query = pq.getParams(); + DataRule dataRule=commonMethod.dataRule(query.getOrgPath(),query.getMenuUrl(),query.getUserSid()).getData(); + pq.getParams().setOrgLevelKey(dataRule.getDataRuleId()); + pq.getParams().setIndex(dataRule.getIndex()); return crmCustomerTempFeign.listPage(pq); }