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