-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
------------------------------------- * 日志输出改进 * 部分bean 添加成员变量 * 添加 ClearQuotaAPI * MenuAPI 添加自定义菜单重载方法 * PayMchAPI 添加刷卡支付 授权码查询OPENID接口 * emoji 表情支持
- Loading branch information
Showing
25 changed files
with
963 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package weixin.popular.api; | ||
|
||
import java.nio.charset.Charset; | ||
|
||
import org.apache.http.client.methods.HttpUriRequest; | ||
import org.apache.http.client.methods.RequestBuilder; | ||
import org.apache.http.entity.StringEntity; | ||
|
||
import weixin.popular.bean.BaseResult; | ||
import weixin.popular.client.LocalHttpClient; | ||
|
||
/** | ||
* | ||
* 接口调用频次清零API <br/> | ||
* 公众号调用接口并不是无限制的。为了防止公众号的程序错误而引发微信服务器负载异常,默认情况下,每个公众号调用接口都不能超过一定限制,当超过一定限制时,调用对应接口会收到如下错误返回码: | ||
* {"errcode":45009,"errmsg":"api freq out of limit"} | ||
* @author LiYi | ||
* @since 2.7.1 | ||
*/ | ||
public class ClearQuotaAPI extends BaseAPI{ | ||
|
||
/** | ||
* 公众号调用或第三方平台帮公众号调用对公众号的所有api调用(包括第三方帮其调用)次数进行清零 | ||
* @since 2.7.1 | ||
* @param access_token | ||
* @param appid | ||
* @return | ||
*/ | ||
public static BaseResult clear_quota(String access_token,String appid){ | ||
String json = String.format("{\"appid\":\"%s\"}", appid); | ||
HttpUriRequest httpUriRequest = RequestBuilder.post() | ||
.setHeader(jsonHeader) | ||
.setUri(BASE_URI+"/cgi-bin/clear_quota") | ||
.addParameter(getATPN(), access_token) | ||
.setEntity(new StringEntity(json,Charset.forName("utf-8"))) | ||
.build(); | ||
return LocalHttpClient.executeJsonResult(httpUriRequest,BaseResult.class); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
src/main/java/weixin/popular/bean/message/AroundBeacon.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package weixin.popular.bean.message; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
|
||
/** | ||
* | ||
* 摇一摇 周边事件数据 | ||
* | ||
* @author LiYi | ||
* | ||
*/ | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
@XmlRootElement(name="AroundBeacon") | ||
public class AroundBeacon { | ||
|
||
@XmlElement(name="Uuid") | ||
private String uuid; | ||
|
||
@XmlElement(name="Major") | ||
private String major; | ||
|
||
@XmlElement(name="Minor") | ||
private String minor; | ||
|
||
@XmlElement(name="Distance") | ||
private String distance; | ||
|
||
public String getUuid() { | ||
return uuid; | ||
} | ||
|
||
public void setUuid(String uuid) { | ||
this.uuid = uuid; | ||
} | ||
|
||
public String getMajor() { | ||
return major; | ||
} | ||
|
||
public void setMajor(String major) { | ||
this.major = major; | ||
} | ||
|
||
public String getMinor() { | ||
return minor; | ||
} | ||
|
||
public void setMinor(String minor) { | ||
this.minor = minor; | ||
} | ||
|
||
public String getDistance() { | ||
return distance; | ||
} | ||
|
||
public void setDistance(String distance) { | ||
this.distance = distance; | ||
} | ||
} |
Oops, something went wrong.