单点登陆修改

dongdingding
dongdingding 11 months ago
parent a76dafe03f
commit a57254ac8b

@ -5,6 +5,7 @@ import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.jjh.declaration.single.dto.response.ChiefResponse; import com.ruoyi.jjh.declaration.single.dto.response.ChiefResponse;
import com.ruoyi.jjh.declaration.single.service.SingleLoginService; import com.ruoyi.jjh.declaration.single.service.SingleLoginService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -20,6 +21,7 @@ import javax.annotation.Resource;
/** /**
* *
*
* @author du * @author du
* @since 2024/6/4 9:53 * @since 2024/6/4 9:53
*/ */
@ -58,14 +60,13 @@ public class ChiefController {
JSONObject jsonObj = JSONUtil.parseObj(responseBody); JSONObject jsonObj = JSONUtil.parseObj(responseBody);
JSONObject dataObj = jsonObj.getJSONObject("data"); JSONObject dataObj = jsonObj.getJSONObject("data");
ChiefResponse req = JSONUtil.toBean(dataObj, ChiefResponse.class); ChiefResponse req = JSONUtil.toBean(dataObj, ChiefResponse.class);
// req.setToken(singleLoginService.singleLogin("1","2",null,"02"));
//判断几个政务端用户 //判断几个政务端用户
return AjaxResult.success(req); return AjaxResult.success(req);
} }
} else { } else {
//跳转到登录页面 throw new ServiceException("登陆失败");
} }
return null; throw new ServiceException("登陆失败");
} }
} }

Loading…
Cancel
Save