下载对账单错误修复
This commit is contained in:
parent
fe8166d1a4
commit
b2e5c108fd
@ -21,6 +21,7 @@ import com.foxinmy.weixin4j.payment.mch.SettlementRecord;
|
||||
import com.foxinmy.weixin4j.type.CurrencyType;
|
||||
import com.foxinmy.weixin4j.util.DateUtil;
|
||||
import com.foxinmy.weixin4j.util.RandomUtil;
|
||||
import com.foxinmy.weixin4j.util.StringUtil;
|
||||
import com.foxinmy.weixin4j.xml.XmlStream;
|
||||
|
||||
/**
|
||||
@ -48,6 +49,20 @@ public class CashApi extends MchApi {
|
||||
*
|
||||
* @param redpacket
|
||||
* 红包信息
|
||||
* @see #sendRedpack(Redpacket,String)
|
||||
*/
|
||||
public RedpacketSendResult sendRedpack(Redpacket redpacket)
|
||||
throws WeixinException {
|
||||
return sendRedpack(redpacket, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发放红包 企业向微信用户个人发现金红包
|
||||
*
|
||||
* @param redpacket
|
||||
* 红包信息
|
||||
* @param appId
|
||||
* 应用ID 可为空 主要是针对企业号支付时传入的agentid
|
||||
* @return 发放结果
|
||||
* @see com.foxinmy.weixin4j.payment.mch.Redpacket
|
||||
* @see com.foxinmy.weixin4j.payment.mch.RedpacketSendResult
|
||||
@ -59,10 +74,13 @@ public class CashApi extends MchApi {
|
||||
* 发放裂变红包接口</a>
|
||||
* @throws WeixinException
|
||||
*/
|
||||
public RedpacketSendResult sendRedpack(Redpacket redpacket)
|
||||
public RedpacketSendResult sendRedpack(Redpacket redpacket, String appId)
|
||||
throws WeixinException {
|
||||
super.declareMerchant(redpacket);
|
||||
JSONObject obj = (JSONObject) JSON.toJSON(redpacket);
|
||||
if (StringUtil.isNotBlank(appId)) {
|
||||
obj.put("appid", appId);
|
||||
}
|
||||
obj.put("wxappid", obj.remove("appid"));
|
||||
obj.put("sign", weixinSignature.sign(obj));
|
||||
String param = XmlStream.map2xml(obj);
|
||||
|
||||
@ -73,11 +73,14 @@ public class WeixinResponse implements HttpResponse {
|
||||
return messageConverter.convert(clazz, response);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("IO error on convert to "
|
||||
+ typeReference, e);
|
||||
+ clazz, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("cannot convert to " + typeReference);
|
||||
if (clazz.isAssignableFrom(ApiResult.class)) {
|
||||
return (T) new ApiResult();
|
||||
}
|
||||
throw new RuntimeException("cannot convert to " + clazz);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -29,8 +29,13 @@ public class MediaItem implements Serializable {
|
||||
/**
|
||||
* 媒体素材名称
|
||||
*/
|
||||
@JSONField(name = "filename")
|
||||
@JSONField(name = "name")
|
||||
private String name;
|
||||
/**
|
||||
* 图文页的URL,或者,当获取的列表是图片素材列表时,该字段是图片的URL
|
||||
*/
|
||||
@JSONField(name = "url")
|
||||
private String url;
|
||||
/**
|
||||
* 媒体素材最后更新时间
|
||||
*/
|
||||
@ -58,6 +63,14 @@ public class MediaItem implements Serializable {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
@ -81,7 +94,8 @@ public class MediaItem implements Serializable {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MediaItem [mediaId=" + mediaId + ", name=" + name
|
||||
+ ", updateTime=" + updateTime + ", articles=" + articles + "]";
|
||||
return "MediaItem [mediaId=" + mediaId + ", name=" + name + ",url="
|
||||
+ url + ", updateTime=" + updateTime + ", articles=" + articles
|
||||
+ "]";
|
||||
}
|
||||
}
|
||||
|
||||
@ -676,6 +676,20 @@ public class WeixinPayProxy {
|
||||
*
|
||||
* @param redpacket
|
||||
* 红包信息
|
||||
* @see #sendRedpack(Redpacket,String)
|
||||
*/
|
||||
public RedpacketSendResult sendRedpack(Redpacket redpacket)
|
||||
throws WeixinException {
|
||||
return cashApi.sendRedpack(redpacket);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发放红包 企业向微信用户个人发现金红包
|
||||
*
|
||||
* @param redpacket
|
||||
* 红包信息
|
||||
* @param appId
|
||||
* 应用ID 可为空 主要是针对企业号支付时传入的agentid
|
||||
* @return 发放结果
|
||||
* @see com.foxinmy.weixin4j.api.CashApi
|
||||
* @see com.foxinmy.weixin4j.payment.mch.Redpacket
|
||||
@ -688,9 +702,9 @@ public class WeixinPayProxy {
|
||||
* 发放裂变红包接口</a>
|
||||
* @throws WeixinException
|
||||
*/
|
||||
public RedpacketSendResult sendRedpack(Redpacket redpacket)
|
||||
public RedpacketSendResult sendRedpack(Redpacket redpacket, String appId)
|
||||
throws WeixinException {
|
||||
return cashApi.sendRedpack(redpacket);
|
||||
return cashApi.sendRedpack(redpacket, appId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user