zoujiajian 3 vuotta sitten
vanhempi
sitoutus
f9d69c215f

+ 6 - 2
netflix-web/src/main/java/com/cyksj/web/controller/cps/CpsBackLoginController.java

@@ -19,6 +19,7 @@ import com.cyksj.mapper.UserMapper;
 import com.cyksj.mapper.manage.distribute.UserDistributeMapper;
 import com.cyksj.model.dto.AuthRedirect;
 import com.cyksj.model.dto.AuthToken;
+import com.cyksj.model.dto.CpsAuthDto;
 import com.cyksj.model.dto.GzhOAuth2UserInfo;
 import com.cyksj.model.entity.*;
 import com.cyksj.model.request.LoginReq;
@@ -104,7 +105,8 @@ public class CpsBackLoginController {
 	 * cps后台微信授权登录
 	 */
 	@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()));
 		Long mappingId = SEQUENCE.nextId();
 		String authState = mappingId.toString();
@@ -114,7 +116,9 @@ public class CpsBackLoginController {
 		if (StrUtil.isEmpty(wxAuthUrl)) {
 			wxAuthUrl = authorizationService.createWxAuthLoginUrl(state, true);
 		}
-		return GatewayResponse.SUCCESS.newBuilder().toResult(wxAuthUrl);
+		cpsAuthDto.setAuthUrl(wxAuthUrl);
+		cpsAuthDto.setAuthState(authState);
+		return GatewayResponse.SUCCESS.newBuilder().toResult(cpsAuthDto);
 	}
 
 	/**