forked from chanjarster/weixin-java-tools
-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c1c801c
commit d4d830f
Showing
9 changed files
with
607 additions
and
38 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
...-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayRedpackQueryRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.github.binarywang.wxpay.bean.entpay; | ||
|
||
import com.github.binarywang.wxpay.bean.request.BaseWxPayRequest; | ||
import com.github.binarywang.wxpay.exception.WxPayException; | ||
import com.thoughtworks.xstream.annotations.XStreamAlias; | ||
import lombok.*; | ||
|
||
/** | ||
* 红包发送记录查询请求 | ||
* @author wuyong | ||
* @date 2019-12-01 17:19 | ||
*/ | ||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
@Builder(builderMethodName = "newBuilder") | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@XStreamAlias("xml") | ||
public class EntPayRedpackQueryRequest extends BaseWxPayRequest { | ||
|
||
|
||
/** | ||
* 商户订单号 | ||
*/ | ||
@XStreamAlias("mch_billno") | ||
private String mchBillNo; | ||
|
||
|
||
@Override | ||
protected void checkConstraints() throws WxPayException { | ||
|
||
} | ||
} |
133 changes: 133 additions & 0 deletions
133
...a-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayRedpackQueryResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
package com.github.binarywang.wxpay.bean.entpay; | ||
|
||
import com.github.binarywang.wxpay.bean.result.BaseWxPayResult; | ||
import com.thoughtworks.xstream.annotations.XStreamAlias; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.NoArgsConstructor; | ||
|
||
/** | ||
* 红包发送记录查询返回 | ||
* | ||
* @author wuyong | ||
* @date 2019-12-01 17:23 | ||
*/ | ||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
@NoArgsConstructor | ||
@XStreamAlias("xml") | ||
public class EntPayRedpackQueryResult extends BaseWxPayResult { | ||
|
||
/** | ||
* 商户订单号 | ||
* 商户使用查询API填写的商户单号的原路返回 | ||
*/ | ||
@XStreamAlias("mch_billno") | ||
protected String mchBillNo; | ||
|
||
/** | ||
* 红包单号 | ||
* 使用API发放现金红包时返回的红包单号 | ||
*/ | ||
@XStreamAlias("detailId") | ||
private String detailId; | ||
/** | ||
* 红包状态 | ||
* SENDING:发放 | ||
* SENT: | ||
* 已发放待领取 | ||
* FAILED:发放失败 | ||
* RECEIVED:已领取 | ||
* RFUND_ING:退款中 REFUND:已退款 | ||
*/ | ||
@XStreamAlias("status") | ||
private String status; | ||
|
||
/** | ||
* 发放类型 | ||
* API:通过API接口发放 | ||
*/ | ||
@XStreamAlias("send_type") | ||
private String sendType; | ||
|
||
/** | ||
* 红包金额 | ||
* 红包总金额(单位分) | ||
*/ | ||
@XStreamAlias("total_amount") | ||
private Integer totalAmount; | ||
|
||
/** | ||
* 失败原因 | ||
* 发送失败原因 | ||
*/ | ||
@XStreamAlias("reason") | ||
private Integer reason; | ||
|
||
/** | ||
* 红包发送时间 | ||
*/ | ||
@XStreamAlias("send_time") | ||
private String sendTime; | ||
/** | ||
* 红包的退款时间 | ||
*/ | ||
@XStreamAlias("refund_time") | ||
private String refundTime; | ||
|
||
/** | ||
* 红包退款金额 | ||
*/ | ||
@XStreamAlias("refund_amount") | ||
private Integer refundAmount; | ||
|
||
/** | ||
* 祝福语 | ||
*/ | ||
@XStreamAlias("wishing") | ||
private String wishing; | ||
|
||
/** | ||
* 备注 | ||
*/ | ||
@XStreamAlias("remark") | ||
private String remark; | ||
|
||
/** | ||
* 活动名称 | ||
*/ | ||
@XStreamAlias("act_name") | ||
private String actName; | ||
|
||
/** | ||
* 领取红包的Openid | ||
*/ | ||
@XStreamAlias("openid") | ||
private String openid; | ||
|
||
/** | ||
* 金额 | ||
*/ | ||
@XStreamAlias("amount") | ||
private Integer amount; | ||
|
||
/** | ||
* 接收时间 | ||
*/ | ||
@XStreamAlias("rcv_time") | ||
private Integer rcvTime; | ||
|
||
/** | ||
* 发送者名称 | ||
*/ | ||
@XStreamAlias("sender_name") | ||
private Integer senderName; | ||
|
||
/** | ||
* 发送者头像 | ||
* 通过企业微信开放接口上传获取 | ||
*/ | ||
@XStreamAlias("sender_header_media_id") | ||
private Integer senderHeaderMediaId; | ||
|
||
} |
147 changes: 147 additions & 0 deletions
147
...-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayRedpackRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
package com.github.binarywang.wxpay.bean.entpay; | ||
|
||
import com.github.binarywang.wxpay.bean.request.BaseWxPayRequest; | ||
import com.github.binarywang.wxpay.exception.WxPayException; | ||
import com.thoughtworks.xstream.annotations.XStreamAlias; | ||
import lombok.*; | ||
import me.chanjar.weixin.common.annotation.Required; | ||
|
||
/** | ||
* 发送企业红包 | ||
* @author wuyong | ||
* @date 2019-12-1 | ||
*/ | ||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
@Builder(builderMethodName = "newBuilder") | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@XStreamAlias("xml") | ||
public class EntPayRedpackRequest extends BaseWxPayRequest { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
@Override | ||
protected void checkConstraints() throws WxPayException { | ||
|
||
} | ||
|
||
/** | ||
* 商户订单号(每个订单号必须唯一) | ||
* 组成:mch_id+yyyymmdd+10位一天内不能重复的数字。 接口根据商户订单号支持重入,如出现超时可再调用。 | ||
* 必填:是 | ||
*/ | ||
@Required | ||
@XStreamAlias("mch_billno") | ||
private String mchBillNo; | ||
|
||
/** | ||
* 微信分配的公众账号ID(企业微信corpid即为此appId) | ||
* 必填:是 | ||
*/ | ||
@Required | ||
@XStreamAlias("wxappid") | ||
private String wxAppId; | ||
|
||
/** | ||
* 发送者名称 | ||
* 以个人名义发红包,红包发送者名称(需要utf-8格式)。与agentid互斥,二者只能填一个。 | ||
* 必填:否 | ||
*/ | ||
@XStreamAlias("sender_name") | ||
private String senderName; | ||
|
||
/** | ||
* 发送红包的应用id | ||
* 以企业应用的名义发红包,企业应用id,整型,可在企业微信管理端应用的设置页面查看。与sender_name互斥,二者只能填一个。 | ||
* 必填:否 | ||
*/ | ||
@XStreamAlias("agentid") | ||
private String agentId; | ||
|
||
/** | ||
* 发送者头像 | ||
* 发送者头像素材id,通过企业微信开放上传素材接口获取 | ||
* 必填:否 | ||
*/ | ||
@XStreamAlias("sender_header_media_id") | ||
private String senderHeaderMediaId; | ||
|
||
/** | ||
* 用户openid | ||
* 接受红包的用户.用户在wxappid下的openid。 | ||
* 必填:是 | ||
*/ | ||
@Required | ||
@XStreamAlias("re_openid") | ||
private String reOpenid; | ||
|
||
/** | ||
* 金额 | ||
* 单位分,单笔最小金额默认为1元 | ||
* 必填:是 | ||
*/ | ||
@Required | ||
@XStreamAlias("total_amount") | ||
private Integer totalAmount; | ||
|
||
/** | ||
* 红包祝福语 | ||
* 必填:是 | ||
*/ | ||
@Required | ||
@XStreamAlias("wishing") | ||
private String wishing; | ||
|
||
/** | ||
* 项目名称 | ||
* 必填:是 | ||
*/ | ||
@Required | ||
@XStreamAlias("act_name") | ||
private String actName; | ||
|
||
/** | ||
* 备注 | ||
* 必填:是 | ||
*/ | ||
@Required | ||
@XStreamAlias("remark") | ||
private String remark; | ||
|
||
/** | ||
* 场景 | ||
* 发放红包使用场景,红包金额大于200时必传 | ||
* PRODUCT_1:商品促销 | ||
* PRODUCT_2:抽奖 | ||
* PRODUCT_3:虚拟物品兑奖 | ||
* PRODUCT_4:企业内部福利 | ||
* PRODUCT_5:渠道分润 | ||
* PRODUCT_6:保险回馈 | ||
* PRODUCT_7:彩票派奖 | ||
* PRODUCT_8:税务刮奖 | ||
*/ | ||
@XStreamAlias("scene_id") | ||
private String sceneId; | ||
|
||
|
||
@Override | ||
protected boolean ignoreAppid() { | ||
return true; | ||
} | ||
|
||
@Override | ||
protected boolean ignoreSubAppId() { | ||
return true; | ||
} | ||
|
||
@Override | ||
protected boolean ignoreSubMchId() { | ||
return true; | ||
} | ||
|
||
@Override | ||
protected boolean isWxWorkSign() { | ||
return true; | ||
} | ||
} |
80 changes: 80 additions & 0 deletions
80
...n-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayRedpackResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package com.github.binarywang.wxpay.bean.entpay; | ||
|
||
import com.github.binarywang.wxpay.bean.result.BaseWxPayResult; | ||
import com.thoughtworks.xstream.annotations.XStreamAlias; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* 企业微信红包返回 | ||
* @author wuyong | ||
* @date 2019-12-01 11:31 | ||
*/ | ||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
@NoArgsConstructor | ||
@XStreamAlias("xml") | ||
public class EntPayRedpackResult extends BaseWxPayResult implements Serializable { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
/** | ||
* 商户订单号 | ||
* 商户订单号(每个订单号必须唯一)组成:mch_id+yyyymmdd+10位一天内不能重复的数字 | ||
*/ | ||
@XStreamAlias("mch_billno") | ||
private String mchBillNo; | ||
|
||
/** | ||
* 商户号 | ||
* 微信支付分配的商户号 | ||
*/ | ||
@XStreamAlias("mch_id") | ||
private String mchId; | ||
|
||
/** | ||
* 公众账号appid | ||
* 商户appid,接口传入的所有appid应该为公众号的appid,不能为APP的appid | ||
*/ | ||
@XStreamAlias("wxappid") | ||
private String wxAppId; | ||
|
||
/** | ||
* 用户openid | ||
* 接受收红包的用户在wxappid下的openid | ||
*/ | ||
@XStreamAlias("re_openid") | ||
private String reOpenid; | ||
|
||
/** | ||
* 付款金额 | ||
* 付款金额,单位分 | ||
*/ | ||
@XStreamAlias("totalAmount") | ||
private String totalAmount; | ||
|
||
/** | ||
* 微信单号 | ||
* 红包订单的微信单号 | ||
*/ | ||
@XStreamAlias("sendListid") | ||
private String sendListId; | ||
|
||
/** | ||
* 发送者名称 | ||
* 红包发送者名称(需要utf-8格式) | ||
*/ | ||
@XStreamAlias("sender_name") | ||
private String senderName; | ||
|
||
/** | ||
* 发送者头像 | ||
* 发送者头像素材id,通过企业微信开放上传素材接口获取 | ||
*/ | ||
@XStreamAlias("sender_header_media_id") | ||
private String senderHeaderMediaId; | ||
|
||
} |
Oops, something went wrong.