提交 c691a3e5 作者: zhenjie

添加微信报错信息查询接口

上级 7e3d801b
......@@ -90,4 +90,11 @@ public class WxController extends BaseController {
public ResultBody getAppletQRCode(@ApiParam(value = "小程序路径", example = "pages/welcome/index") @RequestParam String page, @ApiParam(value = "参数", example = "name=123&sex=456") @RequestParam String scene) {
return wxService.getUnLimitedQRCode(page, scene);
}
@ApiOperation(value = "查询rid信息")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("rid")
public ResultBody rid(@RequestParam String rid) throws Exception {
return wxService.rid(rid);
}
}
......@@ -14,6 +14,7 @@ import javax.servlet.http.HttpServletRequest;
public interface WxService {
/**
* 小程序登录调用接口
*
* @param wxLoginVO
* @return
*/
......@@ -21,6 +22,7 @@ public interface WxService {
/**
* pc扫码登录
*
* @param wxLoginVO
* @return
*/
......@@ -28,36 +30,42 @@ public interface WxService {
/**
* 获取AccessToken
*
* @return
*/
String getAccessToken();
/**
* 获取稳定AccessToken
*
* @return
*/
String getStableAccessToken() throws Exception;
/**
* 获取公众号AccessToken
*
* @return
*/
String getSubAccessToken();
/**
* 监控微信公众号的事件变化通知
*
* @param request
*/
String receiveSubAccountEvents(HttpServletRequest request);
/**
* 公众号推送模板消息-不需要用户同意
*
* @return
*/
ResultBody sendSubTemplateMsg(WxMsgVO ws);
/**
* 获取不限制的小程序码
*
* @param path
* @param scene
*/
......@@ -65,12 +73,14 @@ public interface WxService {
/**
* 小程序推送订阅号消息-需用户同意订阅
*
* @param appletMsgVO
*/
ResultBody sendAppletMsg(AppletMsgVO appletMsgVO);
/**
* 生成小程序链接
*
* @param path
* @param query
* @return
......@@ -85,4 +95,6 @@ public interface WxService {
* @return
*/
String getUserPhoneNumber(Integer id, String code);
ResultBody rid(String rid) throws Exception;
}
......@@ -310,4 +310,13 @@ public class WxServiceImpl implements WxService {
}
return null;
}
@Override
public ResultBody rid(String rid) throws Exception {
JSONObject param = new JSONObject();
param.put("rid", rid);
String url = "https://api.weixin.qq.com/cgi-bin/openapi/rid/get?access_token=" + this.getSubAccessToken();
String res = HttpHelper.httpPost(url, param.toString());
return ResultBody.success(res);
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论