mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-12-17 17:41:32 +08:00
issue #28
This commit is contained in:
@@ -318,6 +318,17 @@ public interface WxMpService {
|
|||||||
*/
|
*/
|
||||||
public void templateSend(WxMpTemplateMessage templateMessage) throws WxErrorException;
|
public void templateSend(WxMpTemplateMessage templateMessage) throws WxErrorException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* 语义查询接口
|
||||||
|
* 详情请见:http://mp.weixin.qq.com/wiki/index.php?title=语义理解
|
||||||
|
* </pre>
|
||||||
|
* @param semanticQuery
|
||||||
|
* @return
|
||||||
|
* @throws WxErrorException
|
||||||
|
*/
|
||||||
|
WxMpSemanticQueryResult semanticQuery(WxMpSemanticQuery semanticQuery) throws WxErrorException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当本Service没有实现某个API的时候,可以用这个,针对所有微信API中的GET请求
|
* 当本Service没有实现某个API的时候,可以用这个,针对所有微信API中的GET请求
|
||||||
* @param url
|
* @param url
|
||||||
|
|||||||
@@ -293,6 +293,12 @@ public class WxMpServiceImpl implements WxMpService {
|
|||||||
execute(new SimplePostRequestExecutor(), url, templateMessage.toJson());
|
execute(new SimplePostRequestExecutor(), url, templateMessage.toJson());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public WxMpSemanticQueryResult semanticQuery(WxMpSemanticQuery semanticQuery) throws WxErrorException {
|
||||||
|
String url = "https://api.weixin.qq.com/semantic/semproxy/search";
|
||||||
|
String responseContent = execute(new SimplePostRequestExecutor(), url, semanticQuery.toJson());
|
||||||
|
return WxMpSemanticQueryResult.fromJson(responseContent);
|
||||||
|
}
|
||||||
|
|
||||||
public String get(String url, String queryParam) throws WxErrorException {
|
public String get(String url, String queryParam) throws WxErrorException {
|
||||||
return execute(new SimpleGetRequestExecutor(), url, queryParam);
|
return execute(new SimpleGetRequestExecutor(), url, queryParam);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user