浏览代码

长沙湘雅医院特殊登录页面

chengyao 3 年之前
父节点
当前提交
bc44fda793

+ 1 - 0
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -38,6 +38,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .authorizeRequests()
                 .regexMatchers(".*swagger.*", ".*v2.*", ".*webjars.*", "/druid.*", "/actuator.*", "/hystrix.*").permitAll()
                 .antMatchers("/sys/user/getJwt").permitAll()
+                .antMatchers("/sys/user/getHospitalMark").permitAll()
                 .antMatchers("/sys/user/getJwtNoPass").permitAll()
                 .antMatchers("/sys/user/refreshJwt").permitAll()
                 .antMatchers("/sys/user/checkToken").permitAll()

+ 1 - 0
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -81,6 +81,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/actuator/**", request)
                 || matchers("/hystrix/**", request)
                 || matchers("/sys/user/getJwt", request)
+                || matchers("/sys/user/getHospitalMark", request)
                 || matchers("/sys/user/getJwtNoPass", request)
                 || matchers("/sys/user/refreshJwt", request)
                 || matchers("/sys/dictionaryInfo/getDictionary", request)

+ 22 - 1
src/main/java/com/diagbot/facade/SysUserFacade.java

@@ -8,6 +8,7 @@ import com.diagbot.dto.*;
 import com.diagbot.entity.BasHospitalInfo;
 import com.diagbot.entity.JWT;
 import com.diagbot.entity.JwtStore;
+import com.diagbot.entity.SysDictionaryInfo;
 import com.diagbot.entity.SysUser;
 import com.diagbot.entity.SysUserDept;
 import com.diagbot.entity.SysUserHospital;
@@ -85,9 +86,29 @@ public class SysUserFacade extends SysUserServiceImpl {
     @Autowired
     private SysDictionaryFacade sysDictionaryFacade;
 
+
+
+
+    /**
+     * 获取标识--选择登录页面
+     * @return java.lang.Long
+     */
+    public Long getHospitalMark() {
+        long mark = 0L;//0-默认通用医院 1-湘雅医院特殊登录页面
+        SysDictionaryInfo sysDictionaryInfo = sysDictionaryFacade.lambdaQuery()
+                .eq(SysDictionaryInfo::getGroupType, 31)
+                .eq(SysDictionaryInfo::getIsDeleted, IsDeleteEnum.N.getKey())
+                .eq(SysDictionaryInfo::getName, "长沙湘雅三院").one();
+        if(null != sysDictionaryInfo){
+            String val = sysDictionaryInfo.getVal();
+            if(StringUtil.isNotBlank(val)){
+               mark =  Long.valueOf(val);
+            }
+        }
+        return mark;
+    }
     /**
      * 获取jwt
-     *
      * @param username 用户名
      * @param password 密码
      * @return jwt

+ 7 - 0
src/main/java/com/diagbot/web/SysUserController.java

@@ -69,6 +69,13 @@ public class SysUserController {
         return RespDTO.onSuc(data);
     }
 
+    @ApiOperation(value = "获取标识--选择登录页面[by:cy]")
+    @PostMapping("/getHospitalMark")
+    @SysLogger("getHospitalMark")
+    public RespDTO<Long> getHospitalMark() {
+        Long mark = userFacade.getHospitalMark();
+        return RespDTO.onSuc(mark);
+    }
     @ApiOperation(value = "登录获取jwt[by:gaodm]",
             notes = "username:用户名,必填<br>")
     @PostMapping("/getJwtNoPass")