| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.web.service.SysLoginService; |
| | | import com.ruoyi.framework.web.service.SysPermissionService; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.ruoyi.system.service.ISysDeptService; |
| | | import com.ruoyi.system.service.ISysMenuService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.view.RedirectView; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.io.IOException; |
| | | import java.net.URI; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private SysPermissionService permissionService; |
| | | |
| | | @Autowired |
| | | private ISysConfigService sysConfigService; |
| | | |
| | | |
| | | @Value("${pri_key}") |
| | |
| | | if (StringUtils.isEmpty(token)) { |
| | | throw new BaseException("登陆失败"); |
| | | } |
| | | redirectView.setUrl("http://127.0.0.1:8091/loginSSO?token=" + token + "&orgid=" + orgid + "&orgname=''" + "&ZuHuID=''&deptCode=''&redirect=''"); |
| | | String path = sysConfigService.selectConfigByKey("sys.qddz"); |
| | | if(StringUtils.isEmpty(path)){ |
| | | throw new BaseException("请配置前端地址"); |
| | | } |
| | | log.info("单点登陆重定向地址为:{}",path + "/loginSSO?token=" + token + "&orgid=" + orgid + "&orgname=''" + "&ZuHuID=''&deptCode=''"); |
| | | redirectView.setUrl(path + "/loginSSO?token=" + token + "&orgid=" + orgid + "&orgname=null" + "&ZuHuID=null&deptCode=null"); |
| | | redirectView.setStatusCode(HttpStatus.MOVED_PERMANENTLY); |
| | | return redirectView; |
| | | } |