update md
This commit is contained in:
parent
282699d95c
commit
fa9c6ccd0a
@ -28,6 +28,8 @@ import com.foxinmy.weixin4j.mp.model.Group;
|
|||||||
import com.foxinmy.weixin4j.mp.model.MpArticle;
|
import com.foxinmy.weixin4j.mp.model.MpArticle;
|
||||||
import com.foxinmy.weixin4j.mp.model.OauthToken;
|
import com.foxinmy.weixin4j.mp.model.OauthToken;
|
||||||
import com.foxinmy.weixin4j.mp.model.QRParameter;
|
import com.foxinmy.weixin4j.mp.model.QRParameter;
|
||||||
|
import com.foxinmy.weixin4j.mp.model.SemQuery;
|
||||||
|
import com.foxinmy.weixin4j.mp.model.SemResult;
|
||||||
import com.foxinmy.weixin4j.mp.model.User;
|
import com.foxinmy.weixin4j.mp.model.User;
|
||||||
import com.foxinmy.weixin4j.mp.msg.model.Article;
|
import com.foxinmy.weixin4j.mp.msg.model.Article;
|
||||||
import com.foxinmy.weixin4j.mp.msg.model.BaseMsg;
|
import com.foxinmy.weixin4j.mp.msg.model.BaseMsg;
|
||||||
@ -925,4 +927,34 @@ public class WeixinProxy {
|
|||||||
public String getPayShorturl(String url) throws WeixinException {
|
public String getPayShorturl(String url) throws WeixinException {
|
||||||
return payApi.getShorturl(url);
|
return payApi.getShorturl(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 语义理解
|
||||||
|
*
|
||||||
|
* @param semQuery
|
||||||
|
* 语义理解协议
|
||||||
|
* @return 语义理解结果
|
||||||
|
* @see com.foxinmy.weixin4j.mp.model.SemQuery
|
||||||
|
* @see com.foxinmy.weixin4j.mp.model.SemResult
|
||||||
|
* @see <a
|
||||||
|
* href="http://mp.weixin.qq.com/wiki/index.php?title=%E8%AF%AD%E4%B9%89%E7%90%86%E8%A7%A3">语义理解</a>
|
||||||
|
* @see com.foxinmy.weixin4j.mp.api.HelperApi
|
||||||
|
* @throws WeixinException
|
||||||
|
*/
|
||||||
|
public SemResult semantic(SemQuery semQuery) throws WeixinException {
|
||||||
|
return helperApi.semantic(semQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取微信服务器IP地址
|
||||||
|
*
|
||||||
|
* @return IP地址
|
||||||
|
* @see <a
|
||||||
|
* href="http://mp.weixin.qq.com/wiki/index.php?title=%E8%8E%B7%E5%8F%96%E5%BE%AE%E4%BF%A1%E6%9C%8D%E5%8A%A1%E5%99%A8IP%E5%9C%B0%E5%9D%80">获取IP地址</a>
|
||||||
|
* @see com.foxinmy.weixin4j.mp.api.HelperApi
|
||||||
|
* @throws WeixinException
|
||||||
|
*/
|
||||||
|
public List<String> getcallbackip() throws WeixinException {
|
||||||
|
return helperApi.getcallbackip();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
# \u7f16\u7801\u6d4b\u8bd5\u4e4b\u7528 \u6b63\u5f0f\u73af\u5883\u4e0bcopy\u4e00\u4efd\u5230classpath
|
# \u6d4b\u8bd5\u4e4b\u7528 \u6b63\u5f0f\u73af\u5883\u4e0bcopy\u4e00\u4efd\u5230classpath
|
||||||
# \u516c\u4f17\u53f7\u4fe1\u606f
|
# \u516c\u4f17\u53f7\u4fe1\u606f
|
||||||
account={"appId":"wx4ab8f8de58159a57","appSecret":"1d4eb0f4bf556aaed539f30ed05ca795",\
|
account={"appId":"wx4ab8f8de58159a57","appSecret":"1d4eb0f4bf556aaed539f30ed05ca795",\
|
||||||
"token":"\u5f00\u653e\u8005\u7684token \u975e\u5fc5\u987b","openId":"\u516c\u4f17\u53f7\u7684openid \u975e\u5fc5\u987b",\
|
"token":"\u5f00\u653e\u8005\u7684token \u975e\u5fc5\u987b","openId":"\u516c\u4f17\u53f7\u7684openid \u975e\u5fc5\u987b",\
|
||||||
"encodingAesKey":"\u516c\u4f17\u53f7\u8bbe\u7f6e\u4e86\u52a0\u5bc6\u65b9\u5f0f\u4e14\u4e3a\u300c\u5b89\u5168\u6a21\u5f0f\u300d\u9700\u8981\u586b\u5165",\
|
"encodingAesKey":"\u516c\u4f17\u53f7\u8bbe\u7f6e\u4e86\u52a0\u5bc6\u65b9\u5f0f\u4e14\u4e3a\u300c\u5b89\u5168\u6a21\u5f0f\u300d\u65f6\u9700\u8981\u586b\u5165",\
|
||||||
"mchId":"V3.x\u7248\u672c\u4e0b\u7684\u5fae\u4fe1\u5546\u6237\u53f7",\
|
"mchId":"V3.x\u7248\u672c\u4e0b\u7684\u5fae\u4fe1\u5546\u6237\u53f7",\
|
||||||
"version":3,\
|
"version":3,\
|
||||||
"partnerId":"\u8d22\u4ed8\u901a\u7684\u5546\u6237\u53f7","partnerKey":"\u8d22\u4ed8\u901a\u5546\u6237\u6743\u9650\u5bc6\u94a5Key",\
|
"partnerId":"\u8d22\u4ed8\u901a\u7684\u5546\u6237\u53f7","partnerKey":"\u8d22\u4ed8\u901a\u5546\u6237\u6743\u9650\u5bc6\u94a5Key",\
|
||||||
|
|||||||
@ -41,7 +41,7 @@ weixin4j-mp-server
|
|||||||
|
|
||||||
2.mvn package,得到一个zip的压缩包,解压到启动目录(见`src/main/startup.sh/APP_HOME`)
|
2.mvn package,得到一个zip的压缩包,解压到启动目录(见`src/main/startup.sh/APP_HOME`)
|
||||||
|
|
||||||
3.启动netty服务(`com.foxinmy.weixin4j.mp.startup.WeixinServiceBootstrap`)
|
3.启动netty服务(`com.foxinmy.weixin4j.mp.startup.WeixinServerBootstrap`)
|
||||||
|
|
||||||
sh startup.sh start
|
sh startup.sh start
|
||||||
|
|
||||||
|
|||||||
@ -79,6 +79,11 @@ public class WeixinServerHandler extends
|
|||||||
BaseResponse response = action.execute(xmlContent);
|
BaseResponse response = action.execute(xmlContent);
|
||||||
log.info("\n=================message out=================\n{}",
|
log.info("\n=================message out=================\n{}",
|
||||||
response);
|
response);
|
||||||
|
if (response == null) {
|
||||||
|
HttpResponse httpResponse = HttpUtil
|
||||||
|
.createWeixinMessageResponse("");
|
||||||
|
ctx.write(httpResponse);
|
||||||
|
}
|
||||||
if (httpMessage.getEncryptType() == EncryptType.RAW) {
|
if (httpMessage.getEncryptType() == EncryptType.RAW) {
|
||||||
HttpResponse httpResponse = HttpUtil
|
HttpResponse httpResponse = HttpUtil
|
||||||
.createWeixinMessageResponse(response.toXml());
|
.createWeixinMessageResponse(response.toXml());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user