修复checkstyle检查出来的部分代码问题

This commit is contained in:
Binary Wang
2017-11-07 15:29:10 +08:00
parent 97d6f90ac4
commit 67abc9216f
21 changed files with 217 additions and 138 deletions

View File

@@ -11,7 +11,7 @@ import java.util.ArrayList;
import java.util.List;
/**
* 菜单(公众号和企业号共用的)
* 菜单(公众号和企业号共用的).
*
* @author Daniel Qian
*/
@@ -36,7 +36,8 @@ public class WxMenu implements Serializable {
* 相比 http://mp.weixin.qq.com/wiki/13/43de8269be54a0a6f64413e4dfa94f39.html 的格式外层多套了一个menu
*/
public static WxMenu fromJson(InputStream is) {
return WxGsonBuilder.create().fromJson(new InputStreamReader(is, StandardCharsets.UTF_8), WxMenu.class);
return WxGsonBuilder.create()
.fromJson(new InputStreamReader(is, StandardCharsets.UTF_8), WxMenu.class);
}
public List<WxMenuButton> getButtons() {

View File

@@ -12,7 +12,7 @@ public class WxMenuButton implements Serializable {
/**
* <pre>
* 菜单的响应动作类型
* 菜单的响应动作类型.
* view表示网页类型
* click表示点击类型
* miniprogram表示小程序类型
@@ -21,13 +21,13 @@ public class WxMenuButton implements Serializable {
private String type;
/**
* 菜单标题不超过16个字节子菜单不超过60个字节
* 菜单标题不超过16个字节子菜单不超过60个字节.
*/
private String name;
/**
* <pre>
* 菜单KEY值用于消息接口推送不超过128字节
* 菜单KEY值用于消息接口推送不超过128字节.
* click等点击类型必须
* </pre>
*/
@@ -35,7 +35,8 @@ public class WxMenuButton implements Serializable {
/**
* <pre>
* 网页链接用户点击菜单可打开链接不超过1024字节。type为miniprogram时不支持小程序的老版本客户端将打开本url。
* 网页链接.
* 用户点击菜单可打开链接不超过1024字节。type为miniprogram时不支持小程序的老版本客户端将打开本url。
* view、miniprogram类型必须
* </pre>
*/
@@ -43,7 +44,7 @@ public class WxMenuButton implements Serializable {
/**
* <pre>
* 调用新增永久素材接口返回的合法media_id
* 调用新增永久素材接口返回的合法media_id.
* media_id类型和view_limited类型必须
* </pre>
*/
@@ -52,7 +53,7 @@ public class WxMenuButton implements Serializable {
/**
* <pre>
* 小程序的appid
* 小程序的appid.
* miniprogram类型必须
* </pre>
*/
@@ -61,7 +62,7 @@ public class WxMenuButton implements Serializable {
/**
* <pre>
* 小程序的页面路径
* 小程序的页面路径.
* miniprogram类型必须
* </pre>
*/

View File

@@ -9,7 +9,7 @@ public class WxMenuRule implements Serializable {
private static final long serialVersionUID = -4587181819499286670L;
/**
* 变态的微信接口,反序列化时这里反人类的使用和序列化时不一样的名字
* 变态的微信接口,反序列化时这里反人类的使用和序列化时不一样的名字.
*/
@SerializedName(value = "tag_id", alternate = "group_id")
private String tagId;

View File

@@ -5,7 +5,7 @@ import me.chanjar.weixin.common.util.json.WxGsonBuilder;
import java.io.Serializable;
/**
* 微信错误码说明,请阅读: <a href="http://mp.weixin.qq.com/wiki/10/6380dc743053a91c544ffd2b7c959166.html">全局返回码说明</a>
* 微信错误码说明,请阅读: <a href="http://mp.weixin.qq.com/wiki/10/6380dc743053a91c544ffd2b7c959166.html">全局返回码说明</a>.
*
* @author Daniel Qian
*/
@@ -73,6 +73,9 @@ public class WxError implements Serializable {
return this;
}
/**
* 构造器方法.
*/
public WxError build() {
WxError wxError = new WxError();
wxError.setErrorCode(this.errorCode);