|
|
|
@@ -5,6 +5,7 @@ import com.iformall.enums.EnumWxAuthorizationStatus; |
|
|
|
import com.iformall.service.WxAuthorizerInfoService; |
|
|
|
import com.iformall.service.wechat.WxOpenService; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import me.chanjar.weixin.common.error.WxErrorException; |
|
|
|
import me.chanjar.weixin.open.bean.result.WxOpenAuthorizerInfoResult; |
|
|
|
import me.chanjar.weixin.open.bean.result.WxOpenQueryAuthResult; |
|
|
|
@@ -32,6 +33,7 @@ public class WechatAuthController { |
|
|
|
@Autowired |
|
|
|
private WxAuthorizerInfoService authorizerInfoService; |
|
|
|
|
|
|
|
@ApiOperation(value = "获取授权跳转页", notes = "") |
|
|
|
@GetMapping("/goto_auth_url_show") |
|
|
|
@ResponseBody |
|
|
|
public String gotoPreAuthUrlShow() { |
|
|
|
@@ -42,6 +44,7 @@ public class WechatAuthController { |
|
|
|
"</html>"; |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation(value = "授权跳转页", notes = "") |
|
|
|
@GetMapping("/goto_auth_url") |
|
|
|
public void gotoPreAuthUrl(HttpServletRequest request, HttpServletResponse response) { |
|
|
|
String host = request.getHeader("host"); |
|
|
|
@@ -55,6 +58,7 @@ public class WechatAuthController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation(value = "授权", notes = "") |
|
|
|
@GetMapping("/jump") |
|
|
|
@ResponseBody |
|
|
|
public WxOpenQueryAuthResult jump(@RequestParam("auth_code") String authorizationCode) { |
|
|
|
@@ -80,6 +84,7 @@ public class WechatAuthController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation(value = "手机跳转链接url", notes = "") |
|
|
|
@GetMapping("/getMobilePreAuthUrl") |
|
|
|
@ResponseBody |
|
|
|
public String getMobilePreAuthUrl(HttpServletRequest request, HttpServletResponse response) { |
|
|
|
|