@@ -1,9 +1,8 @@ | |||
package me.chanjar.weixin.common.bean; | |||
import java.io.Serializable; | |||
import me.chanjar.weixin.common.util.ToStringUtils; | |||
import org.apache.commons.lang3.builder.ToStringBuilder; | |||
import org.apache.commons.lang3.builder.ToStringStyle; | |||
import java.io.Serializable; | |||
/** | |||
* 卡券Api签名 | |||
@@ -35,7 +34,7 @@ public class WxCardApiSignature implements Serializable { | |||
@Override | |||
public String toString() { | |||
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); | |||
return ToStringUtils.toSimpleString(this); | |||
} | |||
public String getAppId() { | |||
@@ -1,11 +1,10 @@ | |||
package me.chanjar.weixin.common.bean.menu; | |||
import me.chanjar.weixin.common.util.ToStringUtils; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import org.apache.commons.lang3.builder.ToStringBuilder; | |||
import org.apache.commons.lang3.builder.ToStringStyle; | |||
public class WxMenuButton { | |||
private String type; | |||
@@ -18,10 +17,9 @@ public class WxMenuButton { | |||
@Override | |||
public String toString() { | |||
return ToStringBuilder.reflectionToString(this, | |||
ToStringStyle.MULTI_LINE_STYLE); | |||
return ToStringUtils.toSimpleString(this); | |||
} | |||
public String getType() { | |||
return this.type; | |||
} | |||
@@ -69,4 +67,4 @@ public class WxMenuButton { | |||
public void setMediaId(String mediaId) { | |||
this.mediaId = mediaId; | |||
} | |||
} | |||
} |
@@ -1,7 +1,6 @@ | |||
package me.chanjar.weixin.common.bean.menu; | |||
import org.apache.commons.lang3.builder.ToStringBuilder; | |||
import org.apache.commons.lang3.builder.ToStringStyle; | |||
import me.chanjar.weixin.common.util.ToStringUtils; | |||
public class WxMenuRule { | |||
private String tagId; | |||
@@ -70,6 +69,6 @@ public class WxMenuRule { | |||
@Override | |||
public String toString() { | |||
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); | |||
return ToStringUtils.toSimpleString(this); | |||
} | |||
} | |||
} |
@@ -1,98 +0,0 @@ | |||
package me.chanjar.weixin.common.util; | |||
/** | |||
* copy from apache-commons-lang3 | |||
*/ | |||
public class StringUtils { | |||
/** | |||
* <p>Checks if a CharSequence is whitespace, empty ("") or null.</p> | |||
* <p> | |||
* <pre> | |||
* StringUtils.isBlank(null) = true | |||
* StringUtils.isBlank("") = true | |||
* StringUtils.isBlank(" ") = true | |||
* StringUtils.isBlank("bob") = false | |||
* StringUtils.isBlank(" bob ") = false | |||
* </pre> | |||
* | |||
* @param cs the CharSequence to check, may be null | |||
* @return {@code true} if the CharSequence is null, empty or whitespace | |||
* @since 3.0 Changed signature from isBlank(String) to isBlank(CharSequence) | |||
*/ | |||
public static boolean isBlank(CharSequence cs) { | |||
int strLen; | |||
if (cs == null || (strLen = cs.length()) == 0) { | |||
return true; | |||
} | |||
for (int i = 0; i < strLen; i++) { | |||
if (Character.isWhitespace(cs.charAt(i)) == false) { | |||
return false; | |||
} | |||
} | |||
return true; | |||
} | |||
/** | |||
* <p>Checks if a CharSequence is not empty (""), not null and not whitespace only.</p> | |||
* <p> | |||
* <pre> | |||
* StringUtils.isNotBlank(null) = false | |||
* StringUtils.isNotBlank("") = false | |||
* StringUtils.isNotBlank(" ") = false | |||
* StringUtils.isNotBlank("bob") = true | |||
* StringUtils.isNotBlank(" bob ") = true | |||
* </pre> | |||
* | |||
* @param cs the CharSequence to check, may be null | |||
* @return {@code true} if the CharSequence is | |||
* not empty and not null and not whitespace | |||
* @since 3.0 Changed signature from isNotBlank(String) to isNotBlank(CharSequence) | |||
*/ | |||
public static boolean isNotBlank(CharSequence cs) { | |||
return !StringUtils.isBlank(cs); | |||
} | |||
/** | |||
* <p>Checks if a CharSequence is empty ("") or null.</p> | |||
* <p> | |||
* <pre> | |||
* StringUtils.isEmpty(null) = true | |||
* StringUtils.isEmpty("") = true | |||
* StringUtils.isEmpty(" ") = false | |||
* StringUtils.isEmpty("bob") = false | |||
* StringUtils.isEmpty(" bob ") = false | |||
* </pre> | |||
* <p> | |||
* <p>NOTE: This method changed in Lang version 2.0. | |||
* It no longer trims the CharSequence. | |||
* That functionality is available in isBlank().</p> | |||
* | |||
* @param cs the CharSequence to check, may be null | |||
* @return {@code true} if the CharSequence is empty or null | |||
* @since 3.0 Changed signature from isEmpty(String) to isEmpty(CharSequence) | |||
*/ | |||
public static boolean isEmpty(CharSequence cs) { | |||
return cs == null || cs.length() == 0; | |||
} | |||
/** | |||
* <p>Checks if a CharSequence is not empty ("") and not null.</p> | |||
* <p> | |||
* <pre> | |||
* StringUtils.isNotEmpty(null) = false | |||
* StringUtils.isNotEmpty("") = false | |||
* StringUtils.isNotEmpty(" ") = true | |||
* StringUtils.isNotEmpty("bob") = true | |||
* StringUtils.isNotEmpty(" bob ") = true | |||
* </pre> | |||
* | |||
* @param cs the CharSequence to check, may be null | |||
* @return {@code true} if the CharSequence is not empty and not null | |||
* @since 3.0 Changed signature from isNotEmpty(String) to isNotEmpty(CharSequence) | |||
*/ | |||
public static boolean isNotEmpty(CharSequence cs) { | |||
return !StringUtils.isEmpty(cs); | |||
} | |||
} |
@@ -0,0 +1,61 @@ | |||
package me.chanjar.weixin.common.util; | |||
import org.apache.commons.lang3.StringUtils; | |||
import org.apache.commons.lang3.builder.ToStringBuilder; | |||
import org.apache.commons.lang3.builder.ToStringStyle; | |||
/** | |||
* <pre> | |||
* 自定义的ToString方法,用于产生去掉空值属性的字符串 | |||
* Created by Binary Wang on 2016-10-27. | |||
* @author <a href="https://github.com/binarywang">binarywang(Binary Wang)</a> | |||
* </pre> | |||
*/ | |||
public class ToStringUtils { | |||
public static final ToStringStyle THE_STYLE = new SimpleMultiLineToStringStyle(); | |||
private static class SimpleMultiLineToStringStyle extends ToStringStyle { | |||
private static final long serialVersionUID = 4645306494220335355L; | |||
private static final String LINE_SEPARATOR = "\n"; | |||
private static final String NULL_TEXT = "<null>"; | |||
public SimpleMultiLineToStringStyle() { | |||
super(); | |||
this.setContentStart("["); | |||
this.setFieldSeparator(LINE_SEPARATOR + " "); | |||
this.setFieldSeparatorAtStart(true); | |||
this.setContentEnd(LINE_SEPARATOR + "]"); | |||
this.setNullText(NULL_TEXT); | |||
this.setUseShortClassName(true); | |||
this.setUseIdentityHashCode(false); | |||
} | |||
} | |||
/** | |||
* 用于产生去掉空值属性并以换行符分割各属性键值的toString字符串 | |||
* @param obj | |||
*/ | |||
public static String toSimpleString(Object obj) { | |||
String toStringResult = ToStringBuilder.reflectionToString(obj, THE_STYLE); | |||
String[] split = toStringResult.split(SimpleMultiLineToStringStyle.LINE_SEPARATOR); | |||
StringBuilder result = new StringBuilder(); | |||
for (String string : split) { | |||
if (string.endsWith(SimpleMultiLineToStringStyle.NULL_TEXT)) { | |||
continue; | |||
} | |||
result.append(string + SimpleMultiLineToStringStyle.LINE_SEPARATOR); | |||
} | |||
if (result.length() == 0) { | |||
return ""; | |||
} | |||
//如果没有非空的属性,就输出 <all null properties> | |||
if (StringUtils.countMatches(result, SimpleMultiLineToStringStyle.LINE_SEPARATOR) == 2) { | |||
return result.toString().split(SimpleMultiLineToStringStyle.LINE_SEPARATOR)[0] | |||
+ "<all null values>]"; | |||
} | |||
return result.deleteCharAt(result.length() - 1).toString(); | |||
} | |||
} |
@@ -1,6 +1,6 @@ | |||
package me.chanjar.weixin.common.util.http; | |||
import me.chanjar.weixin.common.util.StringUtils; | |||
import org.apache.commons.lang3.StringUtils; | |||
import org.apache.http.annotation.NotThreadSafe; | |||
import org.apache.http.auth.AuthScope; | |||
import org.apache.http.auth.UsernamePasswordCredentials; | |||
@@ -2,8 +2,8 @@ package me.chanjar.weixin.common.util.http; | |||
import me.chanjar.weixin.common.bean.result.WxError; | |||
import me.chanjar.weixin.common.exception.WxErrorException; | |||
import me.chanjar.weixin.common.util.StringUtils; | |||
import me.chanjar.weixin.common.util.fs.FileUtils; | |||
import org.apache.commons.lang3.StringUtils; | |||
import org.apache.http.Header; | |||
import org.apache.http.HttpHost; | |||
import org.apache.http.client.config.RequestConfig; | |||
@@ -1,6 +1,7 @@ | |||
package me.chanjar.weixin.common.util.http; | |||
import me.chanjar.weixin.common.util.StringUtils; | |||
import org.apache.commons.lang3.StringUtils; | |||
import java.io.UnsupportedEncodingException; | |||
@@ -1,13 +1,11 @@ | |||
package me.chanjar.weixin.cp.api; | |||
import java.io.File; | |||
import org.apache.commons.lang3.builder.ToStringBuilder; | |||
import org.apache.commons.lang3.builder.ToStringStyle; | |||
import me.chanjar.weixin.common.bean.WxAccessToken; | |||
import me.chanjar.weixin.common.util.ToStringUtils; | |||
import me.chanjar.weixin.common.util.http.ApacheHttpClientBuilder; | |||
import java.io.File; | |||
/** | |||
* 基于内存的微信配置provider,在实际生产环境中应该将这些配置持久化 | |||
* | |||
@@ -203,7 +201,7 @@ public class WxCpInMemoryConfigStorage implements WxCpConfigStorage { | |||
@Override | |||
public String toString() { | |||
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE); | |||
return ToStringUtils.toSimpleString(this); | |||
} | |||
@Override | |||
@@ -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; | |||
} | |||
@@ -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); | |||
} | |||
} |
@@ -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); | |||
} | |||
} |
@@ -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; | |||
@@ -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; | |||
@@ -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); | |||
} | |||
/** | |||
@@ -1,17 +1,14 @@ | |||
package me.chanjar.weixin.mp.bean.datacube; | |||
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.common.util.ToStringUtils; | |||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder; | |||
import java.io.Serializable; | |||
import java.util.Date; | |||
import java.util.List; | |||
/** | |||
* <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) { | |||
@@ -1,17 +1,14 @@ | |||
package me.chanjar.weixin.mp.bean.datacube; | |||
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.common.util.ToStringUtils; | |||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder; | |||
import java.io.Serializable; | |||
import java.util.Date; | |||
import java.util.List; | |||
/** | |||
* <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) { | |||
@@ -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); | |||
} | |||
@@ -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() { | |||
@@ -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); | |||
} | |||
@@ -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) { | |||
@@ -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; | |||
} | |||
@@ -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; | |||
} | |||
@@ -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; | |||
} | |||
@@ -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; | |||
} | |||
@@ -1,16 +1,13 @@ | |||
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 | |||
* | |||
*/ | |||
@@ -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) { | |||
@@ -1,16 +1,13 @@ | |||
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 | |||
* | |||
*/ | |||
@@ -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) { | |||
@@ -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); | |||
} | |||
} | |||
@@ -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); | |||
} | |||
} | |||
} |
@@ -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); | |||
} | |||
} |
@@ -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); | |||
} | |||
} | |||
} |
@@ -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); | |||
} | |||
} |
@@ -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); | |||
} | |||
} |
@@ -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); | |||
} | |||
} |
@@ -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); | |||
} | |||
} |
@@ -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); | |||
} | |||
} |
@@ -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); | |||
} | |||
/** | |||
@@ -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() { | |||
@@ -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); | |||
} | |||
} |
@@ -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) { | |||
@@ -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") | |||
@@ -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) { | |||
@@ -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); | |||
} | |||
/** | |||
@@ -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); | |||
} | |||
} |
@@ -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 | |||
@@ -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) { | |||
@@ -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 | |||
@@ -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; | |||
@@ -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 | |||