|
@@ -264,7 +264,7 @@ public class AuthorizationController {
|
|
|
* 网页微信授权登录
|
|
* 网页微信授权登录
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("/wx/authLogin")
|
|
@GetMapping("/wx/authLogin")
|
|
|
- public Result<String> wxAuthorize(Long sharedId, Integer dsType, Long popularizeId, String dsCode, String type, String callbackType, String callback, String returnUrl) throws Exception {
|
|
|
|
|
|
|
+ public Result<String> wxAuthorize(Long sharedId, Integer dsType, Long popularizeId, String dsCode, String type, String callbackType, String callback, String returnUrl, String customId, Integer cmt) throws Exception {
|
|
|
Long mappingId = SEQUENCE.nextId();
|
|
Long mappingId = SEQUENCE.nextId();
|
|
|
String loginUrl = Optional.ofNullable(returnUrl).orElse(wxOpenPlatYHLXLoginConfig.getLoginUrl());
|
|
String loginUrl = Optional.ofNullable(returnUrl).orElse(wxOpenPlatYHLXLoginConfig.getLoginUrl());
|
|
|
if (StrUtil.isNotBlank(type)) {
|
|
if (StrUtil.isNotBlank(type)) {
|
|
@@ -276,7 +276,9 @@ public class AuthorizationController {
|
|
|
}
|
|
}
|
|
|
AuthRedirect redirect = new AuthRedirect().setMappingId(mappingId).setSharedId(sharedId).setDsType(dsType).setPid(popularizeId).setDsCode(dsCode)
|
|
AuthRedirect redirect = new AuthRedirect().setMappingId(mappingId).setSharedId(sharedId).setDsType(dsType).setPid(popularizeId).setDsCode(dsCode)
|
|
|
.setCk(callback)
|
|
.setCk(callback)
|
|
|
- .setCt(callbackType);
|
|
|
|
|
|
|
+ .setCt(callbackType)
|
|
|
|
|
+ .setCd(customId)
|
|
|
|
|
+ .setCmt(cmt);
|
|
|
String state = Codec.DoBase64.custom().setData(Jsons.toJson(redirect)).encodeAsText();
|
|
String state = Codec.DoBase64.custom().setData(Jsons.toJson(redirect)).encodeAsText();
|
|
|
String wxAuthUrl = authorizationService.createWxAuthLoginUrl(state, wxOpenPlatYHLXLoginConfig.getAppId(), wxOpenPlatYHLXLoginConfig.getRedirectUri());
|
|
String wxAuthUrl = authorizationService.createWxAuthLoginUrl(state, wxOpenPlatYHLXLoginConfig.getAppId(), wxOpenPlatYHLXLoginConfig.getRedirectUri());
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(wxAuthUrl);
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(wxAuthUrl);
|