| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Qualifier; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.view.RedirectView; |
| | |
| | | @Autowired |
| | | @Qualifier("sysUserDeptSystemMapper") |
| | | private SysUserDeptMapper sysUserDeptMapper; |
| | | |
| | | @Value("${spring.profiles.active}") |
| | | private String active; |
| | | |
| | | // @Value("${wx_appid}") |
| | | // private String wxAppid; |
| | |
| | | // @IpWhitelist |
| | | @GetMapping("/SSOLogin") |
| | | public RedirectView SSOLogin(@RequestParam(required = false) String campusid, @RequestParam(required = false) String deptId, @RequestParam(required = false) String systype, String orgid, String userName, String token) { |
| | | log.info("SSOLogin的入参,campusid:{}, deptId:{}, systype:{}, orgid:{}, userName:{}, token:{}",campusid,deptId,systype,orgid,userName,token); |
| | | log.info("SSOLogin的入参,campusid:{}, deptId:{}, systype:{}, orgid:{}, userName:{}, token:{}", campusid, deptId, systype, orgid, userName, token); |
| | | if (StringUtils.isEmpty(userName) && StringUtils.isEmpty(token) && StringUtils.isEmpty(orgid)) { |
| | | throw new BaseException("参数不能为空"); |
| | | } |
| | | String path = null; |
| | | if (StringUtils.isEmpty(systype)) path = sysConfigService.selectConfigByKey("sys.qddz"); |
| | | else path = sysConfigService.selectConfigByKey("sys.qddz.yd"); |
| | | log.info("qddz的查询值为,path:{}",path); |
| | | |
| | | if (active.equals("nhfy")){ |
| | | //南华附一的,先不走免登,直接跳到登陆页 |
| | | path = sysConfigService.selectConfigByKey("sys.qddz.yd"); |
| | | log.info("【NHFYSSO登录】重定向地址:{}", path); |
| | | return buildRedirect(path); |
| | | } |
| | | log.info("qddz的查询值为,path:{}", path); |
| | | |
| | | if (StringUtils.isEmpty(path)) { |
| | | throw new BaseException("请配置前端地址"); |