引入自定义ToString工具类和方法,便于查看部分bean对象值

This commit is contained in:
Binary Wang
2016-10-27 19:40:07 +08:00
parent 4959966222
commit b84a2ec777
49 changed files with 230 additions and 361 deletions

View File

@@ -1,13 +1,10 @@
package me.chanjar.weixin.mp.api;
import me.chanjar.weixin.common.bean.WxAccessToken;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.common.util.http.ApacheHttpClientBuilder;
import javax.net.ssl.SSLContext;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.io.File;
/**
@@ -43,7 +40,7 @@ public class WxMpInMemoryConfigStorage implements WxMpConfigStorage {
* 临时文件目录
*/
protected volatile File tmpDirFile;
protected volatile SSLContext sslContext;
protected volatile ApacheHttpClientBuilder apacheHttpClientBuilder;
@@ -62,7 +59,7 @@ public class WxMpInMemoryConfigStorage implements WxMpConfigStorage {
public synchronized void updateAccessToken(WxAccessToken accessToken) {
updateAccessToken(accessToken.getAccessToken(), accessToken.getExpiresIn());
}
@Override
public synchronized void updateAccessToken(String accessToken, int expiresInSeconds) {
this.accessToken = accessToken;
@@ -229,7 +226,7 @@ public class WxMpInMemoryConfigStorage implements WxMpConfigStorage {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this,ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
@Override
@@ -263,7 +260,7 @@ public class WxMpInMemoryConfigStorage implements WxMpConfigStorage {
public SSLContext getSSLContext() {
return this.sslContext;
}
public void setSSLContext(SSLContext context) {
this.sslContext = context;
}

View File

@@ -1,6 +1,8 @@
package me.chanjar.weixin.mp.bean;
import me.chanjar.weixin.common.util.ToStringUtils;
/**
* 微信卡券
*
@@ -61,12 +63,6 @@ public class WxMpCard {
@Override
public String toString() {
return "WxMpCard{" +
"cardId='" + this.cardId + '\'' +
", beginTime=" + this.beginTime +
", endTime=" + this.endTime +
", userCardStatus='" + this.userCardStatus + '\'' +
", canConsume=" + this.canConsume +
'}';
return ToStringUtils.toSimpleString(this);
}
}

View File

@@ -1,5 +1,6 @@
package me.chanjar.weixin.mp.bean;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import java.io.Serializable;
@@ -14,7 +15,7 @@ import java.util.List;
public class WxMpMassNews implements Serializable {
/**
*
*
*/
private static final long serialVersionUID = 565937155013581016L;
private List<WxMpMassNewsArticle> articles = new ArrayList<>();
@@ -137,14 +138,12 @@ public class WxMpMassNews implements Serializable {
@Override
public String toString() {
return "WxMpMassNewsArticle [" + "thumbMediaId=" + this.thumbMediaId + ", author=" + this.author + ", title=" + this.title +
", contentSourceUrl=" + this.contentSourceUrl + ", content=" + this.content + ", digest=" + this.digest +
", showCoverPic=" + this.showCoverPic + "]";
return ToStringUtils.toSimpleString(this);
}
}
@Override
public String toString() {
return "WxMpMassNews [" + "articles=" + this.articles + "]";
return ToStringUtils.toSimpleString(this);
}
}

View File

@@ -8,9 +8,6 @@ import java.io.Serializable;
* @author miller
*/
public class WxMpMassPreviewMessage implements Serializable {
/**
*
*/
private static final long serialVersionUID = 9095211638358424020L;
private String toWxUsername;
private String msgType;

View File

@@ -1,13 +1,12 @@
package me.chanjar.weixin.mp.bean.datacube;
import java.util.List;
import com.google.gson.JsonParser;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import java.util.List;
/**
* 图文分析数据接口返回结果对象
* @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a>
@@ -26,7 +25,9 @@ public class WxDataCubeArticleResult extends WxDataCubeBaseResult {
/**
* msgid
* 请注意这里的msgid实际上是由msgid图文消息id这也就是群发接口调用后返回的msg_data_id和index消息次序索引组成 例如12003_3 其中12003是msgid即一次群发的消息的id 3为index假设该次群发的图文消息共5个文章因为可能为多图文3表示5个中的第3个
* 请注意这里的msgid实际上是由msgid图文消息id这也就是群发接口调用后返回的msg_data_id
* 和index消息次序索引组成 例如12003_3 其中12003是msgid即一次群发的消息的id 3为index
* 假设该次群发的图文消息共5个文章因为可能为多图文3表示5个中的第3个
*/
@SerializedName("msgid")
private String msgId;

View File

@@ -1,8 +1,7 @@
package me.chanjar.weixin.mp.bean.datacube;
import com.google.gson.annotations.SerializedName;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import me.chanjar.weixin.common.util.ToStringUtils;
/**
* 统计接口的共用属性类
@@ -12,7 +11,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
public class WxDataCubeBaseResult {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
/**

View File

@@ -1,17 +1,14 @@
package me.chanjar.weixin.mp.bean.datacube;
import com.google.gson.JsonParser;
import com.google.gson.reflect.TypeToken;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.google.gson.JsonParser;
import com.google.gson.reflect.TypeToken;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
/**
* <pre>
* 累计用户数据接口的返回JSON数据包
@@ -46,7 +43,7 @@ public class WxDataCubeUserCumulate implements Serializable {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
public static List<WxDataCubeUserCumulate> fromJson(String json) {

View File

@@ -1,17 +1,14 @@
package me.chanjar.weixin.mp.bean.datacube;
import com.google.gson.JsonParser;
import com.google.gson.reflect.TypeToken;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.google.gson.JsonParser;
import com.google.gson.reflect.TypeToken;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
/**
* <pre>
* 用户增减数据接口的返回JSON数据包
@@ -65,7 +62,7 @@ public class WxDataCubeUserSummary implements Serializable {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
public static List<WxDataCubeUserSummary> fromJson(String json) {

View File

@@ -1,14 +1,11 @@
package me.chanjar.weixin.mp.bean.kefu.request;
import java.io.Serializable;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.google.gson.annotations.SerializedName;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import java.io.Serializable;
public class WxMpKfSessionRequest implements Serializable {
private static final long serialVersionUID = -5451863610674856927L;
@@ -17,7 +14,7 @@ public class WxMpKfSessionRequest implements Serializable {
*/
@SerializedName("kf_account")
private String kfAccount;
/**
* openid 客户openid
*/
@@ -31,9 +28,9 @@ public class WxMpKfSessionRequest implements Serializable {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
public String toJson() {
return WxMpGsonBuilder.INSTANCE.create().toJson(this);
}

View File

@@ -1,12 +1,10 @@
package me.chanjar.weixin.mp.bean.kefu.result;
import java.io.Serializable;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import me.chanjar.weixin.common.util.ToStringUtils;
import java.io.Serializable;
/**
* 客服基本信息以及客服在线状态信息
@@ -127,7 +125,7 @@ public class WxMpKfInfo implements Serializable {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
public String getWxAccount() {

View File

@@ -1,15 +1,12 @@
package me.chanjar.weixin.mp.bean.kefu.result;
import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.google.gson.annotations.SerializedName;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import java.util.List;
/**
*
*
* @author Binary Wang
*
*/
@@ -19,7 +16,7 @@ public class WxMpKfList {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
public List<WxMpKfInfo> getKfList() {
@@ -28,8 +25,8 @@ public class WxMpKfList {
public void setKfList(List<WxMpKfInfo> kfList) {
this.kfList = kfList;
}
}
public static WxMpKfList fromJson(String json) {
return WxMpGsonBuilder.INSTANCE.create().fromJson(json, WxMpKfList.class);
}

View File

@@ -1,9 +1,8 @@
package me.chanjar.weixin.mp.bean.kefu.result;
import com.google.gson.annotations.SerializedName;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.List;
@@ -46,7 +45,7 @@ public class WxMpKfMsgList {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
public static WxMpKfMsgList fromJson(String responseContent) {

View File

@@ -1,9 +1,7 @@
package me.chanjar.weixin.mp.bean.kefu.result;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.google.gson.annotations.SerializedName;
import me.chanjar.weixin.common.util.ToStringUtils;
/**
* Created by Binary Wang on 2016/7/18.
@@ -41,8 +39,9 @@ public class WxMpKfMsgRecord {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
public String getWorker() {
return this.worker;
}

View File

@@ -1,15 +1,12 @@
package me.chanjar.weixin.mp.bean.kefu.result;
import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.google.gson.annotations.SerializedName;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import java.util.List;
/**
*
*
* @author Binary Wang
*
*/
@@ -19,9 +16,9 @@ public class WxMpKfOnlineList {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
public List<WxMpKfInfo> getKfOnlineList() {
return this.kfOnlineList;
}

View File

@@ -1,12 +1,10 @@
package me.chanjar.weixin.mp.bean.kefu.result;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.google.gson.annotations.SerializedName;
import me.chanjar.weixin.common.util.ToStringUtils;
/**
*
*
* @author Binary Wang
*
*/
@@ -39,9 +37,9 @@ public class WxMpKfSession {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
public String getKfAccount() {
return this.kfAccount;
}

View File

@@ -1,14 +1,11 @@
package me.chanjar.weixin.mp.bean.kefu.result;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.google.gson.annotations.SerializedName;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
/**
*
*
* @author Binary Wang
*
*/
@@ -27,13 +24,13 @@ public class WxMpKfSessionGetResult {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
public static WxMpKfSessionGetResult fromJson(String json) {
return WxMpGsonBuilder.INSTANCE.create().fromJson(json, WxMpKfSessionGetResult.class);
}
public String getKfAccount() {
return this.kfAccount;
}

View File

@@ -1,16 +1,13 @@
package me.chanjar.weixin.mp.bean.kefu.result;
import com.google.gson.annotations.SerializedName;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.google.gson.annotations.SerializedName;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
/**
*
*
* @author Binary Wang
*
*/
@@ -23,7 +20,7 @@ public class WxMpKfSessionList {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
public static WxMpKfSessionList fromJson(String json) {

View File

@@ -1,16 +1,13 @@
package me.chanjar.weixin.mp.bean.kefu.result;
import com.google.gson.annotations.SerializedName;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.google.gson.annotations.SerializedName;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
/**
*
*
* @author Binary Wang
*
*/
@@ -29,7 +26,7 @@ public class WxMpKfSessionWaitCaseList {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
public static WxMpKfSessionWaitCaseList fromJson(String json) {

View File

@@ -1,7 +1,6 @@
package me.chanjar.weixin.mp.bean.material;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import me.chanjar.weixin.common.util.ToStringUtils;
import java.io.Serializable;
@@ -46,7 +45,7 @@ public class WxMpMaterialCountResult implements Serializable {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
}

View File

@@ -1,7 +1,6 @@
package me.chanjar.weixin.mp.bean.material;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import me.chanjar.weixin.common.util.ToStringUtils;
import java.io.Serializable;
import java.util.Date;
@@ -39,7 +38,7 @@ public class WxMpMaterialFileBatchGetResult implements Serializable {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
public static class WxMaterialFileBatchGetNewsItem {
@@ -82,7 +81,7 @@ public class WxMpMaterialFileBatchGetResult implements Serializable {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
}
}

View File

@@ -1,8 +1,7 @@
package me.chanjar.weixin.mp.bean.material;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.io.Serializable;
import java.util.ArrayList;
@@ -157,12 +156,12 @@ public class WxMpMaterialNews implements Serializable {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
}

View File

@@ -1,7 +1,6 @@
package me.chanjar.weixin.mp.bean.material;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import me.chanjar.weixin.common.util.ToStringUtils;
import java.io.Serializable;
import java.util.Date;
@@ -40,7 +39,7 @@ public class WxMpMaterialNewsBatchGetResult implements Serializable {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
public static class WxMaterialNewsBatchGetNewsItem {
@@ -74,7 +73,7 @@ public class WxMpMaterialNewsBatchGetResult implements Serializable {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
}
}

View File

@@ -2,13 +2,12 @@ package me.chanjar.weixin.mp.bean.message;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
import me.chanjar.weixin.mp.api.WxMpConfigStorage;
import me.chanjar.weixin.mp.util.crypto.WxMpCryptUtil;
import me.chanjar.weixin.mp.util.xml.XStreamTransformer;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.io.IOException;
import java.io.InputStream;
@@ -724,7 +723,7 @@ public class WxMpXmlMessage implements Serializable {
public static class ScanCodeInfo {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
@XStreamAlias("ScanType")
@@ -764,7 +763,7 @@ public class WxMpXmlMessage implements Serializable {
public static class SendPicsInfo {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
@XStreamAlias("Count")
@@ -789,8 +788,7 @@ public class WxMpXmlMessage implements Serializable {
public static class Item {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this,
ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
@XStreamAlias("PicMd5Sum")
@@ -832,7 +830,7 @@ public class WxMpXmlMessage implements Serializable {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
public String getLocationX() {
@@ -878,6 +876,6 @@ public class WxMpXmlMessage implements Serializable {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
}

View File

@@ -1,5 +1,7 @@
package me.chanjar.weixin.mp.bean.pay;
import me.chanjar.weixin.common.util.ToStringUtils;
import java.io.Serializable;
/**
@@ -259,21 +261,7 @@ public class WxPayJsSDKCallback implements Serializable {
@Override
public String toString() {
return "WxPayJsSDKCallback [return_code=" + this.return_code + ", return_msg="
+ this.return_msg + ", appid=" + this.appid + ", mch_id=" + this.mch_id
+ ", device_info=" + this.device_info + ", nonce_str=" + this.nonce_str
+ ", sign=" + this.sign + ", result_code=" + this.result_code
+ ", err_code=" + this.err_code + ", err_code_des=" + this.err_code_des
+ ", openid=" + this.openid + ", is_subscribe=" + this.is_subscribe
+ ", trade_type=" + this.trade_type + ", bank_type=" + this.bank_type
+ ", total_fee=" + this.total_fee + ", fee_type=" + this.fee_type
+ ", cash_fee=" + this.cash_fee + ", cash_fee_type=" + this.cash_fee_type
+ ", coupon_fee=" + this.coupon_fee + ", coupon_count="
+ this.coupon_count + ", coupon_batch_id_$n=" + this.coupon_batch_id_$n
+ ", coupon_id_$n=" + this.coupon_id_$n + ", coupon_fee_$n="
+ this.coupon_fee_$n + ", transaction_id=" + this.transaction_id
+ ", out_trade_no=" + this.out_trade_no + ", attach=" + this.attach
+ ", time_end=" + this.time_end + "]";
return ToStringUtils.toSimpleString(this);
}
}

View File

@@ -1,11 +1,8 @@
package me.chanjar.weixin.mp.bean.pay.request;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import me.chanjar.weixin.common.annotation.Required;
import me.chanjar.weixin.common.util.ToStringUtils;
/**
* <pre>
@@ -71,7 +68,7 @@ public class WxEntPayQueryRequest extends WxPayBaseRequest {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
}

View File

@@ -1,9 +1,7 @@
package me.chanjar.weixin.mp.bean.pay.request;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import me.chanjar.weixin.common.util.ToStringUtils;
/**
* <pre>
@@ -278,7 +276,7 @@ public class WxEntPayRequest {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
}

View File

@@ -1,9 +1,7 @@
package me.chanjar.weixin.mp.bean.pay.request;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import me.chanjar.weixin.common.util.ToStringUtils;
/**
* <pre>
@@ -103,6 +101,6 @@ public abstract class WxPayBaseRequest {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
}

View File

@@ -1,9 +1,7 @@
package me.chanjar.weixin.mp.bean.pay.result;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import me.chanjar.weixin.common.util.ToStringUtils;
/**
* <pre>
@@ -15,7 +13,7 @@ import com.thoughtworks.xstream.annotations.XStreamAlias;
public abstract class WxPayBaseResult {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
/**

View File

@@ -1,8 +1,7 @@
package me.chanjar.weixin.mp.bean.result;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.mp.bean.WxMpCard;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.io.Serializable;
@@ -15,7 +14,7 @@ import java.io.Serializable;
public class WxMpCardResult implements Serializable {
/**
*
*
*/
private static final long serialVersionUID = -7950878428289035637L;
@@ -65,7 +64,7 @@ public class WxMpCardResult implements Serializable {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
public String getUserCardStatus() {

View File

@@ -1,18 +1,15 @@
package me.chanjar.weixin.mp.bean.result;
import java.io.Serializable;
import java.lang.reflect.Type;
import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.google.gson.reflect.TypeToken;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import java.io.Serializable;
import java.lang.reflect.Type;
import java.util.List;
/**
* 微信用户信息
* @author chanjarster
@@ -175,7 +172,7 @@ public class WxMpUser implements Serializable {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
}

View File

@@ -4,9 +4,8 @@ import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.annotations.SerializedName;
import me.chanjar.weixin.common.annotation.Required;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.math.BigDecimal;
import java.util.List;
@@ -19,7 +18,7 @@ import java.util.List;
public class WxMpStoreBaseInfo {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
public static WxMpStoreBaseInfo fromJson(String json) {

View File

@@ -1,14 +1,12 @@
package me.chanjar.weixin.mp.bean.store;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.google.gson.annotations.SerializedName;
import me.chanjar.weixin.common.util.ToStringUtils;
public class WxMpStoreInfo {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
@SerializedName("base_info")

View File

@@ -1,14 +1,11 @@
package me.chanjar.weixin.mp.bean.store;
import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.google.gson.annotations.SerializedName;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import java.util.List;
/**
* 门店列表结果类
* @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a>
@@ -18,7 +15,7 @@ import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
public class WxMpStoreListResult {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
public static WxMpStoreListResult fromJson(String json) {

View File

@@ -1,14 +1,11 @@
package me.chanjar.weixin.mp.bean.tag;
import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.google.gson.annotations.SerializedName;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import java.util.List;
/**
* 获取标签下粉丝列表的结果对象
* @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a>
@@ -26,7 +23,7 @@ public class WxTagListUser {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
/**
@@ -74,7 +71,7 @@ public class WxTagListUser {
public static class WxTagListUserData {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
/**

View File

@@ -1,15 +1,12 @@
package me.chanjar.weixin.mp.bean.tag;
import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.google.gson.JsonParser;
import com.google.gson.reflect.TypeToken;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import java.util.List;
/**
* 用户标签对象
* @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a>
@@ -73,6 +70,6 @@ public class WxUserTag {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
}

View File

@@ -1,16 +1,13 @@
package me.chanjar.weixin.mp.bean.template;
import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.google.gson.JsonParser;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import java.util.List;
/**
* <pre>
* 模板列表信息
@@ -30,9 +27,9 @@ public class WxMpTemplate {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
/**
* template_id
* 模板ID

View File

@@ -1,9 +1,8 @@
package me.chanjar.weixin.mp.bean.template;
import me.chanjar.weixin.common.util.ToStringUtils;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.io.Serializable;
@@ -48,7 +47,7 @@ public class WxMpTemplateIndustry implements Serializable {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
public String getId() {
@@ -78,7 +77,7 @@ public class WxMpTemplateIndustry implements Serializable {
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
return ToStringUtils.toSimpleString(this);
}
public static WxMpTemplateIndustry fromJson(String json) {

View File

@@ -1,7 +1,7 @@
package me.chanjar.weixin.mp.builder.outxml;
import me.chanjar.weixin.common.util.StringUtils;
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutTransferKefuMessage;
import org.apache.commons.lang3.StringUtils;
/**
* 客服消息builder

View File

@@ -2,8 +2,8 @@ package me.chanjar.weixin.mp.api;
import com.google.inject.Inject;
import me.chanjar.weixin.common.exception.WxErrorException;
import me.chanjar.weixin.common.util.StringUtils;
import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
import org.apache.commons.lang3.StringUtils;
import org.testng.Assert;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;

View File

@@ -1,17 +1,16 @@
package me.chanjar.weixin.mp.demo;
import java.io.IOException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import me.chanjar.weixin.common.util.StringUtils;
import me.chanjar.weixin.mp.api.WxMpConfigStorage;
import me.chanjar.weixin.mp.api.WxMpMessageRouter;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
import org.apache.commons.lang3.StringUtils;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* @author Daniel Qian