From 6bae4ddf719274362d1110a76028bcd390851c66 Mon Sep 17 00:00:00 2001 From: liyawei Date: Thu, 9 Jun 2022 17:38:07 +0800 Subject: [PATCH] =?UTF-8?q?sso=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../opensso/controller/SSOLoginController.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/opensso/controller/SSOLoginController.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/opensso/controller/SSOLoginController.java index 99f07dbab..234dfd7ef 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/opensso/controller/SSOLoginController.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/opensso/controller/SSOLoginController.java @@ -11,6 +11,8 @@ import com.jero.common.system.vo.LoginUser; import com.jero.common.util.RedisUtil; import com.jero.common.util.oConvertUtils; import com.jero.modules.base.service.BaseCommonService; +import com.jero.modules.config.entity.SysConfig; +import com.jero.modules.config.service.ISysConfigService; import com.jero.modules.system.entity.SysDepart; import com.jero.modules.system.entity.SysUser; import com.jero.modules.system.service.ISysDepartService; @@ -21,6 +23,7 @@ import com.jero.modules.system.util.StringUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.CollectionUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -57,6 +60,8 @@ public class SSOLoginController { private ISysDictService sysDictService; @Resource private BaseCommonService baseCommonService; + @Autowired + private ISysConfigService iSysConfigService; private static final String BASE_CHECK_CODES = "qwertyuiplkjhgfdsazxcvbnmQWERTYUPLKJHGFDSAZXCVBNM1234567890"; //密码登录错误的次数前缀 @@ -193,6 +198,14 @@ public class SSOLoginController { // update-end--Author:wangshuai Date:20200805 for:如果用戶为选择部门,数据库为存在上一次登录部门,则取一条存进去 obj.put("multi_depart", 2); } + //获取配置信息 + List sysConfigs = iSysConfigService.queryList(); + if(CollectionUtils.isNotEmpty(sysConfigs)){ + for (SysConfig sysConfig : sysConfigs) { + obj.put(sysConfig.getConfigName(),sysConfig.getConfig()); + } + } + obj.put("token", token); obj.put("userInfo", sysUser); obj.put("sysAllDictItems", sysDictService.queryAllDictItems());