From 3e28e14b490ff59c6dd4ad117f7eac2d597e4792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Tue, 6 Jun 2023 00:29:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B9=B3=E5=8F=B0=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E7=9B=B8=E5=85=B3=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../platformConfig/PlatformConfigService.java | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/platformConfig/PlatformConfigService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/platformConfig/PlatformConfigService.java index aa6f2091..54b72b9e 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/platformConfig/PlatformConfigService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/platformConfig/PlatformConfigService.java @@ -34,7 +34,9 @@ public class PlatformConfigService { public PlatformConfig getPlatformConfig(long id)throws Exception { PlatformConfig result=null; try{ - result=platformConfigMapper.selectByPrimaryKey(id); + if(BusinessConstants.DEFAULT_MANAGER.equals(userService.getCurrentUser().getLoginName())) { + result = platformConfigMapper.selectByPrimaryKey(id); + } }catch(Exception e){ JshException.readFail(logger, e); } @@ -46,7 +48,9 @@ public class PlatformConfigService { example.createCriteria(); List list=null; try{ - list=platformConfigMapper.selectByExample(example); + if(BusinessConstants.DEFAULT_MANAGER.equals(userService.getCurrentUser().getLoginName())) { + list = platformConfigMapper.selectByExample(example); + } }catch(Exception e){ JshException.readFail(logger, e); } @@ -153,11 +157,15 @@ public class PlatformConfigService { public PlatformConfig getPlatformConfigByKey(String platformKey)throws Exception { PlatformConfig platformConfig = new PlatformConfig(); try{ - PlatformConfigExample example = new PlatformConfigExample(); - example.createCriteria().andPlatformKeyEqualTo(platformKey); - List list=platformConfigMapper.selectByExample(example); - if(list!=null && list.size()>0){ - platformConfig = list.get(0); + if(platformKey.contains("aliOss") || platformKey.contains("weixin")) { + platformConfig = null; + } else { + PlatformConfigExample example = new PlatformConfigExample(); + example.createCriteria().andPlatformKeyEqualTo(platformKey); + List list=platformConfigMapper.selectByExample(example); + if(list!=null && list.size()>0){ + platformConfig = list.get(0); + } } }catch(Exception e){ JshException.readFail(logger, e);