优化非核心类代码以及V3版本JSAPI接口支付签名错误bug

This commit is contained in:
jy.hu
2014-12-15 00:11:00 +08:00
parent 746697a358
commit 641d6c62ac
32 changed files with 266 additions and 263 deletions
@@ -85,8 +85,8 @@ public class XmlResult implements Serializable {
@Override
public String toString() {
return "XmlResult [returnCode=" + returnCode + ", returnMsg="
+ returnMsg + ", resultCode=" + resultCode + ", errCode="
+ errCode + ", errCodeDes=" + errCodeDes + "]";
return "returnCode=" + returnCode + ", returnMsg=" + returnMsg
+ ", resultCode=" + resultCode + ", errCode=" + errCode
+ ", errCodeDes=" + errCodeDes;
}
}
@@ -9,7 +9,9 @@ import org.apache.commons.lang3.StringUtils;
* @author jy
* @date 2014年8月17日
* @since JDK 1.7
* @see
* @see<a href=
* "https://mp.weixin.qq.com/advanced/advanced?action=dev&t=advanced/dev&token=836970804&lang=zh_CN"
* >开发者模式</a>
*/
public class WeixinMpAccount extends WeixinAccount {
private static final long serialVersionUID = 3689999353867189585L;
@@ -29,13 +31,6 @@ public class WeixinMpAccount extends WeixinAccount {
// 微信支付版本号(如果无则按照mchId来做判断)
private int version;
// 是否已经认证
private boolean isAlive;
// 是否是服务号
private boolean isService;
// 是否是订阅号
private boolean isSubscribe;
@Override
public String getTokenUrl() {
return String.format(Consts.MP_ASSESS_TOKEN_URL, getId(), getSecret());
@@ -89,30 +84,6 @@ public class WeixinMpAccount extends WeixinAccount {
this.deviceInfo = deviceInfo;
}
public boolean getIsAlive() {
return isAlive;
}
public void setIsAlive(Boolean isAlive) {
this.isAlive = isAlive;
}
public boolean getIsService() {
return isService;
}
public void setIsService(Boolean isService) {
this.isService = isService;
}
public boolean getIsSubscribe() {
return isSubscribe;
}
public void setIsSubscribe(Boolean isSubscribe) {
this.isSubscribe = isSubscribe;
}
public int getVersion() {
if (version == 0) {
return StringUtils.isNotBlank(mchId) ? 3 : 2;
@@ -169,8 +140,7 @@ public class WeixinMpAccount extends WeixinAccount {
return "WeixinMpAccount [openId=" + openId + ", paySignKey="
+ paySignKey + ", partnerId=" + partnerId + ", partnerKey="
+ partnerKey + ", mchId=" + mchId + ", deviceInfo="
+ deviceInfo + ", version=" + version + ", isAlive=" + isAlive
+ ", isService=" + isService + ", isSubscribe=" + isSubscribe
+ ", " + super.toString() + "]";
+ deviceInfo + ", version=" + version + ", " + super.toString()
+ "]";
}
}
@@ -7,7 +7,9 @@ package com.foxinmy.weixin4j.model;
* @author jy
* @date 2014年11月18日
* @since JDK 1.7
* @see
* @see <a href=
* "https://qy.weixin.qq.com/cgi-bin/home?lang=zh_CN&token=685923034#setting"
* >企业号设置</a>
*/
public class WeixinQyAccount extends WeixinAccount {
private static final long serialVersionUID = 3689999353867189585L;