正式环境跳转某企业详细信息

master
杜函宇 5 months ago
parent 2463035346
commit a214fa6fc8

@ -103,4 +103,26 @@ public class ChiefController {
}
throw new ServiceException("登陆失败");
}
@ApiOperation("政务根据信用代码返回跳转路由")
@GetMapping("/returnUrl")
public AjaxResult returnUrl(@RequestParam("code") String code,
@RequestParam("userToken") String userToken) throws Exception {
//请求的地址
StringBuilder url = new StringBuilder("http://qyt.sipac.gov.cn/sipsg-enterprise-mobile-manage/#/loginVerify?");
//当前时间的时间戳
long timespan = System.currentTimeMillis();
UserInfoRequestDTO req = new UserInfoRequestDTO();
req.setClientId(clientId);
req.setUserToken(userToken);
String signature = Base64.encode(HMAC256Config.HmacSHA256(JSONUtil.parse(req).toString() + timespan, clientSecret));
url.append("signature=").append(signature);
url.append("&timespan=").append(timespan);
url.append("&userToken=").append(userToken);
url.append("&clientid=").append(clientId);
url.append("&gourl=")
.append(URLEncoder.encode("https://qyt.sipac.gov.cn/sipsg-enterprise-mobile-manage/#/workPlat/search/enterprise/detail?id="+code,"UTF-8"));
return AjaxResult.success(url.toString());
}
}

Loading…
Cancel
Save