|
@@ -19,6 +19,7 @@ import com.cyksj.mapper.UserMapper;
|
|
|
import com.cyksj.mapper.manage.distribute.UserDistributeMapper;
|
|
import com.cyksj.mapper.manage.distribute.UserDistributeMapper;
|
|
|
import com.cyksj.model.dto.AuthRedirect;
|
|
import com.cyksj.model.dto.AuthRedirect;
|
|
|
import com.cyksj.model.dto.AuthToken;
|
|
import com.cyksj.model.dto.AuthToken;
|
|
|
|
|
+import com.cyksj.model.dto.CpsAuthDto;
|
|
|
import com.cyksj.model.dto.GzhOAuth2UserInfo;
|
|
import com.cyksj.model.dto.GzhOAuth2UserInfo;
|
|
|
import com.cyksj.model.entity.*;
|
|
import com.cyksj.model.entity.*;
|
|
|
import com.cyksj.model.request.LoginReq;
|
|
import com.cyksj.model.request.LoginReq;
|
|
@@ -104,7 +105,8 @@ public class CpsBackLoginController {
|
|
|
* cps后台微信授权登录
|
|
* cps后台微信授权登录
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("/wx/authLogin")
|
|
@GetMapping("/wx/authLogin")
|
|
|
- public Result<String> wxAuthorize() throws Exception {
|
|
|
|
|
|
|
+ public Result<CpsAuthDto> wxAuthorize() throws Exception {
|
|
|
|
|
+ CpsAuthDto cpsAuthDto = new CpsAuthDto();
|
|
|
String wxAuthUrl = redisService.getStr(RedisService.key.WX_LOGIN_AUTH_URI.getNameFormat(wxOpenPlatYHLXLoginConfig.getAppId()));
|
|
String wxAuthUrl = redisService.getStr(RedisService.key.WX_LOGIN_AUTH_URI.getNameFormat(wxOpenPlatYHLXLoginConfig.getAppId()));
|
|
|
Long mappingId = SEQUENCE.nextId();
|
|
Long mappingId = SEQUENCE.nextId();
|
|
|
String authState = mappingId.toString();
|
|
String authState = mappingId.toString();
|
|
@@ -114,7 +116,9 @@ public class CpsBackLoginController {
|
|
|
if (StrUtil.isEmpty(wxAuthUrl)) {
|
|
if (StrUtil.isEmpty(wxAuthUrl)) {
|
|
|
wxAuthUrl = authorizationService.createWxAuthLoginUrl(state, true);
|
|
wxAuthUrl = authorizationService.createWxAuthLoginUrl(state, true);
|
|
|
}
|
|
}
|
|
|
- return GatewayResponse.SUCCESS.newBuilder().toResult(wxAuthUrl);
|
|
|
|
|
|
|
+ cpsAuthDto.setAuthUrl(wxAuthUrl);
|
|
|
|
|
+ cpsAuthDto.setAuthState(authState);
|
|
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult(cpsAuthDto);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|