From 0f3ab149b59ba92aa90b2f206f5002385b46a730 Mon Sep 17 00:00:00 2001 From: erzhongxmu Date: Sat, 24 Oct 2020 12:44:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E8=B4=A6=E5=8D=95=EF=BC=8C?= =?UTF-8?q?=E7=89=A9=E6=96=99=E9=99=90=E5=88=B6=E5=AE=A2=E6=88=B7=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E5=8F=AA=E8=83=BD=E6=9F=A5=E7=9C=8B=E6=9C=AC=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/zzjee/wmutil/wmUtil.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/zzjee/wmutil/wmUtil.java b/src/main/java/com/zzjee/wmutil/wmUtil.java index d2b357c9..34e7bc35 100644 --- a/src/main/java/com/zzjee/wmutil/wmUtil.java +++ b/src/main/java/com/zzjee/wmutil/wmUtil.java @@ -288,6 +288,14 @@ public class wmUtil { public static String getCusCode(){ SystemService systemService =ApplicationContextUtil.getContext().getBean(SystemService.class); String cusCode = ""; + String cusrole = ""; + try{ + cusrole = ResourceUtil.getConfigByName("cus.role"); + + }catch (Exception e){ + cusrole = "CUS"; + + } try{ TSUser user = ResourceUtil.getSessionUserName(); String roles = ""; @@ -300,7 +308,7 @@ public class wmUtil { if (roles.length() > 0) { roles = roles.substring(0, roles.length() - 1); } - if(roles.equals("CUS")){ + if(roles.equals(cusrole)){ cusCode = user.getUserName(); }