repo
stringclasses
1k values
file_url
stringlengths
96
373
file_path
stringlengths
11
294
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
6 values
commit_sha
stringclasses
1k values
retrieved_at
stringdate
2026-01-04 14:45:56
2026-01-04 18:30:23
truncated
bool
2 classes
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/shoppingOrders/PayerBean.java
weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/shoppingOrders/PayerBean.java
package me.chanjar.weixin.open.bean.shoppingOrders; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; @Data @Builder @NoArgsConstructor @AllArgsConstructor public class PayerBean implements Serializable { private static final long serialVersionUID = -7943088204264205895L; /** * 必填 * 用户标识,用户在小程序appid下的唯一标识。 下单前需获取到用户的Openid 示例值: oUpF8uMuAJO_M2pxb1Q9zNjWeS6o 字符字节限制: [1, 128] */ @SerializedName("openid") private String openid; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/shoppingOrders/CombinedShoppingInfo.java
weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/shoppingOrders/CombinedShoppingInfo.java
package me.chanjar.weixin.open.bean.shoppingOrders; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; import java.util.List; @Data @Builder @NoArgsConstructor @AllArgsConstructor public class CombinedShoppingInfo implements Serializable { private static final long serialVersionUID = 8325009858985444023L; /** * 必填 * 合单订单,需要上传购物详情的合单订单,根据订单类型二选一 */ @SerializedName("order_key") private OrderKeyBean orderKey; /** * 子单购物详情 */ @SerializedName("sub_orders") private List<SubOrderListBean> subOrders; /** * 必填 * 支付者,支付者信息 */ @SerializedName("payer") private PayerBean payer; /** * 必填 * 上传时间,用于标识请求的先后顺序 示例值: `2022-12-15T13:29:35.120+08:00 */ @SerializedName("upload_time") private String uploadTime; @Data @Builder @NoArgsConstructor @AllArgsConstructor public static class SubOrderListBean implements Serializable { private static final long serialVersionUID = -8792281478692710237L; /** * 必填 * 订单,需要上传购物详情的订单,根据订单类型二选一 */ @SerializedName("order_key") private OrderKeyBean orderKey; /** * 必填 * 商户交易订单编号,商户侧的交易订单详情页向用户展示的订单编号 * 示例值: 232457563423 字符字节限制: [1, 64] */ @SerializedName("merchant_order_no") private String merchantOrderNo; /** * 必填 * 商户交易订单详情页链接,用户查看“商城订单”时,跳转至商户侧查看交易订单详情页的链接。详情页类别可以为H5或小程序 */ @SerializedName("order_detail_jump_link") private ShoppingInfo.OrderDetailBean orderDetailJumpLink; /** * 订单购买的商品列表,用户在订单中购买的全部商品明细的列表,最多可以上传50个商品 * 多重性: [1, 50] */ @SerializedName("item_list") private List<ShoppingInfo.OrderItemListBean> itemList; /** * 物流形式,订单商品配送的物流形式,默认为实体物流 * 物流模式,发货方式枚举值:1、实体物流配送采用快递公司进行实体物流配送形式 2、同城配送 3、虚拟商品,虚拟商品,例如话费充值,点卡等,无实体配送形式 4、用户自提 */ @SerializedName("logistics_type") private int logisticsType; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/shoppingOrders/WxOpenShoppingInfoVerifyUploadResult.java
weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/shoppingOrders/WxOpenShoppingInfoVerifyUploadResult.java
package me.chanjar.weixin.open.bean.shoppingOrders; import com.google.gson.annotations.SerializedName; import lombok.Data; import lombok.EqualsAndHashCode; import me.chanjar.weixin.open.bean.result.WxOpenResult; @Data @EqualsAndHashCode(callSuper = true) public class WxOpenShoppingInfoVerifyUploadResult extends WxOpenResult { private static final long serialVersionUID = -3223834939130803964L; /** * 验证结果 */ @SerializedName("verify_result") private String verifyResult; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/shoppingOrders/ShippingListBean.java
weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/shoppingOrders/ShippingListBean.java
package me.chanjar.weixin.open.bean.shoppingOrders; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; import java.util.List; @Data @Builder @NoArgsConstructor @AllArgsConstructor public class ShippingListBean implements Serializable { private static final long serialVersionUID = -6884739637300493109L; /** * 物流单号,物流快递发货时必填,示例值: 323244567777 字符字节限制: [1, 128] */ @SerializedName("tracking_no") private String trackingNo; /** * 物流公司编码,快递公司ID,参见「查询物流公司编码列表」,物流快递发货时必填, 示例值: DHL 字符字节限制: [1, 128] */ @SerializedName("express_company") private String expressCompany; /** * 物流关联的商品列表,当统一发货(单个物流单)时,该项不填;当分拆发货(多个物流单)时,需填入各物流单关联的商品列表 多重性: [0, 50] */ @SerializedName("item_list") private List<ShippingItemListBean> itemList; /** * 联系方式,当发货的物流公司为顺丰时,联系方式为必填,收件人或寄件人联系方式二选一 */ @SerializedName("contact") private ContactBean contact; @Data @Builder @NoArgsConstructor @AllArgsConstructor public static class ShippingItemListBean implements Serializable { private static final long serialVersionUID = -1433227869321841858L; /** * 商户侧商品ID,商户系统内部商品编码,分拆发货模式下为必填,用于标识每笔物流单号内包含的商品,需与「上传购物详情」中传入的商品ID匹配 * 示例值: 1246464644 字符字节限制: [1, 64] */ @SerializedName("merchant_item_id") private String merchantItemId; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/shoppingOrders/OrderKeyBean.java
weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/shoppingOrders/OrderKeyBean.java
package me.chanjar.weixin.open.bean.shoppingOrders; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; @Data @Builder @NoArgsConstructor @AllArgsConstructor public class OrderKeyBean implements Serializable { private static final long serialVersionUID = 1486092394664728388L; /** * 必填 * 订单单号类型,用于确认需要上传详情的订单。枚举值1,使用下单商户号和商户侧单号;枚举值2,使用微信支付单号。 */ @SerializedName("order_number_type") private int orderNumberType; /** * 原支付交易对应的微信订单号 */ @SerializedName("transaction_id") private String transactionId; /** * 支付下单商户的商户号,由微信支付生成并下发。 */ @SerializedName("mchid") private String mchId; /** * 商户系统内部订单号,只能是数字、大小写字母`_-*`且在同一个商户号下唯一 */ @SerializedName("out_trade_no") private String outTradeNo; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/shoppingOrders/CombinedShippingInfo.java
weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/shoppingOrders/CombinedShippingInfo.java
package me.chanjar.weixin.open.bean.shoppingOrders; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; import java.util.List; @Data @Builder @NoArgsConstructor @AllArgsConstructor public class CombinedShippingInfo implements Serializable { private static final long serialVersionUID = -2338140924295957062L; /** * 必填 * 合单订单,需要上传物流详情的合单订单,根据订单类型二选一 */ @SerializedName("order_key") private OrderKeyBean orderKey; /** * 子单物流详情 */ @SerializedName("sub_orders") private List<SubOrderListBean> subOrders; /** * 必填 * 支付者,支付者信息 */ @SerializedName("payer") private PayerBean payer; /** * 必填 * 上传时间,用于标识请求的先后顺序 示例值: `2022-12-15T13:29:35.120+08:00 */ @SerializedName("upload_time") private String uploadTime; @Data @Builder @NoArgsConstructor @AllArgsConstructor public static class SubOrderListBean implements Serializable { private static final long serialVersionUID = -8792281478692710237L; /** * 必填 * 订单,需要上传购物详情的订单,根据订单类型二选一 */ @SerializedName("order_key") private OrderKeyBean orderKey; /** * 必填 * 发货模式,发货模式枚举值:1、UNIFIED_DELIVERY(统一发货)2、SPLIT_DELIVERY(分拆发货) * 示例值: UNIFIED_DELIVERY */ @SerializedName("delivery_mode") private int deliveryMode; /** * 必填 * 物流信息列表,发货物流单列表,支持统一发货(单个物流单)和分拆发货(多个物流单)两种模式,多重性: [1, 10] */ @SerializedName("shipping_list") private List<ShippingListBean> shippingList; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/shoppingOrders/ShoppingInfoVerifyUpload.java
weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/shoppingOrders/ShoppingInfoVerifyUpload.java
package me.chanjar.weixin.open.bean.shoppingOrders; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; @Data @Builder @NoArgsConstructor @AllArgsConstructor public class ShoppingInfoVerifyUpload implements Serializable { private static final long serialVersionUID = 4295431037060277496L; /** * 必填 * 订单,需要上传购物详情的订单,根据订单类型二选一 */ @SerializedName("order_key") private OrderKeyBean orderKey; /** * 必填 * 支付者,支付者信息 */ @SerializedName("payer") private PayerBean payer; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/shoppingOrders/WxOpenShoppingOrdersConfirmResult.java
weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/shoppingOrders/WxOpenShoppingOrdersConfirmResult.java
package me.chanjar.weixin.open.bean.shoppingOrders; import com.google.gson.annotations.SerializedName; import lombok.Data; import lombok.EqualsAndHashCode; import me.chanjar.weixin.open.bean.result.WxOpenResult; @Data @EqualsAndHashCode(callSuper = true) public class WxOpenShoppingOrdersConfirmResult extends WxOpenResult { private static final long serialVersionUID = 8534868743462740891L; /** * 最近一次审核的结果 */ @SerializedName("last_result") private String lastResult; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/shoppingOrders/ContactBean.java
weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/shoppingOrders/ContactBean.java
package me.chanjar.weixin.open.bean.shoppingOrders; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; @Data @Builder @NoArgsConstructor @AllArgsConstructor public class ContactBean implements Serializable { private static final long serialVersionUID = 2256209964320569284L; /** * 寄件人联系方式,寄件人联系方式,采用掩码传输,最后4位数字不能打掩码 示例值: `189****1234, 021-****1234, ****1234, 0**2-***1234, 0**2-******23-10, ****123-8008` 值限制: 0 ≤ value ≤ 1024 */ @SerializedName("consignor_contact") private String consignorContact; /** * 收件人联系方式,收件人联系方式为,采用掩码传输,最后4位数字不能打掩码 示例值: `189****1234, 021-****1234, ****1234, 0**2-***1234, 0**2-******23-10, ****123-8008` 值限制: 0 ≤ value ≤ 1024 */ @SerializedName("receiver_contact") private String receiverContact; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/shoppingOrders/ShippingInfo.java
weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/shoppingOrders/ShippingInfo.java
package me.chanjar.weixin.open.bean.shoppingOrders; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; import java.util.List; @Data @Builder @NoArgsConstructor @AllArgsConstructor public class ShippingInfo implements Serializable { private static final long serialVersionUID = 2105037984591600658L; /** * 必填 * 订单,需要上传物流信息的订单 */ @SerializedName("order_key") private OrderKeyBean orderKey; /** * 必填 * 发货模式,发货模式枚举值:1、UNIFIED_DELIVERY(统一发货)2、SPLIT_DELIVERY(分拆发货) * 示例值: UNIFIED_DELIVERY */ @SerializedName("delivery_mode") private int deliveryMode; /** * 必填 * 物流信息列表,发货物流单列表,支持统一发货(单个物流单)和分拆发货(多个物流单)两种模式,多重性: [1, 10] */ @SerializedName("shipping_list") private List<ShippingListBean> shippingList; /** * 必填 * 上传时间,用于标识请求的先后顺序 示例值: `2022-12-15T13:29:35.120+08:00 */ @SerializedName("upload_time") private String uploadTime; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/authandicp/WxOpenQueryAuthAndIcpResult.java
weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/authandicp/WxOpenQueryAuthAndIcpResult.java
package me.chanjar.weixin.open.bean.authandicp; import com.google.gson.annotations.SerializedName; import lombok.*; import me.chanjar.weixin.open.bean.result.WxOpenResult; import java.io.Serializable; import java.util.List; /** * @author 痴货 * @Description * @createTime 2025/06/18 23:00 */ @Getter @Setter @NoArgsConstructor public class WxOpenQueryAuthAndIcpResult extends WxOpenResult { private static final long serialVersionUID = -1175687030580654852L; /** * 当前任务流程状态,见下方任务流程状态枚举 * 9 手机验证成功 * 15 等待支付认证审核费用 * 16 认证审核费用支付成功 * 17 认证审核中 * 18 认证审核驳回 * 19 认证审核通过 * 20 认证审核最终失败(不能再修改) * 21 创建备案审核单失败 * 22 备案平台审核中 * 23 备案平台审核驳回 * 24 备案管局审核中 * 25 管局审核驳回 * 26 认证及备案完成 * 27 流程已过期 * 28 流程已终止 * 29 备案已撤回 */ @SerializedName("procedure_status") private Integer procedureStatus; /** * 小程序后台展示的认证订单号 */ @SerializedName("orderid") private Integer orderId; /** * 小程序认证审核单被驳回(procedure_status 为 18)时有效 */ @SerializedName("refill_reason") private String refillReason; /** * 小程序认证审核最终失败的原因(procedure_status 为 20)时有效 */ @SerializedName("fail_reason") private String failReason; /** * 小程序备案相关信息 */ @SerializedName("icp_audit") private IcpAudit icpAudit; @Getter @Setter @NoArgsConstructor public static class IcpAudit implements Serializable { private static final long serialVersionUID = 879913578852421216L; /** * 错误提示,创建备案审核单失败时返回(procedure_status 为 21) */ @SerializedName("hints") private List<Hint> hints; /** * 驳回原因,备案不通过时返回(procedure_status 为 23、25) */ @SerializedName("audit_data") private AuditData auditData; /** * 管局短信核验状态,仅当任务流程状态为 24(备案管局审核中)的时候才有效。1:等待核验中,2:核验完成,3:核验超时。 */ @SerializedName("sms_verify_status") private Integer smsVerifyStatus; } @Getter @Setter @NoArgsConstructor public static class AuditData implements Serializable { private static final long serialVersionUID = 2217833539540191890L; /** * 审核不通过的字段中文名 */ @SerializedName("key_name") private String keyName; /** * 字段不通过的原因 */ @SerializedName("error") private String error; /** * 修改建议 */ @SerializedName("suggest") private String suggest; } @Data @EqualsAndHashCode(callSuper = true) public static class Hint extends WxOpenResult { private static final long serialVersionUID = 6585787444231265854L; /** * 校验失败的字段 */ @SerializedName("err_field") private String errField; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/authandicp/WxOpenSubmitAuthAndIcpParam.java
weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/authandicp/WxOpenSubmitAuthAndIcpParam.java
package me.chanjar.weixin.open.bean.authandicp; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import me.chanjar.weixin.open.api.WxOpenMaIcpService; import java.io.Serializable; import java.util.List; /** * @author 痴货 * @Description * @createTime 2025/06/18 23:00 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor public class WxOpenSubmitAuthAndIcpParam implements Serializable { private static final long serialVersionUID = 5545621231231213158L; /** * 认证数据 */ @SerializedName("auth_data") private AuthData authData; /** * 备案主体信息 */ @SerializedName("icp_subject") private IcpSubject icpSubject; /** * 微信小程序信息 */ @SerializedName("icp_applets") private IcpApplets icpApplets; /** * 其他备案媒体材料 */ @SerializedName("icp_materials") private IcpMaterials icpMaterials; @Data @Builder @NoArgsConstructor @AllArgsConstructor public static class AuthData implements Serializable { private static final long serialVersionUID = 5545289494161613158L; /** * 联系人信息 */ @SerializedName("contact_info") private ContactInfo contactInfo; /** * 发票信息,如果是服务商代缴模式,不需要填写 */ @SerializedName("invoice_info") private InvoiceInfo invoiceInfo; /** * 认证主体类型:1.企业;12.个体工商户;15.个人 */ @SerializedName("customer_type") private Integer customerType; /** * 支付方式 1:消耗服务商预购包 2:小程序开发者自行支付 */ @SerializedName("pay_type") private Integer payType; /** * 主体资质其他证明材料,最多上传10张图片 */ @SerializedName("qualification_other") private List<String> qualificationOther; /** * 小程序账号名称 */ @SerializedName("account_name") private String accountName; /** * 小程序账号名称命名类型 1:基于自选词汇命名 2:基于商标命名 */ @SerializedName("account_name_type") private String accountNameType; /** * 名称命中关键词-补充材料,支持上传多张图片 */ @SerializedName("account_supplemental") private List<String> accountSupplemental; /** * 认证类型为个人类型时可以选择要认证的身份,从 查询个人认证身份选项列表 里获取,填叶节点的name */ @SerializedName("auth_identification") private String authIdentification; /** * 填了 auth_identification 则必填。身份证明材料 (1)基于不同认证身份上传不同的材料;(2)认证类型=1时选填,支持上传10张图片 */ @SerializedName("auth_ident_material") private List<String> authIdentMaterial; /** * 第三方联系电话 */ @SerializedName("third_party_phone") private String thirdPartyPhone; /** * 选择服务商代缴模式时必填。服务市场 appid,该服务市场账号主体必须与服务商账号主体一致 */ @SerializedName("service_appid") private String serviceAppid; } @Data @Builder @NoArgsConstructor @AllArgsConstructor public static class ContactInfo implements Serializable { private static final long serialVersionUID = -2962862643438222305L; /** * 认证联系人姓名 */ @SerializedName("name") private String name; /** * 认证联系人邮箱 */ @SerializedName("email") private String email; /** * 认证联系人手机号 */ @SerializedName("mobile") private String mobile; } @Data @Builder @NoArgsConstructor @AllArgsConstructor public static class InvoiceInfo implements Serializable { private static final long serialVersionUID = 4564894651613131322L; /** * 发票类型 1: 不开发票 2: 电子发票 4: 增值税专票(数电类型) */ @SerializedName("invoice_type") private String invoiceType; /** * 发票类型=2时必填 电子发票开票信息 */ @SerializedName("electronic") private Electronic electronic; /** * 发票类型=4时必填 增值税专票(数电类型)开票信息 */ @SerializedName("vat") private Vat vat; } @Data @Builder @NoArgsConstructor @AllArgsConstructor public static class Electronic implements Serializable { private static final long serialVersionUID = 189498465135131444L; /** * 纳税识别号(15位、17、18或20位) */ @SerializedName("id") private String id; /** * 发票备注(选填) */ @SerializedName("desc") private String desc; } @Data @Builder @NoArgsConstructor @AllArgsConstructor public static class Vat implements Serializable { private static final long serialVersionUID = 829892829816551512L; /** * 企业电话 */ @SerializedName("enterprise_phone") private String enterprisePhone; /** * 纳税识别号(15位、17、18或20位) */ @SerializedName("id") private String id; /** * 企业注册地址 */ @SerializedName("enterprise_address") private String enterpriseAddress; /** * 企业开户银行(选填) */ @SerializedName("bank_name") private String bankName; /** * 企业银行账号(选填) */ @SerializedName("bank_account") private String bankAccount; /** * 发票备注(选填) */ @SerializedName("desc") private String desc; } @Data @Builder @NoArgsConstructor @AllArgsConstructor public static class IcpSubject implements Serializable { private static final long serialVersionUID = -1256165165165165165L; /** * 主体基本信息 */ @SerializedName("base_info") private SubjectBaseInfo baseInfo; /** * 个人主体额外信息 */ @SerializedName("personal_info") private SubjectPersonalInfo personalInfo; /** * 主体额外信息(个人备案时,如果存在与主体负责人信息相同的字段,则填入相同的值) */ @SerializedName("organize_info") private SubjectOrganizeInfo organizeInfo; /** * 主体负责人信息 */ @SerializedName("principal_info") private SubjectPrincipalInfo principalInfo; /** * 法人信息(非个人备案,且主体负责人不是法人时,必填) */ @SerializedName("legal_person_info") private SubjectLegalPersonInfo legalPersonInfo; } @Data @Builder @NoArgsConstructor @AllArgsConstructor public static class SubjectBaseInfo implements Serializable { private static final long serialVersionUID = -1561561613212313445L; /** * 主体性质,选项参考 获取单位性质,**仅支持企业、个体工商户、个人** * {@link WxOpenMaIcpService#queryIcpSubjectTypes } */ @SerializedName("type") private Integer type; /** * 主办单位名称 */ @SerializedName("name") private String name; /** * 备案省份,使用省份代码 */ @SerializedName("province") private String province; /** * 备案城市,使用城市代码 */ @SerializedName("city") private String city; /** * 备案县区,使用县区代码 */ @SerializedName("district") private String district; /** * 通讯地址,必须属于备案省市区,地址开头的省市区不用填入 */ @SerializedName("address") private String address; /** * 主体信息备注,根据需要,如实填写 */ @SerializedName("comment") private String comment; /** * 主体备案号 */ @SerializedName("record_number") private String recordNumber; } @Data @Builder @NoArgsConstructor @AllArgsConstructor public static class SubjectPersonalInfo implements Serializable { private static final long serialVersionUID = -2151981561916519288L; /** * 临时居住证明照片 media_id,个人备案且非本省人员,需要提供居住证、暂住证、社保证明、房产证等临时居住证明 */ @SerializedName("residence_permit") private String residencePermit; } @Data @Builder @NoArgsConstructor @AllArgsConstructor public static class SubjectOrganizeInfo implements Serializable { private static final long serialVersionUID = -1181121318132185161L; /** * 主体证件类型 * {@link WxOpenMaIcpService#queryIcpCertificateTypes} */ @SerializedName("certificate_type") private Integer certificateType; /** * 主体证件号码 */ @SerializedName("certificate_number") private String certificateNumber; /** * 主体证件住所 */ @SerializedName("certificate_address") private String certificateAddress; /** * 主体证件照片 media_id,如果小程序主体为非个人类型 */ @SerializedName("certificate_photo") private String certificatePhoto; } @Data @Builder @NoArgsConstructor @AllArgsConstructor public static class SubjectPrincipalInfo implements Serializable { private static final long serialVersionUID = -2984191321918916511L; /** * 负责人姓名 */ @SerializedName("name") private String name; /** * 负责人联系方式 */ @SerializedName("mobile") private String mobile; /** * 负责人电子邮件 */ @SerializedName("email") private String email; /** * 负责人应急联系方式 */ @SerializedName("emergency_contact") private String emergencyContact; /** * 负责人证件类型(获取证件类型 * {@link WxOpenMaIcpService#queryIcpCertificateTypes()}) */ @SerializedName("certificate_type") private Integer certificateType; /** * 负责人证件号码 */ @SerializedName("certificate_number") private String certificateNumber; /** * 负责人证件有效期起始日期,格式为 YYYYmmdd */ @SerializedName("certificate_validity_date_start") private String certificateValidityDateStart; /** * 负责人证件有效期终止日期,格式为 YYYYmmdd */ @SerializedName("certificate_validity_date_end") private String certificateValidityDateEnd; /** * 负责人证件正面照片 media_id(身份证为人像面) */ @SerializedName("certificate_photo_front") private String certificatePhotoFront; /** * 负责人证件背面照片 media_id(身份证为国徽面) */ @SerializedName("certificate_photo_back") private String certificatePhotoBack; /** * 授权书 media_id,当主体负责人不是法人时需要主体负责人授权书,当小程序负责人不是法人时需要小程序负责人授权书 */ @SerializedName("authorization_letter") private String authorizationLetter; /** * 扫脸认证任务id(扫脸认证接口返回的task_id),仅小程序负责人需要扫脸,主体负责人无需扫脸 */ @SerializedName("verify_task_id") private String verifyTaskId; } @Data @Builder @NoArgsConstructor @AllArgsConstructor public static class SubjectLegalPersonInfo implements Serializable { private static final long serialVersionUID = -1259198165316516161L; /** * 法人代表姓名 */ @SerializedName("name") private String name; /** * 法人证件号码 */ @SerializedName("certificate_number") private String certificateNumber; } @Data @Builder @NoArgsConstructor @AllArgsConstructor public static class IcpApplets implements Serializable { private static final long serialVersionUID = -2156129841651651651L; /** * 微信小程序基本信息 */ @SerializedName("base_info") private AppletsBaseInfo baseInfo; /** * 小程序负责人信息 */ @SerializedName("principal_info") private AppletsPrincipalInfo principalInfo; } @Data @Builder @NoArgsConstructor @AllArgsConstructor public static class AppletsBaseInfo implements Serializable { private static final long serialVersionUID = 8404017028547715919L; /** * 小程序ID,不用填写,后台自动拉取 */ @SerializedName("appid") private String appId; /** * 小程序名称,不用填写,后台自动拉取 */ @SerializedName("name") private String name; /** * 小程序服务内容类型,只能填写二级服务内容类型,最多5个 * {@link WxOpenMaIcpService#queryIcpServiceContentTypes} */ @SerializedName("service_content_types") private List<Integer> serviceContentTypes; /** * 前置审批项,列表中不能存在重复的前置审批类型id,如不涉及前置审批项,也需要填“以上都不涉及” */ @SerializedName("nrlx_details") private List<AppletsNrlxDetailItem> nrlxDetails; /** * 请具体描述小程序实际经营内容、主要服务内容,该信息为主管部门审核重要依据,备注内容字数限制20-200字,请认真填写。 */ @SerializedName("comment") private String comment; /** * 小程序备案号,示例值:粤B2-20090059-1626X * (申请小程序备案时不用填写,查询已备案详情时会返回) */ @SerializedName("record_number") private String recordNumber; } @Data @Builder @NoArgsConstructor @AllArgsConstructor public static class AppletsNrlxDetailItem implements Serializable { private static final long serialVersionUID = -9144721738792167000L; /** * 前置审批类型 * {@link WxOpenMaIcpService#queryIcpNrlxTypes} */ @SerializedName("type") private Integer type; /** * 前置审批号,如果前置审批类型不是“以上都不涉及”, * 则必填,示例值:"粤-12345号 */ @SerializedName("code") private String code; /** * 前置审批媒体材料 media_id */ @SerializedName("media") private String media; } @Data @Builder @NoArgsConstructor @AllArgsConstructor public static class AppletsPrincipalInfo implements Serializable { private static final long serialVersionUID = 5088256283066784463L; /** * 负责人姓名 */ @SerializedName("name") private String name; /** * 负责人联系方式 */ @SerializedName("mobile") private String mobile; /** * 负责人电子邮件 */ @SerializedName("email") private String email; /** * 负责人应急联系方式 */ @SerializedName("emergency_contact") private String emergencyContact; /** * 负责人证件类型 * {@link WxOpenMaIcpService#queryIcpCertificateTypes} */ @SerializedName("certificate_type") private Integer certificateType; /** * 负责人证件号码 */ @SerializedName("certificate_number") private String certificateNumber; /** * 负责人证件有效期起始日期, * 格式为 YYYYmmdd,示例值:"20230815" */ @SerializedName("certificate_validity_date_start") private String certificateValidityDateStart; /** * 负责人证件有效期终止日期, * 格式为 YYYYmmdd, * 如证件长期有效,请填写 "长期",示例值:"20330815" */ @SerializedName("certificate_validity_date_end") private String certificateValidityDateEnd; /** * 负责人证件正面照片 media_id * (身份证为人像面) */ @SerializedName("certificate_photo_front") private String certificatePhotoFront; /** * 负责人证件背面照片 media_id * (身份证为国徽面) */ @SerializedName("certificate_photo_back") private String certificatePhotoBack; /** * 授权书 media_id, * 当主体负责人不是法人时需要主体负责人授权书, * 当小程序负责人不是法人时需要小程序负责人授权书 */ @SerializedName("authorization_letter") private String authorizationLetter; /** * 扫脸认证任务id(扫脸认证接口返回的task_id), * 仅小程序负责人需要扫脸,主体负责人无需扫脸 */ @SerializedName("verify_task_id") private String verifyTaskId; } @Data @Builder @NoArgsConstructor @AllArgsConstructor public static class IcpMaterials implements Serializable { private static final long serialVersionUID = -2651654844198165191L; /** * 互联网信息服务承诺书 media_id,最多上传1个 */ @SerializedName("commitment_letter") private List<String> commitmentLetter; /** * 主体更名函 media_id(非个人类型,且发生过更名时需要上传),最多上传1个 */ @SerializedName("business_name_change_letter") private List<String> businessNameChangeLetter; /** * 党建确认函 media_id,最多上传1个 */ @SerializedName("party_building_confirmation_letter") private List<String> partyBuildingConfirmationLetter; /** * 承诺视频 media_id,最多上传1个 */ @SerializedName("promise_video") private List<String> promiseVideo; /** * 网站备案信息真实性责任告知书 media_id,最多上传1个 */ @SerializedName("authenticity_responsibility_letter") private List<String> authenticityResponsibilityLetter; /** * 小程序备案信息真实性承诺书 media_id,最多上传1个 */ @SerializedName("authenticity_commitment_letter") private List<String> authenticityCommitmentLetter; /** * 小程序建设方案书 media_id,最多上传1个 */ @SerializedName("website_construction_proposal") private List<String> websiteConstructionProposal; /** * 主体其它附件 media_id,最多上传10个 */ @SerializedName("subject_other_materials") private List<String> subjectOtherMaterials; /** * 小程序其它附件 media_id,最多上传10个 */ @SerializedName("applets_other_materials") private List<String> appletsOtherMaterials; /** * 手持证件照 media_id,最多上传1个 */ @SerializedName("holding_certificate_photo") private List<String> holdingCertificatePhoto; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/authandicp/WxOpenSubmitAuthAndIcpResult.java
weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/authandicp/WxOpenSubmitAuthAndIcpResult.java
package me.chanjar.weixin.open.bean.authandicp; import com.google.gson.annotations.SerializedName; import lombok.*; import me.chanjar.weixin.open.bean.result.WxOpenResult; import java.util.List; /** * @author 痴货 * @Description * @createTime 2025/06/18 23:00 */ @Getter @Setter @NoArgsConstructor public class WxOpenSubmitAuthAndIcpResult extends WxOpenResult { private static final long serialVersionUID = -1175687058498454852L; /** * 错误提示 */ @SerializedName("hints") private List<Hint> hints; /** * 小程序认证及备案任务流程 id */ @SerializedName("procedure_id") private String procedureId; /** * 小程序认证认证审核费用付费链接,当 pay_type 为 2 时返回 */ @SerializedName("pay_url") private String payUrl; @Data @EqualsAndHashCode(callSuper = true) public static class Hint extends WxOpenResult { private static final long serialVersionUID = 6585787444231265854L; /** * 校验失败的字段 */ @SerializedName("err_field") private String errField; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/util/JsonUtilsTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/util/JsonUtilsTest.java
package me.chanjar.weixin.channel.util; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; import me.chanjar.weixin.channel.bean.base.AttrInfo; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ public class JsonUtilsTest { @Test public void testEncode() { AttrInfo info = new AttrInfo("这是Key", "这是Value"); String json = JsonUtils.encode(info); System.out.println(json); assertNotNull(json); } @Test public void testDecode() { String json = "{\"attr_key\": \"这是Key\",\"attr_value\": \"这是Value\"}"; AttrInfo info = JsonUtils.decode(json, AttrInfo.class); assertNotNull(info); assertEquals(info.getKey(), "这是Key"); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/util/ResponseUtilsTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/util/ResponseUtilsTest.java
package me.chanjar.weixin.channel.util; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; import me.chanjar.weixin.channel.bean.shop.ShopInfoResponse; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ public class ResponseUtilsTest { @Test public void testDecode() { String json = "{\"errcode\":0,\"errmsg\":\"ok\",\"info\":{\"nickname\":\"某某视频号\"," + "\"headimg_url\":\"http://wx.qlogo.cn/xxx\",\"subject_type\":\"企业\"}}"; ShopInfoResponse response = ResponseUtils.decode(json, ShopInfoResponse.class); assertNotNull(response); assertEquals(response.getErrCode(), 0); assertEquals(response.getErrMsg(), "ok"); assertEquals(response.getInfo().getNickname(), "某某视频号"); assertEquals(response.getInfo().getHeadImgUrl(), "http://wx.qlogo.cn/xxx"); assertEquals(response.getInfo().getSubjectType(), "企业"); } @Test public void testInternalError() { ShopInfoResponse response = ResponseUtils.internalError(ShopInfoResponse.class); assertNotNull(response); assertEquals(response.getErrCode(), -99); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/test/ApiTestModule.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/test/ApiTestModule.java
package me.chanjar.weixin.channel.test; import com.google.inject.Binder; import com.google.inject.Module; import java.io.IOException; import java.io.InputStream; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.api.impl.WxChannelServiceImpl; import me.chanjar.weixin.channel.util.XmlUtils; import me.chanjar.weixin.common.error.WxRuntimeException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * 测试模块 * * @author <a href="https://github.com/lixize">Zeyes</a> */ public class ApiTestModule implements Module { private final Logger log = LoggerFactory.getLogger(this.getClass()); private static final String TEST_CONFIG_XML = "test-config.xml"; @Override public void configure(Binder binder) { try (InputStream inputStream = ClassLoader.getSystemResourceAsStream(TEST_CONFIG_XML)) { if (inputStream == null) { throw new WxRuntimeException( "测试配置文件【" + TEST_CONFIG_XML + "】未找到,请参照test-config-sample.xml文件生成"); } // 提示xml相关依赖不存在时,引入一下就好 TestConfig config = this.fromXml(TestConfig.class, inputStream); WxChannelService service = new WxChannelServiceImpl(); service.setConfig(config); binder.bind(TestConfig.class).toInstance(config); binder.bind(WxChannelService.class).toInstance(service); } catch (IOException e) { this.log.error(e.getMessage(), e); } } private <T> T fromXml(Class<T> clazz, InputStream is) { return XmlUtils.decode(is, clazz); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/test/TestConfig.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/test/TestConfig.java
package me.chanjar.weixin.channel.test; import lombok.Getter; import lombok.Setter; import me.chanjar.weixin.channel.config.impl.WxChannelDefaultConfigImpl; @Getter @Setter public class TestConfig extends WxChannelDefaultConfigImpl { }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelVipServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelVipServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; import com.google.inject.Inject; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.bean.vip.VipInfoResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.channel.util.JsonUtils; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Guice(modules = ApiTestModule.class) public class WxChannelVipServiceImplTest { @Inject private WxChannelService channelService; @Test public void getVipInfo() throws WxErrorException { String openId = ""; Boolean needPhoneNumber = false; VipInfoResponse response = channelService.getVipService().getVipInfo(openId, needPhoneNumber); System.out.println(JsonUtils.encode(response)); assertNotNull(response); assertTrue(response.isSuccess()); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxStoreHomePageServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxStoreHomePageServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; import com.google.inject.Inject; import me.chanjar.weixin.channel.api.WxStoreHomePageService; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.home.background.BackgroundApplyResponse; import me.chanjar.weixin.channel.bean.home.background.BackgroundGetResponse; import me.chanjar.weixin.channel.bean.home.banner.BannerApplyParam; import me.chanjar.weixin.channel.bean.home.banner.BannerApplyResponse; import me.chanjar.weixin.channel.bean.home.banner.BannerGetResponse; import me.chanjar.weixin.channel.bean.home.banner.BannerInfo; import me.chanjar.weixin.channel.bean.home.tree.TreeProductEditInfo; import me.chanjar.weixin.channel.bean.home.tree.TreeProductEditParam; import me.chanjar.weixin.channel.bean.home.tree.TreeProductListInfo; import me.chanjar.weixin.channel.bean.home.tree.TreeProductListResponse; import me.chanjar.weixin.channel.bean.home.tree.TreeShowGetResponse; import me.chanjar.weixin.channel.bean.home.tree.TreeShowInfo; import me.chanjar.weixin.channel.bean.home.tree.TreeShowParam; import me.chanjar.weixin.channel.bean.home.tree.TreeShowSetResponse; import me.chanjar.weixin.channel.bean.home.window.WindowProductSettingResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.channel.util.JsonUtils; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Guice(modules = ApiTestModule.class) public class WxStoreHomePageServiceImplTest { @Inject private WxChannelService channelService; @Test public void testAddTreeProduct() throws WxErrorException { WxStoreHomePageService service = channelService.getHomePageService(); // https://developers.weixin.qq.com/doc/store/API/homepage/classification/addclassificationproduct.html String json = "{\n" + " \"req\": {\n" + " \"level_1_id\": 10000046,\n" + " \"level_2_id\": 10000048,\n" + " \"product_ids\": [\n" + " 10000076089602\n" + " ]\n" + " }\n" + "}"; TreeProductEditParam param = JsonUtils.decode(json, TreeProductEditParam.class); TreeProductEditInfo info = null; if (param != null) { info = param.getReq(); } WxChannelBaseResponse response = service.addTreeProduct(info); assertNotNull(response); assertTrue(response.isSuccess()); assertNotNull(info); System.out.println(JsonUtils.encode(response)); } @Test public void testDelTreeProduct() throws WxErrorException { WxStoreHomePageService service = channelService.getHomePageService(); String json = "{\n" + " \"req\": {\n" + " \"level_1_id\": 1,\n" + " \"level_2_id\": 0,\n" + " \"product_ids\": [\n" + " 123\n" + " ]\n" + " }\n" + "}"; TreeProductEditParam param = JsonUtils.decode(json, TreeProductEditParam.class); TreeProductEditInfo info = null; if (param != null) { info = param.getReq(); } WxChannelBaseResponse response = service.delTreeProduct(info); assertNotNull(response); assertTrue(response.isSuccess()); assertNotNull(info); System.out.println(JsonUtils.encode(response)); } @Test public void testGetTreeProductList() throws WxErrorException { WxStoreHomePageService service = channelService.getHomePageService(); String pageContext = ""; TreeProductListInfo info = new TreeProductListInfo(); info.setLevel1Id(1); info.setLevel2Id(2); info.setPageSize(10); info.setPageContext(pageContext); TreeProductListResponse response = service.getTreeProductList(info); assertNotNull(response); assertTrue(response.isSuccess()); assertNotNull(info); System.out.println(JsonUtils.encode(response)); } @Test public void testSetShowTree() throws WxErrorException { WxStoreHomePageService service = channelService.getHomePageService(); // https://developers.weixin.qq.com/doc/store/API/homepage/classification/setclassificationtree.html String json = "{\n" + " \"req\": {\n" + " \"version\": 121,\n" + " \"classification_id_deleted\": [\n" + " \"1.2\"\n" + " ],\n" + " \"tree\": {\n" + " \"level_1\": [\n" + " {\n" + " \"id\": 4,\n" + " \"name\": \"测试7\",\n" + " \"level_2\": [\n" + " {\n" + " \"id\": 5,\n" + " \"name\": \"1\",\n" + " \"is_displayed\": 1\n" + " }\n" + " ],\n" + " \"is_displayed\": 1\n" + " },\n" + " {\n" + " \"id\": 6,\n" + " \"name\": \"测试8\",\n" + " \"level_2\": [\n" + " {\n" + " \"id\": 7,\n" + " \"name\": \"1\",\n" + " \"is_displayed\": 1\n" + " },\n" + " {\n" + " \"id\": 8,\n" + " \"name\": \"2\",\n" + " \"is_displayed\": 1\n" + " }\n" + " ],\n" + " \"is_displayed\": 1\n" + " }\n" + " ]\n" + " }\n" + " }\n" + "}"; TreeShowParam param = JsonUtils.decode(json, TreeShowParam.class); TreeShowInfo info = null; if (param != null) { info = param.getReq(); } TreeShowSetResponse response = service.setShowTree(info); assertNotNull(response); assertTrue(response.isSuccess()); assertNotNull(info); System.out.println(JsonUtils.encode(response)); } @Test public void testGetShowTree() throws WxErrorException { WxStoreHomePageService service = channelService.getHomePageService(); TreeShowGetResponse response = service.getShowTree(); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(JsonUtils.encode(response)); } @Test public void testListWindowProduct() throws WxErrorException { WxStoreHomePageService service = channelService.getHomePageService(); Integer pageSize = 1; String nextKey = ""; WindowProductSettingResponse response = service.listWindowProduct(pageSize, nextKey); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(JsonUtils.encode(response)); } @Test public void testReorderWindowProduct() throws WxErrorException { WxStoreHomePageService service = channelService.getHomePageService(); String productId = ""; Integer indexNum = 100; WxChannelBaseResponse response = service.reorderWindowProduct(productId, indexNum); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(JsonUtils.encode(response)); } @Test public void testHideWindowProduct() throws WxErrorException { WxStoreHomePageService service = channelService.getHomePageService(); String productId = ""; // 0:显示 1:隐藏 Integer setHide = 0; WxChannelBaseResponse response = service.hideWindowProduct(productId, setHide); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(JsonUtils.encode(response)); } @Test public void testTopWindowProduct() throws WxErrorException { WxStoreHomePageService service = channelService.getHomePageService(); String productId = ""; // 0:取消置顶 1:置顶 Integer setTop = 0; WxChannelBaseResponse response = service.topWindowProduct(productId, setTop); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(JsonUtils.encode(response)); } @Test public void testApplyBackground() throws WxErrorException { WxStoreHomePageService service = channelService.getHomePageService(); String imgUrl = "https://github.githubassets.com/images/icons/emoji/octocat.png"; BackgroundApplyResponse response = service.applyBackground(imgUrl); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(JsonUtils.encode(response)); } @Test public void testGetBackground() throws WxErrorException { WxStoreHomePageService service = channelService.getHomePageService(); BackgroundGetResponse response = service.getBackground(); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(JsonUtils.encode(response)); } @Test public void testCancelBackground() throws WxErrorException { Integer applyId = 1; WxStoreHomePageService service = channelService.getHomePageService(); WxChannelBaseResponse response = service.cancelBackground(applyId); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(JsonUtils.encode(response)); } @Test public void testRemoveBackground() throws WxErrorException { WxStoreHomePageService service = channelService.getHomePageService(); WxChannelBaseResponse response = service.removeBackground(); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(JsonUtils.encode(response)); } @Test public void testApplyBanner() throws WxErrorException { WxStoreHomePageService service = channelService.getHomePageService(); // https://developers.weixin.qq.com/doc/store/API/homepage/banner/submit_banner_apply.html String json = "{\n" + " \"banner\": {\n" + " \"scale\": 2,\n" + " \"banner\": [\n" + " {\n" + " \"type\": 1,\n" + " \"product\": {\n" + " \"product_id\": 123\n" + " },\n" + " \"banner\": {\n" + " \"description\": \"测试商品精品展示位描述\",\n" + " \"img_url\": \"https://store.mp.video.tencent-cloud.com/abc\",\n" + " \"title\": \"测试商品精品展示位标题\"\n" + " }\n" + " },\n" + " {\n" + " \"type\": 3,\n" + " \"finder\": {\n" + " \"feed_id\": \"export/abc\",\n" + " \"finder_user_name\": \"sphabc\"\n" + " },\n" + " \"banner\": {\n" + " \"description\": \"测试视频号视频精品展示位描述\",\n" + " \"img_url\": \"https://store.mp.video.tencent-cloud.com/abc\",\n" + " \"title\": \"测试视频号视频精品展示位标题\"\n" + " }\n" + " },\n" + " {\n" + " \"type\": 4,\n" + " \"official_account\": {\n" + " \"url\": \"https://mp.weixin.qq.com/abc\"\n" + " },\n" + " \"banner\": {\n" + " \"description\": \"测试公众号文章精品展示位描述\",\n" + " \"img_url\": \"https://store.mp.video.tencent-cloud.com/abc\",\n" + " \"title\": \"测试公众号文章精品展示位标题\"\n" + " }\n" + " }\n" + " ]\n" + " }\n" + "}"; BannerApplyParam param = JsonUtils.decode(json, BannerApplyParam.class); BannerInfo info = null; if (param != null) { info = param.getBanner(); } BannerApplyResponse response = service.applyBanner(info); assertNotNull(response); assertTrue(response.isSuccess()); assertNotNull(info); System.out.println(JsonUtils.encode(response)); } @Test public void testGetBanner() throws WxErrorException { WxStoreHomePageService service = channelService.getHomePageService(); BannerGetResponse response = service.getBanner(); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(JsonUtils.encode(response)); } @Test public void testCancelBanner() throws WxErrorException { Integer applyId = 1; WxStoreHomePageService service = channelService.getHomePageService(); WxChannelBaseResponse response = service.cancelBanner(applyId); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(JsonUtils.encode(response)); } @Test public void testRemoveBanner() throws WxErrorException { WxStoreHomePageService service = channelService.getHomePageService(); WxChannelBaseResponse response = service.removeBanner(); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(JsonUtils.encode(response)); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelFreightTemplateServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelFreightTemplateServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import static org.testng.Assert.*; import com.google.inject.Inject; import me.chanjar.weixin.channel.api.WxChannelFreightTemplateService; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.bean.freight.FreightTemplate; import me.chanjar.weixin.channel.bean.freight.TemplateIdResponse; import me.chanjar.weixin.channel.bean.freight.TemplateInfoResponse; import me.chanjar.weixin.channel.bean.freight.TemplateListResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Guice(modules = ApiTestModule.class) public class WxChannelFreightTemplateServiceImplTest { @Inject private WxChannelService channelService; @Test public void testListTemplate() throws WxErrorException { WxChannelFreightTemplateService freightTemplateService = channelService.getFreightTemplateService(); Integer offset = 0; Integer limit = 20; TemplateListResponse response = freightTemplateService.listTemplate(offset, limit); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetTemplate() throws WxErrorException { WxChannelFreightTemplateService freightTemplateService = channelService.getFreightTemplateService(); String templateId = ""; TemplateInfoResponse response = freightTemplateService.getTemplate(templateId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testAddTemplate() throws WxErrorException { WxChannelFreightTemplateService freightTemplateService = channelService.getFreightTemplateService(); FreightTemplate template = new FreightTemplate(); // ... TemplateIdResponse response = freightTemplateService.addTemplate(template); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testUpdateTemplate() throws WxErrorException { WxChannelFreightTemplateService freightTemplateService = channelService.getFreightTemplateService(); FreightTemplate template = new FreightTemplate(); // ... TemplateIdResponse response = freightTemplateService.updateTemplate(template); assertNotNull(response); assertTrue(response.isSuccess()); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelOrderServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelOrderServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; import com.google.inject.Inject; import java.util.ArrayList; import java.util.List; import me.chanjar.weixin.channel.api.WxChannelOrderService; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.bean.base.AddressInfo; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.delivery.DeliveryCompanyResponse; import me.chanjar.weixin.channel.bean.delivery.DeliveryInfo; import me.chanjar.weixin.channel.bean.delivery.PackageAuditInfo; import me.chanjar.weixin.channel.bean.order.ChangeOrderInfo; import me.chanjar.weixin.channel.bean.order.DecodeSensitiveInfoResponse; import me.chanjar.weixin.channel.bean.order.DeliveryUpdateParam; import me.chanjar.weixin.channel.bean.order.OrderAddressInfo; import me.chanjar.weixin.channel.bean.order.OrderInfoResponse; import me.chanjar.weixin.channel.bean.order.OrderListParam; import me.chanjar.weixin.channel.bean.order.OrderListResponse; import me.chanjar.weixin.channel.bean.order.OrderSearchCondition; import me.chanjar.weixin.channel.bean.order.OrderSearchParam; import me.chanjar.weixin.channel.bean.order.VirtualTelNumberResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Guice(modules = ApiTestModule.class) public class WxChannelOrderServiceImplTest { @Inject private WxChannelService channelService; @Test public void testGetOrder() throws WxErrorException { WxChannelOrderService orderService = channelService.getOrderService(); String orderId = ""; OrderInfoResponse response = orderService.getOrder(orderId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetOrder2() throws WxErrorException { WxChannelOrderService orderService = channelService.getOrderService(); String orderId = ""; boolean encodeSensitiveInfo = true; OrderInfoResponse response = orderService.getOrder(orderId, encodeSensitiveInfo); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetOrders() throws WxErrorException { WxChannelOrderService orderService = channelService.getOrderService(); OrderListParam param = new OrderListParam(); OrderListResponse response = orderService.getOrders(param); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testSearchOrder() throws WxErrorException { WxChannelOrderService orderService = channelService.getOrderService(); OrderSearchParam param = new OrderSearchParam(); param.setPageSize(100); OrderSearchCondition searchCondition = new OrderSearchCondition(); searchCondition.setTitle(""); param.setSearchCondition(searchCondition); OrderListResponse response = orderService.searchOrder(param); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testUpdatePrice() throws WxErrorException { WxChannelOrderService orderService = channelService.getOrderService(); String orderId = ""; Integer expressFee = 0; List<ChangeOrderInfo> changeOrderInfos = new ArrayList<>(4); ChangeOrderInfo changeOrderInfo = new ChangeOrderInfo(); changeOrderInfos.add(changeOrderInfo); WxChannelBaseResponse response = orderService.updatePrice(orderId, expressFee, changeOrderInfos); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testUpdateRemark() throws WxErrorException { WxChannelOrderService orderService = channelService.getOrderService(); String orderId = ""; String merchantNotes = ""; WxChannelBaseResponse response = orderService.updateRemark(orderId, merchantNotes); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testUpdateAddress() throws WxErrorException { WxChannelOrderService orderService = channelService.getOrderService(); String orderId = ""; AddressInfo addressInfo = new OrderAddressInfo(); WxChannelBaseResponse response = orderService.updateAddress(orderId, addressInfo); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testUpdateDelivery() throws WxErrorException { WxChannelOrderService orderService = channelService.getOrderService(); DeliveryUpdateParam param = new DeliveryUpdateParam(); WxChannelBaseResponse response = orderService.updateDelivery(param); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testAcceptAddressModify() throws WxErrorException { WxChannelOrderService orderService = channelService.getOrderService(); String orderId = ""; WxChannelBaseResponse response = orderService.acceptAddressModify(orderId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testRejectAddressModify() throws WxErrorException { WxChannelOrderService orderService = channelService.getOrderService(); String orderId = ""; WxChannelBaseResponse response = orderService.rejectAddressModify(orderId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testCloseOrder() { WxChannelOrderService orderService = channelService.getOrderService(); String orderId = ""; WxChannelBaseResponse response = orderService.closeOrder(orderId); assertNotNull(response); //assertTrue(response.isSuccess()); } @Test public void testListDeliveryCompany() throws WxErrorException { WxChannelOrderService orderService = channelService.getOrderService(); DeliveryCompanyResponse response = orderService.listDeliveryCompany(false); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testDeliveryOrder() throws WxErrorException { WxChannelOrderService orderService = channelService.getOrderService(); String orderId = ""; List<DeliveryInfo> deliveryList = new ArrayList<>(4); DeliveryInfo deliveryInfo = new DeliveryInfo(); deliveryList.add(deliveryInfo); WxChannelBaseResponse response = orderService.deliveryOrder(orderId, deliveryList); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testUploadFreshInspect() throws WxErrorException { WxChannelOrderService orderService = channelService.getOrderService(); String orderId = "123"; List<PackageAuditInfo> items = new ArrayList<>(); items.add(new PackageAuditInfo("product_express_pic_url", "https://store.mp.video.tencent-cloud.com/x")); items.add(new PackageAuditInfo("product_packaging_box_panoramic_video_url", "https://store.mp.video.tencent-cloud.com/y")); items.add(new PackageAuditInfo("product_unboxing_panoramic_video_url", "https://store.mp.video.tencent-cloud.com/z")); items.add(new PackageAuditInfo("single_product_detail_panoramic_video_url", "https://store.mp.video.tencent-cloud.com/a")); WxChannelBaseResponse response = orderService.uploadFreshInspect(orderId, items); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetVirtualTelNumber() throws WxErrorException { WxChannelOrderService orderService = channelService.getOrderService(); String orderId = "123"; VirtualTelNumberResponse response = orderService.getVirtualTelNumber(orderId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testDecodeSensitiveInfo() throws WxErrorException { WxChannelOrderService orderService = channelService.getOrderService(); String orderId = "123"; DecodeSensitiveInfoResponse response = orderService.decodeSensitiveInfo(orderId); assertNotNull(response); assertTrue(response.isSuccess()); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelAfterSaleServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; import com.google.inject.Inject; import java.time.LocalDateTime; import java.time.ZoneId; import java.util.ArrayList; import java.util.List; import me.chanjar.weixin.channel.api.WxChannelAfterSaleService; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.bean.after.AfterSaleInfoResponse; import me.chanjar.weixin.channel.bean.after.AfterSaleListResponse; import me.chanjar.weixin.channel.bean.after.AfterSaleReasonResponse; import me.chanjar.weixin.channel.bean.after.AfterSaleRejectReasonResponse; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.complaint.ComplaintOrderResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Guice(modules = ApiTestModule.class) public class WxChannelAfterSaleServiceImplTest { @Inject private WxChannelService channelService; @Test public void testListIds() throws WxErrorException { WxChannelAfterSaleService afterSaleService = channelService.getAfterSaleService(); Long beginCreateTime = LocalDateTime.now().minusDays(7).atZone(ZoneId.systemDefault()).toEpochSecond(); Long endCreateTime = LocalDateTime.now().atZone(ZoneId.systemDefault()).toEpochSecond(); String nextKey = null; AfterSaleListResponse response = afterSaleService.listIds(beginCreateTime, endCreateTime, nextKey); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGet() throws WxErrorException { WxChannelAfterSaleService afterSaleService = channelService.getAfterSaleService(); String afterSaleOrderId = ""; AfterSaleInfoResponse response = afterSaleService.get(afterSaleOrderId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testAccept() throws WxErrorException { WxChannelAfterSaleService afterSaleService = channelService.getAfterSaleService(); String afterSaleOrderId = ""; String addressId = null; WxChannelBaseResponse response = afterSaleService.accept(afterSaleOrderId, addressId, 2); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testReject() throws WxErrorException { WxChannelAfterSaleService afterSaleService = channelService.getAfterSaleService(); String afterSaleOrderId = ""; String rejectReason = null; WxChannelBaseResponse response = afterSaleService.reject(afterSaleOrderId, rejectReason,1); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testUploadRefundEvidence() throws WxErrorException { WxChannelAfterSaleService afterSaleService = channelService.getAfterSaleService(); String afterSaleOrderId = ""; String desc = ""; List<String> certificates = new ArrayList<>(4); WxChannelBaseResponse response = afterSaleService.uploadRefundEvidence(afterSaleOrderId, desc, certificates); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testAddComplaintMaterial() throws WxErrorException { WxChannelAfterSaleService afterSaleService = channelService.getAfterSaleService(); String complaintId = ""; String content = ""; List<String> mediaIds = new ArrayList<>(4); WxChannelBaseResponse response = afterSaleService.addComplaintMaterial(complaintId, content, mediaIds); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testAddComplaintEvidence() throws WxErrorException { WxChannelAfterSaleService afterSaleService = channelService.getAfterSaleService(); String complaintId = ""; String content = ""; List<String> mediaIds = new ArrayList<>(4); WxChannelBaseResponse response = afterSaleService.addComplaintEvidence(complaintId, content, mediaIds); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetComplaint() throws WxErrorException { WxChannelAfterSaleService afterSaleService = channelService.getAfterSaleService(); String complaintId = ""; ComplaintOrderResponse response = afterSaleService.getComplaint(complaintId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetAllReason() throws WxErrorException { WxChannelAfterSaleService afterSaleService = channelService.getAfterSaleService(); AfterSaleReasonResponse allReason = afterSaleService.getAllReason(); assertNotNull(allReason); assertTrue(allReason.isSuccess()); } @Test public void testGetRejectReason() throws WxErrorException { WxChannelAfterSaleService afterSaleService = channelService.getAfterSaleService(); AfterSaleRejectReasonResponse rejectReason = afterSaleService.getRejectReason(); assertNotNull(rejectReason); assertTrue(rejectReason.isSuccess()); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelAddressServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelAddressServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; import com.google.inject.Inject; import me.chanjar.weixin.channel.api.WxChannelAddressService; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.bean.address.AddressDetail; import me.chanjar.weixin.channel.bean.address.AddressIdResponse; import me.chanjar.weixin.channel.bean.address.AddressInfoResponse; import me.chanjar.weixin.channel.bean.address.AddressListResponse; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Guice(modules = ApiTestModule.class) public class WxChannelAddressServiceImplTest { @Inject private WxChannelService channelService; @Test public void testListAddress() throws WxErrorException { WxChannelAddressService addressService = channelService.getAddressService(); AddressListResponse response = addressService.listAddress(0, 10); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetAddress() throws WxErrorException { WxChannelAddressService addressService = channelService.getAddressService(); String addressId = ""; AddressInfoResponse response = addressService.getAddress(addressId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testAddAddress() throws WxErrorException { WxChannelAddressService addressService = channelService.getAddressService(); AddressDetail addressDetail = new AddressDetail(); // ... AddressIdResponse response = addressService.addAddress(addressDetail); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testUpdateAddress() throws WxErrorException { WxChannelAddressService addressService = channelService.getAddressService(); AddressDetail addressDetail = new AddressDetail(); // ... WxChannelBaseResponse response = addressService.updateAddress(addressDetail); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testDeleteAddress() throws WxErrorException { WxChannelAddressService addressService = channelService.getAddressService(); String addressId = ""; WxChannelBaseResponse response = addressService.deleteAddress(addressId); assertNotNull(response); assertTrue(response.isSuccess()); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelLiveDashboardServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelLiveDashboardServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import com.google.inject.Inject; import me.chanjar.weixin.channel.api.WxChannelLiveDashboardService; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.bean.live.dashboard.LiveDataResponse; import me.chanjar.weixin.channel.bean.live.dashboard.LiveListResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; /** * @author <a href="https://github.com/Winnie-by996">Winnie</a> */ @Guice(modules = ApiTestModule.class) public class WxChannelLiveDashboardServiceImplTest { @Inject private WxChannelService channelService; @Test public void testGetLiveList() throws WxErrorException { WxChannelLiveDashboardService liveDashboardService = channelService.getLiveDashboardService(); // yyyyMMdd Long ds = 20240630L; LiveListResponse response = liveDashboardService.getLiveList(ds); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetLiveData() throws WxErrorException { WxChannelLiveDashboardService liveDashboardService = channelService.getLiveDashboardService(); String exportId = "export/UzFf*****************************************************************************************64V"; LiveDataResponse response = liveDashboardService.getLiveData(exportId); assertNotNull(response); assertTrue(response.isSuccess()); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxStoreCooperationServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxStoreCooperationServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; import com.google.inject.Inject; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.api.WxStoreCooperationService; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.channel.util.JsonUtils; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Guice(modules = ApiTestModule.class) public class WxStoreCooperationServiceImplTest { @Inject private WxChannelService channelService; @Test public void testListCooperation() throws WxErrorException { WxStoreCooperationService service = channelService.getCooperationService(); Integer sharerType = 3; WxChannelBaseResponse response = service.listCooperation(sharerType); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(JsonUtils.encode(response)); } @Test public void testGetCooperationStatus() throws WxErrorException { WxStoreCooperationService service = channelService.getCooperationService(); WxChannelBaseResponse response = service.getCooperationStatus("sph3FZbOEY64mWQ", 2); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGenerateQrCode() throws WxErrorException { WxStoreCooperationService service = channelService.getCooperationService(); WxChannelBaseResponse response = service.generateQrCode("sph3FZbOEY64mWQ", 2); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testCancelInvitation() throws WxErrorException { WxStoreCooperationService service = channelService.getCooperationService(); WxChannelBaseResponse response = service.cancelInvitation("sph3FZbOEY64mWQ", 2); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testUnbind() throws WxErrorException { WxStoreCooperationService service = channelService.getCooperationService(); WxChannelBaseResponse response = service.unbind("sph3FZbOEY64mWQ", 2); assertNotNull(response); assertTrue(response.isSuccess()); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxAssistantServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxAssistantServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import com.google.inject.Inject; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.window.request.AddWindowProductRequest; import me.chanjar.weixin.channel.bean.window.request.GetWindowProductListRequest; import me.chanjar.weixin.channel.bean.window.request.WindowProductRequest; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; /** * @author <a href="https://github.com/imyzt">imyzt</a> */ @Guice(modules = ApiTestModule.class) public class WxAssistantServiceImplTest { @Inject private WxChannelService channelService; @Test public void testAddWindowProduct() throws WxErrorException { AddWindowProductRequest req = new AddWindowProductRequest(); req.setProductId("123"); req.setAppid(channelService.getConfig().getAppid()); req.setIsHideForWindow(true); WxChannelBaseResponse response = channelService.getAssistantService().addWindowProduct(req); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetWindowProduct() throws WxErrorException { WindowProductRequest req = new WindowProductRequest(); req.setProductId("123"); req.setAppid(channelService.getConfig().getAppid()); WxChannelBaseResponse response = channelService.getAssistantService().getWindowProduct(req); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetWindowProductList() throws WxErrorException { GetWindowProductListRequest req = new GetWindowProductListRequest(); req.setAppid(channelService.getConfig().getAppid()); WxChannelBaseResponse response = channelService.getAssistantService().getWindowProductList(req); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testOffWindowProduct() throws WxErrorException { WindowProductRequest req = new WindowProductRequest(); req.setProductId("123"); req.setAppid(channelService.getConfig().getAppid()); WxChannelBaseResponse response = channelService.getAssistantService().offWindowProduct(req); assertNotNull(response); assertTrue(response.isSuccess()); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelSharerServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelSharerServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import static org.testng.Assert.*; import com.google.inject.Inject; import java.util.ArrayList; import java.util.List; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.api.WxChannelSharerService; import me.chanjar.weixin.channel.bean.sharer.SharerBindResponse; import me.chanjar.weixin.channel.bean.sharer.SharerInfoResponse; import me.chanjar.weixin.channel.bean.sharer.SharerOrderParam; import me.chanjar.weixin.channel.bean.sharer.SharerOrderResponse; import me.chanjar.weixin.channel.bean.sharer.SharerSearchResponse; import me.chanjar.weixin.channel.bean.sharer.SharerUnbindResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Guice(modules = ApiTestModule.class) public class WxChannelSharerServiceImplTest { @Inject private WxChannelService channelService; @Test public void testBindSharer() throws WxErrorException { WxChannelSharerService sharerService = channelService.getSharerService(); String username = ""; SharerBindResponse response = sharerService.bindSharer(username); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testSearchSharer() throws WxErrorException { WxChannelSharerService sharerService = channelService.getSharerService(); String openid = ""; String username = ""; SharerSearchResponse response = sharerService.searchSharer(openid, username); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testListSharer() throws WxErrorException { WxChannelSharerService sharerService = channelService.getSharerService(); Integer page = 1; Integer pageSize = 10; Integer sharerType = 1; SharerInfoResponse response = sharerService.listSharer(page, pageSize, sharerType); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testListSharerOrder() throws WxErrorException { WxChannelSharerService sharerService = channelService.getSharerService(); SharerOrderParam param = new SharerOrderParam(); SharerOrderResponse response = sharerService.listSharerOrder(param); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testUnbindSharer() throws WxErrorException { WxChannelSharerService sharerService = channelService.getSharerService(); List<String> openIds = new ArrayList<>(4); openIds.add(""); SharerUnbindResponse response = sharerService.unbindSharer(openIds); assertNotNull(response); assertTrue(response.isSuccess()); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelBrandServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelBrandServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; import com.google.inject.Inject; import java.util.List; import me.chanjar.weixin.channel.api.WxChannelBrandService; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.bean.audit.AuditApplyResponse; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.brand.BasicBrand; import me.chanjar.weixin.channel.bean.brand.Brand; import me.chanjar.weixin.channel.bean.brand.BrandApplyListResponse; import me.chanjar.weixin.channel.bean.brand.BrandInfoResponse; import me.chanjar.weixin.channel.bean.brand.BrandListResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.channel.util.JsonUtils; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; import org.testng.collections.CollectionUtils; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Guice(modules = ApiTestModule.class) public class WxChannelBrandServiceImplTest { @Inject private WxChannelService channelService; @Test public void testListAllBrand() throws WxErrorException { WxChannelBrandService brandService = channelService.getBrandService(); BrandListResponse response = brandService.listAllBrand(100, null); assertNotNull(response); assertTrue(response.isSuccess()); List<BasicBrand> brands = response.getBrands(); assertTrue(CollectionUtils.hasElements(brands)); System.out.println(JsonUtils.encode(response)); } @Test public void testAddBrandApply() throws WxErrorException { WxChannelBrandService brandService = channelService.getBrandService(); Brand brand = new Brand(); // ... AuditApplyResponse response = brandService.addBrandApply(brand); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testUpdateBrandApply() throws WxErrorException { WxChannelBrandService brandService = channelService.getBrandService(); Brand brand = new Brand(); // ... AuditApplyResponse response = brandService.updateBrandApply(brand); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testCancelBrandApply() throws WxErrorException { WxChannelBrandService brandService = channelService.getBrandService(); String brandId = "10000000"; String auditId = "12345566"; WxChannelBaseResponse response = brandService.cancelBrandApply(brandId, auditId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testDeleteBrandApply() throws WxErrorException { WxChannelBrandService brandService = channelService.getBrandService(); String brandId = "10000000"; WxChannelBaseResponse response = brandService.deleteBrandApply(brandId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetBrandApply() throws WxErrorException { WxChannelBrandService brandService = channelService.getBrandService(); String brandId = "10000000"; BrandInfoResponse response = brandService.getBrandApply(brandId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testListBrandApply() throws WxErrorException { WxChannelBrandService brandService = channelService.getBrandService(); BrandApplyListResponse response = brandService.listBrandApply(10, null, null); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testListValidBrandApply() throws WxErrorException { WxChannelBrandService brandService = channelService.getBrandService(); BrandApplyListResponse response = brandService.listValidBrandApply(10, null); assertNotNull(response); assertTrue(response.isSuccess()); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelBasicServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelBasicServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; import com.google.inject.Inject; import java.io.File; import java.io.IOException; import java.net.URL; import java.util.UUID; import me.chanjar.weixin.channel.api.WxChannelBasicService; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.bean.address.AddressCodeResponse; import me.chanjar.weixin.channel.bean.image.ChannelImageInfo; import me.chanjar.weixin.channel.bean.image.ChannelImageResponse; import me.chanjar.weixin.channel.bean.image.QualificationFileResponse; import me.chanjar.weixin.channel.bean.shop.ShopInfo; import me.chanjar.weixin.channel.bean.shop.ShopInfoResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.channel.util.JsonUtils; import me.chanjar.weixin.common.error.WxErrorException; import org.apache.commons.io.FileUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.annotations.Guice; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Guice(modules = ApiTestModule.class) public class WxChannelBasicServiceImplTest { private static final Logger log = LoggerFactory.getLogger(WxChannelBasicServiceImplTest.class); @Inject private WxChannelService channelService; @Test public void testGetAccessToken() throws WxErrorException { String accessToken = channelService.getAccessToken(); assertNotNull(accessToken); log.info("accessToken: \n{}\n\n", accessToken); System.out.println(accessToken); } @Test public void testGetShopInfo() throws WxErrorException { WxChannelBasicService basicService = channelService.getBasicService(); ShopInfoResponse response = basicService.getShopInfo(); assertNotNull(response); assertTrue(response.isSuccess()); ShopInfo info = response.getInfo(); assertNotNull(info); System.out.println(JsonUtils.encode(response)); } @Test public void testUploadImg() throws WxErrorException, IOException { String imgUrl = "https://github.githubassets.com/images/icons/emoji/octocat.png"; WxChannelBasicService basicService = channelService.getBasicService(); // 获取mediaId ChannelImageInfo info = basicService.uploadImg(0, imgUrl); assertNotNull(info); assertNotNull(info.getMediaId()); System.out.println(info.getMediaId()); // 获取临时链接 info = basicService.uploadImg(1, imgUrl); assertNotNull(info); assertNotNull(info.getUrl()); System.out.println(info.getUrl()); // 本地文件的格式上传 String fileName = "tmp.png"; URL url = ClassLoader.getSystemResource(fileName); File f = File.createTempFile(UUID.randomUUID().toString(), ".png"); FileUtils.copyURLToFile(url, f); info = basicService.uploadImg(1, f, 253, 253); assertNotNull(info); assertNotNull(info.getUrl()); System.out.println(info.getUrl()); FileUtils.forceDeleteOnExit(f); } @Test public void testUploadQualificationFile() throws IOException, WxErrorException { WxChannelBasicService basicService = channelService.getBasicService(); // 本地文件的格式上传 String fileName = "tmp.png"; URL url = ClassLoader.getSystemResource(fileName); File f = File.createTempFile(UUID.randomUUID().toString(), ".png"); FileUtils.copyURLToFile(url, f); QualificationFileResponse response = basicService.uploadQualificationFile(f); assertNotNull(response); assertTrue(response.isSuccess()); assertNotNull(response.getData()); assertNotNull(response.getData().getId()); System.out.println(response.getData().getId()); FileUtils.forceDeleteOnExit(f); } @Test public void testGetImg() throws WxErrorException { WxChannelBasicService basicService = channelService.getBasicService(); String mediaId = "ttRiex0K2utmlhR-IWcfaWP6deE5Gzo48Hq8abLEoVtTY618jAGtEmDDRPimKpTP8vlgTMwZokXHgm4fBVw82Q"; ChannelImageResponse response = basicService.getImg(mediaId); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(response.getContentType()); } @Test public void testGetAddressCode() throws WxErrorException { WxChannelBasicService basicService = channelService.getBasicService(); Integer rootCode = 0; AddressCodeResponse response = basicService.getAddressCode(rootCode); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(response); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxLeadComponentServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxLeadComponentServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.inject.Inject; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.bean.lead.component.request.GetLeadInfoByComponentRequest; import me.chanjar.weixin.channel.bean.lead.component.request.GetLeadsComponentIdRequest; import me.chanjar.weixin.channel.bean.lead.component.request.GetLeadsComponentPromoteRecordRequest; import me.chanjar.weixin.channel.bean.lead.component.request.GetLeadsInfoByRequestIdRequest; import me.chanjar.weixin.channel.bean.lead.component.request.GetLeadsRequestIdRequest; import me.chanjar.weixin.channel.bean.lead.component.response.GetLeadsComponentIdResponse; import me.chanjar.weixin.channel.bean.lead.component.response.GetLeadsComponentPromoteRecordResponse; import me.chanjar.weixin.channel.bean.lead.component.response.GetLeadsRequestIdResponse; import me.chanjar.weixin.channel.bean.lead.component.response.LeadInfoResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; import java.time.Instant; import java.time.temporal.ChronoUnit; import java.util.Objects; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; /** * @author <a href="https://github.com/imyzt">imyzt</a> */ @Guice(modules = ApiTestModule.class) public class WxLeadComponentServiceImplTest { private static final String LEADS_COMPONENT_ID = "123"; private static final String REQUEST_ID = "123"; private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); @Inject private WxChannelService channelService; @Test public void testGetLeadsInfoByComponentId() throws WxErrorException, JsonProcessingException { String lastBuffer = null; for (; ; ) { GetLeadInfoByComponentRequest req = new GetLeadInfoByComponentRequest(); req.setStartTime(Instant.now().minus(1, ChronoUnit.DAYS).getEpochSecond()); req.setEndTime(Instant.now().getEpochSecond()); req.setLeadsComponentId(LEADS_COMPONENT_ID); req.setLastBuffer(lastBuffer); req.setVersion(1); LeadInfoResponse response = channelService.getLeadComponentService().getLeadsInfoByComponentId(req); System.out.println(OBJECT_MAPPER.writeValueAsString(response)); assertNotNull(response); assertTrue(response.isSuccess()); lastBuffer = response.getLastBuffer(); if (Objects.isNull(lastBuffer)) { break; } } } @Test public void testGetLeadsInfoByRequestId() throws WxErrorException, JsonProcessingException { String lastBuffer = null; for (; ; ) { GetLeadsInfoByRequestIdRequest req = new GetLeadsInfoByRequestIdRequest(); req.setLastBuffer(lastBuffer); req.setRequestId(REQUEST_ID); LeadInfoResponse response = channelService.getLeadComponentService().getLeadsInfoByRequestId(req); System.out.println(OBJECT_MAPPER.writeValueAsString(response)); assertNotNull(response); assertTrue(response.isSuccess()); lastBuffer = response.getLastBuffer(); if (Objects.isNull(lastBuffer)) { break; } } } @Test public void testGetLeadsRequestId() throws WxErrorException, JsonProcessingException { String lastBuffer = null; for (; ; ) { GetLeadsRequestIdRequest req = new GetLeadsRequestIdRequest(); req.setLastBuffer(lastBuffer); req.setLeadsComponentId(LEADS_COMPONENT_ID); GetLeadsRequestIdResponse response = channelService.getLeadComponentService().getLeadsRequestId(req); System.out.println(OBJECT_MAPPER.writeValueAsString(response)); assertNotNull(response); assertTrue(response.isSuccess()); lastBuffer = response.getLastBuffer(); if (Objects.isNull(lastBuffer)) { break; } } } @Test public void testGetLeadsComponentPromoteRecord() throws WxErrorException, JsonProcessingException { String lastBuffer = null; for (; ; ) { GetLeadsComponentPromoteRecordRequest req = new GetLeadsComponentPromoteRecordRequest(); req.setStartTime(Instant.now().minus(1, ChronoUnit.DAYS).getEpochSecond()); req.setEndTime(Instant.now().getEpochSecond()); req.setLeadsComponentId(LEADS_COMPONENT_ID); req.setLastBuffer(lastBuffer); GetLeadsComponentPromoteRecordResponse response = channelService.getLeadComponentService().getLeadsComponentPromoteRecord(req); System.out.println(OBJECT_MAPPER.writeValueAsString(response)); assertNotNull(response); assertTrue(response.isSuccess()); lastBuffer = response.getLastBuffer(); if (Objects.isNull(lastBuffer)) { break; } } } @Test public void testGetLeadsComponentId() throws WxErrorException, JsonProcessingException { String lastBuffer = null; for (; ; ) { GetLeadsComponentIdRequest req = new GetLeadsComponentIdRequest(); req.setLastBuffer(lastBuffer); GetLeadsComponentIdResponse response = channelService.getLeadComponentService().getLeadsComponentId(req); System.out.println(OBJECT_MAPPER.writeValueAsString(response)); assertNotNull(response); assertTrue(response.isSuccess()); lastBuffer = response.getLastBuffer(); if (Objects.isNull(lastBuffer)) { break; } } } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxLeaguePromoterServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxLeaguePromoterServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; import com.google.inject.Inject; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.api.WxLeaguePromoterService; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.league.promoter.PromoterInfoResponse; import me.chanjar.weixin.channel.bean.league.promoter.PromoterListResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Guice(modules = ApiTestModule.class) public class WxLeaguePromoterServiceImplTest { @Inject private WxChannelService channelService; @Test public void testAddPromoter() throws WxErrorException { WxLeaguePromoterService leaguePromoterService = channelService.getLeaguePromoterService(); String finderId = ""; WxChannelBaseResponse response = leaguePromoterService.addPromoter(finderId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testUpdatePromoter() throws WxErrorException { WxLeaguePromoterService leaguePromoterService = channelService.getLeaguePromoterService(); String finderId = ""; int type = 1; WxChannelBaseResponse response = leaguePromoterService.updatePromoter(finderId, type); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testDeletePromoter() throws WxErrorException { WxLeaguePromoterService leaguePromoterService = channelService.getLeaguePromoterService(); String finderId = ""; WxChannelBaseResponse response = leaguePromoterService.deletePromoter(finderId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetPromoterInfo() throws WxErrorException { WxLeaguePromoterService leaguePromoterService = channelService.getLeaguePromoterService(); String finderId = ""; PromoterInfoResponse response = leaguePromoterService.getPromoterInfo(finderId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testListPromoter() throws WxErrorException { WxLeaguePromoterService leaguePromoterService = channelService.getLeaguePromoterService(); Integer pageIndex = 1; Integer pageSize = 10; Integer status = null; PromoterListResponse response = leaguePromoterService.listPromoter(pageIndex, pageSize, status); assertNotNull(response); assertTrue(response.isSuccess()); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelCouponServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelCouponServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import static org.testng.Assert.*; import com.google.inject.Inject; import me.chanjar.weixin.channel.api.WxChannelCouponService; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.coupon.CouponIdResponse; import me.chanjar.weixin.channel.bean.coupon.CouponInfoResponse; import me.chanjar.weixin.channel.bean.coupon.CouponListParam; import me.chanjar.weixin.channel.bean.coupon.CouponListResponse; import me.chanjar.weixin.channel.bean.coupon.CouponParam; import me.chanjar.weixin.channel.bean.coupon.UserCouponListParam; import me.chanjar.weixin.channel.bean.coupon.UserCouponListResponse; import me.chanjar.weixin.channel.bean.coupon.UserCouponResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Guice(modules = ApiTestModule.class) public class WxChannelCouponServiceImplTest { @Inject private WxChannelService channelService; @Test public void testCreateCoupon() throws WxErrorException { WxChannelCouponService couponService = channelService.getCouponService(); CouponParam param = new CouponParam(); // ... CouponIdResponse response = couponService.createCoupon(param); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testUpdateCoupon() throws WxErrorException { WxChannelCouponService couponService = channelService.getCouponService(); CouponParam param = new CouponParam(); // ... CouponIdResponse response = couponService.updateCoupon(param); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testUpdateCouponStatus() throws WxErrorException { WxChannelCouponService couponService = channelService.getCouponService(); String couponId = ""; Integer status = 2; WxChannelBaseResponse response = couponService.updateCouponStatus(couponId, status); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetCoupon() throws WxErrorException { WxChannelCouponService couponService = channelService.getCouponService(); String couponId = ""; CouponInfoResponse response = couponService.getCoupon(couponId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetCouponList() throws WxErrorException { WxChannelCouponService couponService = channelService.getCouponService(); CouponListParam param = new UserCouponListParam(); CouponListResponse response = couponService.getCouponList(param); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetUserCoupon() throws WxErrorException { WxChannelCouponService couponService = channelService.getCouponService(); String couponId = ""; String userCouponId = ""; UserCouponResponse response = couponService.getUserCoupon(couponId, userCouponId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetUserCouponList() throws WxErrorException { WxChannelCouponService couponService = channelService.getCouponService(); UserCouponListParam param = new UserCouponListParam(); UserCouponListResponse response = couponService.getUserCouponList(param); assertNotNull(response); assertTrue(response.isSuccess()); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelProductServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelProductServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; import com.google.inject.Inject; import java.util.ArrayList; import java.util.List; import me.chanjar.weixin.channel.api.WxChannelProductService; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.limit.LimitTaskAddResponse; import me.chanjar.weixin.channel.bean.limit.LimitTaskListResponse; import me.chanjar.weixin.channel.bean.limit.LimitTaskParam; import me.chanjar.weixin.channel.bean.product.SkuStockBatchResponse; import me.chanjar.weixin.channel.bean.product.SkuStockResponse; import me.chanjar.weixin.channel.bean.product.SpuGetResponse; import me.chanjar.weixin.channel.bean.product.SpuListResponse; import me.chanjar.weixin.channel.bean.product.SpuUpdateInfo; import me.chanjar.weixin.channel.bean.product.SpuUpdateResponse; import me.chanjar.weixin.channel.bean.product.link.ProductH5UrlResponse; import me.chanjar.weixin.channel.bean.product.link.ProductQrCodeResponse; import me.chanjar.weixin.channel.bean.product.link.ProductTagLinkResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Guice(modules = ApiTestModule.class) public class WxChannelProductServiceImplTest { @Inject private WxChannelService channelService; @Test public void testAddProduct() throws WxErrorException { WxChannelProductService productService = channelService.getProductService(); SpuUpdateInfo spuInfo = new SpuUpdateInfo(); // ... SpuUpdateResponse response = productService.addProduct(spuInfo); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testUpdateProduct() throws WxErrorException { WxChannelProductService productService = channelService.getProductService(); SpuUpdateInfo spuInfo = new SpuUpdateInfo(); // ... SpuUpdateResponse response = productService.updateProduct(spuInfo); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testUpdateStock() throws WxErrorException { WxChannelProductService productService = channelService.getProductService(); String productId = ""; String skuId = ""; Integer diffType = 1; Integer num = 10; WxChannelBaseResponse response = productService.updateStock(productId, skuId, diffType, num); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testDeleteProduct() throws WxErrorException { WxChannelProductService productService = channelService.getProductService(); String productId = ""; WxChannelBaseResponse response = productService.deleteProduct(productId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testCancelProductAudit() throws WxErrorException { WxChannelProductService productService = channelService.getProductService(); String productId = ""; WxChannelBaseResponse response = productService.cancelProductAudit(productId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetProduct() throws WxErrorException { WxChannelProductService productService = channelService.getProductService(); String productId = "10000029995861"; Integer dataType = 3; SpuGetResponse response = productService.getProduct(productId, dataType); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testListProduct() throws WxErrorException { WxChannelProductService productService = channelService.getProductService(); Integer pageSize = 10; String nextKey = null; Integer status = null; SpuListResponse response = productService.listProduct(pageSize, nextKey, status); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testUpProduct() throws WxErrorException { WxChannelProductService productService = channelService.getProductService(); String productId = ""; WxChannelBaseResponse response = productService.upProduct(productId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testDownProduct() throws WxErrorException { WxChannelProductService productService = channelService.getProductService(); String productId = ""; WxChannelBaseResponse response = productService.downProduct(productId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetSkuStock() throws WxErrorException { WxChannelProductService productService = channelService.getProductService(); String productId = "10000076089602"; String skuId = "1918289111"; SkuStockResponse response = productService.getSkuStock(productId, skuId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetSkuStockBatch() throws WxErrorException { WxChannelProductService productService = channelService.getProductService(); List<String> productIds = new ArrayList<>(); productIds.add("123"); SkuStockBatchResponse response = productService.getSkuStockBatch(productIds); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetProductH5Url() throws WxErrorException { WxChannelProductService productService = channelService.getProductService(); String productId = ""; ProductH5UrlResponse response = productService.getProductH5Url(productId); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(response.getProductH5url()); } @Test public void testGetProductQrCode() throws WxErrorException { WxChannelProductService productService = channelService.getProductService(); String productId = ""; ProductQrCodeResponse response = productService.getProductQrCode(productId); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(response.getProductQrcode()); } @Test public void testGetProductTagLink() throws WxErrorException { WxChannelProductService productService = channelService.getProductService(); String productId = ""; ProductTagLinkResponse response = productService.getProductTagLink(productId); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(response.getProductTaglink()); } @Test public void testAddLimitTask() throws WxErrorException { WxChannelProductService productService = channelService.getProductService(); LimitTaskParam param = new LimitTaskParam(); // ... LimitTaskAddResponse response = productService.addLimitTask(param); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testListLimitTask() throws WxErrorException { WxChannelProductService productService = channelService.getProductService(); Integer pageSize = 1; String nextKey = ""; Integer status = null; LimitTaskListResponse response = productService.listLimitTask(pageSize, nextKey, status); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testStopLimitTask() throws WxErrorException { WxChannelProductService productService = channelService.getProductService(); String taskId = ""; WxChannelBaseResponse response = productService.stopLimitTask(taskId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testDeleteLimitTask() throws WxErrorException { WxChannelProductService productService = channelService.getProductService(); String taskId = ""; WxChannelBaseResponse response = productService.deleteLimitTask(taskId); assertNotNull(response); assertTrue(response.isSuccess()); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelCompassFinderServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelCompassFinderServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import com.google.inject.Inject; import me.chanjar.weixin.channel.api.WxChannelCompassFinderService; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.bean.compass.finder.OverallResponse; import me.chanjar.weixin.channel.bean.compass.finder.ProductDataResponse; import me.chanjar.weixin.channel.bean.compass.finder.ProductListResponse; import me.chanjar.weixin.channel.bean.compass.finder.SaleProfileDataResponse; import me.chanjar.weixin.channel.enums.SaleProfileUserType; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; /** * @author <a href="https://github.com/Winnie-by996">Winnie</a> */ @Guice(modules = ApiTestModule.class) public class WxChannelCompassFinderServiceImplTest { @Inject private WxChannelService channelService; @Test public void testGetOverAll() throws WxErrorException { WxChannelCompassFinderService compassFinderService = channelService.getCompassFinderService(); String ds = "20240630"; OverallResponse response = compassFinderService.getOverall(ds); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetProductData() throws WxErrorException { WxChannelCompassFinderService compassFinderService = channelService.getCompassFinderService(); String ds = "20240630"; String productId = "10000017457793"; ProductDataResponse response = compassFinderService.getProductData(ds, productId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetProductList() throws WxErrorException { WxChannelCompassFinderService compassFinderService = channelService.getCompassFinderService(); String ds = "20240630"; ProductListResponse response = compassFinderService.getProductList(ds); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetSaleProfileData() throws WxErrorException { WxChannelCompassFinderService compassFinderService = channelService.getCompassFinderService(); String ds = "20240630"; Integer type = SaleProfileUserType.PRODUCT_IMPRESSION_USER.getKey(); SaleProfileDataResponse response = compassFinderService.getSaleProfileData(ds, type); assertNotNull(response); assertTrue(response.isSuccess()); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxFinderLiveServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxFinderLiveServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import com.google.inject.Inject; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.bean.lead.component.request.GetFinderLiveDataListRequest; import me.chanjar.weixin.channel.bean.lead.component.request.GetFinderLiveLeadsDataRequest; import me.chanjar.weixin.channel.bean.lead.component.response.FinderAttrResponse; import me.chanjar.weixin.channel.bean.lead.component.response.GetFinderLiveDataListResponse; import me.chanjar.weixin.channel.bean.lead.component.response.GetFinderLiveLeadsDataResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; import java.time.Instant; import java.time.temporal.ChronoUnit; import java.util.Objects; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; /** * @author <a href="https://github.com/imyzt">imyzt</a> */ @Guice(modules = ApiTestModule.class) public class WxFinderLiveServiceImplTest { @Inject private WxChannelService channelService; @Test public void testGetFinderAttrByAppid() throws WxErrorException { FinderAttrResponse response = channelService.getFinderLiveService().getFinderAttrByAppid(); System.out.println(response); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetFinderLiveDataList() throws WxErrorException { String lastBuffer = null; for (; ; ) { GetFinderLiveDataListRequest req = new GetFinderLiveDataListRequest(); req.setLastBuffer(lastBuffer); GetFinderLiveDataListResponse response = channelService.getFinderLiveService().getFinderLiveDataList(req); System.out.println(response); assertNotNull(response); assertTrue(response.isSuccess()); lastBuffer = response.getLastBuffer(); if (Objects.isNull(lastBuffer)) { break; } } } @Test public void testGetFinderLiveLeadsData() throws WxErrorException { GetFinderLiveLeadsDataRequest req = new GetFinderLiveLeadsDataRequest(); req.setStartTime(Instant.now().minus(1, ChronoUnit.DAYS).getEpochSecond()); req.setEndTime(Instant.now().getEpochSecond()); GetFinderLiveLeadsDataResponse response = channelService.getFinderLiveService().getFinderLiveLeadsData(req); assertNotNull(response); assertTrue(response.isSuccess()); for (GetFinderLiveLeadsDataResponse.LeadCountItem item : response.getItems()) { System.out.println(item.toString()); } } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxLeagueProductServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxLeagueProductServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import static org.testng.Assert.*; import com.google.inject.Inject; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.api.WxLeagueProductService; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.league.product.BatchAddParam; import me.chanjar.weixin.channel.bean.league.product.BatchAddResponse; import me.chanjar.weixin.channel.bean.league.product.ProductDetailParam; import me.chanjar.weixin.channel.bean.league.product.ProductDetailResponse; import me.chanjar.weixin.channel.bean.league.product.ProductListParam; import me.chanjar.weixin.channel.bean.league.product.ProductListResponse; import me.chanjar.weixin.channel.bean.league.product.ProductUpdateParam; import me.chanjar.weixin.channel.bean.league.product.ProductUpdateResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Guice(modules = ApiTestModule.class) public class WxLeagueProductServiceImplTest { @Inject private WxChannelService channelService; @Test public void testBatchAddProduct() throws WxErrorException { WxLeagueProductService leagueProductService = channelService.getLeagueProductService(); BatchAddParam param = new BatchAddParam(); BatchAddResponse response = leagueProductService.batchAddProduct(param); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testUpdateProduct() throws WxErrorException { WxLeagueProductService leagueProductService = channelService.getLeagueProductService(); ProductUpdateParam param = new ProductUpdateParam(); ProductUpdateResponse response = leagueProductService.updateProduct(param); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testDeleteProduct() throws WxErrorException { WxLeagueProductService leagueProductService = channelService.getLeagueProductService(); Integer type = 1; String productId = ""; WxChannelBaseResponse response = leagueProductService.deleteProduct(type, productId, null); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetProductDetail() throws WxErrorException { WxLeagueProductService leagueProductService = channelService.getLeagueProductService(); ProductDetailParam param = new ProductDetailParam(); ProductDetailResponse response = leagueProductService.getProductDetail(param); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testListProduct() throws WxErrorException { WxLeagueProductService leagueProductService = channelService.getLeagueProductService(); ProductListParam param = new ProductListParam(); ProductListResponse response = leagueProductService.listProduct(param); assertNotNull(response); assertTrue(response.isSuccess()); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelWarehouseServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelWarehouseServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; import com.google.inject.Inject; import java.util.ArrayList; import java.util.List; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.api.WxChannelWarehouseService; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.warehouse.LocationPriorityResponse; import me.chanjar.weixin.channel.bean.warehouse.PriorityLocationParam; import me.chanjar.weixin.channel.bean.warehouse.WarehouseIdsResponse; import me.chanjar.weixin.channel.bean.warehouse.WarehouseLocation; import me.chanjar.weixin.channel.bean.warehouse.WarehouseParam; import me.chanjar.weixin.channel.bean.warehouse.WarehouseResponse; import me.chanjar.weixin.channel.bean.warehouse.WarehouseStockParam; import me.chanjar.weixin.channel.bean.warehouse.WarehouseStockResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Guice(modules = ApiTestModule.class) public class WxChannelWarehouseServiceImplTest { @Inject private WxChannelService channelService; @Test public void testCreateWarehouse() throws WxErrorException { WxChannelWarehouseService warehouseService = channelService.getWarehouseService(); WarehouseParam param = new WarehouseParam(); // ... WxChannelBaseResponse response = warehouseService.createWarehouse(param); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testListWarehouse() throws WxErrorException { WxChannelWarehouseService warehouseService = channelService.getWarehouseService(); Integer pageSize = 10; WarehouseIdsResponse response = warehouseService.listWarehouse(pageSize, null); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetWarehouse() throws WxErrorException { WxChannelWarehouseService warehouseService = channelService.getWarehouseService(); String warehouseId = "123"; WarehouseResponse response = warehouseService.getWarehouse(warehouseId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testUpdateWarehouse() throws WxErrorException { WxChannelWarehouseService warehouseService = channelService.getWarehouseService(); String outWarehouseId = ""; String name = ""; String intro = ""; WxChannelBaseResponse response = warehouseService.updateWarehouse(outWarehouseId, name, intro); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testAddWarehouseArea() throws WxErrorException { WxChannelWarehouseService warehouseService = channelService.getWarehouseService(); String outWarehouseId = ""; List<WarehouseLocation> coverLocations = new ArrayList<>(4); WarehouseLocation location = new WarehouseLocation(); coverLocations.add(location); WxChannelBaseResponse response = warehouseService.addWarehouseArea(outWarehouseId, coverLocations); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testDeleteWarehouseArea() throws WxErrorException { WxChannelWarehouseService warehouseService = channelService.getWarehouseService(); String outWarehouseId = ""; List<WarehouseLocation> coverLocations = new ArrayList<>(4); WarehouseLocation location = new WarehouseLocation(); coverLocations.add(location); WxChannelBaseResponse response = warehouseService.deleteWarehouseArea(outWarehouseId, coverLocations); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testSetWarehousePriority() throws WxErrorException { WxChannelWarehouseService warehouseService = channelService.getWarehouseService(); PriorityLocationParam param = new PriorityLocationParam(); WxChannelBaseResponse response = warehouseService.setWarehousePriority(param); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetWarehousePriority() throws WxErrorException { WxChannelWarehouseService warehouseService = channelService.getWarehouseService(); Integer addressId1 = 1; Integer addressId2 = 2; Integer addressId3 = 3; Integer addressId4 = 4; LocationPriorityResponse response = warehouseService .getWarehousePriority(addressId1, addressId2, addressId3, addressId4); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testUpdateWarehouseStock() throws WxErrorException { WxChannelWarehouseService warehouseService = channelService.getWarehouseService(); WarehouseStockParam param = new WarehouseStockParam(); WxChannelBaseResponse response = warehouseService.updateWarehouseStock(param); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetWarehouseStock() throws WxErrorException { WxChannelWarehouseService warehouseService = channelService.getWarehouseService(); String productId = ""; String skuId = ""; String outWarehouseId = ""; WarehouseStockResponse response = warehouseService.getWarehouseStock(productId, skuId, outWarehouseId); assertNotNull(response); assertTrue(response.isSuccess()); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelCategoryServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelCategoryServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; import com.google.inject.Inject; import java.util.List; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.WxChannelCategoryService; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.bean.audit.AuditApplyResponse; import me.chanjar.weixin.channel.bean.audit.AuditResponse; import me.chanjar.weixin.channel.bean.audit.CategoryAuditInfo; import me.chanjar.weixin.channel.bean.audit.CategoryAuditRequest; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.category.CategoryAndQualificationList; import me.chanjar.weixin.channel.bean.category.CategoryDetailResult; import me.chanjar.weixin.channel.bean.category.CategoryQualification; import me.chanjar.weixin.channel.bean.category.CategoryQualificationResponse; import me.chanjar.weixin.channel.bean.category.PassCategoryResponse; import me.chanjar.weixin.channel.bean.category.ShopCategory; import me.chanjar.weixin.channel.bean.category.ShopCategoryResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.channel.util.JsonUtils; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; import org.testng.collections.CollectionUtils; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Slf4j @Guice(modules = ApiTestModule.class) public class WxChannelCategoryServiceImplTest { @Inject private WxChannelService channelService; @Test public void testListAllCategory() throws WxErrorException { WxChannelCategoryService categoryService = channelService.getCategoryService(); CategoryQualificationResponse response = categoryService.listAllCategory(); assertNotNull(response); assertTrue(response.isSuccess()); //System.out.println(response); // 测试分类:7231 瑜伽服上衣 for (CategoryAndQualificationList cat : response.getCatsV2()) { if (cat.getList() == null) { continue; } for (CategoryQualification qua : cat.getList()) { if (qua.getCategory() == null) { log.error("category is null"); } if ("7231".equals(qua.getCategory().getId())) { log.info("qua: {}", JsonUtils.encode(qua)); } } } } @Test public void testListAvailableCategories() throws WxErrorException { WxChannelCategoryService categoryService = channelService.getCategoryService(); ShopCategoryResponse response = categoryService.listAvailableCategories("0"); assertNotNull(response); assertTrue(response.isSuccess()); List<ShopCategory> v1 = response.getCategories(); List<ShopCategory> v2 = response.getCatListV2(); assertTrue(CollectionUtils.hasElements(v1) || CollectionUtils.hasElements(v2)); v1.forEach(System.out::println); v2.forEach(System.out::println); } @Test public void testGetCategoryDetail() throws WxErrorException { WxChannelCategoryService categoryService = channelService.getCategoryService(); CategoryDetailResult categoryDetail = categoryService.getCategoryDetail("7231"); assertNotNull(categoryDetail); assertTrue(categoryDetail.isSuccess()); System.out.println(categoryDetail); } @Test public void testAddCategory() throws WxErrorException { // WxChannelCategoryService categoryService = channelService.getCategoryService(); // List<String> certificates = new ArrayList<>(); // certificates.add( // "hWNith8iZSrxfN7W2tXOoWSXYWi1qADRJxwImvQl2DC6wqqJrl4g8i/UEZfd59yiiEKAnqy0WETFrOcGZFcJDfpH2ccmNZddzesR1/OpAC7bbfmEiDFBK2QL7MBjhR2m"); // AuditApplyResponse response = categoryService.addCategory("1001", "1002", "1005", certificates); // assertNotNull(response); // assertTrue(response.isSuccess()); // System.out.println(response); String json = "{\n" + " \"category_info\": {\n" + " \"cats_v2\":[\n" + " {\n" + " \"cat_id\": 6033\n" + " },\n" + " {\n" + " \"cat_id\": 6057\n" + " },\n" + " {\n" + " \"cat_id\": 6091\n" + " },\n" + " {\n" + " \"cat_id\": 6093\n" + " }\n" + " ],\n" + " \"certificate\": [\n" + " \"THE_FILE_ID_1\",\n" + " \"THE_FILE_ID_2\"\n" + " ],\n" + " \"brand_list\" : [\n" + " { \"brand_id\": 1001 },\n" + " { \"brand_id\": 1002 }\n" + " ]\n" + " }\n" + "}"; CategoryAuditRequest param = JsonUtils.decode(json, CategoryAuditRequest.class); CategoryAuditInfo info = null; if (info != null) { info = param.getCategoryInfo(); } WxChannelCategoryService categoryService = channelService.getCategoryService(); AuditApplyResponse response = categoryService.addCategory(info); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(response); } @Test public void testCancelCategoryAudit() throws WxErrorException { WxChannelCategoryService categoryService = channelService.getCategoryService(); String auditId = "4403159413"; WxChannelBaseResponse response = categoryService.cancelCategoryAudit(auditId); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(response); } @Test public void testGetAudit() throws WxErrorException { WxChannelCategoryService categoryService = channelService.getCategoryService(); String auditId = "4403159413"; AuditResponse response = categoryService.getAudit(auditId); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(response); } @Test public void testListPassCategory() throws WxErrorException { WxChannelCategoryService categoryService = channelService.getCategoryService(); PassCategoryResponse response = categoryService.listPassCategory(); assertNotNull(response); assertTrue(response.isSuccess()); System.out.println(response); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelFundServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelFundServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import static org.testng.Assert.*; import com.google.inject.Inject; import java.time.LocalDateTime; import java.time.ZoneId; import me.chanjar.weixin.channel.api.WxChannelFundService; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.fund.AccountInfo; import me.chanjar.weixin.channel.bean.fund.AccountInfoResponse; import me.chanjar.weixin.channel.bean.fund.BalanceInfoResponse; import me.chanjar.weixin.channel.bean.fund.FlowListResponse; import me.chanjar.weixin.channel.bean.fund.FundsFlowResponse; import me.chanjar.weixin.channel.bean.fund.FundsListParam; import me.chanjar.weixin.channel.bean.fund.WithdrawDetailResponse; import me.chanjar.weixin.channel.bean.fund.WithdrawListResponse; import me.chanjar.weixin.channel.bean.fund.WithdrawSubmitResponse; import me.chanjar.weixin.channel.bean.fund.bank.BankCityResponse; import me.chanjar.weixin.channel.bean.fund.bank.BankInfoResponse; import me.chanjar.weixin.channel.bean.fund.bank.BankListResponse; import me.chanjar.weixin.channel.bean.fund.bank.BankProvinceResponse; import me.chanjar.weixin.channel.bean.fund.bank.BranchInfoResponse; import me.chanjar.weixin.channel.bean.fund.qrcode.QrCheckResponse; import me.chanjar.weixin.channel.bean.fund.qrcode.QrCodeResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Guice(modules = ApiTestModule.class) public class WxChannelFundServiceImplTest { @Inject private WxChannelService channelService; @Test public void testGetBalance() throws WxErrorException { WxChannelFundService fundService = channelService.getFundService(); BalanceInfoResponse response = fundService.getBalance(); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetBankAccount() throws WxErrorException { WxChannelFundService fundService = channelService.getFundService(); AccountInfoResponse response = fundService.getBankAccount(); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetFundsFlowDetail() throws WxErrorException { WxChannelFundService fundService = channelService.getFundService(); String flowId = ""; FundsFlowResponse response = fundService.getFundsFlowDetail(flowId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testListFundsFlow() throws WxErrorException { WxChannelFundService fundService = channelService.getFundService(); FundsListParam param = new FundsListParam(); FlowListResponse response = fundService.listFundsFlow(param); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetWithdrawDetail() throws WxErrorException { WxChannelFundService fundService = channelService.getFundService(); String withdrawId = ""; WithdrawDetailResponse response = fundService.getWithdrawDetail(withdrawId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testListWithdraw() throws WxErrorException { WxChannelFundService fundService = channelService.getFundService(); Integer pageNum = 1; Integer pageSize = 10; Long startTime = LocalDateTime.now().minusDays(7).atZone(ZoneId.systemDefault()).toEpochSecond(); Long endTime = LocalDateTime.now().atZone(ZoneId.systemDefault()).toEpochSecond(); WithdrawListResponse response = fundService.listWithdraw(pageNum, pageSize, startTime, endTime); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testSetBankAccount() throws WxErrorException { WxChannelFundService fundService = channelService.getFundService(); AccountInfo accountInfo = new AccountInfo(); // ... WxChannelBaseResponse response = fundService.setBankAccount(accountInfo); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testSubmitWithdraw() throws WxErrorException { WxChannelFundService fundService = channelService.getFundService(); Integer amount = 1; String remark = "test"; String bankMemo = "-"; WithdrawSubmitResponse response = fundService.submitWithdraw(amount, remark, bankMemo); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetBankInfoByCardNo() throws WxErrorException { WxChannelFundService fundService = channelService.getFundService(); String accountNumber = ""; BankInfoResponse response = fundService.getBankInfoByCardNo(accountNumber); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testSearchBankList() throws WxErrorException { WxChannelFundService fundService = channelService.getFundService(); Integer offset = 0; Integer limit = 20; String keywords = ""; Integer bankType = 1; BankListResponse response = fundService.searchBankList(offset, limit, keywords, bankType); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testSearchCityList() throws WxErrorException { WxChannelFundService fundService = channelService.getFundService(); String provinceCode = "0"; BankCityResponse response = fundService.searchCityList(provinceCode); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetProvinceList() throws WxErrorException { WxChannelFundService fundService = channelService.getFundService(); BankProvinceResponse response = fundService.getProvinceList(); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testSearchBranchList() throws WxErrorException { WxChannelFundService fundService = channelService.getFundService(); String bankCode = ""; String cityCode = ""; Integer offset = 0; Integer limit = 20; BranchInfoResponse response = fundService.searchBranchList(bankCode, cityCode, offset, limit); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetQrCode() throws WxErrorException { WxChannelFundService fundService = channelService.getFundService(); String qrcodeTicket = ""; QrCodeResponse response = fundService.getQrCode(qrcodeTicket); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testCheckQrStatus() throws WxErrorException { WxChannelFundService fundService = channelService.getFundService(); String qrcodeTicket = ""; QrCheckResponse response = fundService.checkQrStatus(qrcodeTicket); assertNotNull(response); assertTrue(response.isSuccess()); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxLeagueSupplierServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxLeagueSupplierServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; import com.google.inject.Inject; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.api.WxLeagueSupplierService; import me.chanjar.weixin.channel.bean.league.supplier.CommissionOrderListParam; import me.chanjar.weixin.channel.bean.league.supplier.CommissionOrderListResponse; import me.chanjar.weixin.channel.bean.league.supplier.CommissionOrderResponse; import me.chanjar.weixin.channel.bean.league.supplier.CoopProductListResponse; import me.chanjar.weixin.channel.bean.league.supplier.CoopProductResponse; import me.chanjar.weixin.channel.bean.league.supplier.FlowListParam; import me.chanjar.weixin.channel.bean.league.supplier.ShopDetailResponse; import me.chanjar.weixin.channel.bean.league.supplier.ShopListResponse; import me.chanjar.weixin.channel.bean.league.supplier.SupplierBalanceResponse; import me.chanjar.weixin.channel.bean.league.supplier.SupplierFlowDetailResponse; import me.chanjar.weixin.channel.bean.league.supplier.SupplierFlowListResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Guice(modules = ApiTestModule.class) public class WxLeagueSupplierServiceImplTest { @Inject private WxChannelService channelService; @Test public void testGetBalanceInfo() throws WxErrorException { WxLeagueSupplierService leagueSupplierService = channelService.getLeagueSupplierService(); SupplierBalanceResponse response = leagueSupplierService.getBalanceInfo(); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetFlowDetail() throws WxErrorException { WxLeagueSupplierService leagueSupplierService = channelService.getLeagueSupplierService(); String flowId = ""; SupplierFlowDetailResponse response = leagueSupplierService.getFlowDetail(flowId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetFlowList() throws WxErrorException { WxLeagueSupplierService leagueSupplierService = channelService.getLeagueSupplierService(); FlowListParam param = new FlowListParam(); SupplierFlowListResponse response = leagueSupplierService.getFlowList(param); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetProductDetail() throws WxErrorException { WxLeagueSupplierService leagueSupplierService = channelService.getLeagueSupplierService(); String productId = ""; String appId = ""; CoopProductResponse response = leagueSupplierService.getProductDetail(productId, appId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetProductList() throws WxErrorException { WxLeagueSupplierService leagueSupplierService = channelService.getLeagueSupplierService(); String appId = ""; Integer pageSize = 10; String nextKey = null; CoopProductListResponse response = leagueSupplierService.getProductList(appId, pageSize, nextKey); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetCommissionOrder() throws WxErrorException { WxLeagueSupplierService leagueSupplierService = channelService.getLeagueSupplierService(); String orderId = ""; String skuId = ""; CommissionOrderResponse response = leagueSupplierService.getCommissionOrder(orderId, skuId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetCommissionOrderList() throws WxErrorException { WxLeagueSupplierService leagueSupplierService = channelService.getLeagueSupplierService(); CommissionOrderListParam param = new CommissionOrderListParam(); CommissionOrderListResponse response = leagueSupplierService.getCommissionOrderList(param); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetShopDetail() throws WxErrorException { WxLeagueSupplierService leagueSupplierService = channelService.getLeagueSupplierService(); String appId = ""; ShopDetailResponse response = leagueSupplierService.getShopDetail(appId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetShopList() throws WxErrorException { WxLeagueSupplierService leagueSupplierService = channelService.getLeagueSupplierService(); Integer pageSize = 10; String nextKey = null; ShopListResponse response = leagueSupplierService.getShopList(pageSize, nextKey); assertNotNull(response); assertTrue(response.isSuccess()); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxLeagueWindowServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxLeagueWindowServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import static org.testng.Assert.*; import com.google.inject.Inject; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.api.WxLeagueProductService; import me.chanjar.weixin.channel.api.WxLeagueWindowService; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.league.product.BatchAddParam; import me.chanjar.weixin.channel.bean.league.product.BatchAddResponse; import me.chanjar.weixin.channel.bean.league.window.AuthInfoResponse; import me.chanjar.weixin.channel.bean.league.window.AuthStatusResponse; import me.chanjar.weixin.channel.bean.league.window.ProductSearchParam; import me.chanjar.weixin.channel.bean.league.window.WindowProductListResponse; import me.chanjar.weixin.channel.bean.league.window.WindowProductResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Guice(modules = ApiTestModule.class) public class WxLeagueWindowServiceImplTest { @Inject private WxChannelService channelService; @Test public void testAddProduct() throws WxErrorException { WxLeagueWindowService leagueWindowService = channelService.getLeagueWindowService(); String appid = ""; String openfinderid = ""; String productId = ""; WxChannelBaseResponse response = leagueWindowService.addProduct(appid, openfinderid, productId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testListProduct() throws WxErrorException { WxLeagueWindowService leagueWindowService = channelService.getLeagueWindowService(); ProductSearchParam param = new ProductSearchParam(); WindowProductListResponse response = leagueWindowService.listProduct(param); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testRemoveProduct() throws WxErrorException { WxLeagueWindowService leagueWindowService = channelService.getLeagueWindowService(); String appid = ""; String openfinderid = ""; String productId = ""; WxChannelBaseResponse response = leagueWindowService.removeProduct(appid, openfinderid, productId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetProductDetail() throws WxErrorException { WxLeagueWindowService leagueWindowService = channelService.getLeagueWindowService(); String appid = ""; String openfinderid = ""; String productId = ""; WindowProductResponse response = leagueWindowService.getProductDetail(appid, openfinderid, productId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetWindowAuthInfo() throws WxErrorException { WxLeagueWindowService leagueWindowService = channelService.getLeagueWindowService(); String finderId = ""; AuthInfoResponse response = leagueWindowService.getWindowAuthInfo(finderId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetWindowAuthStatus() throws WxErrorException { WxLeagueWindowService leagueWindowService = channelService.getLeagueWindowService(); String finderId = ""; AuthStatusResponse response = leagueWindowService.getWindowAuthStatus(finderId); assertNotNull(response); assertTrue(response.isSuccess()); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelCompassShopServiceImplTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/api/impl/WxChannelCompassShopServiceImplTest.java
package me.chanjar.weixin.channel.api.impl; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; import com.google.inject.Inject; import me.chanjar.weixin.channel.api.WxChannelCompassShopService; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.bean.compass.shop.FinderAuthListResponse; import me.chanjar.weixin.channel.bean.compass.shop.FinderListResponse; import me.chanjar.weixin.channel.bean.compass.shop.FinderOverallResponse; import me.chanjar.weixin.channel.bean.compass.shop.FinderProductListResponse; import me.chanjar.weixin.channel.bean.compass.shop.FinderProductOverallResponse; import me.chanjar.weixin.channel.bean.compass.shop.ShopLiveListResponse; import me.chanjar.weixin.channel.bean.compass.shop.ShopOverallResponse; import me.chanjar.weixin.channel.bean.compass.shop.ShopProductDataResponse; import me.chanjar.weixin.channel.bean.compass.shop.ShopProductListResponse; import me.chanjar.weixin.channel.bean.compass.shop.ShopSaleProfileDataResponse; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.common.error.WxErrorException; import org.testng.annotations.Guice; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Guice(modules = ApiTestModule.class) public class WxChannelCompassShopServiceImplTest { @Inject private WxChannelService channelService; @Test public void testGetShopOverall() throws WxErrorException { WxChannelCompassShopService service = channelService.getCompassShopService(); String ds = "20240306"; ShopOverallResponse response = service.getShopOverall(ds); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetFinderAuthorizationList() throws WxErrorException { WxChannelCompassShopService service = channelService.getCompassShopService(); FinderAuthListResponse response = service.getFinderAuthorizationList(); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetFinderList() throws WxErrorException { WxChannelCompassShopService service = channelService.getCompassShopService(); String ds = "20240306"; FinderListResponse response = service.getFinderList(ds); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetFinderOverall() throws WxErrorException { WxChannelCompassShopService service = channelService.getCompassShopService(); String ds = "20240306"; FinderOverallResponse response = service.getFinderOverall(ds); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetFinderProductList() throws WxErrorException { WxChannelCompassShopService service = channelService.getCompassShopService(); String ds = ""; String finderId = ""; FinderProductListResponse response = service.getFinderProductList(ds, finderId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetFinderProductOverall() throws WxErrorException { WxChannelCompassShopService service = channelService.getCompassShopService(); String ds = ""; String finderId = ""; FinderProductOverallResponse response = service.getFinderProductOverall(ds, finderId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetShopLiveList() throws WxErrorException { WxChannelCompassShopService service = channelService.getCompassShopService(); String ds = ""; String finderId = ""; ShopLiveListResponse response = service.getShopLiveList(ds, finderId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetShopProductData() throws WxErrorException { WxChannelCompassShopService service = channelService.getCompassShopService(); String ds = "20240306"; String productId = ""; ShopProductDataResponse response = service.getShopProductData(ds, productId); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetShopProductList() throws WxErrorException { WxChannelCompassShopService service = channelService.getCompassShopService(); String ds = "20240306"; ShopProductListResponse response = service.getShopProductList(ds); assertNotNull(response); assertTrue(response.isSuccess()); } @Test public void testGetShopSaleProfileData() throws WxErrorException { WxChannelCompassShopService service = channelService.getCompassShopService(); String ds = "20240306"; ShopSaleProfileDataResponse response = service.getShopSaleProfileData(ds, 3); assertNotNull(response); assertTrue(response.isSuccess()); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/message/WxChannelMessageRouterRuleTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/message/WxChannelMessageRouterRuleTest.java
package me.chanjar.weixin.channel.message; import static org.testng.Assert.assertEquals; import me.chanjar.weixin.channel.bean.message.order.OrderPayMessage; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ public class WxChannelMessageRouterRuleTest { @Test public void testResolveMessageClass() { WxChannelMessageRouterRule<OrderPayMessage> rule = new WxChannelMessageRouterRule<>(); rule.setMessageClass(OrderPayMessage.class); assertEquals(rule.getMessageClass(), OrderPayMessage.class); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/test/java/me/chanjar/weixin/channel/message/WxChannelMessageRouterTest.java
weixin-java-channel/src/test/java/me/chanjar/weixin/channel/message/WxChannelMessageRouterTest.java
package me.chanjar.weixin.channel.message; import static me.chanjar.weixin.channel.constant.MessageEventConstants.BRAND; import static me.chanjar.weixin.channel.constant.MessageEventConstants.CLOSE_STORE; import static me.chanjar.weixin.channel.constant.MessageEventConstants.PRODUCT_SPU_AUDIT; import static me.chanjar.weixin.channel.constant.MessageEventConstants.SET_SHOP_NICKNAME; import static org.testng.Assert.*; import com.google.inject.Inject; import java.util.Map; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.WxChannelService; import me.chanjar.weixin.channel.bean.message.product.BrandMessage; import me.chanjar.weixin.channel.bean.message.product.SpuAuditMessage; import me.chanjar.weixin.channel.bean.message.store.CloseStoreMessage; import me.chanjar.weixin.channel.bean.message.store.NicknameUpdateMessage; import me.chanjar.weixin.channel.message.rule.HandlerConsumer; import me.chanjar.weixin.channel.test.ApiTestModule; import me.chanjar.weixin.channel.util.JsonUtils; import me.chanjar.weixin.common.session.WxSessionManager; import org.testng.annotations.Guice; import org.testng.annotations.Test; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Slf4j @Guice(modules = ApiTestModule.class) public class WxChannelMessageRouterTest { @Inject private WxChannelService channelService; @Test public void test1() { WxChannelMessageRouter router = new WxChannelMessageRouter(); /* 品牌资质事件回调 */ this.addRule(router, BrandMessage.class, BRAND, this::brandUpdate); /* 商品审核结果 */ this.addRule(router, SpuAuditMessage.class, PRODUCT_SPU_AUDIT, this::spuAudit); String spuAuditJson = "{\n" + " \"ToUserName\":\"gh_*\",\n" + " \"FromUserName\":\"OPENID\",\n" + " \"CreateTime\":1662480000,\n" + " \"MsgType\":\"event\",\n" + " \"Event\":\"product_spu_audit\",\n" + " \"ProductSpuAudit\": {\n" + " \"product_id\":\"12345678\",\n" + " \"status\":3,\n" + " \"reason\":\"abc\"\n" + " }\n" + "}"; WxChannelMessage message = JsonUtils.decode(spuAuditJson, WxChannelMessage.class); Object result = router.route(message, spuAuditJson, "xxxWWQQxxx", channelService); if (result != null) { log.info("result:{}", result); } else { log.info("return null"); } } @Test public void closeStore() { WxChannelMessageRouter router = new WxChannelMessageRouter(); /* 小店注销 */ this.addRule(router, CloseStoreMessage.class, CLOSE_STORE, this::closeStore); /* 小店修改名称 */ this.addRule(router, NicknameUpdateMessage.class, SET_SHOP_NICKNAME, this::updateNickname); String closeStoreJson = "{\n" + " \"ToUserName\": \"gh_*\",\n" + " \"FromUserName\": \"OPENID\",\n" + " \"CreateTime\": 1662480000,\n" + " \"MsgType\": \"event\",\n" + " \"Event\": \"channels_ec_close_store\",\n" + " \"appid\": \"APPID\",\n" + " \"close_timestamp\": \"1662480000\"\n" + "}"; String updateNicknameJson = "{\n" + " \"ToUserName\": \"gh_*\", \n" + " \"FromUserName\": \"OPENID\", \n" + " \"CreateTime\": 1662480000, \n" + " \"MsgType\": \"event\", \n" + " \"Event\": \"set_shop_nickname\", \n" + " \"appid\": \"APPID\",\n" + " \"old_nickname\": \"旧昵称\",\n" + " \"new_nickname\": \"新昵称\"\n" + "}"; WxChannelMessage message1 = JsonUtils.decode(closeStoreJson, WxChannelMessage.class); WxChannelMessage message2 = JsonUtils.decode(updateNicknameJson, WxChannelMessage.class); Object result1 = router.route(message1, closeStoreJson, "123456", channelService); if (result1 != null) { log.info("result1:{}", result1); } else { log.info("result1 return null"); } Object result2 = router.route(message2, updateNicknameJson, "123456", channelService); if (result2 != null) { log.info("result2:{}", result2); } else { log.info("result2 return null"); } } public void brandUpdate(BrandMessage message, String content, String appId, Map<String, Object> context, WxSessionManager sessionManager) { log.info("品牌更新:{}", JsonUtils.encode(message)); } public void spuAudit(SpuAuditMessage message, String content, String appId, Map<String, Object> context, WxSessionManager sessionManager) { log.info("商品审核:{}", JsonUtils.encode(message)); } public void closeStore(CloseStoreMessage message, String content, String appId, Map<String, Object> context, WxSessionManager sessionManager) { log.info("小店注销:{}", JsonUtils.encode(message)); } public void updateNickname(NicknameUpdateMessage message, String content, String appId, Map<String, Object> context, WxSessionManager sessionManager) { log.info("昵称更新:{}", JsonUtils.encode(message)); } /** * 添加一条规则进入路由器 * * @param clazz 消息类型 * @param event 事件类型 * @param consumer 处理器 * @param <T> 消息类型 */ protected <T extends WxChannelMessage> void addRule(WxChannelMessageRouter router, Class<T> clazz, String event, HandlerConsumer<T, String, String, Map<String, Object>, WxSessionManager> consumer) { WxChannelMessageRouterRule<T> rule = new WxChannelMessageRouterRule<>(); rule.setMessageClass(clazz).setEvent(event).setAsync(false); rule.getHandlers().add((message, content, appId, context, sessionManager) -> { consumer.accept(message, content, appId, context, sessionManager); return "success"; }); router.getRules().add(rule); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/util/WxChCryptUtils.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/util/WxChCryptUtils.java
package me.chanjar.weixin.channel.util; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.security.AlgorithmParameters; import javax.crypto.Cipher; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.config.WxChannelConfig; import me.chanjar.weixin.common.util.crypto.PKCS7Encoder; import me.chanjar.weixin.common.util.crypto.WxCryptUtil; import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang3.StringUtils; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Slf4j public class WxChCryptUtils extends WxCryptUtil { protected static final Charset UTF_8 = StandardCharsets.UTF_8; public WxChCryptUtils(WxChannelConfig config) { this.appidOrCorpid = config.getAppid(); this.token = config.getToken(); this.aesKey = Base64.decodeBase64(StringUtils.trim(config.getAesKey()) + "="); } /** * AES解密 * * @param sessionKey session_key * @param encryptedData 消息密文 * @param ivStr iv字符串 */ public static String decrypt(String sessionKey, String encryptedData, String ivStr) { try { AlgorithmParameters params = AlgorithmParameters.getInstance("AES"); params.init(new IvParameterSpec(Base64.decodeBase64(ivStr))); Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding"); cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(Base64.decodeBase64(sessionKey), "AES"), params); return new String(PKCS7Encoder.decode(cipher.doFinal(Base64.decodeBase64(encryptedData))), UTF_8); } catch (Exception e) { throw new RuntimeException("AES解密失败!", e); } } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/util/JsonUtils.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/util/JsonUtils.java
package me.chanjar.weixin.channel.util; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.json.JsonReadFeature; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.json.JsonMapper; import java.io.IOException; import lombok.extern.slf4j.Slf4j; /** * Json序列化/反序列化工具类 * * @author <a href="https://github.com/lixize">Zeyes</a> */ @Slf4j public class JsonUtils { private static final JsonMapper JSON_MAPPER = new JsonMapper(); static { JSON_MAPPER.enable(JsonReadFeature.ALLOW_JAVA_COMMENTS.mappedFeature()); JSON_MAPPER.enable(JsonReadFeature.ALLOW_UNQUOTED_FIELD_NAMES.mappedFeature()); JSON_MAPPER.enable(JsonReadFeature.ALLOW_SINGLE_QUOTES.mappedFeature()); JSON_MAPPER.enable(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature()); JSON_MAPPER.setSerializationInclusion(JsonInclude.Include.NON_NULL); JSON_MAPPER.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); JSON_MAPPER.disable(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES); } private JsonUtils() { } /** * 对象序列化 * * @param obj 对象 * @return json */ public static String encode(Object obj) { try { return JSON_MAPPER.writeValueAsString(obj); } catch (IOException e) { log.error("encode(Object)", e); } return null; } /** * 对象序列化 * * @param objectMapper ObjectMapper * @param obj obj * @return json */ public static String encode(ObjectMapper objectMapper, Object obj) { try { return objectMapper.writeValueAsString(obj); } catch (IOException e) { log.error("encode(Object)", e); } return null; } /** * 将json反序列化成对象 * * @param json json * @param valueType Class<T> * @return T */ public static <T> T decode(String json, Class<T> valueType) { if (json == null || json.length() <= 0) { return null; } try { return JSON_MAPPER.readValue(json, valueType); } catch (IOException e) { log.info("decode(String, Class<T>)", e); } return null; } /** * 将json反序列化为对象 * * @param json json * @param typeReference TypeReference<T> * @return T */ public static <T> T decode(String json, TypeReference<T> typeReference) { try { return (T) JSON_MAPPER.readValue(json, typeReference); } catch (IOException e) { log.info("decode(String, JsonTypeReference<T>)", e); } return null; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/util/ResponseUtils.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/util/ResponseUtils.java
package me.chanjar.weixin.channel.util; import static me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse.INTERNAL_ERROR_CODE; import java.lang.reflect.InvocationTargetException; import lombok.experimental.UtilityClass; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import org.apache.commons.lang3.StringUtils; /** * 响应工具类 * * @author <a href="https://github.com/lixize">Zeyes</a> */ @Slf4j @UtilityClass public class ResponseUtils { /** * 将json反序列化成对象 * * @param json json * @param valueType Class<T> * @return T */ public static <T extends WxChannelBaseResponse> T decode(String json, Class<T> valueType) { T t = null; try { if (StringUtils.isNotBlank(json)) { t = JsonUtils.decode(json, valueType); } } catch (Exception e) { log.error("decode", e); } if (t == null) { t = internalError(valueType); } return t; } /** * 设置系统内部错误 * * @param clazz 类 * @param <T> T * @return 错误 */ public static <T extends WxChannelBaseResponse> T internalError(Class<T> clazz) { try { T t = clazz.getDeclaredConstructor().newInstance(); t.setErrCode(INTERNAL_ERROR_CODE); t.setErrMsg("内部错误"); return t; } catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) { log.error("internalError", e); } // 正常情况下不会执行到这里 return null; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/util/XmlUtils.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/util/XmlUtils.java
package me.chanjar.weixin.channel.util; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; import java.io.IOException; import java.io.InputStream; import lombok.extern.slf4j.Slf4j; /** * Xml序列化/反序列化工具类 * * @author <a href="https://github.com/lixize">Zeyes</a> */ @Slf4j public class XmlUtils { private static final XmlMapper XML_MAPPER = new XmlMapper(); static { XML_MAPPER.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); XML_MAPPER.disable(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES); // 带有xml文件头,<?xml version="1.0" encoding="utf-8" ?> XML_MAPPER.disable(ToXmlGenerator.Feature.WRITE_XML_DECLARATION); } private XmlUtils() { } /** * 对象序列化 * * @param obj 对象 * @return json */ public static String encode(Object obj) { try { return XML_MAPPER.writeValueAsString(obj); } catch (IOException e) { log.error("encode(Object)", e); } return null; } /** * 对象序列化 * * @param objectMapper ObjectMapper * @param obj obj * @return json */ public static String encode(ObjectMapper objectMapper, Object obj) { try { return objectMapper.writeValueAsString(obj); } catch (IOException e) { log.error("encode(Object)", e); } return null; } /** * 将xml反序列化成对象 * * @param xml xml * @param valueType Class<T> * @return T */ public static <T> T decode(String xml, Class<T> valueType) { if (xml == null || xml.length() <= 0) { return null; } try { return XML_MAPPER.readValue(xml, valueType); } catch (IOException e) { log.info("decode(String, Class<T>)", e); } return null; } /** * 将xml反序列化为对象 * * @param xml xml * @param typeReference TypeReference<T> * @return T */ public static <T> T decode(String xml, TypeReference<T> typeReference) { try { return (T) XML_MAPPER.readValue(xml, typeReference); } catch (IOException e) { log.info("decode(String, TypeReference<T>)", e); } return null; } /** * 将xml反序列化为对象 * * @param is InputStream * @param valueType Class<T> * @return T */ public static <T> T decode(InputStream is, Class<T> valueType) { try { return (T) XML_MAPPER.readValue(is, valueType); } catch (IOException e) { log.info("decode(InputStream, Class<T>)", e); } return null; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/MessageEventConstants.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/MessageEventConstants.java
package me.chanjar.weixin.channel.constant; /** * 消息回调 * * @author <a href="https://github.com/lixize">Zeyes</a> */ public interface MessageEventConstants { /** 品牌资质事件回调 */ String BRAND = "channels_ec_brand"; /** 商品审核结果 */ String PRODUCT_SPU_AUDIT = "product_spu_audit"; /** 商品上下架 */ String PRODUCT_SPU_STATUS_UPDATE = "product_spu_listing"; /** 商品更新 */ String PRODUCT_SPU_UPDATE = "product_spu_update"; /** 类目审核结果 */ String PRODUCT_CATEGORY_AUDIT = "product_category_audit"; /** 库存不足 */ String PRODUCT_STOCK_NO_ENOUGH = "channels_ec_stock_no_enough"; /** 订单下单 */ String ORDER_NEW = "channels_ec_order_new"; /** 订单取消 */ String ORDER_CANCEL = "channels_ec_order_cancel"; /** 订单支付成功 */ String ORDER_PAY = "channels_ec_order_pay"; /** 订单待发货 */ String ORDER_WAIT_SHIPPING = "channels_ec_order_wait_shipping"; /** 订单发货 */ String ORDER_DELIVER = "channels_ec_order_deliver"; /** 订单确认收货 */ String ORDER_CONFIRM = "channels_ec_order_confirm"; /** 订单结算成功 */ String ORDER_SETTLE = "channels_ec_order_settle"; /** 订单其他信息更新 */ String ORDER_EXT_INFO_UPDATE = "channels_ec_order_ext_info_update"; /** 订单状态更新 */ String ORDER_STATUS_UPDATE = "product_order_status_update"; /** 售后单更新通知 */ String AFTER_SALE_UPDATE = "channels_ec_aftersale_update"; /** 纠纷更新通知 */ String COMPLAINT_NOTIFY = "channels_ec_complaint_update"; // 优惠券相关 /** 优惠券领取通知 */ String RECEIVE_COUPON = "channels_ec_coupon_receive"; /** 创建优惠券通知 */ String CREATE_COUPON = "channels_ec_coupon_create"; /** 优惠券删除通知 */ String DELETE_COUPON = "channels_ec_coupon_delete"; /** 优惠券过期通知 */ String EXPIRE_COUPON = "channels_ec_coupon_expire"; /** 更新优惠券信息通知 */ String UPDATE_COUPON_INFO = "channels_ec_coupon_info_change"; /** 优惠券作废通知 */ String INVALID_COUPON = "channels_ec_coupon_invalid"; /** 用户优惠券过期通知 */ String USER_COUPON_EXPIRE = "channels_ec_user_coupon_expire"; /** 优惠券返还通知 */ String USER_COUPON_UNUSE = "channels_ec_user_coupon_unuse"; /** 优惠券核销通知 */ String USER_COUPON_USE = "channels_ec_user_coupon_use"; /** 发放团购优惠成功回调 */ String VOUCHER_SEND_SUCC = "channels_ec_voucher_send_succ"; // 资金相关 /** 结算账户变更回调 */ String ACCOUNT_NOTIFY = "channels_ec_acct_notify"; /** 提现回调 */ String WITHDRAW_NOTIFY = "channels_ec_withdraw_notify"; /** 提现二维码回调 */ String QRCODE_STATUS = "qrcode_status"; // 团长 String SUPPLIER_ITEM_UPDATE = "head_supplier_item_update"; // 其他 /** 进入会话事件 */ String USER_ENTER_TEMP_SESSION = "user_enter_tempsession"; // 会员相关 /** 用户加入会员 */ String USER_VIP_JOIN = "channels_ec_vip_join"; /** 用户注销会员 */ String USER_VIP_CLOSE = "channels_ec_vip_close"; /** 用户等级更新 */ String USER_VIP_GRADE_INFO_UPDATE = "channels_ec_vip_grade_info_update"; /** 用户积分更新 */ String USER_VIP_SCORE_UPDATE = "channels_ec_vip_score_update"; /** 用户积分兑换 */ String USER_VIP_SCORE_EXCHANGE = "channels_ec_vip_score_exchange"; // 分享员相关 /** 分享员变更 **/ String SHARER_CHANGE = "channels_ec_sharer_change"; // 店铺相关 /** 小店注销 */ String CLOSE_STORE = "channels_ec_close_store"; /** 小店修改 */ String SET_SHOP_NICKNAME = "set_shop_nickname"; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/constant/WxChannelApiUrlConstants.java
package me.chanjar.weixin.channel.constant; import lombok.experimental.UtilityClass; /** * 视频号小店接口地址常量 * * @author <a href="https://github.com/lixize">Zeyes</a> */ @UtilityClass public class WxChannelApiUrlConstants { /** * 获取access_token. */ public static final String GET_ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s"; /** * 获取Stable access_token. */ public static final String GET_STABLE_ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/stable_token"; /** 基础接口 */ public interface Basics { /** 获取店铺基本信息 */ String GET_SHOP_INFO = "https://api.weixin.qq.com/channels/ec/basics/info/get"; /** 上传图片 */ String IMG_UPLOAD_URL = "https://api.weixin.qq.com/channels/ec/basics/img/upload"; /** 上传资质图片 */ String UPLOAD_QUALIFICATION_FILE = "https://api.weixin.qq.com/channels/ec/basics/qualification/upload"; /** 下载图片 */ String GET_IMG_URL = "https://api.weixin.qq.com/channels/ec/basics/media/get"; /** 获取地址编码 */ String GET_ADDRESS_CODE = "https://api.weixin.qq.com/channels/ec/basics/addresscode/get"; } /** 商品类目相关接口 */ public interface Category { /** 获取所有的类目 */ String LIST_ALL_CATEGORY_URL = "https://api.weixin.qq.com/channels/ec/category/all"; /** 获取类目详情 */ String GET_CATEGORY_DETAIL_URL = "https://api.weixin.qq.com/channels/ec/category/detail"; /** 获取可用的子类目详情 */ String AVAILABLE_CATEGORY_URL = "https://api.weixin.qq.com/channels/ec/category/availablesoncategories/get"; /** 上传类目资质 */ String ADD_CATEGORY_URL = "https://api.weixin.qq.com/channels/ec/category/add"; /** 获取类目审核结果 */ String GET_CATEGORY_AUDIT_URL = "https://api.weixin.qq.com/channels/ec/category/audit/get"; /** 取消类目提审 */ String CANCEL_CATEGORY_AUDIT_URL = "https://api.weixin.qq.com/channels/ec/category/audit/cancel"; /** 获取账号申请通过的类目和资质信息 */ String LIST_PASS_CATEGORY_URL = "https://api.weixin.qq.com/channels/ec/category/list/get"; } /** 主页管理相关接口 */ public interface HomePage { /** 添加分类关联的商品 */ String ADD_TREE_PRODUCT_URL = "https://api.weixin.qq.com/channels/ec/store/classification/tree/product/add"; /** 删除分类关联的商品 */ String DEL_TREE_PRODUCT_URL = "https://api.weixin.qq.com/channels/ec/store/classification/tree/product/del"; /** 获取分类关联的商品ID列表 */ String LIST_TREE_PRODUCT_URL = "https://api.weixin.qq.com/channels/ec/store/classification/tree/product/get"; /** 设置展示在店铺主页的商品分类 */ String SET_SHOW_TREE_URL = "https://api.weixin.qq.com/channels/ec/store/classification/tree/set"; /** 获取在店铺主页展示的商品分类 */ String GET_SHOW_TREE_URL = "https://api.weixin.qq.com/channels/ec/store/classification/tree/get"; /** 获取主页展示商品列表 */ String LIST_WINDOW_PRODUCT_URL = "https://api.weixin.qq.com/channels/ec/store/window/product/list/get"; /** 重新排序主页展示商品 */ String REORDER_WINDOW_PRODUCT_URL = "https://api.weixin.qq.com/channels/ec/store/window/product/reorder"; /** 隐藏小店主页商品 */ String HIDE_WINDOW_PRODUCT_URL = "https://api.weixin.qq.com/channels/ec/store/window/product/hide"; /** 置顶小店主页商品 */ String TOP_WINDOW_PRODUCT_URL = "https://api.weixin.qq.com/channels/ec/store/window/product/settop"; /** 提交主页背景图申请 */ String APPLY_BACKGROUND_URL = "https://api.weixin.qq.com/channels/ec/basics/homepage/background/apply/submit"; /** 查询主页背景图 */ String GET_BACKGROUND_URL = "https://api.weixin.qq.com/channels/ec/basics/homepage/background/get"; /** 撤销主页背景图申请 */ String CANCEL_BACKGROUND_URL = "https://api.weixin.qq.com/channels/ec/basics/homepage/background/apply/cancel"; /** 清空主页背景图并撤销流程中的申请 */ String REMOVE_BACKGROUND_URL = "https://api.weixin.qq.com/channels/ec/basics/homepage/background/remove"; /** 提交精选展示位申请 */ String APPLY_BANNER_URL = "https://api.weixin.qq.com/channels/ec/basics/homepage/banner/apply/submit"; /** 查询精选展示位 */ String GET_BANNER_URL = "https://api.weixin.qq.com/channels/ec/basics/homepage/banner/get"; /** 撤销精选展示位申请 */ String CANCEL_BANNER_URL = "https://api.weixin.qq.com/channels/ec/basics/homepage/banner/apply/cancel"; /** 清空精选展示位并撤销流程中的申请 */ String REMOVE_BANNER_URL = "https://api.weixin.qq.com/channels/ec/basics/homepage/banner/remove"; } /** 品牌资质相关接口 */ public interface Brand { /** 获取品牌库列表 */ String ALL_BRAND_URL = "https://api.weixin.qq.com/channels/ec/brand/all"; /** 新增品牌资质 */ String ADD_BRAND_URL = "https://api.weixin.qq.com/channels/ec/brand/add"; /** 更新品牌资质 */ String UPDATE_BRAND_URL = "https://api.weixin.qq.com/channels/ec/brand/update"; /** 撤回品牌资质审核 */ String CANCEL_BRAND_AUDIT_URL = "https://api.weixin.qq.com/channels/ec/brand/audit/cancel"; /** 删除品牌资质 */ String DELETE_BRAND_URL = "https://api.weixin.qq.com/channels/ec/brand/delete"; /** 获取品牌资质申请详情 */ String GET_BRAND_URL = "https://api.weixin.qq.com/channels/ec/brand/get"; /** 获取品牌资质申请列表 */ String LIST_BRAND_URL = "https://api.weixin.qq.com/channels/ec/brand/list/get"; /** 获取生效中的品牌资质列表 */ String LIST_BRAND_VALID_URL = "https://api.weixin.qq.com/channels/ec/brand/valid/list/get"; } /** 商品操作相关接口 */ public interface Spu { /** 添加商品 */ String SPU_ADD_URL = "https://api.weixin.qq.com/channels/ec/product/add"; /** 删除商品 */ String SPU_DEL_URL = "https://api.weixin.qq.com/channels/ec/product/delete"; /** 获取商品详情 */ String SPU_GET_URL = "https://api.weixin.qq.com/channels/ec/product/get"; /** 获取商品列表 */ String SPU_LIST_URL = "https://api.weixin.qq.com/channels/ec/product/list/get"; /** 更新商品 */ String SPU_UPDATE_URL = "https://api.weixin.qq.com/channels/ec/product/update"; /** 更新商品 */ String SPU_AUDIT_FREE_UPDATE_URL = "https://api.weixin.qq.com/channels/ec/product/auditfree"; /** 上架商品 */ String SPU_LISTING_URL = "https://api.weixin.qq.com/channels/ec/product/listing"; /** 下架商品 */ String SPU_DELISTING_URL = "https://api.weixin.qq.com/channels/ec/product/delisting"; /** 撤回商品审核 */ String CANCEL_AUDIT_URL = "https://api.weixin.qq.com/channels/ec/product/audit/cancel"; /** 获取商品H5短链 */ String SPU_H5URL_URL = "https://api.weixin.qq.com/channels/ec/product/h5url/get"; /** 获取商品二维码 */ String SPU_QRCODE_URL = "https://api.weixin.qq.com/channels/ec/product/qrcode/get"; /** 获取商品口令 */ String SPU_TAGLINK_URL = "https://api.weixin.qq.com/channels/ec/product/taglink/get"; /** 获取实时库存 */ String SPU_GET_STOCK_URL = "https://api.weixin.qq.com/channels/ec/product/stock/get"; /** 获取实时库存 */ String SPU_GET_STOCK_BATCH_URL = "https://api.weixin.qq.com/channels/ec/product/stock/batchget"; /** 更新商品库存 */ String SPU_UPDATE_STOCK_URL = "https://api.weixin.qq.com/channels/ec/product/stock/update"; /** 添加限时抢购任务 */ String ADD_LIMIT_TASK_URL = "https://api.weixin.qq.com/channels/ec/product/limiteddiscounttask/add"; /** 拉取限时抢购任务列表 */ String LIST_LIMIT_TASK_URL = "https://api.weixin.qq.com/channels/ec/product/limiteddiscounttask/list/get"; /** 停止限时抢购任务 */ String STOP_LIMIT_TASK_URL = "https://api.weixin.qq.com/channels/ec/product/limiteddiscounttask/stop"; /** 删除限时抢购任务 */ String DELETE_LIMIT_TASK_URL = "https://api.weixin.qq.com/channels/ec/product/limiteddiscounttask/delete"; } /** 区域仓库 */ public interface Warehouse { /** 添加区域仓库 */ String ADD_WAREHOUSE_URL = "https://api.weixin.qq.com/channels/ec/warehouse/create"; /** 获取区域仓库列表 */ String LIST_WAREHOUSE_URL = "https://api.weixin.qq.com/channels/ec/warehouse/list/get"; /** 获取区域仓库详情 */ String GET_WAREHOUSE_URL = "https://api.weixin.qq.com/channels/ec/warehouse/get"; /** 更新区域仓库详情 */ String UPDATE_WAREHOUSE_URL = "https://api.weixin.qq.com/channels/ec/warehouse/detail/update"; /** 批量增加覆盖区域 */ String ADD_COVER_AREA_URL = "https://api.weixin.qq.com/channels/ec/warehouse/coverlocations/add"; /** 批量删除覆盖区域 */ String DELETE_COVER_AREA_URL = "https://api.weixin.qq.com/channels/ec/warehouse/coverlocations/del"; /** 设置指定地址下的仓的优先级 */ String SET_WAREHOUSE_PRIORITY_URL = "https://api.weixin.qq.com/channels/ec/warehouse/address/prioritysort/set"; /** 获取指定地址下的仓的优先级 */ String GET_WAREHOUSE_PRIORITY_URL = "https://api.weixin.qq.com/channels/ec/warehouse/address/prioritysort/get"; /** 更新区域仓库存 */ String UPDATE_WAREHOUSE_STOCK_URL = "https://api.weixin.qq.com/channels/ec/warehouse/stock/update"; /** 获取区域仓库存 */ String GET_WAREHOUSE_STOCK_URL = "https://api.weixin.qq.com/channels/ec/warehouse/stock/get"; } /** 订单相关接口 */ public interface Order { /** 获取订单列表 */ String ORDER_LIST_URL = "https://api.weixin.qq.com/channels/ec/order/list/get"; /** 获取订单详情 */ String ORDER_GET_URL = "https://api.weixin.qq.com/channels/ec/order/get"; /** 更改订单价格 */ String UPDATE_PRICE_URL = "https://api.weixin.qq.com/channels/ec/order/price/update"; /** 修改订单备注 */ String UPDATE_REMARK_URL = "https://api.weixin.qq.com/channels/ec/order/merchantnotes/update"; /** 更修改订单地址 */ String UPDATE_ADDRESS_URL = "https://api.weixin.qq.com/channels/ec/order/address/update"; /** 修改物流信息 */ String UPDATE_EXPRESS_URL = "https://api.weixin.qq.com/channels/ec/order/deliveryinfo/update"; /** 同意用户修改收货地址申请 */ String ACCEPT_ADDRESS_MODIFY_URL = "https://api.weixin.qq.com/channels/ec/order/addressmodify/accept"; /** 拒绝用户修改收货地址申请 */ String REJECT_ADDRESS_MODIFY_URL = "https://api.weixin.qq.com/channels/ec/order/addressmodify/reject"; /** 订单搜索 */ String ORDER_SEARCH_URL = "https://api.weixin.qq.com/channels/ec/order/search"; /** 上传生鲜质检信息 */ String UPLOAD_FRESH_INSPECT_URL = "https://api.weixin.qq.com/channels/ec/order/freshinspect/submit"; /** 兑换虚拟号 */ String VIRTUAL_TEL_NUMBER_URL = "https://api.weixin.qq.com/channels/ec/order/virtualtelnumber/get"; /** 解码订单包含的敏感数据 */ String DECODE_SENSITIVE_INFO_URL = "https://api.weixin.qq.com/channels/ec/order/sensitiveinfo/decode"; } /** 售后相关接口 */ public interface AfterSale { /** 获取售后列表 */ String AFTER_SALE_LIST_URL = "https://api.weixin.qq.com/channels/ec/aftersale/getaftersalelist"; /** 获取售后单 */ String AFTER_SALE_GET_URL = "https://api.weixin.qq.com/channels/ec/aftersale/getaftersaleorder"; /** 同意售后 */ String AFTER_SALE_ACCEPT_URL = "https://api.weixin.qq.com/channels/ec/aftersale/acceptapply"; /** 拒绝售后 */ String AFTER_SALE_REJECT_URL = "https://api.weixin.qq.com/channels/ec/aftersale/rejectapply"; /** 上传退款凭证 */ String AFTER_SALE_UPLOAD_URL = "https://api.weixin.qq.com/channels/ec/aftersale/uploadrefundcertificate"; /** 获取全量售后原因*/ String AFTER_SALE_REASON_GET_URL = "https://api.weixin.qq.com/channels/ec/aftersale/reason/get"; /** 获取拒绝售后原因*/ String AFTER_SALE_REJECT_REASON_GET_URL = "https://api.weixin.qq.com/channels/ec/aftersale/rejectreason/get"; /** 换货发货*/ String AFTER_SALE_ACCEPT_EXCHANGE_RESHIP_URL = "https://api.weixin.qq.com/channels/ec/aftersale/acceptexchangereship"; /** 换货拒绝发货*/ String AFTER_SALE_REJECT_EXCHANGE_RESHIP_URL = "https://api.weixin.qq.com/channels/ec/aftersale/rejectexchangereship"; /** 商家协商*/ String AFTER_SALE_MERCHANT_UPDATE_URL = "https://api.weixin.qq.com/channels/ec/aftersale/merchantupdateaftersale"; } /** 纠纷相关接口 */ public interface Complaint { /** 商家补充纠纷单留言 */ String ADD_COMPLAINT_MATERIAL_URL = "https://api.weixin.qq.com/channels/ec/aftersale/addcomplaintmaterial"; /** 商家举证 */ String ADD_COMPLAINT_PROOF_URL = "https://api.weixin.qq.com/channels/ec/aftersale/addcomplaintproof"; /** 获取纠纷单 */ String GET_COMPLAINT_ORDER_URL = "https://api.weixin.qq.com/channels/ec/aftersale/getcomplaintorder"; } /** 物流相关接口 */ public interface Delivery { /** 获取快递公司列表 */ String GET_DELIVERY_COMPANY_NEW_URL = "https://api.weixin.qq.com/channels/ec/order/deliverycompanylist/new/get"; /** 获取快递公司列表(旧) */ String GET_DELIVERY_COMPANY_URL = "https://api.weixin.qq.com/channels/ec/order/deliverycompanylist/get"; /** 订单发货 */ String DELIVERY_SEND_URL = "https://api.weixin.qq.com/channels/ec/order/delivery/send"; } /** 运费模板相关接口 */ public interface FreightTemplate { /** 获取运费模板列表 */ String LIST_TEMPLATE_URL = "https://api.weixin.qq.com/channels/ec/merchant/getfreighttemplatelist"; /** 查询运费模版 */ String GET_TEMPLATE_URL = "https://api.weixin.qq.com/channels/ec/merchant/getfreighttemplatedetail"; /** 增加运费模版 */ String ADD_TEMPLATE_URL = "https://api.weixin.qq.com/channels/ec/merchant/addfreighttemplate"; /** 更新运费模版 */ String UPDATE_TEMPLATE_URL = "https://api.weixin.qq.com/channels/ec/merchant/updatefreighttemplate"; } /** 地址管理相关接口 */ public interface Address { /** 增加地址 */ String ADD_ADDRESS_URL = "https://api.weixin.qq.com/channels/ec/merchant/address/add"; /** 获取地址列表 */ String LIST_ADDRESS_URL = "https://api.weixin.qq.com/channels/ec/merchant/address/list"; /** 获取地址详情 */ String GET_ADDRESS_URL = "https://api.weixin.qq.com/channels/ec/merchant/address/get"; /** 更新地址 */ String UPDATE_ADDRESS_URL = "https://api.weixin.qq.com/channels/ec/merchant/address/update"; /** 删除地址 */ String DELETE_ADDRESS_URL = "https://api.weixin.qq.com/channels/ec/merchant/address/delete"; } /** 优惠券相关接口 */ public interface Coupon { /** 创建优惠券 */ String CREATE_COUPON_URL = "https://api.weixin.qq.com/channels/ec/coupon/create"; /** 更新优惠券 */ String UPDATE_COUPON_URL = "https://api.weixin.qq.com/channels/ec/coupon/update"; /** 更新优惠券状态 */ String UPDATE_COUPON_STATUS_URL = "https://api.weixin.qq.com/channels/ec/coupon/update_status"; /** 获取优惠券详情 */ String GET_COUPON_URL = "https://api.weixin.qq.com/channels/ec/coupon/get"; /** 获取优惠券ID列表 */ String LIST_COUPON_URL = "https://api.weixin.qq.com/channels/ec/coupon/get_list"; /** 获取用户优惠券ID列表 */ String LIST_USER_COUPON_URL = "https://api.weixin.qq.com/channels/ec/coupon/get_user_coupon_list"; /** 获取用户优惠券详情 */ String GET_USER_COUPON_URL = "https://api.weixin.qq.com/channels/ec/coupon/get_user_coupon"; } /** 分享员相关接口 */ public interface Share { /** 邀请分享员 */ String BIND_SHARER_URL = "https://api.weixin.qq.com/channels/ec/sharer/bind"; /** 获取绑定的分享员 */ String SEARCH_SHARER_URL = "https://api.weixin.qq.com/channels/ec/sharer/search_sharer"; /** 获取绑定的分享员列表 */ String LIST_SHARER_URL = "https://api.weixin.qq.com/channels/ec/sharer/get_sharer_list"; /** 获取分享员订单列表 */ String LIST_SHARER_ORDER_URL = "https://api.weixin.qq.com/channels/ec/sharer/get_sharer_order_list"; /** 解绑分享员 */ String UNBIND_SHARER_URL = "https://api.weixin.qq.com/channels/ec/sharer/unbind"; } /** 合作账号相关接口 */ public interface Cooperation { /** 获取合作账号列表 */ String LIST_COOPERATION_URL = "https://api.weixin.qq.com/channels/ec/cooperation/list"; /** 查看合作账号邀请状态 */ String GET_COOPERATION_STATUS_URL = "https://api.weixin.qq.com/channels/ec/cooperation/invitation/get"; /** 邀请合作账号 */ String GENERATE_QRCODE_COOPERATION_URL = "https://api.weixin.qq.com/channels/ec/cooperation/invitation/qrcode/generate"; /** 取消合作账号邀请 */ String CANCEL_COOPERATION_URL = "https://api.weixin.qq.com/channels/ec/cooperation/invitation/cancel"; /** 解绑合作账号 */ String UNBIND_COOPERATION_URL = "https://api.weixin.qq.com/channels/ec/cooperation/unbind"; } /** 资金相关接口 */ public interface Fund { /** 获取账户余额 */ String GET_BALANCE_URL = "https://api.weixin.qq.com/channels/ec/funds/getbalance"; /** 获取结算账户 */ String GET_BANK_ACCOUNT_URL = "https://api.weixin.qq.com/channels/ec/funds/getbankacct"; /** 获取资金流水详情 */ String GET_BALANCE_FLOW_DETAIL_URL = "https://api.weixin.qq.com/channels/ec/funds/getfundsflowdetail"; /** 获取资金流水列表 */ String GET_BALANCE_FLOW_LIST_URL = "https://api.weixin.qq.com/channels/ec/funds/getfundsflowlist"; /** 获取提现记录 */ String GET_WITHDRAW_DETAIL_URL = "https://api.weixin.qq.com/channels/ec/funds/getwithdrawdetail"; /** 获取提现记录列表 */ String GET_WITHDRAW_LIST_URL = "https://api.weixin.qq.com/channels/ec/funds/getwithdrawlist"; /** 修改结算账户 */ String SET_BANK_ACCOUNT_URL = "https://api.weixin.qq.com/channels/ec/funds/setbankacct"; /** 商户提现 */ String WITHDRAW_URL = "https://api.weixin.qq.com/channels/ec/funds/submitwithdraw"; /** 根据卡号查银行信息 */ String GET_BANK_BY_NUM_URL = "https://api.weixin.qq.com/shop/funds/getbankbynum"; /** 搜索银行列表 */ String GET_BANK_LIST_URL = "https://api.weixin.qq.com/shop/funds/getbanklist"; /** 查询城市列表 */ String GET_CITY_URL = "https://api.weixin.qq.com/shop/funds/getcity"; /** 查询大陆银行省份列表 */ String GET_PROVINCE_URL = "https://api.weixin.qq.com/shop/funds/getprovince"; /** 查询支行列表 */ String GET_SUB_BANK_URL = "https://api.weixin.qq.com/shop/funds/getsubbranch"; /** 获取二维码 */ String GET_QRCODE_URL = "https://api.weixin.qq.com/shop/funds/qrcode/get"; /** 查询扫码状态 */ String CHECK_QRCODE_URL = "https://api.weixin.qq.com/shop/funds/qrcode/check"; } /** 优选联盟相关接口 */ public interface League { /** 添加团长商品到橱窗 */ String ADD_SUPPLIER_GOODS_URL = "https://api.weixin.qq.com/channels/ec/league/headsupplier/window/add"; /** 查询橱窗上团长商品列表 */ String LIST_SUPPLIER_GOODS_URL = "https://api.weixin.qq.com/channels/ec/league/headsupplier/window/getall"; /** 从橱窗移除团长商品 */ String REMOVE_SUPPLIER_GOODS_URL = "https://api.weixin.qq.com/channels/ec/league/headsupplier/window/remove"; /** 查询橱窗上团长商品详情 */ String GET_SUPPLIER_GOODS_URL = "https://api.weixin.qq.com/channels/ec/league/headsupplier/window/getdetail"; /** 获取达人橱窗授权链接 */ String GET_SUPPLIER_AUTH_URL = "https://api.weixin.qq.com/channels/ec/league/headsupplier/windowauth/get"; /** 获取达人橱窗授权状态 */ String GET_SUPPLIER_AUTH_STATUS_URL = "https://api.weixin.qq.com/channels/ec/league/headsupplier/windowauth/status/get"; /** 获取团长账户余额 */ String GET_SUPPLIER_BALANCE_URL = "https://api.weixin.qq.com/channels/ec/league/headsupplier/funds/balance/get"; /** 获取资金流水详情 */ String GET_SUPPLIER_BALANCE_FLOW_DETAIL_URL = "https://api.weixin.qq.com/channels/ec/league/headsupplier/funds/flowdetail/get"; /** 获取资金流水列表 */ String GET_SUPPLIER_BALANCE_FLOW_LIST_URL = "https://api.weixin.qq.com/channels/ec/league/headsupplier/funds/flowlist/get"; /** 获取合作商品详情 */ String GET_SUPPLIER_ITEM_URL = "https://api.weixin.qq.com/channels/ec/league/headsupplier/item/get"; /** 获取合作商品列表 */ String GET_SUPPLIER_ITEM_LIST_URL = "https://api.weixin.qq.com/channels/ec/league/headsupplier/item/list/get"; /** 获取佣金单详情 */ String GET_SUPPLIER_ORDER_URL = "https://api.weixin.qq.com/channels/ec/league/headsupplier/order/get"; /** 获取佣金单列表 */ String GET_SUPPLIER_ORDER_LIST_URL = "https://api.weixin.qq.com/channels/ec/league/headsupplier/order/list/get"; /** 获取合作小店详情 */ String GET_SUPPLIER_SHOP_URL = "https://api.weixin.qq.com/channels/ec/league/headsupplier/shop/get"; /** 获取合作小店列表 */ String GET_SUPPLIER_SHOP_LIST_URL = "https://api.weixin.qq.com/channels/ec/league/headsupplier/shop/list/get"; /** 新增达人 */ String ADD_PROMOTER_URL = "https://api.weixin.qq.com/channels/ec/league/promoter/add"; /** 编辑达人 */ String EDIT_PROMOTER_URL = "https://api.weixin.qq.com/channels/ec/league/promoter/upd"; /** 删除达人 */ String DELETE_PROMOTER_URL = "https://api.weixin.qq.com/channels/ec/league/promoter/delete"; /** 获取达人详情信息 */ String GET_PROMOTER_URL = "https://api.weixin.qq.com/channels/ec/league/promoter/get"; /** 拉取商店达人列表 */ String GET_PROMOTER_LIST_URL = "https://api.weixin.qq.com/channels/ec/league/promoter/list/get"; /** 批量新增联盟商品 */ String BATCH_ADD_LEAGUE_ITEM_URL = "https://api.weixin.qq.com/channels/ec/league/item/batchadd"; /** 更新联盟商品信息 */ String UPDATE_LEAGUE_ITEM_URL = "https://api.weixin.qq.com/channels/ec/league/item/upd"; /** 删除联盟商品 */ String DELETE_LEAGUE_ITEM_URL = "https://api.weixin.qq.com/channels/ec/league/item/delete"; /** 拉取联盟商品详情 */ String GET_LEAGUE_ITEM_URL = "https://api.weixin.qq.com/channels/ec/league/item/get"; /** 拉取联盟商品推广列表 */ String GET_LEAGUE_ITEM_LIST_URL = "https://api.weixin.qq.com/channels/ec/league/item/list/get"; } /** 视频号助手开放接口 */ public interface Assistant { /** 上架商品到橱窗 */ String ADD_WINDOW_PRODUCT_URL = "https://api.weixin.qq.com/channels/ec/window/product/add"; /** 获取橱窗商品详情 */ String GET_WINDOW_PRODUCT_URL = "https://api.weixin.qq.com/channels/ec/window/product/get"; /** 获取已添加到橱窗的商品列表 */ String LIST_WINDOW_PRODUCT_URL = "https://api.weixin.qq.com/channels/ec/window/product/list/get"; /** 下架橱窗商品 */ String OFF_WINDOW_PRODUCT_URL = "https://api.weixin.qq.com/channels/ec/window/product/off"; } /** * 留资组件管理 */ public interface LeadComponent { /** * <a href="https://developers.weixin.qq.com/doc/channels/API/leads/get_leads_info_by_component_id.html">按时间获取留资信息详情</a> */ String GET_LEADS_INFO_BY_COMPONENT_ID = "https://api.weixin.qq.com/channels/leads/get_leads_info_by_component_id"; /** * <a href="https://developers.weixin.qq.com/doc/channels/API/leads/get_leads_info_by_request_id.html">按直播场次获取留资信息详情</a> */ String GET_LEADS_INFO_BY_REQUEST_ID = "https://api.weixin.qq.com/channels/leads/get_leads_info_by_request_id"; /** * <a href="https://developers.weixin.qq.com/doc/channels/API/leads/get_leads_request_id.html">获取留资request_id列表详情</a> */ String GET_LEADS_REQUEST_ID = "https://api.weixin.qq.com/channels/leads/get_leads_request_id"; /** * <a href="https://developers.weixin.qq.com/doc/channels/API/leads/get_leads_component_promote_record.html">获取留资组件直播推广记录信息详情</a> */ String GET_LEADS_COMPONENT_PROMOTE_RECORD = "https://api.weixin.qq.com/channels/leads/get_leads_component_promote_record"; /** * <a href="https://developers.weixin.qq.com/doc/channels/API/leads/get_leads_component_id.html">获取留资组件Id列表详情</a> */ String GET_LEADS_COMPONENT_ID = "https://api.weixin.qq.com/channels/leads/get_leads_component_id"; } /** * 留资服务的直播数据 */ public interface FinderLive { /** * <a href="https://developers.weixin.qq.com/doc/channels/API/live/get_finder_attr_by_appid.html">获取视频号账号信息</a> */ String GET_FINDER_ATTR_BY_APPID = "https://api.weixin.qq.com/channels/finderlive/get_finder_attr_by_appid"; /** * <a href="https://developers.weixin.qq.com/doc/channels/API/live/get_finder_live_data_list.html">获取留资直播间数据详情</a> */ String GET_FINDER_LIVE_DATA_LIST = "https://api.weixin.qq.com/channels/finderlive/get_finder_live_data_list"; /** * <a href="https://developers.weixin.qq.com/doc/channels/API/live/get_finder_live_leads_data.html">获取账号收集的留资数量</a> */ String GET_FINDER_LIVE_LEADS_DATA = "https://api.weixin.qq.com/channels/finderlive/get_finder_live_leads_data"; } /** 会员功能接口 */ public interface Vip { /** 拉取用户详情 */ String VIP_USER_INFO_URL = "https://api.weixin.qq.com/channels/ec/vip/user/info/get"; /** 拉取用户列表 */ String VIP_USER_LIST_URL = "https://api.weixin.qq.com/channels/ec/vip/user/list/get"; /** 获取用户积分 */ String VIP_SCORE_URL = "https://api.weixin.qq.com/channels/ec/vip/user/score/get"; /** 增加用户积分 */ String SCORE_INCREASE_URL = "https://api.weixin.qq.com/channels/ec/vip/user/score/increase"; /** 减少用户积分 */ String SCORE_DECREASE_URL = "https://api.weixin.qq.com/channels/ec/vip/user/score/decrease"; /** 更新用户等级 */ String GRADE_UPDATE_URL = "https://api.weixin.qq.com/channels/ec/vip/user/grade/update"; } /** * 直播大屏数据 */ public interface LiveDashboard { /** * <a href="https://developers.weixin.qq.com/doc/channels/API/livedashboard/getlivelist.html">获取直播大屏直播列表</a> */ String GET_LIVE_LIST_URL = "https://api.weixin.qq.com/channels/livedashboard/getlivelist"; /** * <a href="https://developers.weixin.qq.com/doc/channels/API/livedashboard/getlivedata.html">获取直播大屏数据</a> */ String GET_LIVE_DATA_URL = "https://api.weixin.qq.com/channels/livedashboard/getlivedata"; } /** * 罗盘达人版API */ public interface CompassFinder { /** * <a href="https://developers.weixin.qq.com/doc/channels/API/compass/finder/getfinderoverall.html">获取电商概览数据</a> */ String GET_OVERALL_URL = "https://api.weixin.qq.com/channels/ec/compass/finder/overall/get"; /** * <a href="https://developers.weixin.qq.com/doc/channels/API/compass/finder/getfinderproductdata.html">获取带货商品数据</a> */ String GET_PRODUCT_DATA_URL = "https://api.weixin.qq.com/channels/ec/compass/finder/product/data/get"; /** * <a href="https://developers.weixin.qq.com/doc/channels/API/compass/finder/getfinderproductlist.html">获取带货商品列表</a> */ String GET_PRODUCT_LIST_URL = "https://api.weixin.qq.com/channels/ec/compass/finder/product/list/get"; /** * <a href="https://developers.weixin.qq.com/doc/channels/API/compass/finder/getfindersaleprofiledata.html">获取带货人群数据</a> */ String GET_SALE_PROFILE_DATA_URL = "https://api.weixin.qq.com/channels/ec/compass/finder/sale/profile/data/get"; } /** * 罗盘商家版API */ public interface CompassShop { /** 获取电商数据概览 */ String GET_SHOP_OVERALL_URL = "https://api.weixin.qq.com/channels/ec/compass/shop/overall/get"; /** 获取授权视频号列表 */ String FINDER_AUTH_LIST_URL = "https://api.weixin.qq.com/channels/ec/compass/shop/finder/authorization/list/get"; /** 获取带货达人列表 */ String FINDER_LIST_URL = "https://api.weixin.qq.com/channels/ec/compass/shop/finder/list/get"; /** 获取带货数据概览 */ String GET_FINDER_OVERALL_URL = "https://api.weixin.qq.com/channels/ec/compass/shop/finder/overall/get"; /** 获取带货达人商品列表 */ String GET_FINDER_PRODUCT_LIST_URL = "https://api.weixin.qq.com/channels/ec/compass/shop/finder/product/list/get"; /** 获取带货达人商品数据 */ String GET_FINDER_PRODUCT_OVERALL_URL = "https://api.weixin.qq.com/channels/ec/compass/shop/finder/product/overall/get"; /** 获取店铺开播列表 */ String GET_LIVE_LIST_URL = "https://api.weixin.qq.com/channels/ec/compass/shop/live/list/get"; /** 获取商品详细信息 */ String GET_SHOP_PRODUCT_DATA_URL = "https://api.weixin.qq.com/channels/ec/compass/shop/product/data/get"; /** 获取商品列表 */ String GET_SHOP_PRODUCT_LIST_URL = "https://api.weixin.qq.com/channels/ec/compass/shop/product/list/get"; /** 获取店铺人群数据 */ String GET_SHOP_SALE_PROFILE_DATA_URL = "https://api.weixin.qq.com/channels/ec/compass/shop/sale/profile/data/get"; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelProductService.java
package me.chanjar.weixin.channel.api; import java.util.List; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.limit.LimitTaskAddResponse; import me.chanjar.weixin.channel.bean.limit.LimitTaskListResponse; import me.chanjar.weixin.channel.bean.limit.LimitTaskParam; import me.chanjar.weixin.channel.bean.product.SkuStockBatchResponse; import me.chanjar.weixin.channel.bean.product.SkuStockResponse; import me.chanjar.weixin.channel.bean.product.SpuFastInfo; import me.chanjar.weixin.channel.bean.product.SpuGetResponse; import me.chanjar.weixin.channel.bean.product.SpuInfo; import me.chanjar.weixin.channel.bean.product.SpuListResponse; import me.chanjar.weixin.channel.bean.product.SpuUpdateInfo; import me.chanjar.weixin.channel.bean.product.SpuUpdateResponse; import me.chanjar.weixin.channel.bean.product.link.ProductH5UrlResponse; import me.chanjar.weixin.channel.bean.product.link.ProductQrCodeResponse; import me.chanjar.weixin.channel.bean.product.link.ProductTagLinkResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号小店 商品服务接口 * * @author <a href="https://github.com/lixize">Zeyes</a> * @see <a href="https://developers.weixin.qq.com/doc/store/API/product/product_status.html">商品状态流转图</a> */ public interface WxChannelProductService { /** * 添加商品 * * @param info 商品信息 * @return 返回商品的状态和id * * @throws WxErrorException 异常 */ SpuUpdateResponse addProduct(SpuUpdateInfo info) throws WxErrorException; /** * 更新商品 * * @param info 商品信息 * @return 返回商品的状态和id * * @throws WxErrorException 异常 */ SpuUpdateResponse updateProduct(SpuUpdateInfo info) throws WxErrorException; /** * 添加商品 * * @param info 商品信息 * @return 返回商品的状态和id * * @throws WxErrorException 异常 * @deprecated 请使用 {@link #addProduct(SpuUpdateInfo)} */ @Deprecated SpuUpdateResponse addProduct(SpuInfo info) throws WxErrorException; /** * 更新商品 * * @param info 商品信息 * @return 返回商品的状态和id * * @throws WxErrorException 异常 * @deprecated 请使用 {@link #updateProduct(SpuUpdateInfo)} */ @Deprecated SpuUpdateResponse updateProduct(SpuInfo info) throws WxErrorException; /** * 免审更新商品 * * @param info 商品信息 * @return 返回商品的状态和id * * @throws WxErrorException 异常 */ WxChannelBaseResponse updateProductAuditFree(SpuFastInfo info) throws WxErrorException; /** * 更新商品库存 (仅对edit_status != 2 的商品适用,其他状态的商品无法通过该接口修改库存) * * @param productId 内部商品ID * @param skuId 内部sku_id * @param diffType 修改类型 1增加 2减少 3设置 * 建议使用1或2,不建议使用3,因为使用3在高并发场景可能会出现预期外表现 * @param num 增加、减少或者设置的库存值 * @return WxChannelBaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse updateStock(String productId, String skuId, Integer diffType, Integer num) throws WxErrorException; /** * 删除商品 * * @param productId 商品ID * @return 是否成功 * * @throws WxErrorException 异常 */ WxChannelBaseResponse deleteProduct(String productId) throws WxErrorException; /** * 撤回商品审核 * * @param productId 商品ID * @return 是否成功 * * @throws WxErrorException 异常 */ WxChannelBaseResponse cancelProductAudit(String productId) throws WxErrorException; /** * 获取商品 * * @param productId 商品ID * @param dataType 默认取1 1:获取线上数据 2:获取草稿数据 3:同时获取线上和草稿数据(注意:需成功上架后才有线上数据) * @return 商品信息 * * @throws WxErrorException 异常 */ SpuGetResponse getProduct(String productId, Integer dataType) throws WxErrorException; /** * 获取商品列表 * * @param pageSize 每页数量(默认10,不超过30) * @param nextKey 由上次请求返回,记录翻页的上下文。传入时会从上次返回的结果往后翻一页,不传默认拉取第一页数据。 * @param status 商品状态,不填默认拉全部商品(不包含回收站) {@link me.chanjar.weixin.channel.enums.SpuStatus} * @return List * * @throws WxErrorException 异常 */ SpuListResponse listProduct(Integer pageSize, String nextKey, Integer status) throws WxErrorException; /** * 上架商品 * * @param productId 商品ID * @return 是否成功 * * @throws WxErrorException 异常 */ WxChannelBaseResponse upProduct(String productId) throws WxErrorException; /** * 下架商品 * * @param productId 商品ID * @return 是否成功 * * @throws WxErrorException 异常 */ WxChannelBaseResponse downProduct(String productId) throws WxErrorException; /** * 获取商品实时库存 * * @param productId 商品ID * @param skuId skuId * @return SkuStockResponse * * @throws WxErrorException 异常 */ SkuStockResponse getSkuStock(String productId, String skuId) throws WxErrorException; /** * 批量获取库存信息 (单次请求不能超过50个商品ID) * * @param productIds 商品ID列表 * @return 库存信息 * @throws WxErrorException 异常 */ SkuStockBatchResponse getSkuStockBatch(List<String> productIds) throws WxErrorException; /** * 获取商品H5链接 * * @param productId 商品ID * @return 商品H5链接 * @throws WxErrorException 异常 */ ProductH5UrlResponse getProductH5Url(String productId) throws WxErrorException; /** * 获取商品二维码 * * @param productId 商品ID * @return 商品二维码 * @throws WxErrorException 异常 */ ProductQrCodeResponse getProductQrCode(String productId) throws WxErrorException; /** * 获取商品口令 * * @param productId 商品ID * @return 商品口令 * @throws WxErrorException 异常 */ ProductTagLinkResponse getProductTagLink(String productId) throws WxErrorException; /** * 添加限时抢购任务 * * @param param 限时抢购任务 * @return LimitTaskAddResponse * * @throws WxErrorException 异常 */ LimitTaskAddResponse addLimitTask(LimitTaskParam param) throws WxErrorException; /** * 拉取限时抢购任务列表 * * @param pageSize 每页数量(默认10,不超过50) * @param nextKey 由上次请求返回,记录翻页的上下文。传入时会从上次返回的结果往后翻一页,不传默认拉取第一页数据 * @param status 抢购活动状态 * @return LimitTaskListResponse * * @throws WxErrorException 异常 */ LimitTaskListResponse listLimitTask(Integer pageSize, String nextKey, Integer status) throws WxErrorException; /** * 停止限时抢购任务 * * @param taskId 限时抢购任务ID * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse stopLimitTask(String taskId) throws WxErrorException; /** * 停止限时抢购任务 * * @param taskId 限时抢购任务ID * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse deleteLimitTask(String taskId) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAddressService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAddressService.java
package me.chanjar.weixin.channel.api; import me.chanjar.weixin.channel.bean.address.AddressDetail; import me.chanjar.weixin.channel.bean.address.AddressIdResponse; import me.chanjar.weixin.channel.bean.address.AddressInfoResponse; import me.chanjar.weixin.channel.bean.address.AddressListResponse; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号小店 地址管理服务 * * @author <a href="https://github.com/lixize">Zeyes</a> */ public interface WxChannelAddressService { /** * 获取地址列表 * * @param offset 起始位置 * @param limit 拉取个数 * @return 列表 * * @throws WxErrorException 异常 */ AddressListResponse listAddress(Integer offset, Integer limit) throws WxErrorException; /** * 获取地址详情 * * @param addressId 地址id * @return 地址详情 * * @throws WxErrorException 异常 */ AddressInfoResponse getAddress(String addressId) throws WxErrorException; /** * 添加地址 * * @param addressDetail 地址 * @return AddressIdResponse * * @throws WxErrorException 异常 */ AddressIdResponse addAddress(AddressDetail addressDetail) throws WxErrorException; /** * 更新地址 * * @param addressDetail 地址 * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse updateAddress(AddressDetail addressDetail) throws WxErrorException; /** * 删除地址 * * @param addressId 地址id * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse deleteAddress(String addressId) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelSharerService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelSharerService.java
package me.chanjar.weixin.channel.api; import java.util.List; import me.chanjar.weixin.channel.bean.sharer.SharerBindResponse; import me.chanjar.weixin.channel.bean.sharer.SharerInfoResponse; import me.chanjar.weixin.channel.bean.sharer.SharerOrderParam; import me.chanjar.weixin.channel.bean.sharer.SharerOrderResponse; import me.chanjar.weixin.channel.bean.sharer.SharerSearchResponse; import me.chanjar.weixin.channel.bean.sharer.SharerUnbindResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号小店 分享员服务接口 * * @author <a href="https://github.com/lixize">Zeyes</a> */ public interface WxChannelSharerService { /** * 邀请分享员 * * @param username 邀请的用户微信号 * @return SharerBindResponse * * @throws WxErrorException 异常 */ SharerBindResponse bindSharer(String username) throws WxErrorException; /** * 获取绑定的分享员 * * @param openid 分享员openid * @param username 分享员微信号(二选一) * @return SharerSearchResponse * * @throws WxErrorException 异常 */ SharerSearchResponse searchSharer(String openid, String username) throws WxErrorException; /** * 获取绑定的分享员列表 * * @param page 分页参数,页数 * @param pageSize 分页参数,每页分享员数(不超过100 * @param sharerType 分享员类型 * @return 分享员列表 * * @throws WxErrorException 异常 */ SharerInfoResponse listSharer(Integer page, Integer pageSize, Integer sharerType) throws WxErrorException; /** * 获取分享员订单列表 * * @param param 参数 * @return 列表 * * @throws WxErrorException 异常 */ SharerOrderResponse listSharerOrder(SharerOrderParam param) throws WxErrorException; /** * 解绑分享员 * * @param openIds openid列表 * @return 状态 * * @throws WxErrorException 异常 */ SharerUnbindResponse unbindSharer(List<String> openIds) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelWarehouseService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelWarehouseService.java
package me.chanjar.weixin.channel.api; import java.util.List; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.warehouse.LocationPriorityResponse; import me.chanjar.weixin.channel.bean.warehouse.PriorityLocationParam; import me.chanjar.weixin.channel.bean.warehouse.WarehouseIdsResponse; import me.chanjar.weixin.channel.bean.warehouse.WarehouseLocation; import me.chanjar.weixin.channel.bean.warehouse.WarehouseParam; import me.chanjar.weixin.channel.bean.warehouse.WarehouseResponse; import me.chanjar.weixin.channel.bean.warehouse.WarehouseStockParam; import me.chanjar.weixin.channel.bean.warehouse.WarehouseStockResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号小店 区域仓库服务 * * @author <a href="https://github.com/lixize">Zeyes</a> */ public interface WxChannelWarehouseService { /** * 创建仓库 * * @param param 仓库信息 * @return 响应 * * @throws WxErrorException 异常 */ WxChannelBaseResponse createWarehouse(WarehouseParam param) throws WxErrorException; /** * 查询仓库列表 * * @param pageSize 每页数量(最大不超过10) * @param nextKey 由上次请求返回,记录翻页的上下文。传入时会从上次返回的结果往后翻一页,不传默认拉取第一页数据 * @return 响应 * * @throws WxErrorException 异常 */ WarehouseIdsResponse listWarehouse(Integer pageSize, String nextKey) throws WxErrorException; /** * 获取仓库详情 * * @param outWarehouseId 外部仓库ID * @return 响应 * * @throws WxErrorException 异常 */ WarehouseResponse getWarehouse(String outWarehouseId) throws WxErrorException; /** * 修改仓库详情 * * @param outWarehouseId 外部仓库ID * @param name 仓库名称 * @param intro 仓库介绍 * @return 响应 * * @throws WxErrorException 异常 */ WxChannelBaseResponse updateWarehouse(String outWarehouseId, String name, String intro) throws WxErrorException; /** * 批量增加覆盖区域 * * @param outWarehouseId 外部仓库ID * @param coverLocations 覆盖区域 * @return 响应 * * @throws WxErrorException 异常 */ WxChannelBaseResponse addWarehouseArea(String outWarehouseId, List<WarehouseLocation> coverLocations) throws WxErrorException; /** * 批量删除覆盖区域 * * @param outWarehouseId 外部仓库ID * @param coverLocations 覆盖区域 * @return 响应 * * @throws WxErrorException 异常 */ WxChannelBaseResponse deleteWarehouseArea(String outWarehouseId, List<WarehouseLocation> coverLocations) throws WxErrorException; /** * 设置指定地址下的仓的优先级 * * @param param 参数 * @return 响应 * * @throws WxErrorException 异常 */ WxChannelBaseResponse setWarehousePriority(PriorityLocationParam param) throws WxErrorException; /** * 获取指定地址下的仓的优先级 * * @param addressId1 省份地址编码 * @param addressId2 市地址编码 * @param addressId3 区地址编码 * @param addressId4 街道地址编码 * @return 仓的优先级 * * @throws WxErrorException 异常 */ LocationPriorityResponse getWarehousePriority(Integer addressId1, Integer addressId2, Integer addressId3, Integer addressId4) throws WxErrorException; /** * 更新区域仓库存数量 * * @param param 参数 * @return 响应 * * @throws WxErrorException 异常 */ WxChannelBaseResponse updateWarehouseStock(WarehouseStockParam param) throws WxErrorException; /** * 获取区域仓库存数量 * * @param productId 商品ID * @param outWarehouseId 外部仓库ID * @param skuId 商品skuId * @return 响应 * * @throws WxErrorException 异常 */ WarehouseStockResponse getWarehouseStock(String productId, String skuId, String outWarehouseId) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxLeadComponentService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxLeadComponentService.java
package me.chanjar.weixin.channel.api; import me.chanjar.weixin.channel.bean.lead.component.request.GetLeadInfoByComponentRequest; import me.chanjar.weixin.channel.bean.lead.component.request.GetLeadsComponentIdRequest; import me.chanjar.weixin.channel.bean.lead.component.request.GetLeadsComponentPromoteRecordRequest; import me.chanjar.weixin.channel.bean.lead.component.request.GetLeadsInfoByRequestIdRequest; import me.chanjar.weixin.channel.bean.lead.component.request.GetLeadsRequestIdRequest; import me.chanjar.weixin.channel.bean.lead.component.response.GetLeadsComponentIdResponse; import me.chanjar.weixin.channel.bean.lead.component.response.GetLeadsComponentPromoteRecordResponse; import me.chanjar.weixin.channel.bean.lead.component.response.GetLeadsRequestIdResponse; import me.chanjar.weixin.channel.bean.lead.component.response.LeadInfoResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号助手 留资组件管理服务 * * @author <a href="https://github.com/imyzt">imyzt</a> */ public interface WxLeadComponentService { /** * <a href="https://developers.weixin.qq.com/doc/channels/API/leads/get_leads_info_by_component_id.html">按时间获取留资信息详情</a> * * @param req 留资组件信息 * @return 留资信息详情 */ LeadInfoResponse getLeadsInfoByComponentId(GetLeadInfoByComponentRequest req) throws WxErrorException; /** * <a href="https://developers.weixin.qq.com/doc/channels/API/leads/get_leads_info_by_request_id.html">按直播场次获取留资信息详情</a> * * @param req 留资组件信息 * @return 留资信息详情 */ LeadInfoResponse getLeadsInfoByRequestId(GetLeadsInfoByRequestIdRequest req) throws WxErrorException; /** * <a href="https://developers.weixin.qq.com/doc/channels/API/leads/get_leads_request_id.html">获取留资request_id列表详情</a> * * @param req 留资组件信息 * @return 留资信息列表 */ GetLeadsRequestIdResponse getLeadsRequestId(GetLeadsRequestIdRequest req) throws WxErrorException; /** * <a href="https://developers.weixin.qq.com/doc/channels/API/leads/get_leads_component_promote_record.html">获取留资组件直播推广记录信息详情</a> * * @param req 留资组件信息 * @return 留资组件直播推广记录信息详情 */ GetLeadsComponentPromoteRecordResponse getLeadsComponentPromoteRecord(GetLeadsComponentPromoteRecordRequest req) throws WxErrorException; /** * <a href="https://developers.weixin.qq.com/doc/channels/API/leads/get_leads_component_id.html">获取留资组件Id列表详情</a> * * @param req 留资组件信息 * @return 留资组件Id列表 */ GetLeadsComponentIdResponse getLeadsComponentId(GetLeadsComponentIdRequest req) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/BaseWxChannelMessageService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/BaseWxChannelMessageService.java
package me.chanjar.weixin.channel.api; import java.util.Map; import me.chanjar.weixin.channel.bean.message.after.AfterSaleMessage; import me.chanjar.weixin.channel.bean.message.after.ComplaintMessage; import me.chanjar.weixin.channel.bean.message.coupon.CouponActionMessage; import me.chanjar.weixin.channel.bean.message.coupon.CouponReceiveMessage; import me.chanjar.weixin.channel.bean.message.coupon.UserCouponExpireMessage; import me.chanjar.weixin.channel.bean.message.fund.AccountNotifyMessage; import me.chanjar.weixin.channel.bean.message.fund.QrNotifyMessage; import me.chanjar.weixin.channel.bean.message.fund.WithdrawNotifyMessage; import me.chanjar.weixin.channel.bean.message.order.OrderCancelMessage; import me.chanjar.weixin.channel.bean.message.order.OrderConfirmMessage; import me.chanjar.weixin.channel.bean.message.order.OrderDeliveryMessage; import me.chanjar.weixin.channel.bean.message.order.OrderExtMessage; import me.chanjar.weixin.channel.bean.message.order.OrderIdMessage; import me.chanjar.weixin.channel.bean.message.order.OrderPayMessage; import me.chanjar.weixin.channel.bean.message.order.OrderSettleMessage; import me.chanjar.weixin.channel.bean.message.order.OrderStatusMessage; import me.chanjar.weixin.channel.bean.message.product.BrandMessage; import me.chanjar.weixin.channel.bean.message.product.CategoryAuditMessage; import me.chanjar.weixin.channel.bean.message.product.SpuAuditMessage; import me.chanjar.weixin.channel.bean.message.product.SpuStockMessage; import me.chanjar.weixin.channel.bean.message.store.CloseStoreMessage; import me.chanjar.weixin.channel.bean.message.store.NicknameUpdateMessage; import me.chanjar.weixin.channel.bean.message.supplier.SupplierItemMessage; import me.chanjar.weixin.channel.bean.message.vip.ExchangeInfoMessage; import me.chanjar.weixin.channel.bean.message.vip.UserInfoMessage; import me.chanjar.weixin.channel.bean.message.voucher.VoucherMessage; import me.chanjar.weixin.channel.message.WxChannelMessage; import me.chanjar.weixin.channel.message.WxChannelMessageRouterRule; import me.chanjar.weixin.common.session.WxSessionManager; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ public interface BaseWxChannelMessageService { /** * 路由微信消息 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param service 服务实例 * @return Object */ Object route(final WxChannelMessage message, final String content, final String appId, final WxChannelService service); /** * 添加一条规则进入路由器 * * @param rule 规则 */ void addRule(WxChannelMessageRouterRule<? extends WxChannelMessage> rule); /** * 订单下单 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void orderNew(final OrderIdMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 订单取消 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void orderCancel(OrderCancelMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 订单支付成功 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void orderPay(OrderPayMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 订单待发货 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void orderWaitShipping(OrderIdMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 订单发货 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void orderDelivery(OrderDeliveryMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 订单确认收货 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void orderConfirm(OrderConfirmMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 订单结算成功 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void orderSettle(OrderSettleMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 订单其他信息更新 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void orderExtInfoUpdate(OrderExtMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 订单状态更新 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void orderStatusUpdate(OrderStatusMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 商品审核结果 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void spuAudit(SpuAuditMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 商品系统下架通知 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void spuStatusUpdate(SpuAuditMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 商品更新通知 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void spuUpdate(SpuAuditMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 商品库存不足通知 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void stockNoEnough(SpuStockMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 类目审核结果 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void categoryAudit(CategoryAuditMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 品牌更新 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void brandUpdate(BrandMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 售后单状态更新 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void afterSaleStatusUpdate(AfterSaleMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 纠纷回调 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void complaintNotify(ComplaintMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 用户领券通知 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void couponReceive(CouponReceiveMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 创建优惠券通知 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void couponCreate(CouponActionMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 优惠券删除通知 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void couponDelete(CouponActionMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 优惠券过期通知 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void couponExpire(CouponActionMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 更新优惠券信息通知 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void couponUpdate(CouponActionMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 优惠券作废通知 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void couponInvalid(CouponActionMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 用户优惠券过期通知 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void userCouponExpire(UserCouponExpireMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 用户优惠券使用通知 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void userCouponUse(UserCouponExpireMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 用户优惠券返还通知 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void userCouponUnuse(UserCouponExpireMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 发放团购优惠成功回调 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void voucherSendSucc(VoucherMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 结算账户变更回调 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void accountNotify(AccountNotifyMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 提现回调 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void withdrawNotify(WithdrawNotifyMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 提现二维码回调 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void qrNotify(QrNotifyMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 团长商品变更 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void supplierItemUpdate(SupplierItemMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 用户加入会员. * * @param message the message * @param content the content * @param appId the app id * @param context the context * @param sessionManager the session manager */ public void vipJoin(UserInfoMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 用户注销会员. * * @param message the message * @param content the content * @param appId the app id * @param context the context * @param sessionManager the session manager */ void vipClose(UserInfoMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 用户等级更新. * * @param message the message * @param content the content * @param appId the app id * @param context the context * @param sessionManager the session manager */ void vipGradeUpdate(UserInfoMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 用户积分更新. * * @param message the message * @param content the content * @param appId the app id * @param context the context * @param sessionManager the session manager */ void vipScoreUpdate(UserInfoMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 用户积分兑换 * * @param message the message * @param content the content * @param appId the app id * @param context the context * @param sessionManager the session manager */ void vipScoreExchange(ExchangeInfoMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 小店注销 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void closeStore(CloseStoreMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 小店修改名称 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 */ void updateNickname(NicknameUpdateMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 默认消息处理 * * @param message 消息 * @param content 消息原始内容 * @param appId appId * @param context 上下文 * @param sessionManager session管理器 * @return Object */ Object defaultMessageHandler(WxChannelMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); /** * 分享员变更 * * @param message the message * @param content the content * @param appId the app id * @param context the context * @param sessionManager the session manager */ void sharerChange(WxChannelMessage message, final String content, final String appId, final Map<String, Object> context, final WxSessionManager sessionManager); }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelVipService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelVipService.java
package me.chanjar.weixin.channel.api; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.vip.VipInfoResponse; import me.chanjar.weixin.channel.bean.vip.VipListResponse; import me.chanjar.weixin.channel.bean.vip.VipScoreResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号小店 会员功能接口 * * @author <a href="https://github.com/asushiye">aushiye</a> * @link <a href="https://developers.weixin.qq.com/doc/channels/API/vip/access_guide.html">会员功能接口文档</a> */ public interface WxChannelVipService { /** 拉取用户详情 */ // String VIP_USER_INFO_URL = "https://api.weixin.qq.com/channels/ec/vip/user/info/get"; // /** 拉取用户列表 */ // String VIP_USER_LIST_URL = "https://api.weixin.qq.com/channels/ec/vip/user/list/get"; // // /** 获取用户积分 */ // String VIP_SCORE_URL = "https://api.weixin.qq.com/channels/ec/vip/user/score/get"; // /** 增加用户积分 */ // String SCORE_INCREASE_URL = "https://api.weixin.qq.com/channels/ec/vip/user/score/increase"; // /** 减少用户积分 */ // String SCORE_DECREASE_URL = "https://api.weixin.qq.com/channels/ec/vip/user/score/decrease"; // // /** 更新用户等级 */ // String GRADE_UPDATE_URL = "https://api.weixin.qq.com/channels/ec/vip/user/grade/update"; /** * 获取用户详情 * * @param openId the open id * @param needPhoneNumber the need phone number * @return the vip info * @throws WxErrorException the wx error exception */ VipInfoResponse getVipInfo(String openId, Boolean needPhoneNumber) throws WxErrorException; /** * 获取用户积分 * * @param needPhoneNumber the need phone number * @param pageNum the page num * @param pageSize the page size * @return the vip list * @throws WxErrorException the wx error exception */ VipListResponse getVipList(Boolean needPhoneNumber, Integer pageNum, Integer pageSize) throws WxErrorException; /** * 获取用户积分 * * @param openId the open id * @return the vip score * @throws WxErrorException the wx error exception */ VipScoreResponse getVipScore(String openId) throws WxErrorException; /** * 增加用户积分 * * @param openId the open id * @param score the score * @param remark the remark * @param requestId the request id * @return the wx channel base response * @throws WxErrorException the wx error exception */ WxChannelBaseResponse increaseVipScore(String openId, String score, String remark, String requestId) throws WxErrorException; /** * 减少用户积分 * * @param openId the open id * @param score the score * @param remark the remark * @param requestId the request id * @return the wx channel base response * @throws WxErrorException the wx error exception */ WxChannelBaseResponse decreaseVipScore(String openId, String score, String remark, String requestId) throws WxErrorException; /** * 更新用户等级 * * @param openId the open id * @param score the score * @return the wx channel base response * @throws WxErrorException the wx error exception */ WxChannelBaseResponse updateVipGrade(String openId, Integer score) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxLeagueWindowService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxLeagueWindowService.java
package me.chanjar.weixin.channel.api; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.league.window.AuthInfoResponse; import me.chanjar.weixin.channel.bean.league.window.AuthStatusResponse; import me.chanjar.weixin.channel.bean.league.window.ProductSearchParam; import me.chanjar.weixin.channel.bean.league.window.WindowProductListResponse; import me.chanjar.weixin.channel.bean.league.window.WindowProductResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 优选联盟 团长合作达人管理服务 * * @author <a href="https://github.com/lixize">Zeyes</a> */ public interface WxLeagueWindowService { /** * 添加团长商品到橱窗 * * @param appid 团长appid * @param openfinderid 视频号openfinderid * @param productId 团长商品ID * @return 结果 */ WxChannelBaseResponse addProduct(String appid, String openfinderid, String productId) throws WxErrorException; /** * 查询橱窗上团长商品列表 * * @param param 查询参数 * @return 团长商品列表 */ WindowProductListResponse listProduct(ProductSearchParam param) throws WxErrorException; /** * 从橱窗移除团长商品 * * @param appid 团长appid * @param openfinderid 视频号openfinderid * @param productId 团长商品ID * @return 结果 */ WxChannelBaseResponse removeProduct(String appid, String openfinderid, String productId) throws WxErrorException; /** * 查询橱窗上团长商品详情 * * @param appid 团长appid * @param openfinderid 视频号openfinderid * @param productId 团长商品ID * @return 结果 */ WindowProductResponse getProductDetail(String appid, String openfinderid, String productId) throws WxErrorException; /** * 获取达人橱窗授权链接 * * @param finderId 视频号finder_id * @return 授权链接 */ AuthInfoResponse getWindowAuthInfo(String finderId) throws WxErrorException; /** * 获取达人橱窗授权状态 * * @param finderId 视频号finder_id * @return 授权链接 */ AuthStatusResponse getWindowAuthStatus(String finderId) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelService.java
package me.chanjar.weixin.channel.api; /** * The interface Wx Channel service * * @author <a href="https://github.com/lixize">Zeyes</a> */ public interface WxChannelService extends BaseWxChannelService { /** * 基础接口服务 * * @return 基础接口服务 */ WxChannelBasicService getBasicService(); /** * 商品类目服务 * * @return 商品类目服务 */ WxChannelCategoryService getCategoryService(); /** * 品牌服务 * * @return 品牌服务 */ WxChannelBrandService getBrandService(); /** * 商品服务 * * @return 商品服务 */ WxChannelProductService getProductService(); /** * 仓库服务 * * @return 仓库服务 */ WxChannelWarehouseService getWarehouseService(); /** * 订单服务 * * @return 订单服务 */ WxChannelOrderService getOrderService(); /** * 售后服务 * * @return 售后服务 */ WxChannelAfterSaleService getAfterSaleService(); /** * 运费模板服务 * * @return 运费模板服务 */ WxChannelFreightTemplateService getFreightTemplateService(); /** * 地址服务 * * @return 地址服务 */ WxChannelAddressService getAddressService(); /** * 优惠券服务 * * @return 优惠券服务 */ WxChannelCouponService getCouponService(); /** * 分享员服务 * * @return 分享员服务 */ WxChannelSharerService getSharerService(); /** * 资金服务 * * @return 资金服务 */ WxChannelFundService getFundService(); /** * 主页管理服务 * * @return 主页管理服务 */ WxStoreHomePageService getHomePageService(); /** * 合作账号服务 * * @return 团长合作服务 */ WxStoreCooperationService getCooperationService(); /** * 视频号/微信小店 罗盘商家版服务 * * @return 罗盘商家版服务 */ WxChannelCompassShopService getCompassShopService(); /** * 优选联盟-团长合作达人管理服务 * * @return 团长合作达人管理服务 */ WxLeagueWindowService getLeagueWindowService(); /** * 优选联盟-团长服务 * * @return 团长服务 */ WxLeagueSupplierService getLeagueSupplierService(); /** * 优选联盟-达人服务 * * @return 达人服务 */ WxLeaguePromoterService getLeaguePromoterService(); /** * 优选联盟-商品服务 * * @return 商品服务 */ WxLeagueProductService getLeagueProductService(); /** * 视频号助手 留资组件管理服务 * * @return 留资组件管理服务 */ WxLeadComponentService getLeadComponentService(); /** * 视频号助手 留资服务的直播数据服务 * * @return 留资服务的直播数据服务 */ WxFinderLiveService getFinderLiveService(); /** * 视频号助手 橱窗管理服务 * * @return 橱窗管理服务 */ WxAssistantService getAssistantService(); /** * 会员功能 * * @return 会员服务 */ WxChannelVipService getVipService(); /** * 视频号助手-罗盘达人版服务 * * @return 罗盘达人版服务 */ WxChannelCompassFinderService getCompassFinderService(); /** * 视频号助手-直播大屏数据服务 * * @return 直播大屏数据服务 */ WxChannelLiveDashboardService getLiveDashboardService(); }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxStoreHomePageService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxStoreHomePageService.java
package me.chanjar.weixin.channel.api; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.home.background.BackgroundApplyResponse; import me.chanjar.weixin.channel.bean.home.background.BackgroundGetResponse; import me.chanjar.weixin.channel.bean.home.banner.BannerApplyResponse; import me.chanjar.weixin.channel.bean.home.banner.BannerGetResponse; import me.chanjar.weixin.channel.bean.home.banner.BannerInfo; import me.chanjar.weixin.channel.bean.home.tree.TreeProductEditInfo; import me.chanjar.weixin.channel.bean.home.tree.TreeProductListInfo; import me.chanjar.weixin.channel.bean.home.tree.TreeProductListResponse; import me.chanjar.weixin.channel.bean.home.tree.TreeShowGetResponse; import me.chanjar.weixin.channel.bean.home.tree.TreeShowInfo; import me.chanjar.weixin.channel.bean.home.tree.TreeShowSetResponse; import me.chanjar.weixin.channel.bean.home.window.WindowProductSettingResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 微信小店 主页管理相关接口 * * @author <a href="https://github.com/lixize">Zeyes</a> */ public interface WxStoreHomePageService { /** * 添加分类关联的商品 * * @param info 商品分类以及商品id * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse addTreeProduct(TreeProductEditInfo info) throws WxErrorException; /** * 删除分类关联的商品 * * @param info 商品分类以及商品id * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse delTreeProduct(TreeProductEditInfo info) throws WxErrorException; /** * 获取分类关联的商品ID列表 * * @param info 分类id、分页大小、分页上下文 * @return 商品id、分页上下文 * * @throws WxErrorException 异常 */ TreeProductListResponse getTreeProductList(TreeProductListInfo info) throws WxErrorException; /** * 设置展示在店铺主页的商品分类 * * @param info 分类id * @return 商品分类审核结果 * * @throws WxErrorException 异常 */ TreeShowSetResponse setShowTree(TreeShowInfo info) throws WxErrorException; /** * 获取展示在店铺主页的商品分类 * * @return 商品分类信息 * * @throws WxErrorException 异常 */ TreeShowGetResponse getShowTree() throws WxErrorException; /** * 获取主页展示商品列表 * * @param pageSize 分页大小 * @param nextKey 分页上下文 * @return WindowProductSettingResponse * * @throws WxErrorException 异常 */ WindowProductSettingResponse listWindowProduct(Integer pageSize, String nextKey) throws WxErrorException; /** * 删除主页展示商品 * * @param productId 商品id * @param indexNum 商品重新排序后的新序号,最大移动步长为500(即新序号与当前序号的距离小于500) * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse reorderWindowProduct(String productId, Integer indexNum) throws WxErrorException; /** * 隐藏小店主页商品 * * @param productId 商品id * @param setHide 是否隐藏。1-隐藏,0-取消隐藏 * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse hideWindowProduct(String productId, Integer setHide) throws WxErrorException; /** * 置顶小店主页商品 * * @param productId 商品id * @param setTop 是否顶置。1-置顶,0-取消置顶 * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse topWindowProduct(String productId, Integer setTop) throws WxErrorException; /** * 提交背景图申请 * * @param imgUrl 图片链接。请务必使用接口上传图片(参数resp_type=1),并将返回的img_url填入此处,不接受其他任何格式的图片url。 * 若url曾经做过转换(url前缀为mmecimage.cn/p/),则可以直接提交。 * @return 申请编号 * * @throws WxErrorException 异常 * @see WxChannelBasicService#uploadImg(int, String) */ BackgroundApplyResponse applyBackground(String imgUrl) throws WxErrorException; /** * 查询背景图 * * @return 背景图信息 * @throws WxErrorException 异常 */ BackgroundGetResponse getBackground() throws WxErrorException; /** * 撤销主页背景图申请 * * @param applyId 申请编号 * @return BaseResponse * @throws WxErrorException 异常 */ WxChannelBaseResponse cancelBackground(Integer applyId) throws WxErrorException; /** * 清空主页背景图并撤销流程中的申请 * * @return BaseResponse * @throws WxErrorException 异常 */ WxChannelBaseResponse removeBackground() throws WxErrorException; /** * 提交精选展示位申请 * * @param info 展示位信息 * @return 申请编号 * @throws WxErrorException 异常 */ BannerApplyResponse applyBanner(BannerInfo info) throws WxErrorException; /** * 查询精选展示位 * * @return 展示位信息 * @throws WxErrorException 异常 */ BannerGetResponse getBanner() throws WxErrorException; /** * 撤销精选展示位申请 * * @param applyId 申请编号 * @return BaseResponse * @throws WxErrorException 异常 */ WxChannelBaseResponse cancelBanner(Integer applyId) throws WxErrorException; /** * 清空精选展示位并撤销流程中的申请 * * @return BaseResponse * @throws WxErrorException 异常 */ WxChannelBaseResponse removeBanner() throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelCategoryService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelCategoryService.java
package me.chanjar.weixin.channel.api; import java.io.File; import java.util.List; import me.chanjar.weixin.channel.bean.audit.AuditApplyResponse; import me.chanjar.weixin.channel.bean.audit.AuditResponse; import me.chanjar.weixin.channel.bean.audit.CategoryAuditInfo; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.category.CategoryDetailResult; import me.chanjar.weixin.channel.bean.category.CategoryQualificationResponse; import me.chanjar.weixin.channel.bean.category.PassCategoryResponse; import me.chanjar.weixin.channel.bean.category.ShopCategory; import me.chanjar.weixin.channel.bean.category.ShopCategoryResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号小店 商品类目相关接口 * * @author <a href="https://github.com/lixize">Zeyes</a> * @see <a href="https://developers.weixin.qq.com/doc/store/API/category/new_old_diff.html">新旧类目树差异</a> */ public interface WxChannelCategoryService { /** * 获取所有的类目 * * @return 所有类目以及资质信息 * * @throws WxErrorException 异常 */ CategoryQualificationResponse listAllCategory() throws WxErrorException; /** * 获取商品类目列表(全量) 有频率限制 * * @param fCatId 类目父id * @return 类目列表 * * @throws WxErrorException 异常 * @deprecated 接口返回更新,请使用 {@link #listAvailableCategories(String)} */ @Deprecated List<ShopCategory> listAvailableCategory(String fCatId) throws WxErrorException; /** * 获取可用的子类目详情 * * 1.f_cat_id 为旧类目树中的非叶子类目,仅设置 cat_list 字段。 * 2.f_cat_id 为新类目树中的非叶子类目,仅设置 cat_list_v2 字段。 * 3.f_cat_id 为0,同时设置 cat_list 和 cat_list_v2 字段 * * @param fCatId 父类目ID,可先填0获取根部类目 * @return 类目列表 * @throws WxErrorException 异常 */ ShopCategoryResponse listAvailableCategories(String fCatId) throws WxErrorException; /** * 获取类目信息 * * @param id 三级类目id * @return 类目信息 * * @throws WxErrorException 异常 */ CategoryDetailResult getCategoryDetail(String id) throws WxErrorException; /** * 上传类目资质 * * @param level1 一级类目ID * @param level2 二级类目ID * @param level3 三级类目ID * @param certificate 资质材料,图片mediaid,图片类型,最多不超过10张 * @return 审核id * * @throws WxErrorException 异常 * @see WxChannelBasicService#uploadQualificationFile(File) * @deprecated 请使用 {@link #addCategory(CategoryAuditInfo)} */ @Deprecated AuditApplyResponse addCategory(String level1, String level2, String level3, List<String> certificate) throws WxErrorException; /** * 上传类目资质 * * @param info 类目资质信息 * @return 审核id * * @throws WxErrorException 异常 * @see WxChannelBasicService#uploadQualificationFile(File) */ AuditApplyResponse addCategory(CategoryAuditInfo info) throws WxErrorException; /** * 取消类目提审 * * @param auditId 提交审核时返回的id * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse cancelCategoryAudit(String auditId) throws WxErrorException; /** * 查询类目审核结果 * * @param auditId 审核id * @return 审核结果 * * @throws WxErrorException 异常 */ AuditResponse getAudit(String auditId) throws WxErrorException; /** * 获取账号申请通过的类目和资质信息 * * @return 类目和资质信息 * * @throws WxErrorException 异常 */ PassCategoryResponse listPassCategory() throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelCouponService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelCouponService.java
package me.chanjar.weixin.channel.api; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.coupon.CouponIdResponse; import me.chanjar.weixin.channel.bean.coupon.CouponInfoResponse; import me.chanjar.weixin.channel.bean.coupon.CouponListParam; import me.chanjar.weixin.channel.bean.coupon.CouponListResponse; import me.chanjar.weixin.channel.bean.coupon.CouponParam; import me.chanjar.weixin.channel.bean.coupon.UserCouponListParam; import me.chanjar.weixin.channel.bean.coupon.UserCouponListResponse; import me.chanjar.weixin.channel.bean.coupon.UserCouponResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号小店 优惠券服务 * * @author <a href="https://github.com/lixize">Zeyes</a> */ public interface WxChannelCouponService { /** * 创建优惠券 * * @param coupon 优惠券 * @return 优惠券ID * * @throws WxErrorException 异常 */ CouponIdResponse createCoupon(CouponParam coupon) throws WxErrorException; /** * 更新优惠券 * * @param coupon 优惠券 * @return 优惠券ID * * @throws WxErrorException 异常 */ CouponIdResponse updateCoupon(CouponParam coupon) throws WxErrorException; /** * 更新优惠券状态 * * @param couponId 优惠券ID * @param status 状态 2生效 4已作废 5删除 {@link me.chanjar.weixin.channel.enums.WxCouponStatus} * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse updateCouponStatus(String couponId, Integer status) throws WxErrorException; /** * 获取优惠券详情 * * @param couponId 优惠券ID * @return CouponInfoResponse * * @throws WxErrorException 异常 */ CouponInfoResponse getCoupon(String couponId) throws WxErrorException; /** * 获取优惠券ID列表 * * @param param 条件参数 * @return 优惠券ID列表 * * @throws WxErrorException 异常 */ CouponListResponse getCouponList(CouponListParam param) throws WxErrorException; /** * 获取用户优惠券 * * @param openId 用户openid * @param userCouponId 用户优惠券ID * @return UserCouponResponse * * @throws WxErrorException 异常 */ UserCouponResponse getUserCoupon(String openId, String userCouponId) throws WxErrorException; /** * 获取用户优惠券ID列表 * * @param param 条件参数 * @return UserCouponListResponse * * @throws WxErrorException 异常 */ UserCouponListResponse getUserCouponList(UserCouponListParam param) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelCompassFinderService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelCompassFinderService.java
package me.chanjar.weixin.channel.api; import me.chanjar.weixin.channel.bean.compass.finder.OverallResponse; import me.chanjar.weixin.channel.bean.compass.finder.ProductDataResponse; import me.chanjar.weixin.channel.bean.compass.finder.ProductListResponse; import me.chanjar.weixin.channel.bean.compass.finder.SaleProfileDataResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号助手 罗盘达人版服务 * * @author <a href="https://github.com/Winnie-by996">Winnie</a> */ public interface WxChannelCompassFinderService { /** * 获取电商概览数据 * * @param ds 日期,格式 yyyyMMdd * @return 电商概览数据 * * @throws WxErrorException 异常 */ OverallResponse getOverall(String ds) throws WxErrorException; /** * 获取带货商品数据 * * @param ds 日期,格式 yyyyMMdd * @param productId 商品id * @return 带货商品数据 * * @throws WxErrorException 异常 */ ProductDataResponse getProductData(String ds, String productId) throws WxErrorException; /** * 获取带货商品列表 * * @param ds 日期,格式 yyyyMMdd * @return 带货商品列表 * * @throws WxErrorException 异常 */ ProductListResponse getProductList(String ds) throws WxErrorException; /** * 获取带货人群数据 * * @param ds 日期,格式 yyyyMMdd * @param type 用户类型,1=商品曝光用户, 2=商品点击用户, 3=购买用户, 4=首购用户, 5=复购用户, 6=直播观看用户 * @return 带货人群数据 * * @throws WxErrorException 异常 */ SaleProfileDataResponse getSaleProfileData(String ds, Integer type) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelFundService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelFundService.java
package me.chanjar.weixin.channel.api; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.fund.AccountInfo; import me.chanjar.weixin.channel.bean.fund.AccountInfoResponse; import me.chanjar.weixin.channel.bean.fund.BalanceInfoResponse; import me.chanjar.weixin.channel.bean.fund.FlowListResponse; import me.chanjar.weixin.channel.bean.fund.FundsFlowResponse; import me.chanjar.weixin.channel.bean.fund.FundsListParam; import me.chanjar.weixin.channel.bean.fund.WithdrawDetailResponse; import me.chanjar.weixin.channel.bean.fund.WithdrawListResponse; import me.chanjar.weixin.channel.bean.fund.WithdrawSubmitResponse; import me.chanjar.weixin.channel.bean.fund.bank.BankCityResponse; import me.chanjar.weixin.channel.bean.fund.bank.BankInfoResponse; import me.chanjar.weixin.channel.bean.fund.bank.BankListResponse; import me.chanjar.weixin.channel.bean.fund.bank.BankProvinceResponse; import me.chanjar.weixin.channel.bean.fund.bank.BranchInfoResponse; import me.chanjar.weixin.channel.bean.fund.qrcode.QrCheckResponse; import me.chanjar.weixin.channel.bean.fund.qrcode.QrCodeResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 资金相关服务 * * @author <a href="https://github.com/lixize">Zeyes</a> */ public interface WxChannelFundService { /** * 获取账户余额 * * @return 账户余额 * * @throws WxErrorException 异常 */ BalanceInfoResponse getBalance() throws WxErrorException; /** * 获取结算账户 * * @return 结算账户 * * @throws WxErrorException 异常 */ AccountInfoResponse getBankAccount() throws WxErrorException; /** * 获取资金流水详情 * * @param flowId 资金流水号 * @return 资金流水详情 * * @throws WxErrorException 异常 */ FundsFlowResponse getFundsFlowDetail(String flowId) throws WxErrorException; /** * 获取资金流水列表 * * @param param 资金流水列表参数 * @return 资金流水列表 * * @throws WxErrorException 异常 */ FlowListResponse listFundsFlow(FundsListParam param) throws WxErrorException; /** * 获取提现记录 * * @param withdrawId 提现单号 * @return 提现记录 * * @throws WxErrorException 异常 */ WithdrawDetailResponse getWithdrawDetail(String withdrawId) throws WxErrorException; /** * 获取提现记录列表 * * @param pageNum 页码 * @param pageSize 每页大小 * @param startTime 开始时间 * @param endTime 结束时间 * @return 提现记录列表 * * @throws WxErrorException 异常 */ WithdrawListResponse listWithdraw(Integer pageNum, Integer pageSize, Long startTime, Long endTime) throws WxErrorException; /** * 修改结算账户 * * @param accountInfo 结算账户信息 * @return 修改结果 * * @throws WxErrorException 异常 */ WxChannelBaseResponse setBankAccount(AccountInfo accountInfo) throws WxErrorException; /*** * 商户提现 * * @param amount 提现金额(单位:分) * @param remark 提现备注 * @param bankMemo 银行附言 * @return 提现结果 * @throws WxErrorException 异常 */ WithdrawSubmitResponse submitWithdraw(Integer amount, String remark, String bankMemo) throws WxErrorException; /** * 根据卡号查银行信息 * * @param accountNumber 卡号 * @return 银行信息 * * @throws WxErrorException 异常 */ BankInfoResponse getBankInfoByCardNo(String accountNumber) throws WxErrorException; /** * 搜索银行列表 * * @param offset 偏移量 * @param limit 每页数据大小 * @param keywords 银行关键字 * @param bankType 银行类型(1:对私银行,2:对公银行; 默认对公) * @return 银行列表 * * @throws WxErrorException 异常 */ BankListResponse searchBankList(Integer offset, Integer limit, String keywords, Integer bankType) throws WxErrorException; /** * 查询城市列表 * * @param provinceCode 省份编码 * @return 城市列表 * * @throws WxErrorException 异常 */ BankCityResponse searchCityList(String provinceCode) throws WxErrorException; /** * 查询大陆银行省份列表 * * @return 省份列表 * * @throws WxErrorException 异常 */ BankProvinceResponse getProvinceList() throws WxErrorException; /** * 查询支行列表 * * @param bankCode 银行编码 * @param cityCode 城市编码 * @param offset 偏移量 * @param limit 每页数据大小 * @return 支行列表 * * @throws WxErrorException 异常 */ BranchInfoResponse searchBranchList(String bankCode, String cityCode, Integer offset, Integer limit) throws WxErrorException; /** * 获取二维码 * * @param qrcodeTicket 二维码ticket * @return 二维码响应 * * @throws WxErrorException 异常 */ QrCodeResponse getQrCode(String qrcodeTicket) throws WxErrorException; /** * 查询扫码状态 * * @param qrcodeTicket 二维码ticket * @return 扫码状态 * * @throws WxErrorException 异常 */ QrCheckResponse checkQrStatus(String qrcodeTicket) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelOrderService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelOrderService.java
package me.chanjar.weixin.channel.api; import java.util.List; import me.chanjar.weixin.channel.bean.base.AddressInfo; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.delivery.PackageAuditInfo; import me.chanjar.weixin.channel.bean.delivery.DeliveryCompanyResponse; import me.chanjar.weixin.channel.bean.delivery.DeliveryInfo; import me.chanjar.weixin.channel.bean.order.ChangeOrderInfo; import me.chanjar.weixin.channel.bean.order.DecodeSensitiveInfoResponse; import me.chanjar.weixin.channel.bean.order.DeliveryUpdateParam; import me.chanjar.weixin.channel.bean.order.OrderInfoResponse; import me.chanjar.weixin.channel.bean.order.OrderListParam; import me.chanjar.weixin.channel.bean.order.OrderListResponse; import me.chanjar.weixin.channel.bean.order.OrderSearchParam; import me.chanjar.weixin.channel.bean.order.VirtualTelNumberResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号小店 订单服务接口 * * @author <a href="https://github.com/lixize">Zeyes</a> * @link <a href="https://developers.weixin.qq.com/doc/channels/API/order/order_status_graph.html">订单接口文档</a> */ public interface WxChannelOrderService { /** * 获取订单 * * @param orderId 订单id * @return 订单详情 * * @throws WxErrorException 异常 */ OrderInfoResponse getOrder(String orderId) throws WxErrorException; /** * 获取订单详情 * * @param orderId 订单id * @param encodeSensitiveInfo 是否编码敏感信息 * @return 订单详情 * * @throws WxErrorException 异常 */ OrderInfoResponse getOrder(String orderId, Boolean encodeSensitiveInfo) throws WxErrorException; /** * 获取订单列表 * * @param param 搜索条件 * @return 订单列表 * * @throws WxErrorException 异常 */ OrderListResponse getOrders(OrderListParam param) throws WxErrorException; /** * 订单搜索 * * @param param 搜索条件 * @return 订单列表 * * @throws WxErrorException 异常 */ OrderListResponse searchOrder(OrderSearchParam param) throws WxErrorException; /** * 更改订单价格 * * @param orderId 订单id * @param expressFee 运费价格(以分为单位)(不填不改) * @param changeOrderInfos 改价列表 * @return 结果 * * @throws WxErrorException 异常 */ WxChannelBaseResponse updatePrice(String orderId, Integer expressFee, List<ChangeOrderInfo> changeOrderInfos) throws WxErrorException; /** * 更改订单备注 * * @param orderId 订单id * @param merchantNotes 备注 * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse updateRemark(String orderId, String merchantNotes) throws WxErrorException; /** * 更新订单地址 * * @param orderId 订单id * @param userAddress 用户地址 * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse updateAddress(String orderId, AddressInfo userAddress) throws WxErrorException; /** * 修改物流信息 <br /> 发货完成的订单可以修改,最多修改1次 拆包发货的订单暂不允许修改物流 虚拟商品订单暂不允许修改物流 * * @param param 物流信息 * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse updateDelivery(DeliveryUpdateParam param) throws WxErrorException; /** * 同意用户修改收货地址请求 * * @param orderId 订单id * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse acceptAddressModify(String orderId) throws WxErrorException; /** * 拒接用户修改收货地址请求 * * @param orderId 订单id * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse rejectAddressModify(String orderId) throws WxErrorException; /** * 关闭订单 (需要订单状态为未付款状态) * * @param orderId 订单id * @return BaseResponse */ WxChannelBaseResponse closeOrder(String orderId); /** * 获取快递公司列表-旧 * * @return 快递公司列表 * * @throws WxErrorException 异常 */ DeliveryCompanyResponse listDeliveryCompany() throws WxErrorException; /** * 获取快递公司列表 * * @param ewaybillOnly 是否仅返回支持电子面单功能的快递公司 * @return 快递公司列表 * * @throws WxErrorException 异常 */ DeliveryCompanyResponse listDeliveryCompany(Boolean ewaybillOnly) throws WxErrorException; /** * 订单发货 * * @param orderId 订单id * @param deliveryList 物流信息 * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse deliveryOrder(String orderId, List<DeliveryInfo> deliveryList) throws WxErrorException; /** * 上传生鲜质检信息<br /> * * 注意事项:<br /> * 1. 非生鲜质检的订单不能进行上传 <br /> * 2. 图片url必须用图片上传接口获取 {@link WxChannelBasicService#uploadImg(int, String)}<br /> * * @param orderId 订单id * @param items 商品打包信息 * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse uploadFreshInspect(String orderId, List<PackageAuditInfo> items) throws WxErrorException; /** * 兑换虚拟号 * * @param orderId 订单id * @return 虚拟号信息 * @throws WxErrorException 异常 */ VirtualTelNumberResponse getVirtualTelNumber(String orderId) throws WxErrorException; /** * 解码订单包含的敏感数据 * * @param orderId 订单id * @return 解码结果 * @throws WxErrorException 异常 */ DecodeSensitiveInfoResponse decodeSensitiveInfo(String orderId) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxFinderLiveService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxFinderLiveService.java
package me.chanjar.weixin.channel.api; import me.chanjar.weixin.channel.bean.lead.component.request.GetFinderLiveDataListRequest; import me.chanjar.weixin.channel.bean.lead.component.request.GetFinderLiveLeadsDataRequest; import me.chanjar.weixin.channel.bean.lead.component.response.FinderAttrResponse; import me.chanjar.weixin.channel.bean.lead.component.response.GetFinderLiveDataListResponse; import me.chanjar.weixin.channel.bean.lead.component.response.GetFinderLiveLeadsDataResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号助手 留资服务的直播数据服务 * * @author <a href="https://github.com/imyzt">imyzt</a> */ public interface WxFinderLiveService { /** * <a href="https://developers.weixin.qq.com/doc/channels/API/live/get_finder_attr_by_appid.html">获取视频号账号信息</a> * * @return 视频号账号信息 */ FinderAttrResponse getFinderAttrByAppid() throws WxErrorException; /** * <a href="https://developers.weixin.qq.com/doc/channels/API/live/get_finder_live_data_list.html">获取留资直播间数据详情</a> * * @param req 留资组件信息 * @return 留资信息详情 */ GetFinderLiveDataListResponse getFinderLiveDataList(GetFinderLiveDataListRequest req) throws WxErrorException; /** * <a href="https://developers.weixin.qq.com/doc/channels/API/live/get_finder_live_leads_data.html">获取账号收集的留资数量</a> * 说明:该接口只统计2023.9.13号起的数据,所以start_time应大于等于1694534400 * * @param req 留资组件信息 * @return 留资信息列表 */ GetFinderLiveLeadsDataResponse getFinderLiveLeadsData(GetFinderLiveLeadsDataRequest req) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxAssistantService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxAssistantService.java
package me.chanjar.weixin.channel.api; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.window.request.AddWindowProductRequest; import me.chanjar.weixin.channel.bean.window.request.GetWindowProductListRequest; import me.chanjar.weixin.channel.bean.window.request.WindowProductRequest; import me.chanjar.weixin.channel.bean.window.response.GetWindowProductListResponse; import me.chanjar.weixin.channel.bean.window.response.GetWindowProductResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号助手 橱窗管理服务 <br/> * 关于橱窗商品ID的说明: <br/> * 不支持带货中心来源的商品,其余商品的橱窗商品ID与商品来源处的平台内部商品ID相同,对应关系如下 <br/> * <pre> * 商品来源 橱窗ID说明 * 视频号小店 视频号小店商品的 product_id 字段 * 交易组件 组件商品的 product_id 字段 * </pre> * * @author <a href="https://github.com/imyzt">imyzt</a> */ public interface WxAssistantService { /** * <a href="https://developers.weixin.qq.com/doc/channels/API/windowproduct/add.html">上架商品到橱窗</a> * @param req 商品信息 * @return 操作结果 */ WxChannelBaseResponse addWindowProduct(AddWindowProductRequest req) throws WxErrorException; /** * <a href="https://developers.weixin.qq.com/doc/channels/API/windowproduct/get.html">获取橱窗商品详情</a> * * @param req 商品信息 * @return 橱窗商品详情 */ GetWindowProductResponse getWindowProduct(WindowProductRequest req) throws WxErrorException; /** * <a href="https://developers.weixin.qq.com/doc/channels/API/windowproduct/list_get.html">获取已添加到橱窗的商品列表</a> * 接口限制了 page_size × page_index ≤ 10000。命中限制时建议改用传last_buffer顺序翻页的请求方式 * @param req 商品信息 * @return 已添加到橱窗的商品列表 */ GetWindowProductListResponse getWindowProductList(GetWindowProductListRequest req) throws WxErrorException; /** * <a href="https://developers.weixin.qq.com/doc/channels/API/windowproduct/off.html">下架橱窗商品</a> * @param req 商品信息 * @return 操作结果 */ WxChannelBaseResponse offWindowProduct(WindowProductRequest req) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAfterSaleService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelAfterSaleService.java
package me.chanjar.weixin.channel.api; import java.util.List; import me.chanjar.weixin.channel.bean.after.*; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.complaint.ComplaintOrderResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号小店 售后服务接口 * * @author <a href="https://github.com/lixize">Zeyes</a> */ public interface WxChannelAfterSaleService { /** * 获取售后单列表 * * @param beginCreateTime 订单创建启始时间 unix时间戳 * @param endCreateTime 订单创建结束时间,end_create_time减去begin_create_time不得大于24小时 * @param nextKey 翻页参数,从第二页开始传,来源于上一页的返回值 * @return 售后单列表 * * @throws WxErrorException 异常 * @deprecated 使用 {@link WxChannelAfterSaleService#listIds(AfterSaleListParam)} */ @Deprecated AfterSaleListResponse listIds(Long beginCreateTime, Long endCreateTime, String nextKey) throws WxErrorException; /** * 获取售后单列表 * * @param param 参数 * @return 售后单列表 * * @throws WxErrorException 异常 */ AfterSaleListResponse listIds(AfterSaleListParam param) throws WxErrorException; /** * 获取售后单详情 * * @param afterSaleOrderId 售后单号 * @return 售后单信息 * * @throws WxErrorException 异常 */ AfterSaleInfoResponse get(String afterSaleOrderId) throws WxErrorException; /** * 同意售后 * 文档地址 https://developers.weixin.qq.com/doc/channels/API/aftersale/acceptapply.html * * @param afterSaleOrderId 售后单号 * @param addressId 同意退货时传入地址id * @param acceptType 1. 同意退货退款,并通知用户退货; 2. 确认收到货并退款给用户。 如果不填则将根据当前的售后单状态自动选择相应操作。对于仅退款的情况,由于只存在一种同意的场景,无需填写此字段。 * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse accept(String afterSaleOrderId, String addressId, Integer acceptType) throws WxErrorException; /** * 拒绝售后 * 文档地址 https://developers.weixin.qq.com/doc/channels/API/aftersale/rejectapply.html * * @param afterSaleOrderId 售后单号 * @param rejectReason 拒绝原因 * @param rejectReasonType 拒绝原因枚举值 * @see #getRejectReason() * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse reject(String afterSaleOrderId, String rejectReason, Integer rejectReasonType) throws WxErrorException; /** * 上传退款凭证 * * @param afterSaleOrderId 售后单号 * @param desc 退款凭证描述 * @param certificates 退款凭证图片列表 * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse uploadRefundEvidence(String afterSaleOrderId, String desc, List<String> certificates) throws WxErrorException; /** * 商家补充纠纷单留言 * * @param complaintId 纠纷单号 * @param content 留言内容,最多500字 * @param mediaIds 图片media_id列表,所有留言总图片数量最多20张 * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse addComplaintMaterial(String complaintId, String content, List<String> mediaIds) throws WxErrorException; /** * 商家举证 * * @param complaintId 纠纷单号 * @param content 举证内容,最多500字 * @param mediaIds 图片media_id列表,所有留言总图片数量最多20张 * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse addComplaintEvidence(String complaintId, String content, List<String> mediaIds) throws WxErrorException; /** * 获取纠纷单 * * @param complaintId 纠纷单号 * @return BaseResponse * * @throws WxErrorException 异常 */ ComplaintOrderResponse getComplaint(String complaintId) throws WxErrorException; /** * 获取全量售后原因 * 文档地址:https://developers.weixin.qq.com/doc/channels/API/aftersale/getaftersalereason.html * * @return 售后原因 * * @throws WxErrorException 异常 */ AfterSaleReasonResponse getAllReason() throws WxErrorException; /** * 获取拒绝售后原因 * 文档地址:https://developers.weixin.qq.com/doc/channels/API/aftersale/getrejectreason.html * * @return 拒绝售后原因 * * @throws WxErrorException 异常 */ AfterSaleRejectReasonResponse getRejectReason() throws WxErrorException; /** * 换货发货 * 文档地址:https://developers.weixin.qq.com/doc/store/shop/API/channels-shop-aftersale/api_acceptexchangereship.html * * @param afterSaleOrderId 售后单号 * @param waybillId 快递单号 * @param deliveryId 快递公司id * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse acceptExchangeReship(String afterSaleOrderId, String waybillId, String deliveryId) throws WxErrorException; /** * 换货拒绝发货 * 文档地址:https://developers.weixin.qq.com/doc/store/shop/API/channels-shop-aftersale/api_rejectexchangereship.html * * @param afterSaleOrderId 售后单号 * @param rejectReason 拒绝原因具体描述 ,可使用默认描述,也可以自定义描述 * @param rejectReasonType 拒绝原因枚举值 * @param rejectCertificates 退款凭证,可使用图片上传接口获取media_id(数据类型填0) * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse rejectExchangeReship(String afterSaleOrderId, String rejectReason, Integer rejectReasonType, List<String> rejectCertificates) throws WxErrorException; /** * 商家协商 * 文档地址:https://developers.weixin.qq.com/doc/store/shop/API/channels-shop-aftersale/api_merchantupdateaftersale.html * @param param 参数 * @return BaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse merchantUpdateAfterSale(AfterSaleMerchantUpdateParam param) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/BaseWxChannelService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/BaseWxChannelService.java
package me.chanjar.weixin.channel.api; import me.chanjar.weixin.channel.config.WxChannelConfig; import me.chanjar.weixin.common.error.WxErrorException; import me.chanjar.weixin.common.service.WxService; import me.chanjar.weixin.common.util.http.MediaUploadRequestExecutor; import me.chanjar.weixin.common.util.http.RequestExecutor; import me.chanjar.weixin.common.util.http.RequestHttp; /** * The interface Wx Channel service * * @author <a href="https://github.com/lixize">Zeyes</a> */ public interface BaseWxChannelService extends WxService { /** * <pre> * 验证消息的确来自微信服务器. * 详情请见: http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421135319&token=&lang=zh_CN * </pre> * * @param timestamp the timestamp * @param nonce the nonce * @param signature the signature * @return the boolean */ boolean checkSignature(String timestamp, String nonce, String signature); /** * 获取access_token, 不强制刷新access_token. * * @return the access token * * @throws WxErrorException the wx error exception * @see #getAccessToken(boolean) #getAccessToken(boolean) */ String getAccessToken() throws WxErrorException; /** * <pre> * 获取access_token,本方法线程安全. * 且在多线程同时刷新时只刷新一次,避免超出2000次/日的调用次数上限 * 使用【稳定版接口】获取access_token时,限制【20次/日】,连续使用该模式时,请保证调用时间隔至少为30s,否则不会刷新 * * 程序员在非必要情况下尽量不要主动调用此方法 * * 详情请见: http://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140183&token=&lang=zh_CN * </pre> * * @param forceRefresh 强制刷新 * @return the access token * * @throws WxErrorException the wx error exception */ String getAccessToken(boolean forceRefresh) throws WxErrorException; /** * <pre> * Service没有实现某个API的时候,可以用这个, * 比{@link #get}和{@link #post}方法更灵活,可以自己构造RequestExecutor用来处理不同的参数和不同的返回类型。 * 可以参考,{@link MediaUploadRequestExecutor}的实现方法 * </pre> * * @param <T> . * @param <E> . * @param executor 执行器 * @param uri 接口请求地址 * @param data 参数或请求数据 * @return . t * * @throws WxErrorException the wx error exception */ <T, E> T execute(RequestExecutor<T, E> executor, String uri, E data) throws WxErrorException; /** * 执行器 * * @param <T> . * @param <E> . * @param executor 执行器 * @param uri 接口请求地址 * @param data 参数或请求数据 * @return T * * @throws WxErrorException the wx error exception */ <T, E> T executeWithoutLog(RequestExecutor<T, E> executor, String uri, E data) throws WxErrorException; /** * <pre> * 设置当微信系统响应系统繁忙时,要等待多少 retrySleepMillis(ms) * 2^(重试次数 - 1) 再发起重试. * 默认:1000ms * </pre> * * @param retrySleepMillis 重试等待毫秒数 */ void setRetrySleepMillis(int retrySleepMillis); /** * <pre> * 设置当微信系统响应系统繁忙时,最大重试次数. * 默认:5次 * </pre> * * @param maxRetryTimes 最大重试次数 */ void setMaxRetryTimes(int maxRetryTimes); /** * WxChannelConfig对象 * * @return WxMaConfig wx channel config */ WxChannelConfig getConfig(); /** * 注入 {@link WxChannelConfig} 的实现. * * @param config config */ void setConfig(WxChannelConfig config); /** * 初始化http请求对象. */ void initHttp(); /** * 请求http请求相关信息. * * @return . request http */ RequestHttp<?, ?> getRequestHttp(); }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelBasicService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelBasicService.java
package me.chanjar.weixin.channel.api; import java.io.File; import me.chanjar.weixin.channel.bean.address.AddressCodeResponse; import me.chanjar.weixin.channel.bean.image.ChannelImageInfo; import me.chanjar.weixin.channel.bean.image.ChannelImageResponse; import me.chanjar.weixin.channel.bean.image.QualificationFileResponse; import me.chanjar.weixin.channel.bean.shop.ShopInfoResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 基础接口 * * @author <a href="https://github.com/lixize">Zeyes</a> */ public interface WxChannelBasicService { /** * 获取店铺基本信息 * * @return 店铺基本信息 */ ShopInfoResponse getShopInfo() throws WxErrorException; /** * 上传图片 * * @param respType 0:media_id和pay_media_id;1:图片链接(商品信息相关图片请务必使用此参数得到链接) * @param imgUrl 图片url * @return 图片信息 * * @throws WxErrorException 异常 */ ChannelImageInfo uploadImg(int respType, String imgUrl) throws WxErrorException; /** * 上传图片 * * @param respType 0:media_id和pay_media_id;1:图片链接(商品信息相关图片请务必使用此参数得到链接) * @param file 图片文件 * @param height 图片的高,单位:像素 * @param width 图片的宽,单位:像素 * @return 图片信息 * * @throws WxErrorException 异常 */ ChannelImageInfo uploadImg(int respType, File file, int height, int width) throws WxErrorException; /** * 上传资质图片 * * @param file 资质图片 * @return 结果 * * @throws WxErrorException 异常 */ QualificationFileResponse uploadQualificationFile(File file) throws WxErrorException; /** * 根据media_id获取图片 * * @param mediaId media_id */ ChannelImageResponse getImg(String mediaId) throws WxErrorException; /** * 获取地址编码(最多获取4级) * * @param code 地址行政编码,不填或者填0时,拉取全国的省级行政编码 * @return AddressCodeResponse */ AddressCodeResponse getAddressCode(Integer code) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelLiveDashboardService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelLiveDashboardService.java
package me.chanjar.weixin.channel.api; import me.chanjar.weixin.channel.bean.live.dashboard.LiveDataResponse; import me.chanjar.weixin.channel.bean.live.dashboard.LiveListResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号助手 直播大屏数据服务 * * @author <a href="https://github.com/Winnie-by996">Winnie</a> */ public interface WxChannelLiveDashboardService { /** * 获取直播大屏直播列表 * * @param ds 日期,格式 yyyyMMdd * @return 播大屏直播列表 * * @throws WxErrorException 异常 */ LiveListResponse getLiveList(Long ds) throws WxErrorException; /** * 获取直播大屏数据 * * @param exportId 直播唯一ID * @return 播大屏数据 * * @throws WxErrorException 异常 */ LiveDataResponse getLiveData(String exportId) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxLeagueProductService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxLeagueProductService.java
package me.chanjar.weixin.channel.api; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.league.product.BatchAddParam; import me.chanjar.weixin.channel.bean.league.product.BatchAddResponse; import me.chanjar.weixin.channel.bean.league.product.ProductDetailParam; import me.chanjar.weixin.channel.bean.league.product.ProductDetailResponse; import me.chanjar.weixin.channel.bean.league.product.ProductListParam; import me.chanjar.weixin.channel.bean.league.product.ProductListResponse; import me.chanjar.weixin.channel.bean.league.product.ProductUpdateParam; import me.chanjar.weixin.channel.bean.league.product.ProductUpdateResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 优选联盟 商品操作服务 * * @author <a href="https://github.com/lixize">Zeyes</a> */ public interface WxLeagueProductService { /** * 批量新增联盟商品 * * @param param 参数 * @return 结果 */ BatchAddResponse batchAddProduct(BatchAddParam param) throws WxErrorException; /** * 更新联盟商品信息 * * @param param 参数 * @return 结果 */ ProductUpdateResponse updateProduct(ProductUpdateParam param) throws WxErrorException; /** * 删除联盟商品 * * @param type 1普通推广商品 2定向推广商品 3专属推广商品 * @param productId 商品id type为普通推广商品时必填 * @param infoId 特殊推广商品计划id type为特殊推广商品时必填 * @return */ WxChannelBaseResponse deleteProduct(Integer type, String productId, String infoId) throws WxErrorException; /** * 拉取联盟商品详情 * * @param param 参数 * @return 结果 */ ProductDetailResponse getProductDetail(ProductDetailParam param) throws WxErrorException; /** * 拉取联盟商品推广列表 * * @param param 参数 * @return 结果 */ ProductListResponse listProduct(ProductListParam param) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxLeaguePromoterService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxLeaguePromoterService.java
package me.chanjar.weixin.channel.api; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.league.promoter.PromoterInfoResponse; import me.chanjar.weixin.channel.bean.league.promoter.PromoterListResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 优选联盟 达人服务 * * @author <a href="https://github.com/lixize">Zeyes</a> */ public interface WxLeaguePromoterService { /** * 新增达人 * * @param finderId 视频号finder_id,待废除 * @return 结果 * @deprecated 使用 {@link #addPromoterV2(String)} */ @Deprecated WxChannelBaseResponse addPromoter(String finderId) throws WxErrorException; /** * 编辑达人 * * @param finderId 视频号finder_id,待废除 * @param type 操作 1取消邀请 2结束合作 * @return 结果 * @deprecated 使用 {@link #updatePromoterV2(String, int)} */ @Deprecated WxChannelBaseResponse updatePromoter(String finderId, int type) throws WxErrorException; /** * 删除达人 * * @param finderId 视频号finder_id,待废除 * @return 结果 * @deprecated 使用 {@link #deletePromoterV2(String)} */ @Deprecated WxChannelBaseResponse deletePromoter(String finderId) throws WxErrorException; /** * 获取达人详情信息 * * @param finderId 视频号finder_id,待废除 * @return 结果 * @deprecated 使用 {@link #getPromoterInfoV2(String)} */ @Deprecated PromoterInfoResponse getPromoterInfo(String finderId) throws WxErrorException; /** * 新增达人 * * @param promoterId 达人带货id * @return 结果 */ WxChannelBaseResponse addPromoterV2(String promoterId) throws WxErrorException; /** * 编辑达人 * * @param promoterId 达人带货id * @param type 操作 1取消邀请 2结束合作 * @return 结果 */ WxChannelBaseResponse updatePromoterV2(String promoterId, int type) throws WxErrorException; /** * 删除达人 * * @param promoterId 达人带货id * @return 结果 */ WxChannelBaseResponse deletePromoterV2(String promoterId) throws WxErrorException; /** * 获取达人详情信息 * * @param promoterId 达人带货id * @return 结果 */ PromoterInfoResponse getPromoterInfoV2(String promoterId) throws WxErrorException; /** * 获取达人列表 * * @param pageIndex 页面下标,下标从1开始,默认为1 * @param pageSize 单页达人数(不超过200) * @param status 拉取该状态下的达人列表 * @return 结果 */ PromoterListResponse listPromoter(Integer pageIndex, Integer pageSize, Integer status) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxLeagueSupplierService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxLeagueSupplierService.java
package me.chanjar.weixin.channel.api; import me.chanjar.weixin.channel.bean.league.supplier.CommissionOrderListParam; import me.chanjar.weixin.channel.bean.league.supplier.CommissionOrderListResponse; import me.chanjar.weixin.channel.bean.league.supplier.CommissionOrderResponse; import me.chanjar.weixin.channel.bean.league.supplier.CoopProductListResponse; import me.chanjar.weixin.channel.bean.league.supplier.CoopProductResponse; import me.chanjar.weixin.channel.bean.league.supplier.FlowListParam; import me.chanjar.weixin.channel.bean.league.supplier.ShopDetailResponse; import me.chanjar.weixin.channel.bean.league.supplier.ShopListResponse; import me.chanjar.weixin.channel.bean.league.supplier.SupplierBalanceResponse; import me.chanjar.weixin.channel.bean.league.supplier.SupplierFlowDetailResponse; import me.chanjar.weixin.channel.bean.league.supplier.SupplierFlowListResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 优选联盟 团长数据服务 * * @author <a href="https://github.com/lixize">Zeyes</a> */ public interface WxLeagueSupplierService { /** * 获取团长账户余额 * * @return 余额 */ SupplierBalanceResponse getBalanceInfo() throws WxErrorException; /** * 获取资金流水详情 * * @param flowId 流水ID * @return 流水详情 */ SupplierFlowDetailResponse getFlowDetail(String flowId) throws WxErrorException; /** * 获取团长资金流水列表 * * @param param 查询参数 * @return 流水列表 */ SupplierFlowListResponse getFlowList(FlowListParam param) throws WxErrorException; /** * 获取合作商品详情 * * @param productId 商品ID * @param appId 团长商品 所属小店appid * @return 商品详情 */ CoopProductResponse getProductDetail(String productId, String appId) throws WxErrorException; /** * 获取合作商品列表 * * @param appid 团长商品 所属小店appid * @param pageSize 单页商品数(不超过30) * @param nextKey 由上次请求返回,顺序翻页时需要传入, 会从上次返回的结果往后翻一页 * @return 商品列表 */ CoopProductListResponse getProductList(String appid, Integer pageSize, String nextKey) throws WxErrorException; /** * 获取佣金单详情 * * @param orderId 订单号,可从获取佣金单列表中获得 * @param skuId 商品skuId * @return 订单详情 */ CommissionOrderResponse getCommissionOrder(String orderId, String skuId) throws WxErrorException; /** * 获取佣金单列表 * * @param param 查询参数 * @return 佣金单列表 */ CommissionOrderListResponse getCommissionOrderList(CommissionOrderListParam param) throws WxErrorException; /** * 获取合作小店详情 * * @param appid 小店appid * @return 小店详情 */ ShopDetailResponse getShopDetail(String appid) throws WxErrorException; /** * 获取合作小店列表 * * @param pageSize 单页小店数(不超过30) * @param nextKey 由上次请求返回,顺序翻页时需要传入, 会从上次返回的结果往后翻一页 * @return 小店列表 */ ShopListResponse getShopList(Integer pageSize, String nextKey) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxStoreCooperationService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxStoreCooperationService.java
package me.chanjar.weixin.channel.api; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.cooperation.CooperationListResponse; import me.chanjar.weixin.channel.bean.cooperation.CooperationQrCodeResponse; import me.chanjar.weixin.channel.bean.cooperation.CooperationStatusResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 微信小店 合作账号相关接口 * * @author <a href="https://github.com/lixize">Zeyes</a> * @see <a href="https://developers.weixin.qq.com/doc/store/API/cooperation/">合作账号状态机</a> */ public interface WxStoreCooperationService { /** * 获取合作账号列表 * * @param sharerType 合作账号类型 2公众号 3小程序 * @return 合作账号列表 * * @throws WxErrorException 异常 */ CooperationListResponse listCooperation(Integer sharerType) throws WxErrorException; /** * 获取合作账号状态 * * @param sharerId 合作账号id 公众号: gh_开头id 小程序: appid * @param sharerType 合作账号类型 2公众号 3小程序 * @return 合作账号状态 * * @throws WxErrorException 异常 */ CooperationStatusResponse getCooperationStatus(String sharerId, Integer sharerType) throws WxErrorException; /** * 生成合作账号邀请二维码 * * @param sharerId 合作账号id 公众号: gh_开头id 小程序: appid * @param sharerType 合作账号类型 2公众号 3小程序 * @return 二维码 * * @throws WxErrorException 异常 */ CooperationQrCodeResponse generateQrCode(String sharerId, Integer sharerType) throws WxErrorException; /** * 取消合作账号邀请 * * @param sharerId 合作账号id 公众号: gh_开头id 小程序: appid * @param sharerType 合作账号类型 2公众号 3小程序 * @return WxChannelBaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse cancelInvitation(String sharerId, Integer sharerType) throws WxErrorException; /** * 解绑合作账号 * * @param sharerId 合作账号id 公众号: gh_开头id 小程序: appid * @param sharerType 合作账号类型 2公众号 3小程序 * @return WxChannelBaseResponse * * @throws WxErrorException 异常 */ WxChannelBaseResponse unbind(String sharerId, Integer sharerType) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelFreightTemplateService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelFreightTemplateService.java
package me.chanjar.weixin.channel.api; import me.chanjar.weixin.channel.bean.freight.FreightTemplate; import me.chanjar.weixin.channel.bean.freight.TemplateIdResponse; import me.chanjar.weixin.channel.bean.freight.TemplateInfoResponse; import me.chanjar.weixin.channel.bean.freight.TemplateListResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号小店 运费模板服务接口 * * @author <a href="https://github.com/lixize">Zeyes</a> */ public interface WxChannelFreightTemplateService { /** * 获取运费模板列表 * * @param offset 起始位置 * @param limit 拉取个数 * @return 列表 * * @throws WxErrorException 异常 */ TemplateListResponse listTemplate(Integer offset, Integer limit) throws WxErrorException; /** * 获取运费模板 * * @param templateId 模板id * @return 运费模板 * * @throws WxErrorException 异常 */ TemplateInfoResponse getTemplate(String templateId) throws WxErrorException; /** * 添加运费模板 * * @param template 运费模板 * @return TemplateIdResponse * * @throws WxErrorException 异常 */ TemplateIdResponse addTemplate(FreightTemplate template) throws WxErrorException; /** * 更新运费模板 * * @param template 运费模板 * @return TemplateIdResponse * * @throws WxErrorException 异常 */ TemplateIdResponse updateTemplate(FreightTemplate template) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelBrandService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelBrandService.java
package me.chanjar.weixin.channel.api; import me.chanjar.weixin.channel.bean.audit.AuditApplyResponse; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.brand.Brand; import me.chanjar.weixin.channel.bean.brand.BrandApplyListResponse; import me.chanjar.weixin.channel.bean.brand.BrandInfoResponse; import me.chanjar.weixin.channel.bean.brand.BrandListResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号小店 品牌服务接口 * * @author <a href="https://github.com/lixize">Zeyes</a> */ public interface WxChannelBrandService { /** * 获取品牌库列表 * * @param pageSize 每页数量(默认10, 不超过50) * @param nextKey 由上次请求返回, 记录翻页的上下文, 传入时会从上次返回的结果往后翻一页, 不传默认拉取第一页数据 * @return 品牌库列表 * * @throws WxErrorException 异常 */ BrandListResponse listAllBrand(Integer pageSize, String nextKey) throws WxErrorException; /** * 新增品牌资质 * * @param brand 品牌参数 * @return 审核id * * @throws WxErrorException 异常 */ AuditApplyResponse addBrandApply(Brand brand) throws WxErrorException; /** * 修改品牌资质 * * @param brand 品牌参数 * @return 审核id * * @throws WxErrorException 异常 */ AuditApplyResponse updateBrandApply(Brand brand) throws WxErrorException; /** * 撤回品牌资质审核 * * @param brandId 品牌id * @param auditId 审核id * @return 审核id * * @throws WxErrorException 异常 */ WxChannelBaseResponse cancelBrandApply(String brandId, String auditId) throws WxErrorException; /** * 删除品牌资质 * * @param brandId 品牌id * @return 结果 * * @throws WxErrorException 异常 */ WxChannelBaseResponse deleteBrandApply(String brandId) throws WxErrorException; /** * 获取品牌资质申请详情 * * @param brandId 品牌id * @return 品牌信息 * * @throws WxErrorException 异常 */ BrandInfoResponse getBrandApply(String brandId) throws WxErrorException; /** * 获取品牌资质申请列表 * * @param pageSize 每页数量(默认10, 不超过50) * @param nextKey 由上次请求返回, 记录翻页的上下文, 传入时会从上次返回的结果往后翻一页, 不传默认拉取第一页数据 * @param status 审核单状态, 不填默认拉全部商品 * @return 品牌列表 * * @throws WxErrorException 异常 */ BrandApplyListResponse listBrandApply(Integer pageSize, String nextKey, Integer status) throws WxErrorException; /** * 获取生效中的品牌资质列表 * * @param pageSize 每页数量(默认10, 不超过50) * @param nextKey 由上次请求返回, 记录翻页的上下文, 传入时会从上次返回的结果往后翻一页, 不传默认拉取第一页数据 * @return 品牌列表 * * @throws WxErrorException 异常 */ BrandApplyListResponse listValidBrandApply(Integer pageSize, String nextKey) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelCompassShopService.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/WxChannelCompassShopService.java
package me.chanjar.weixin.channel.api; import me.chanjar.weixin.channel.bean.compass.shop.FinderAuthListResponse; import me.chanjar.weixin.channel.bean.compass.shop.FinderListResponse; import me.chanjar.weixin.channel.bean.compass.shop.FinderOverallResponse; import me.chanjar.weixin.channel.bean.compass.shop.FinderProductListResponse; import me.chanjar.weixin.channel.bean.compass.shop.FinderProductOverallResponse; import me.chanjar.weixin.channel.bean.compass.shop.ShopLiveListResponse; import me.chanjar.weixin.channel.bean.compass.shop.ShopOverallResponse; import me.chanjar.weixin.channel.bean.compass.shop.ShopProductDataResponse; import me.chanjar.weixin.channel.bean.compass.shop.ShopProductListResponse; import me.chanjar.weixin.channel.bean.compass.shop.ShopSaleProfileDataResponse; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号/微信小店 罗盘商家版服务 * * @author <a href="https://github.com/lixize">Zeyes</a> */ public interface WxChannelCompassShopService { /** * 获取电商概览数据 * * @param ds 日期,格式 yyyyMMdd * @return 电商概览数据 * * @throws WxErrorException 异常 */ ShopOverallResponse getShopOverall(String ds) throws WxErrorException; /** * 获取授权视频号列表 * * @return 获取授权视频号列表 * * @throws WxErrorException 异常 */ FinderAuthListResponse getFinderAuthorizationList() throws WxErrorException; /** * 获取带货达人列表 * * @param ds 日期,格式 yyyyMMdd * @return 带货达人列表 * * @throws WxErrorException 异常 */ FinderListResponse getFinderList(String ds) throws WxErrorException; /** * 获取带货数据概览 * * @param ds 日期,格式 yyyyMMdd * @return 带货数据概览 * * @throws WxErrorException 异常 */ FinderOverallResponse getFinderOverall(String ds) throws WxErrorException; /** * 获取带货达人商品列表 * * @param ds 日期,格式YYYYMMDD * @param finderId 视频号ID * @return 带货达人商品列表 * * @throws WxErrorException 异常 */ FinderProductListResponse getFinderProductList(String ds, String finderId) throws WxErrorException; /** * 获取带货达人详情 * * @param ds 日期,格式YYYYMMDD * @param finderId 视频号ID * @return 带货达人详情 * * @throws WxErrorException 异常 */ FinderProductOverallResponse getFinderProductOverall(String ds, String finderId) throws WxErrorException; /** * 获取店铺开播列表 * * @param ds 日期,格式YYYYMMDD * @param finderId 视频号ID * @return 店铺开播列表 * * @throws WxErrorException 异常 */ ShopLiveListResponse getShopLiveList(String ds, String finderId) throws WxErrorException; /** * 获取商品详细信息 * * @param ds 日期,格式YYYYMMDD * @param productId 商品id * @return 商品详细信息 * * @throws WxErrorException 异常 */ ShopProductDataResponse getShopProductData(String ds, String productId) throws WxErrorException; /** * 获取商品列表 * * @param ds 日期,格式YYYYMMDD * @return 商品列表 * * @throws WxErrorException 异常 */ ShopProductListResponse getShopProductList(String ds) throws WxErrorException; /** * 获取店铺人群数据 * * @param ds 日期,格式 yyyyMMdd * @param type 用户类型,1商品曝光用户 2商品点击用户 3购买用户 4首购用户 5复购用户 * @return 店铺人群数据 * * @throws WxErrorException 异常 */ ShopSaleProfileDataResponse getShopSaleProfileData(String ds, Integer type) throws WxErrorException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelBasicServiceImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelBasicServiceImpl.java
package me.chanjar.weixin.channel.api.impl; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Basics.GET_ADDRESS_CODE; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Basics.GET_IMG_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Basics.GET_SHOP_INFO; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Basics.IMG_UPLOAD_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Basics.UPLOAD_QUALIFICATION_FILE; import java.io.File; import java.io.IOException; import java.nio.file.Files; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.WxChannelBasicService; import me.chanjar.weixin.channel.bean.address.AddressCodeResponse; import me.chanjar.weixin.channel.bean.image.ChannelImageInfo; import me.chanjar.weixin.channel.bean.image.ChannelImageResponse; import me.chanjar.weixin.channel.bean.image.QualificationFileResponse; import me.chanjar.weixin.channel.bean.image.UploadImageResponse; import me.chanjar.weixin.channel.bean.shop.ShopInfoResponse; import me.chanjar.weixin.channel.executor.ChannelFileUploadRequestExecutor; import me.chanjar.weixin.channel.executor.ChannelMediaDownloadRequestExecutor; import me.chanjar.weixin.channel.util.ResponseUtils; import me.chanjar.weixin.common.error.WxError; import me.chanjar.weixin.common.error.WxErrorException; import me.chanjar.weixin.common.util.http.RequestExecutor; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Slf4j public class WxChannelBasicServiceImpl implements WxChannelBasicService { /** 微信商店服务 */ private final BaseWxChannelServiceImpl<?, ?> shopService; public WxChannelBasicServiceImpl(BaseWxChannelServiceImpl<?, ?> shopService) { this.shopService = shopService; } @Override public ShopInfoResponse getShopInfo() throws WxErrorException { String resJson = shopService.get(GET_SHOP_INFO, null); return ResponseUtils.decode(resJson, ShopInfoResponse.class); } @Override public ChannelImageInfo uploadImg(int respType, String imgUrl) throws WxErrorException { String url = IMG_UPLOAD_URL + "?upload_type=1&resp_type=" + respType; String reqJson = "{\"img_url\":\"" + imgUrl + "\"}"; String resJson = shopService.post(url, reqJson); UploadImageResponse response = ResponseUtils.decode(resJson, UploadImageResponse.class); return response.getImgInfo(); } @Override public ChannelImageInfo uploadImg(int respType, File file, int height, int width) throws WxErrorException { String url = IMG_UPLOAD_URL + "?upload_type=0&resp_type=" + respType + "&height=" + height + "&width=" + width; RequestExecutor<String, File> executor = ChannelFileUploadRequestExecutor.create(shopService); String resJson = shopService.execute(executor, url, file); UploadImageResponse response = ResponseUtils.decode(resJson, UploadImageResponse.class); return response.getImgInfo(); } @Override public QualificationFileResponse uploadQualificationFile(File file) throws WxErrorException { RequestExecutor<String, File> executor = ChannelFileUploadRequestExecutor.create(shopService); String resJson = shopService.execute(executor, UPLOAD_QUALIFICATION_FILE, file); return ResponseUtils.decode(resJson, QualificationFileResponse.class); } @Override public ChannelImageResponse getImg(String mediaId) throws WxErrorException { String appId = shopService.getConfig().getAppid(); ChannelImageResponse rs; try { String url = GET_IMG_URL + "?media_id=" + mediaId; RequestExecutor<ChannelImageResponse, String> executor = ChannelMediaDownloadRequestExecutor.create(shopService, Files.createTempDirectory("wxjava-channel-" + appId).toFile()); rs = shopService.execute(executor, url, null); } catch (IOException e) { throw new WxErrorException(WxError.builder().errorMsg(e.getMessage()).build(), e); } if (rs == null) { rs = ResponseUtils.internalError(ChannelImageResponse.class); } return rs; } @Override public AddressCodeResponse getAddressCode(Integer code) throws WxErrorException { String reqJson = "{\"addr_code\": " + code + "}"; String resJson = shopService.post(GET_ADDRESS_CODE, reqJson); return ResponseUtils.decode(resJson, AddressCodeResponse.class); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/BaseWxChannelServiceImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/BaseWxChannelServiceImpl.java
package me.chanjar.weixin.channel.api.impl; import com.google.gson.JsonObject; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.*; import me.chanjar.weixin.channel.config.WxChannelConfig; import me.chanjar.weixin.channel.util.JsonUtils; import me.chanjar.weixin.common.api.WxConsts; import me.chanjar.weixin.common.bean.CommonUploadParam; import me.chanjar.weixin.common.bean.ToJson; import me.chanjar.weixin.common.bean.WxAccessToken; import me.chanjar.weixin.common.enums.WxType; import me.chanjar.weixin.common.error.WxError; import me.chanjar.weixin.common.error.WxErrorException; import me.chanjar.weixin.common.error.WxRuntimeException; import me.chanjar.weixin.common.executor.CommonUploadRequestExecutor; import me.chanjar.weixin.common.util.DataUtils; import me.chanjar.weixin.common.util.crypto.SHA1; import me.chanjar.weixin.common.util.http.RequestExecutor; import me.chanjar.weixin.common.util.http.RequestHttp; import me.chanjar.weixin.common.util.http.SimpleGetRequestExecutor; import me.chanjar.weixin.common.util.http.SimplePostRequestExecutor; import org.apache.commons.lang3.StringUtils; import java.io.IOException; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Lock; /** * @author <a href="https://github.com/lixize">Zeyes</a> * @see #doGetAccessTokenRequest */ @Slf4j public abstract class BaseWxChannelServiceImpl<H, P> implements WxChannelService, RequestHttp<H, P> { private final WxChannelBasicService basicService = new WxChannelBasicServiceImpl(this); private final WxChannelCategoryService categoryService = new WxChannelCategoryServiceImpl(this); private final WxChannelBrandService brandService = new WxChannelBrandServiceImpl(this); private final WxChannelProductService productService = new WxChannelProductServiceImpl(this); private final WxChannelWarehouseService warehouseService = new WxChannelWarehouseServiceImpl(this); private final WxChannelOrderService orderService = new WxChannelOrderServiceImpl(this); private final WxChannelAfterSaleService afterSaleService = new WxChannelAfterSaleServiceImpl(this); private final WxChannelFreightTemplateService freightTemplateService = new WxChannelFreightTemplateServiceImpl(this); private final WxChannelAddressService addressService = new WxChannelAddressServiceImpl(this); private final WxChannelCouponService couponService = new WxChannelCouponServiceImpl(this); private final WxChannelSharerService sharerService = new WxChannelSharerServiceImpl(this); private final WxChannelFundService fundService = new WxChannelFundServiceImpl(this); private WxStoreHomePageService homePageService = null; private WxStoreCooperationService cooperationService = null; private WxChannelCompassShopService compassShopService = null; private WxLeagueWindowService leagueWindowService = null; private WxLeagueSupplierService leagueSupplierService = null; private WxLeaguePromoterService leaguePromoterService = null; private WxLeagueProductService leagueProductService = null; private WxLeadComponentService leadComponentService = null; private WxFinderLiveService finderLiveService = null; private WxAssistantService assistantService = null; private WxChannelVipService vipService = null; private WxChannelCompassFinderService compassFinderService = null; private WxChannelLiveDashboardService liveDashboardService = null; protected WxChannelConfig config; private int retrySleepMillis = 1000; private int maxRetryTimes = 5; @Override public RequestHttp<H, P> getRequestHttp() { return this; } @Override public boolean checkSignature(String timestamp, String nonce, String signature) { try { return SHA1.gen(this.getConfig().getToken(), timestamp, nonce).equals(signature); } catch (Exception e) { log.error("Checking signature failed, and the reason is :{}", e.getMessage()); return false; } } @Override public String getAccessToken() throws WxErrorException { return getAccessToken(false); } @Override public String getAccessToken(boolean forceRefresh) throws WxErrorException { if (!forceRefresh && !this.getConfig().isAccessTokenExpired()) { return this.getConfig().getAccessToken(); } Lock lock = this.getConfig().getAccessTokenLock(); boolean locked = false; try { do { locked = lock.tryLock(100, TimeUnit.MILLISECONDS); if (!forceRefresh && !this.getConfig().isAccessTokenExpired()) { return this.getConfig().getAccessToken(); } } while (!locked); String response; if (getConfig().isStableAccessToken()) { response = doGetStableAccessTokenRequest(forceRefresh); } else { response = doGetAccessTokenRequest(); } return extractAccessToken(response); } catch (IOException | InterruptedException e) { throw new WxRuntimeException(e); } finally { if (locked) { lock.unlock(); } } } /** * 通过网络请求获取AccessToken * * @return AccessToken * @throws IOException IOException */ protected abstract String doGetAccessTokenRequest() throws IOException; /** * 通过网络请求获取稳定版AccessToken * * @return Stable AccessToken * @throws IOException IOException */ protected abstract String doGetStableAccessTokenRequest(boolean forceRefresh) throws IOException; @Override public String get(String url, String queryParam) throws WxErrorException { return execute(SimpleGetRequestExecutor.create(this), url, queryParam); } @Override public String post(String url, String postData) throws WxErrorException { return execute(SimplePostRequestExecutor.create(this), url, postData); } @Override public String post(String url, Object obj) throws WxErrorException { // 此处用JsonUtils.encode, 不用Gson return this.execute(SimplePostRequestExecutor.create(this), url, JsonUtils.encode(obj)); } @Override public String post(String url, ToJson obj) throws WxErrorException { return this.post(url, obj.toJson()); } @Override public String upload(String url, CommonUploadParam param) throws WxErrorException { RequestExecutor<String, CommonUploadParam> executor = CommonUploadRequestExecutor.create(getRequestHttp()); return this.execute(executor, url, param); } @Override public String post(String url, JsonObject jsonObject) throws WxErrorException { return this.post(url, jsonObject.toString()); } /** * 向微信端发送请求,在这里执行的策略是当发生access_token过期时才去刷新,然后重新执行请求,而不是全局定时请求 */ @Override public <T, E> T execute(RequestExecutor<T, E> executor, String uri, E data) throws WxErrorException { return execute0(executor, uri, data, true); } @Override public <T, E> T executeWithoutLog(RequestExecutor<T, E> executor, String uri, E data) throws WxErrorException { return execute0(executor, uri, data, false); } protected <T, E> T execute0(RequestExecutor<T, E> executor, String uri, E data, boolean printResult) throws WxErrorException { int retryTimes = 0; do { try { return this.executeInternal(executor, uri, data, false, printResult); } catch (WxErrorException e) { if (retryTimes + 1 > this.maxRetryTimes) { log.warn("重试达到最大次数【{}】", maxRetryTimes); //最后一次重试失败后,直接抛出异常,不再等待 throw new WxErrorException(WxError.builder() .errorCode(e.getError().getErrorCode()) .errorMsg("微信服务端异常,超出重试次数!") .build()); } WxError error = e.getError(); // -1 系统繁忙, 1000ms后重试 if (error.getErrorCode() == -1) { int sleepMillis = this.retrySleepMillis * (1 << retryTimes); try { log.warn("微信系统繁忙,{} ms 后重试(第{}次)", sleepMillis, retryTimes + 1); Thread.sleep(sleepMillis); } catch (InterruptedException e1) { Thread.currentThread().interrupt(); } } else { throw e; } } } while (retryTimes++ < this.maxRetryTimes); log.warn("重试达到最大次数【{}】", this.maxRetryTimes); throw new WxRuntimeException("微信服务端异常,超出重试次数"); } protected <T, E> T executeInternal(RequestExecutor<T, E> executor, String uri, E data, boolean doNotAutoRefreshToken, boolean printResult) throws WxErrorException { E dataForLog = DataUtils.handleDataWithSecret(data); if (uri.contains("access_token=")) { throw new IllegalArgumentException("uri参数中不允许有access_token: " + uri); } String accessToken = getAccessToken(false); WxChannelConfig config = this.getConfig(); if (StringUtils.isNotEmpty(config.getApiHostUrl())) { uri = uri.replace("https://api.weixin.qq.com", config.getApiHostUrl()); } String uriWithAccessToken = uri + (uri.contains("?") ? "&" : "?") + "access_token=" + accessToken; try { T result = executor.execute(uriWithAccessToken, data, WxType.Channel); log.debug("\n【请求地址】: {}\n【请求参数】:{}\n【响应数据】:{}", uriWithAccessToken, dataForLog, printResult ? result : "..."); return result; } catch (WxErrorException e) { WxError error = e.getError(); if (WxConsts.ACCESS_TOKEN_ERROR_CODES.contains(error.getErrorCode())) { // 强制设置WxMaConfig的access token过期了,这样在下一次请求里就会刷新access token Lock lock = config.getAccessTokenLock(); lock.lock(); try { if (StringUtils.equals(config.getAccessToken(), accessToken)) { config.expireAccessToken(); } } catch (Exception ex) { config.expireAccessToken(); } finally { lock.unlock(); } if (config.autoRefreshToken() && !doNotAutoRefreshToken) { log.warn("即将重新获取新的access_token,错误代码:{},错误信息:{}", error.getErrorCode(), error.getErrorMsg()); //下一次不再自动重试 //当小程序误调用第三方平台专属接口时,第三方无法使用小程序的access token,如果可以继续自动获取token会导致无限循环重试,直到栈溢出 return this.executeInternal(executor, uri, data, true, printResult); } } if (error.getErrorCode() != 0) { log.warn("\n【请求地址】: {}\n【请求参数】:{}\n【错误信息】:{}", uriWithAccessToken, dataForLog, error); throw new WxErrorException(error, e); } return null; } catch (IOException e) { log.warn("\n【请求地址】: {}\n【请求参数】:{}\n【异常信息】:{}", uriWithAccessToken, dataForLog, e.getMessage()); throw new WxRuntimeException(e); } } /** * 设置当前的AccessToken * * @param resultContent 响应内容 * @return access token * @throws WxErrorException 异常 */ protected String extractAccessToken(String resultContent) throws WxErrorException { log.debug("access-token response: {}", resultContent); WxChannelConfig config = this.getConfig(); WxError error = WxError.fromJson(resultContent, WxType.Channel); if (error.getErrorCode() != 0) { throw new WxErrorException(error); } WxAccessToken accessToken = WxAccessToken.fromJson(resultContent); config.updateAccessToken(accessToken.getAccessToken(), accessToken.getExpiresIn()); return accessToken.getAccessToken(); } @Override public WxChannelConfig getConfig() { return config; } @Override public void setConfig(WxChannelConfig config) { this.config = config; initHttp(); } @Override public void setRetrySleepMillis(int retrySleepMillis) { this.retrySleepMillis = retrySleepMillis; } @Override public void setMaxRetryTimes(int maxRetryTimes) { this.maxRetryTimes = maxRetryTimes; } @Override public WxChannelBasicService getBasicService() { return basicService; } @Override public WxChannelCategoryService getCategoryService() { return categoryService; } @Override public WxChannelBrandService getBrandService() { return brandService; } @Override public WxChannelProductService getProductService() { return productService; } @Override public WxChannelWarehouseService getWarehouseService() { return warehouseService; } @Override public WxChannelOrderService getOrderService() { return orderService; } @Override public WxChannelAfterSaleService getAfterSaleService() { return afterSaleService; } @Override public WxChannelFreightTemplateService getFreightTemplateService() { return freightTemplateService; } @Override public WxChannelAddressService getAddressService() { return addressService; } @Override public WxChannelCouponService getCouponService() { return couponService; } @Override public WxChannelSharerService getSharerService() { return sharerService; } @Override public WxChannelFundService getFundService() { return fundService; } @Override public synchronized WxStoreHomePageService getHomePageService() { if (homePageService == null) { homePageService = new WxStoreHomePageServiceImpl(this); } return homePageService; } @Override public synchronized WxStoreCooperationService getCooperationService() { if (cooperationService == null) { cooperationService = new WxStoreCooperationServiceImpl(this); } return cooperationService; } @Override public synchronized WxChannelCompassShopService getCompassShopService() { if (compassShopService == null) { compassShopService = new WxChannelCompassShopServiceImpl(this); } return compassShopService; } @Override public synchronized WxLeagueWindowService getLeagueWindowService() { if (leagueWindowService == null) { leagueWindowService = new WxLeagueWindowServiceImpl(this); } return leagueWindowService; } @Override public synchronized WxLeagueSupplierService getLeagueSupplierService() { if (leagueSupplierService == null) { leagueSupplierService = new WxLeagueSupplierServiceImpl(this); } return leagueSupplierService; } @Override public synchronized WxLeaguePromoterService getLeaguePromoterService() { if (leaguePromoterService == null) { leaguePromoterService = new WxLeaguePromoterServiceImpl(this); } return leaguePromoterService; } @Override public synchronized WxLeagueProductService getLeagueProductService() { if (leagueProductService == null) { leagueProductService = new WxLeagueProductServiceImpl(this); } return leagueProductService; } @Override public synchronized WxLeadComponentService getLeadComponentService() { if (leadComponentService == null) { leadComponentService = new WxLeadComponentServiceImpl(this); } return leadComponentService; } @Override public synchronized WxFinderLiveService getFinderLiveService() { if (finderLiveService == null) { finderLiveService = new WxFinderLiveServiceImpl(this); } return finderLiveService; } @Override public synchronized WxAssistantService getAssistantService() { if (assistantService == null) { assistantService = new WxAssistantServiceImpl(this) { }; } return assistantService; } @Override public synchronized WxChannelVipService getVipService() { if (vipService == null) { vipService = new WxChannelVipServiceImpl(this); } return vipService; } @Override public synchronized WxChannelCompassFinderService getCompassFinderService() { if (compassFinderService == null) { compassFinderService = new WxChannelCompassFinderServiceImpl(this); } return compassFinderService; } @Override public synchronized WxChannelLiveDashboardService getLiveDashboardService() { if (liveDashboardService == null) { liveDashboardService = new WxChannelLiveDashboardServiceImpl(this); } return liveDashboardService; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelFundServiceImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelFundServiceImpl.java
package me.chanjar.weixin.channel.api.impl; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Fund.CHECK_QRCODE_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Fund.GET_BALANCE_FLOW_DETAIL_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Fund.GET_BALANCE_FLOW_LIST_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Fund.GET_BALANCE_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Fund.GET_BANK_ACCOUNT_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Fund.GET_BANK_BY_NUM_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Fund.GET_BANK_LIST_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Fund.GET_CITY_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Fund.GET_PROVINCE_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Fund.GET_QRCODE_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Fund.GET_SUB_BANK_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Fund.GET_WITHDRAW_DETAIL_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Fund.GET_WITHDRAW_LIST_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Fund.SET_BANK_ACCOUNT_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Fund.WITHDRAW_URL; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.WxChannelFundService; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.fund.AccountInfo; import me.chanjar.weixin.channel.bean.fund.AccountInfoParam; import me.chanjar.weixin.channel.bean.fund.AccountInfoResponse; import me.chanjar.weixin.channel.bean.fund.BalanceInfoResponse; import me.chanjar.weixin.channel.bean.fund.FlowListResponse; import me.chanjar.weixin.channel.bean.fund.FundsFlowResponse; import me.chanjar.weixin.channel.bean.fund.FundsListParam; import me.chanjar.weixin.channel.bean.fund.WithdrawDetailResponse; import me.chanjar.weixin.channel.bean.fund.WithdrawListParam; import me.chanjar.weixin.channel.bean.fund.WithdrawListResponse; import me.chanjar.weixin.channel.bean.fund.WithdrawSubmitParam; import me.chanjar.weixin.channel.bean.fund.WithdrawSubmitResponse; import me.chanjar.weixin.channel.bean.fund.bank.BankCityResponse; import me.chanjar.weixin.channel.bean.fund.bank.BankInfoResponse; import me.chanjar.weixin.channel.bean.fund.bank.BankListResponse; import me.chanjar.weixin.channel.bean.fund.bank.BankProvinceResponse; import me.chanjar.weixin.channel.bean.fund.bank.BankSearchParam; import me.chanjar.weixin.channel.bean.fund.bank.BranchInfoResponse; import me.chanjar.weixin.channel.bean.fund.bank.BranchSearchParam; import me.chanjar.weixin.channel.bean.fund.qrcode.QrCheckResponse; import me.chanjar.weixin.channel.bean.fund.qrcode.QrCodeResponse; import me.chanjar.weixin.channel.util.ResponseUtils; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号小店 资金服务实现 * * @author <a href="https://github.com/lixize">Zeyes</a> */ @Slf4j public class WxChannelFundServiceImpl implements WxChannelFundService { /** 微信商店服务 */ private final BaseWxChannelServiceImpl<?, ?> shopService; public WxChannelFundServiceImpl(BaseWxChannelServiceImpl<?, ?> shopService) { this.shopService = shopService; } @Override public BalanceInfoResponse getBalance() throws WxErrorException { String resJson = shopService.post(GET_BALANCE_URL, "{}"); return ResponseUtils.decode(resJson, BalanceInfoResponse.class); } @Override public AccountInfoResponse getBankAccount() throws WxErrorException { String resJson = shopService.post(GET_BANK_ACCOUNT_URL, "{}"); return ResponseUtils.decode(resJson, AccountInfoResponse.class); } @Override public FundsFlowResponse getFundsFlowDetail(String flowId) throws WxErrorException { String reqJson = "{\"flow_id\":\"" + flowId + "\"}"; String resJson = shopService.post(GET_BALANCE_FLOW_DETAIL_URL, reqJson); return ResponseUtils.decode(resJson, FundsFlowResponse.class); } @Override public FlowListResponse listFundsFlow(FundsListParam param) throws WxErrorException { String resJson = shopService.post(GET_BALANCE_FLOW_LIST_URL, param); return ResponseUtils.decode(resJson, FlowListResponse.class); } @Override public WithdrawDetailResponse getWithdrawDetail(String withdrawId) throws WxErrorException { String reqJson = "{\"withdraw_id\":\"" + withdrawId + "\"}"; String resJson = shopService.post(GET_WITHDRAW_DETAIL_URL, reqJson); return ResponseUtils.decode(resJson, WithdrawDetailResponse.class); } @Override public WithdrawListResponse listWithdraw(Integer pageNum, Integer pageSize, Long startTime, Long endTime) throws WxErrorException { WithdrawListParam param = new WithdrawListParam(pageNum, pageSize, startTime, endTime); String resJson = shopService.post(GET_WITHDRAW_LIST_URL, param); return ResponseUtils.decode(resJson, WithdrawListResponse.class); } @Override public WxChannelBaseResponse setBankAccount(AccountInfo accountInfo) throws WxErrorException { AccountInfoParam param = new AccountInfoParam(accountInfo); String resJson = shopService.post(SET_BANK_ACCOUNT_URL, param); return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } @Override public WithdrawSubmitResponse submitWithdraw(Integer amount, String remark, String bankMemo) throws WxErrorException { WithdrawSubmitParam param = new WithdrawSubmitParam(amount, remark, bankMemo); String resJson = shopService.post(WITHDRAW_URL, param); return ResponseUtils.decode(resJson, WithdrawSubmitResponse.class); } @Override public BankInfoResponse getBankInfoByCardNo(String accountNumber) throws WxErrorException { String reqJson = "{\"account_number\":\"" + accountNumber + "\"}"; String resJson = shopService.post(GET_BANK_BY_NUM_URL, reqJson); return ResponseUtils.decode(resJson, BankInfoResponse.class); } @Override public BankListResponse searchBankList(Integer offset, Integer limit, String keywords, Integer bankType) throws WxErrorException { BankSearchParam param = new BankSearchParam(offset, limit, keywords, bankType); String resJson = shopService.post(GET_BANK_LIST_URL, param); return ResponseUtils.decode(resJson, BankListResponse.class); } @Override public BankCityResponse searchCityList(String provinceCode) throws WxErrorException { String reqJson = "{\"province_code\":\"" + provinceCode + "\"}"; String resJson = shopService.post(GET_CITY_URL, reqJson); return ResponseUtils.decode(resJson, BankCityResponse.class); } @Override public BankProvinceResponse getProvinceList() throws WxErrorException { String resJson = shopService.post(GET_PROVINCE_URL, "{}"); return ResponseUtils.decode(resJson, BankProvinceResponse.class); } @Override public BranchInfoResponse searchBranchList(String bankCode, String cityCode, Integer offset, Integer limit) throws WxErrorException { BranchSearchParam param = new BranchSearchParam(bankCode, cityCode, offset, limit); String resJson = shopService.post(GET_SUB_BANK_URL, param); return ResponseUtils.decode(resJson, BranchInfoResponse.class); } @Override public QrCodeResponse getQrCode(String qrcodeTicket) throws WxErrorException { String reqJson = "{\"qrcode_ticket\":\"" + qrcodeTicket + "\"}"; String resJson = shopService.post(GET_QRCODE_URL, reqJson); return ResponseUtils.decode(resJson, QrCodeResponse.class); } @Override public QrCheckResponse checkQrStatus(String qrcodeTicket) throws WxErrorException { String reqJson = "{\"qrcode_ticket\":\"" + qrcodeTicket + "\"}"; String resJson = shopService.post(CHECK_QRCODE_URL, reqJson); return ResponseUtils.decode(resJson, QrCheckResponse.class); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelVipServiceImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelVipServiceImpl.java
package me.chanjar.weixin.channel.api.impl; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.WxChannelVipService; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.vip.*; import me.chanjar.weixin.channel.util.ResponseUtils; import me.chanjar.weixin.common.error.WxErrorException; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Vip.*; /** * 视频号小店 会员功能接口 * * @author <a href="https://github.com/asushiye">aushiye</a> * @link <a href="https://developers.weixin.qq.com/doc/channels/API/vip/access_guide.html">会员功能接口文档</a> */ @Slf4j public class WxChannelVipServiceImpl implements WxChannelVipService { private final BaseWxChannelServiceImpl<?, ?> shopService; public WxChannelVipServiceImpl(BaseWxChannelServiceImpl<?, ?> shopService) { this.shopService = shopService; } @Override public VipInfoResponse getVipInfo(String openId, Boolean needPhoneNumber) throws WxErrorException { VipInfoParam param = new VipInfoParam(openId, needPhoneNumber); String respJson = shopService.post(VIP_USER_INFO_URL, param); return ResponseUtils.decode(respJson, VipInfoResponse.class); } @Override public VipListResponse getVipList(Boolean needPhoneNumber, Integer pageNum, Integer pageSize) throws WxErrorException { VipListParam param = new VipListParam(needPhoneNumber, pageNum, pageSize); String respJson = shopService.post(VIP_USER_LIST_URL, param); return ResponseUtils.decode(respJson, VipListResponse.class); } @Override public VipScoreResponse getVipScore(String openId) throws WxErrorException { VipOpenIdParam param = new VipOpenIdParam(openId); String respJson = shopService.post(VIP_SCORE_URL, param); return ResponseUtils.decode(respJson, VipScoreResponse.class); } @Override public WxChannelBaseResponse increaseVipScore(String openId, String score, String remark, String requestId) throws WxErrorException { VipScoreParam param = new VipScoreParam(openId, score, remark, requestId); String respJson = shopService.post(SCORE_INCREASE_URL, param); return ResponseUtils.decode(respJson, WxChannelBaseResponse.class); } @Override public WxChannelBaseResponse decreaseVipScore(String openId, String score, String remark, String requestId) throws WxErrorException { VipScoreParam param = new VipScoreParam(openId, score, remark, requestId); String respJson = shopService.post(SCORE_DECREASE_URL, param); return ResponseUtils.decode(respJson, WxChannelBaseResponse.class); } @Override public WxChannelBaseResponse updateVipGrade(String openId, Integer score) throws WxErrorException { VipGradeParam param = new VipGradeParam(openId, score); String respJson = shopService.post(GRADE_UPDATE_URL, param); return ResponseUtils.decode(respJson, WxChannelBaseResponse.class); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelCompassShopServiceImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelCompassShopServiceImpl.java
package me.chanjar.weixin.channel.api.impl; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.CompassShop.FINDER_AUTH_LIST_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.CompassShop.FINDER_LIST_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.CompassShop.GET_FINDER_OVERALL_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.CompassShop.GET_FINDER_PRODUCT_LIST_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.CompassShop.GET_FINDER_PRODUCT_OVERALL_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.CompassShop.GET_LIVE_LIST_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.CompassShop.GET_SHOP_OVERALL_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.CompassShop.GET_SHOP_PRODUCT_DATA_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.CompassShop.GET_SHOP_PRODUCT_LIST_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.CompassShop.GET_SHOP_SALE_PROFILE_DATA_URL; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.WxChannelCompassShopService; import me.chanjar.weixin.channel.bean.compass.CompassFinderBaseParam; import me.chanjar.weixin.channel.bean.compass.shop.CompassFinderIdParam; import me.chanjar.weixin.channel.bean.compass.shop.FinderAuthListResponse; import me.chanjar.weixin.channel.bean.compass.shop.FinderListResponse; import me.chanjar.weixin.channel.bean.compass.shop.FinderOverallResponse; import me.chanjar.weixin.channel.bean.compass.shop.FinderProductListResponse; import me.chanjar.weixin.channel.bean.compass.shop.FinderProductOverallResponse; import me.chanjar.weixin.channel.bean.compass.shop.ShopLiveListResponse; import me.chanjar.weixin.channel.bean.compass.shop.ShopOverallResponse; import me.chanjar.weixin.channel.bean.compass.shop.ShopProductDataParam; import me.chanjar.weixin.channel.bean.compass.shop.ShopProductDataResponse; import me.chanjar.weixin.channel.bean.compass.shop.ShopProductListResponse; import me.chanjar.weixin.channel.bean.compass.shop.ShopSaleProfileDataParam; import me.chanjar.weixin.channel.bean.compass.shop.ShopSaleProfileDataResponse; import me.chanjar.weixin.channel.util.ResponseUtils; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号/微信小店 罗盘商家版 服务实现 * * @author <a href="https://github.com/lixize">Zeyes</a> */ @Slf4j public class WxChannelCompassShopServiceImpl implements WxChannelCompassShopService { /** * 微信商店服务 */ private final BaseWxChannelServiceImpl<?, ?> shopService; public WxChannelCompassShopServiceImpl(BaseWxChannelServiceImpl<?, ?> shopService) {this.shopService = shopService;} @Override public ShopOverallResponse getShopOverall(String ds) throws WxErrorException { CompassFinderBaseParam param = new CompassFinderBaseParam(ds); String resJson = shopService.post(GET_SHOP_OVERALL_URL, param); return ResponseUtils.decode(resJson, ShopOverallResponse.class); } @Override public FinderAuthListResponse getFinderAuthorizationList() throws WxErrorException { String resJson = shopService.post(FINDER_AUTH_LIST_URL, "{}"); return ResponseUtils.decode(resJson, FinderAuthListResponse.class); } @Override public FinderListResponse getFinderList(String ds) throws WxErrorException { CompassFinderBaseParam param = new CompassFinderBaseParam(ds); String resJson = shopService.post(FINDER_LIST_URL, param); return ResponseUtils.decode(resJson, FinderListResponse.class); } @Override public FinderOverallResponse getFinderOverall(String ds) throws WxErrorException { CompassFinderBaseParam param = new CompassFinderBaseParam(ds); String resJson = shopService.post(GET_FINDER_OVERALL_URL, param); return ResponseUtils.decode(resJson, FinderOverallResponse.class); } @Override public FinderProductListResponse getFinderProductList(String ds, String finderId) throws WxErrorException { CompassFinderIdParam param = new CompassFinderIdParam(ds, finderId); String resJson = shopService.post(GET_FINDER_PRODUCT_LIST_URL, param); return ResponseUtils.decode(resJson, FinderProductListResponse.class); } @Override public FinderProductOverallResponse getFinderProductOverall(String ds, String finderId) throws WxErrorException { CompassFinderIdParam param = new CompassFinderIdParam(ds, finderId); String resJson = shopService.post(GET_FINDER_PRODUCT_OVERALL_URL, param); return ResponseUtils.decode(resJson, FinderProductOverallResponse.class); } @Override public ShopLiveListResponse getShopLiveList(String ds, String finderId) throws WxErrorException { CompassFinderIdParam param = new CompassFinderIdParam(ds, finderId); String resJson = shopService.post(GET_LIVE_LIST_URL, param); return ResponseUtils.decode(resJson, ShopLiveListResponse.class); } @Override public ShopProductDataResponse getShopProductData(String ds, String productId) throws WxErrorException { ShopProductDataParam param = new ShopProductDataParam(ds, productId); String resJson = shopService.post(GET_SHOP_PRODUCT_DATA_URL, param); return ResponseUtils.decode(resJson, ShopProductDataResponse.class); } @Override public ShopProductListResponse getShopProductList(String ds) throws WxErrorException { CompassFinderBaseParam param = new CompassFinderBaseParam(ds); String resJson = shopService.post(GET_SHOP_PRODUCT_LIST_URL, param); return ResponseUtils.decode(resJson, ShopProductListResponse.class); } @Override public ShopSaleProfileDataResponse getShopSaleProfileData(String ds, Integer type) throws WxErrorException { ShopSaleProfileDataParam param = new ShopSaleProfileDataParam(ds, type); String resJson = shopService.post(GET_SHOP_SALE_PROFILE_DATA_URL, param); return ResponseUtils.decode(resJson, ShopSaleProfileDataResponse.class); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxLeagueSupplierServiceImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxLeagueSupplierServiceImpl.java
package me.chanjar.weixin.channel.api.impl; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.GET_SUPPLIER_BALANCE_FLOW_DETAIL_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.GET_SUPPLIER_BALANCE_FLOW_LIST_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.GET_SUPPLIER_BALANCE_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.GET_SUPPLIER_ITEM_LIST_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.GET_SUPPLIER_ITEM_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.GET_SUPPLIER_ORDER_LIST_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.GET_SUPPLIER_ORDER_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.GET_SUPPLIER_SHOP_LIST_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.GET_SUPPLIER_SHOP_URL; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.WxLeagueSupplierService; import me.chanjar.weixin.channel.bean.base.StreamPageParam; import me.chanjar.weixin.channel.bean.league.supplier.CommissionOrderListParam; import me.chanjar.weixin.channel.bean.league.supplier.CommissionOrderListResponse; import me.chanjar.weixin.channel.bean.league.supplier.CommissionOrderResponse; import me.chanjar.weixin.channel.bean.league.supplier.CoopProductDetailParam; import me.chanjar.weixin.channel.bean.league.supplier.CoopProductListParam; import me.chanjar.weixin.channel.bean.league.supplier.CoopProductListResponse; import me.chanjar.weixin.channel.bean.league.supplier.CoopProductResponse; import me.chanjar.weixin.channel.bean.league.supplier.FlowListParam; import me.chanjar.weixin.channel.bean.league.supplier.ShopDetailResponse; import me.chanjar.weixin.channel.bean.league.supplier.ShopListResponse; import me.chanjar.weixin.channel.bean.league.supplier.SupplierBalanceResponse; import me.chanjar.weixin.channel.bean.league.supplier.SupplierFlowDetailResponse; import me.chanjar.weixin.channel.bean.league.supplier.SupplierFlowListResponse; import me.chanjar.weixin.channel.util.ResponseUtils; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号小店 优选联盟 团长数据服务 * * @author <a href="https://github.com/lixize">Zeyes</a> */ @Slf4j public class WxLeagueSupplierServiceImpl implements WxLeagueSupplierService { /** 微信商店服务 */ private final BaseWxChannelServiceImpl<?, ?> shopService; public WxLeagueSupplierServiceImpl(BaseWxChannelServiceImpl<?, ?> shopService) { this.shopService = shopService; } @Override public SupplierBalanceResponse getBalanceInfo() throws WxErrorException { String resJson = shopService.post(GET_SUPPLIER_BALANCE_URL, "{}"); return ResponseUtils.decode(resJson, SupplierBalanceResponse.class); } @Override public SupplierFlowDetailResponse getFlowDetail(String flowId) throws WxErrorException { String reqJson = "{\"flow_id\":\"" + flowId + "\"}"; String resJson = shopService.post(GET_SUPPLIER_BALANCE_FLOW_DETAIL_URL, reqJson); return ResponseUtils.decode(resJson, SupplierFlowDetailResponse.class); } @Override public SupplierFlowListResponse getFlowList(FlowListParam param) throws WxErrorException { String resJson = shopService.post(GET_SUPPLIER_BALANCE_FLOW_LIST_URL, param); return ResponseUtils.decode(resJson, SupplierFlowListResponse.class); } @Override public CoopProductResponse getProductDetail(String productId, String appId) throws WxErrorException { CoopProductDetailParam param = new CoopProductDetailParam(productId, appId); String resJson = shopService.post(GET_SUPPLIER_ITEM_URL, param); return ResponseUtils.decode(resJson, CoopProductResponse.class); } @Override public CoopProductListResponse getProductList(String appid, Integer pageSize, String nextKey) throws WxErrorException { CoopProductListParam param = new CoopProductListParam(appid, pageSize, nextKey); String resJson = shopService.post(GET_SUPPLIER_ITEM_LIST_URL, param); return ResponseUtils.decode(resJson, CoopProductListResponse.class); } @Override public CommissionOrderResponse getCommissionOrder(String orderId, String skuId) throws WxErrorException { String reqJson = "{\"order_id\":\"" + orderId + "\",\"sku_id\":\"" + skuId + "\"}"; String resJson = shopService.post(GET_SUPPLIER_ORDER_URL, reqJson); return ResponseUtils.decode(resJson, CommissionOrderResponse.class); } @Override public CommissionOrderListResponse getCommissionOrderList(CommissionOrderListParam param) throws WxErrorException { String resJson = shopService.post(GET_SUPPLIER_ORDER_LIST_URL, param); return ResponseUtils.decode(resJson, CommissionOrderListResponse.class); } @Override public ShopDetailResponse getShopDetail(String appid) throws WxErrorException { String reqJson = "{\"appid\":\"" + appid + "\"}"; String resJson = shopService.post(GET_SUPPLIER_SHOP_URL, reqJson); return ResponseUtils.decode(resJson, ShopDetailResponse.class); } @Override public ShopListResponse getShopList(Integer pageSize, String nextKey) throws WxErrorException { StreamPageParam param = new StreamPageParam(pageSize, nextKey); String resJson = shopService.post(GET_SUPPLIER_SHOP_LIST_URL, param); return ResponseUtils.decode(resJson, ShopListResponse.class); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelWarehouseServiceImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelWarehouseServiceImpl.java
package me.chanjar.weixin.channel.api.impl; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Warehouse.ADD_COVER_AREA_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Warehouse.ADD_WAREHOUSE_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Warehouse.DELETE_COVER_AREA_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Warehouse.GET_WAREHOUSE_PRIORITY_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Warehouse.GET_WAREHOUSE_STOCK_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Warehouse.GET_WAREHOUSE_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Warehouse.LIST_WAREHOUSE_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Warehouse.SET_WAREHOUSE_PRIORITY_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Warehouse.UPDATE_WAREHOUSE_STOCK_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Warehouse.UPDATE_WAREHOUSE_URL; import java.util.List; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.WxChannelWarehouseService; import me.chanjar.weixin.channel.bean.base.StreamPageParam; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.warehouse.LocationPriorityResponse; import me.chanjar.weixin.channel.bean.warehouse.PriorityLocationParam; import me.chanjar.weixin.channel.bean.warehouse.StockGetParam; import me.chanjar.weixin.channel.bean.warehouse.UpdateLocationParam; import me.chanjar.weixin.channel.bean.warehouse.WarehouseIdsResponse; import me.chanjar.weixin.channel.bean.warehouse.WarehouseLocation; import me.chanjar.weixin.channel.bean.warehouse.WarehouseLocationParam; import me.chanjar.weixin.channel.bean.warehouse.WarehouseParam; import me.chanjar.weixin.channel.bean.warehouse.WarehouseResponse; import me.chanjar.weixin.channel.bean.warehouse.WarehouseStockParam; import me.chanjar.weixin.channel.bean.warehouse.WarehouseStockResponse; import me.chanjar.weixin.channel.util.ResponseUtils; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号小店 区域仓库服务实现 * * @author <a href="https://github.com/lixize">Zeyes</a> */ @Slf4j public class WxChannelWarehouseServiceImpl implements WxChannelWarehouseService { /** 微信商店服务 */ private final BaseWxChannelServiceImpl<?, ?> shopService; public WxChannelWarehouseServiceImpl(BaseWxChannelServiceImpl<?, ?> shopService) { this.shopService = shopService; } @Override public WxChannelBaseResponse createWarehouse(WarehouseParam param) throws WxErrorException { String resJson = shopService.post(ADD_WAREHOUSE_URL, param); return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } @Override public WarehouseIdsResponse listWarehouse(Integer pageSize, String nextKey) throws WxErrorException { StreamPageParam param = new StreamPageParam(pageSize, nextKey); String resJson = shopService.post(LIST_WAREHOUSE_URL, param); return ResponseUtils.decode(resJson, WarehouseIdsResponse.class); } @Override public WarehouseResponse getWarehouse(String outWarehouseId) throws WxErrorException { String reqJson = "{\"out_warehouse_id\":\"" + outWarehouseId + "\"}"; String resJson = shopService.post(GET_WAREHOUSE_URL, reqJson); return ResponseUtils.decode(resJson, WarehouseResponse.class); } @Override public WxChannelBaseResponse updateWarehouse(String outWarehouseId, String name, String intro) throws WxErrorException { String reqJson = "{\"out_warehouse_id\":\"" + outWarehouseId + "\",\"name\":\"" + name + "\",\"intro\":\"" + intro + "\"}"; String resJson = shopService.post(UPDATE_WAREHOUSE_URL, reqJson); return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } @Override public WxChannelBaseResponse addWarehouseArea(String outWarehouseId, List<WarehouseLocation> coverLocations) throws WxErrorException { UpdateLocationParam param = new UpdateLocationParam(outWarehouseId, coverLocations); String resJson = shopService.post(ADD_COVER_AREA_URL, param); return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } @Override public WxChannelBaseResponse deleteWarehouseArea(String outWarehouseId, List<WarehouseLocation> coverLocations) throws WxErrorException { UpdateLocationParam param = new UpdateLocationParam(outWarehouseId, coverLocations); String resJson = shopService.post(DELETE_COVER_AREA_URL, param); return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } @Override public WxChannelBaseResponse setWarehousePriority(PriorityLocationParam param) throws WxErrorException { String resJson = shopService.post(SET_WAREHOUSE_PRIORITY_URL, param); return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } @Override public LocationPriorityResponse getWarehousePriority(Integer addressId1, Integer addressId2, Integer addressId3, Integer addressId4) throws WxErrorException { WarehouseLocationParam param = new WarehouseLocationParam(addressId1, addressId2, addressId3, addressId4); String resJson = shopService.post(GET_WAREHOUSE_PRIORITY_URL, param); return ResponseUtils.decode(resJson, LocationPriorityResponse.class); } @Override public WxChannelBaseResponse updateWarehouseStock(WarehouseStockParam param) throws WxErrorException { String resJson = shopService.post(UPDATE_WAREHOUSE_STOCK_URL, param); return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } @Override public WarehouseStockResponse getWarehouseStock(String productId, String skuId, String outWarehouseId) throws WxErrorException { StockGetParam param = new StockGetParam(productId, skuId, outWarehouseId); String resJson = shopService.post(GET_WAREHOUSE_STOCK_URL, param); return ResponseUtils.decode(resJson, WarehouseStockResponse.class); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelSharerServiceImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelSharerServiceImpl.java
package me.chanjar.weixin.channel.api.impl; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Share.BIND_SHARER_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Share.LIST_SHARER_ORDER_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Share.LIST_SHARER_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Share.SEARCH_SHARER_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Share.UNBIND_SHARER_URL; import com.google.gson.JsonObject; import java.util.List; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.WxChannelSharerService; import me.chanjar.weixin.channel.bean.sharer.SharerBindResponse; import me.chanjar.weixin.channel.bean.sharer.SharerInfoResponse; import me.chanjar.weixin.channel.bean.sharer.SharerListParam; import me.chanjar.weixin.channel.bean.sharer.SharerOrderParam; import me.chanjar.weixin.channel.bean.sharer.SharerOrderResponse; import me.chanjar.weixin.channel.bean.sharer.SharerSearchParam; import me.chanjar.weixin.channel.bean.sharer.SharerSearchResponse; import me.chanjar.weixin.channel.bean.sharer.SharerUnbindParam; import me.chanjar.weixin.channel.bean.sharer.SharerUnbindResponse; import me.chanjar.weixin.channel.util.ResponseUtils; import me.chanjar.weixin.common.error.WxErrorException; import me.chanjar.weixin.common.util.json.GsonHelper; /** * 视频号小店 分享员服务实现 * * @author <a href="https://github.com/lixize">Zeyes</a> */ @Slf4j public class WxChannelSharerServiceImpl implements WxChannelSharerService { /** 微信商店服务 */ private final BaseWxChannelServiceImpl<?, ?> shopService; public WxChannelSharerServiceImpl(BaseWxChannelServiceImpl<?, ?> shopService) { this.shopService = shopService; } @Override public SharerBindResponse bindSharer(String username) throws WxErrorException { JsonObject jsonObject = GsonHelper.buildJsonObject("username", username); String resJson = shopService.post(BIND_SHARER_URL, jsonObject); return ResponseUtils.decode(resJson, SharerBindResponse.class); } @Override public SharerSearchResponse searchSharer(String openid, String username) throws WxErrorException { SharerSearchParam param = new SharerSearchParam(openid, username); String resJson = shopService.post(SEARCH_SHARER_URL, param); return ResponseUtils.decode(resJson, SharerSearchResponse.class); } @Override public SharerInfoResponse listSharer(Integer page, Integer pageSize, Integer sharerType) throws WxErrorException { SharerListParam param = new SharerListParam(page, pageSize, sharerType); String resJson = shopService.post(LIST_SHARER_URL, param); return ResponseUtils.decode(resJson, SharerInfoResponse.class); } @Override public SharerOrderResponse listSharerOrder(SharerOrderParam param) throws WxErrorException { String resJson = shopService.post(LIST_SHARER_ORDER_URL, param); return ResponseUtils.decode(resJson, SharerOrderResponse.class); } @Override public SharerUnbindResponse unbindSharer(List<String> openIds) throws WxErrorException { SharerUnbindParam param = new SharerUnbindParam(openIds); String resJson = shopService.post(UNBIND_SHARER_URL, param); return ResponseUtils.decode(resJson, SharerUnbindResponse.class); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelBrandServiceImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelBrandServiceImpl.java
package me.chanjar.weixin.channel.api.impl; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Brand.ADD_BRAND_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Brand.ALL_BRAND_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Brand.CANCEL_BRAND_AUDIT_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Brand.DELETE_BRAND_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Brand.GET_BRAND_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Brand.LIST_BRAND_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Brand.LIST_BRAND_VALID_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Brand.UPDATE_BRAND_URL; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.WxChannelBrandService; import me.chanjar.weixin.channel.bean.audit.AuditApplyResponse; import me.chanjar.weixin.channel.bean.base.StreamPageParam; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.brand.Brand; import me.chanjar.weixin.channel.bean.brand.BrandApplyListResponse; import me.chanjar.weixin.channel.bean.brand.BrandInfoResponse; import me.chanjar.weixin.channel.bean.brand.BrandListResponse; import me.chanjar.weixin.channel.bean.brand.BrandParam; import me.chanjar.weixin.channel.bean.brand.BrandSearchParam; import me.chanjar.weixin.channel.util.ResponseUtils; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号小店 品牌服务实现 * * @author <a href="https://github.com/lixize">Zeyes</a> */ @Slf4j public class WxChannelBrandServiceImpl implements WxChannelBrandService { /** 微信商店服务 */ private final BaseWxChannelServiceImpl<?, ?> shopService; public WxChannelBrandServiceImpl(BaseWxChannelServiceImpl<?, ?> shopService) { this.shopService = shopService; } @Override public BrandListResponse listAllBrand(Integer pageSize, String nextKey) throws WxErrorException { StreamPageParam param = new StreamPageParam(pageSize, nextKey); String resJson = shopService.post(ALL_BRAND_URL, param); return ResponseUtils.decode(resJson, BrandListResponse.class); } @Override public AuditApplyResponse addBrandApply(Brand brand) throws WxErrorException { BrandParam param = new BrandParam(brand); String resJson = shopService.post(ADD_BRAND_URL, param); return ResponseUtils.decode(resJson, AuditApplyResponse.class); } @Override public AuditApplyResponse updateBrandApply(Brand brand) throws WxErrorException { BrandParam param = new BrandParam(brand); String resJson = shopService.post(UPDATE_BRAND_URL, param); return ResponseUtils.decode(resJson, AuditApplyResponse.class); } @Override public WxChannelBaseResponse cancelBrandApply(String brandId, String auditId) throws WxErrorException { String reqJson = "{\"brand_id\":\"" + brandId + "\",\"audit_id\":\"" + auditId + "\"}"; String resJson = shopService.post(CANCEL_BRAND_AUDIT_URL, reqJson); return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } @Override public WxChannelBaseResponse deleteBrandApply(String brandId) throws WxErrorException { String reqJson = "{\"brand_id\":\"" + brandId + "\"}"; String resJson = shopService.post(DELETE_BRAND_URL, reqJson); return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } @Override public BrandInfoResponse getBrandApply(String brandId) throws WxErrorException { String reqJson = "{\"brand_id\":\"" + brandId + "\"}"; String resJson = shopService.post(GET_BRAND_URL, reqJson); return ResponseUtils.decode(resJson, BrandInfoResponse.class); } @Override public BrandApplyListResponse listBrandApply(Integer pageSize, String nextKey, Integer status) throws WxErrorException { BrandSearchParam param = new BrandSearchParam(pageSize, nextKey, status); String resJson = shopService.post(LIST_BRAND_URL, param); return ResponseUtils.decode(resJson, BrandApplyListResponse.class); } @Override public BrandApplyListResponse listValidBrandApply(Integer pageSize, String nextKey) throws WxErrorException { StreamPageParam param = new StreamPageParam(pageSize, nextKey); String resJson = shopService.post(LIST_BRAND_VALID_URL, param); return ResponseUtils.decode(resJson, BrandApplyListResponse.class); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxLeagueProductServiceImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxLeagueProductServiceImpl.java
package me.chanjar.weixin.channel.api.impl; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.BATCH_ADD_LEAGUE_ITEM_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.DELETE_LEAGUE_ITEM_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.GET_LEAGUE_ITEM_LIST_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.GET_LEAGUE_ITEM_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.UPDATE_LEAGUE_ITEM_URL; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.WxLeagueProductService; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.league.product.BatchAddParam; import me.chanjar.weixin.channel.bean.league.product.BatchAddResponse; import me.chanjar.weixin.channel.bean.league.product.ProductDeleteParam; import me.chanjar.weixin.channel.bean.league.product.ProductDetailParam; import me.chanjar.weixin.channel.bean.league.product.ProductDetailResponse; import me.chanjar.weixin.channel.bean.league.product.ProductListParam; import me.chanjar.weixin.channel.bean.league.product.ProductListResponse; import me.chanjar.weixin.channel.bean.league.product.ProductUpdateParam; import me.chanjar.weixin.channel.bean.league.product.ProductUpdateResponse; import me.chanjar.weixin.channel.util.ResponseUtils; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号小店 商品服务 * * @author <a href="https://github.com/lixize">Zeyes</a> */ @Slf4j public class WxLeagueProductServiceImpl implements WxLeagueProductService { /** 微信商店服务 */ private final BaseWxChannelServiceImpl<?, ?> shopService; public WxLeagueProductServiceImpl(BaseWxChannelServiceImpl<?, ?>shopService) { this.shopService = shopService; } @Override public BatchAddResponse batchAddProduct(BatchAddParam param) throws WxErrorException { String resJson = shopService.post(BATCH_ADD_LEAGUE_ITEM_URL, param); return ResponseUtils.decode(resJson, BatchAddResponse.class); } @Override public ProductUpdateResponse updateProduct(ProductUpdateParam param) throws WxErrorException { String resJson = shopService.post(UPDATE_LEAGUE_ITEM_URL, param); return ResponseUtils.decode(resJson, ProductUpdateResponse.class); } @Override public WxChannelBaseResponse deleteProduct(Integer type, String productId, String infoId) throws WxErrorException { ProductDeleteParam param = new ProductDeleteParam(type, productId, infoId); String resJson = shopService.post(DELETE_LEAGUE_ITEM_URL, param); return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } @Override public ProductDetailResponse getProductDetail(ProductDetailParam param) throws WxErrorException { String resJson = shopService.post(GET_LEAGUE_ITEM_URL, param); return ResponseUtils.decode(resJson, ProductDetailResponse.class); } @Override public ProductListResponse listProduct(ProductListParam param) throws WxErrorException { String resJson = shopService.post(GET_LEAGUE_ITEM_LIST_URL, param); return ResponseUtils.decode(resJson, ProductListResponse.class); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxLeagueWindowServiceImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxLeagueWindowServiceImpl.java
package me.chanjar.weixin.channel.api.impl; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.ADD_SUPPLIER_GOODS_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.GET_SUPPLIER_AUTH_STATUS_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.GET_SUPPLIER_AUTH_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.GET_SUPPLIER_GOODS_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.LIST_SUPPLIER_GOODS_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.REMOVE_SUPPLIER_GOODS_URL; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.WxLeagueWindowService; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.league.window.AuthInfoResponse; import me.chanjar.weixin.channel.bean.league.window.AuthStatusResponse; import me.chanjar.weixin.channel.bean.league.window.ProductSearchParam; import me.chanjar.weixin.channel.bean.league.window.WindowProductListResponse; import me.chanjar.weixin.channel.bean.league.window.WindowProductParam; import me.chanjar.weixin.channel.bean.league.window.WindowProductResponse; import me.chanjar.weixin.channel.util.ResponseUtils; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号小店 优选联盟 团长合作达人管理服务 * * @author <a href="https://github.com/lixize">Zeyes</a> */ @Slf4j public class WxLeagueWindowServiceImpl implements WxLeagueWindowService { /** 微信商店服务 */ private final BaseWxChannelServiceImpl<?, ?> shopService; public WxLeagueWindowServiceImpl(BaseWxChannelServiceImpl<?, ?> shopService) { this.shopService = shopService; } @Override public WxChannelBaseResponse addProduct(String appid, String openfinderid, String productId) throws WxErrorException { WindowProductParam param = new WindowProductParam(appid, openfinderid, productId); String resJson = shopService.post(ADD_SUPPLIER_GOODS_URL, param); return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } @Override public WindowProductListResponse listProduct(ProductSearchParam param) throws WxErrorException { String resJson = shopService.post(LIST_SUPPLIER_GOODS_URL, param); return ResponseUtils.decode(resJson, WindowProductListResponse.class); } @Override public WxChannelBaseResponse removeProduct(String appid, String openfinderid, String productId) throws WxErrorException { WindowProductParam param = new WindowProductParam(appid, openfinderid, productId); String resJson = shopService.post(REMOVE_SUPPLIER_GOODS_URL, param); return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } @Override public WindowProductResponse getProductDetail(String appid, String openfinderid, String productId) throws WxErrorException { WindowProductParam param = new WindowProductParam(appid, openfinderid, productId); String resJson = shopService.post(GET_SUPPLIER_GOODS_URL, param); return ResponseUtils.decode(resJson, WindowProductResponse.class); } @Override public AuthInfoResponse getWindowAuthInfo(String finderId) throws WxErrorException { String reqJson = "{\"finder_id\":\"" + finderId + "\"}"; String resJson = shopService.post(GET_SUPPLIER_AUTH_URL, reqJson); return ResponseUtils.decode(resJson, AuthInfoResponse.class); } @Override public AuthStatusResponse getWindowAuthStatus(String finderId) throws WxErrorException { String reqJson = "{\"finder_id\":\"" + finderId + "\"}"; String resJson = shopService.post(GET_SUPPLIER_AUTH_STATUS_URL, reqJson); return ResponseUtils.decode(resJson, AuthStatusResponse.class); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelCompassFinderServiceImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelCompassFinderServiceImpl.java
package me.chanjar.weixin.channel.api.impl; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.WxChannelCompassFinderService; import me.chanjar.weixin.channel.bean.compass.CompassFinderBaseParam; import me.chanjar.weixin.channel.bean.compass.finder.*; import me.chanjar.weixin.channel.util.ResponseUtils; import me.chanjar.weixin.common.error.WxErrorException; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.CompassFinder.*; /** * 视频号助手 罗盘达人版服务实现 * * @author <a href="https://github.com/Winnie-by996">Winnie</a> */ @Slf4j public class WxChannelCompassFinderServiceImpl implements WxChannelCompassFinderService { /** * 微信商店服务 */ private final BaseWxChannelServiceImpl<?, ?> shopService; public WxChannelCompassFinderServiceImpl(BaseWxChannelServiceImpl<?, ?> shopService) {this.shopService = shopService;} @Override public OverallResponse getOverall(String ds) throws WxErrorException { CompassFinderBaseParam param = new CompassFinderBaseParam(ds); String resJson = shopService.post(GET_OVERALL_URL, param); return ResponseUtils.decode(resJson, OverallResponse.class); } @Override public ProductDataResponse getProductData(String ds, String productId) throws WxErrorException { ProductDataParam param = new ProductDataParam(ds, productId); String resJson = shopService.post(GET_PRODUCT_DATA_URL, param); return ResponseUtils.decode(resJson, ProductDataResponse.class); } @Override public ProductListResponse getProductList(String ds) throws WxErrorException { CompassFinderBaseParam param = new CompassFinderBaseParam(ds); String resJson = shopService.post(GET_PRODUCT_LIST_URL, param); return ResponseUtils.decode(resJson, ProductListResponse.class); } @Override public SaleProfileDataResponse getSaleProfileData(String ds, Integer type) throws WxErrorException { SaleProfileDataParam param = new SaleProfileDataParam(ds, type); String resJson = shopService.post(GET_SALE_PROFILE_DATA_URL, param); return ResponseUtils.decode(resJson, SaleProfileDataResponse.class); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxLeadComponentServiceImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxLeadComponentServiceImpl.java
package me.chanjar.weixin.channel.api.impl; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.WxLeadComponentService; import me.chanjar.weixin.channel.bean.lead.component.request.GetLeadInfoByComponentRequest; import me.chanjar.weixin.channel.bean.lead.component.request.GetLeadsComponentIdRequest; import me.chanjar.weixin.channel.bean.lead.component.request.GetLeadsComponentPromoteRecordRequest; import me.chanjar.weixin.channel.bean.lead.component.request.GetLeadsInfoByRequestIdRequest; import me.chanjar.weixin.channel.bean.lead.component.request.GetLeadsRequestIdRequest; import me.chanjar.weixin.channel.bean.lead.component.response.GetLeadsComponentIdResponse; import me.chanjar.weixin.channel.bean.lead.component.response.GetLeadsComponentPromoteRecordResponse; import me.chanjar.weixin.channel.bean.lead.component.response.GetLeadsRequestIdResponse; import me.chanjar.weixin.channel.bean.lead.component.response.LeadInfoResponse; import me.chanjar.weixin.channel.util.ResponseUtils; import me.chanjar.weixin.common.error.WxErrorException; import org.apache.commons.lang3.ObjectUtils; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.LeadComponent.GET_LEADS_COMPONENT_ID; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.LeadComponent.GET_LEADS_COMPONENT_PROMOTE_RECORD; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.LeadComponent.GET_LEADS_INFO_BY_COMPONENT_ID; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.LeadComponent.GET_LEADS_INFO_BY_REQUEST_ID; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.LeadComponent.GET_LEADS_REQUEST_ID; /** * 视频号助手 留资组件管理服务 * @author imyzt * @date 2024/01/27 */ @RequiredArgsConstructor @Slf4j public class WxLeadComponentServiceImpl implements WxLeadComponentService { /** 微信商店服务 */ private final BaseWxChannelServiceImpl<?, ?> shopService; private final ObjectMapper objectMapper = new ObjectMapper(); @Override public LeadInfoResponse getLeadsInfoByComponentId(GetLeadInfoByComponentRequest req) throws WxErrorException { req.setVersion(ObjectUtils.defaultIfNull(req.getVersion(), 1)); String resJson = shopService.post(GET_LEADS_INFO_BY_COMPONENT_ID, req); return this.convertLeadInfoResponse(resJson); } @Override public LeadInfoResponse getLeadsInfoByRequestId(GetLeadsInfoByRequestIdRequest req) throws WxErrorException { req.setVersion(ObjectUtils.defaultIfNull(req.getVersion(), 1)); String resJson = shopService.post(GET_LEADS_INFO_BY_REQUEST_ID, req); return this.convertLeadInfoResponse(resJson); } @Override public GetLeadsRequestIdResponse getLeadsRequestId(GetLeadsRequestIdRequest req) throws WxErrorException { String resJson = shopService.post(GET_LEADS_REQUEST_ID, req); return ResponseUtils.decode(resJson, GetLeadsRequestIdResponse.class); } @Override public GetLeadsComponentPromoteRecordResponse getLeadsComponentPromoteRecord(GetLeadsComponentPromoteRecordRequest req) throws WxErrorException { String resJson = shopService.post(GET_LEADS_COMPONENT_PROMOTE_RECORD, req); return ResponseUtils.decode(resJson, GetLeadsComponentPromoteRecordResponse.class); } @Override public GetLeadsComponentIdResponse getLeadsComponentId(GetLeadsComponentIdRequest req) throws WxErrorException { String resJson = shopService.post(GET_LEADS_COMPONENT_ID, req); return ResponseUtils.decode(resJson, GetLeadsComponentIdResponse.class); } /** * 微信返回的数据中, user_data和leads_data均为字符串包裹的非标准JSON结构, 为方便业务使用避免踩坑此处做好解析 */ private LeadInfoResponse convertLeadInfoResponse(String resJson) throws WxErrorException { try { ObjectNode rootNode = (ObjectNode) objectMapper.readTree(resJson); ArrayNode convertedUserDataArray = objectMapper.createArrayNode(); for (JsonNode userDataEle : rootNode.get("user_data")) { ObjectNode userDataJsonNode = (ObjectNode) objectMapper.readTree(userDataEle.asText()); ArrayNode leadsDataArray = (ArrayNode) objectMapper.readTree(userDataJsonNode.get("leads_data").asText()); userDataJsonNode.set("leads_data", leadsDataArray); convertedUserDataArray.add(userDataJsonNode); } rootNode.set("user_data", convertedUserDataArray); String json = objectMapper.writeValueAsString(rootNode); return ResponseUtils.decode(json, LeadInfoResponse.class); } catch (JsonProcessingException e) { throw new WxErrorException(e); } } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelServiceHttpClientImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelServiceHttpClientImpl.java
package me.chanjar.weixin.channel.api.impl; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.bean.token.StableTokenParam; import me.chanjar.weixin.channel.config.WxChannelConfig; import me.chanjar.weixin.channel.util.JsonUtils; import me.chanjar.weixin.common.util.http.HttpClientType; import me.chanjar.weixin.common.util.http.apache.ApacheBasicResponseHandler; import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder; import me.chanjar.weixin.common.util.http.apache.DefaultApacheHttpClientBuilder; import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpHost; import org.apache.http.client.HttpClient; import org.apache.http.client.config.RequestConfig; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.ContentType; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import java.io.IOException; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.GET_ACCESS_TOKEN_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.GET_STABLE_ACCESS_TOKEN_URL; /** * @author <a href="https://github.com/lixize">Zeyes</a> */ @Slf4j public class WxChannelServiceHttpClientImpl extends BaseWxChannelServiceImpl<HttpClient, HttpHost> { private CloseableHttpClient httpClient; private HttpHost httpProxy; @Override public void initHttp() { WxChannelConfig config = this.getConfig(); ApacheHttpClientBuilder apacheHttpClientBuilder = config.getApacheHttpClientBuilder(); if (null == apacheHttpClientBuilder) { apacheHttpClientBuilder = DefaultApacheHttpClientBuilder.get(); } apacheHttpClientBuilder.httpProxyHost(config.getHttpProxyHost()) .httpProxyPort(config.getHttpProxyPort()) .httpProxyUsername(config.getHttpProxyUsername()) .httpProxyPassword(config.getHttpProxyPassword()); if (config.getHttpProxyHost() != null && config.getHttpProxyPort() > 0) { this.httpProxy = new HttpHost(config.getHttpProxyHost(), config.getHttpProxyPort()); } this.httpClient = apacheHttpClientBuilder.build(); } @Override public CloseableHttpClient getRequestHttpClient() { return httpClient; } @Override public HttpHost getRequestHttpProxy() { return httpProxy; } @Override public HttpClientType getRequestType() { return HttpClientType.APACHE_HTTP; } @Override protected String doGetAccessTokenRequest() throws IOException { WxChannelConfig config = this.getConfig(); String url = StringUtils.isNotEmpty(config.getAccessTokenUrl()) ? config.getAccessTokenUrl() : StringUtils.isNotEmpty(config.getApiHostUrl()) ? GET_ACCESS_TOKEN_URL.replace("https://api.weixin.qq.com", config.getApiHostUrl()) : GET_ACCESS_TOKEN_URL; url = String.format(url, config.getAppid(), config.getSecret()); HttpGet httpGet = new HttpGet(url); if (this.getRequestHttpProxy() != null) { RequestConfig requestConfig = RequestConfig.custom().setProxy(this.getRequestHttpProxy()).build(); httpGet.setConfig(requestConfig); } return getRequestHttpClient().execute(httpGet, ApacheBasicResponseHandler.INSTANCE); } /** * 获取稳定版接口调用凭据 * * @param forceRefresh false 为普通模式, true为强制刷新模式 * @return 返回json的字符串 * @throws IOException the io exception */ @Override protected String doGetStableAccessTokenRequest(boolean forceRefresh) throws IOException { WxChannelConfig config = this.getConfig(); String url = GET_STABLE_ACCESS_TOKEN_URL; HttpPost httpPost = new HttpPost(url); if (this.getRequestHttpProxy() != null) { RequestConfig requestConfig = RequestConfig.custom().setProxy(this.getRequestHttpProxy()).build(); httpPost.setConfig(requestConfig); } StableTokenParam requestParam = new StableTokenParam(); requestParam.setAppId(config.getAppid()); requestParam.setSecret(config.getSecret()); requestParam.setGrantType("client_credential"); requestParam.setForceRefresh(forceRefresh); String requestJson = JsonUtils.encode(requestParam); assert requestJson != null; httpPost.setEntity(new StringEntity(requestJson, ContentType.APPLICATION_JSON)); return getRequestHttpClient().execute(httpPost, ApacheBasicResponseHandler.INSTANCE); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelServiceHttpComponentsImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelServiceHttpComponentsImpl.java
package me.chanjar.weixin.channel.api.impl; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.bean.token.StableTokenParam; import me.chanjar.weixin.channel.config.WxChannelConfig; import me.chanjar.weixin.channel.util.JsonUtils; import me.chanjar.weixin.common.util.http.HttpClientType; import me.chanjar.weixin.common.util.http.apache.ApacheBasicResponseHandler; import me.chanjar.weixin.common.util.http.hc.BasicResponseHandler; import me.chanjar.weixin.common.util.http.hc.DefaultHttpComponentsClientBuilder; import me.chanjar.weixin.common.util.http.hc.HttpComponentsClientBuilder; import org.apache.commons.lang3.StringUtils; import org.apache.hc.client5.http.classic.HttpClient; import org.apache.hc.client5.http.classic.methods.HttpGet; import org.apache.hc.client5.http.classic.methods.HttpPost; import org.apache.hc.client5.http.config.RequestConfig; import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; import org.apache.hc.core5.http.ContentType; import org.apache.hc.core5.http.HttpHost; import org.apache.hc.core5.http.io.entity.StringEntity; import java.io.IOException; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.GET_ACCESS_TOKEN_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.GET_STABLE_ACCESS_TOKEN_URL; /** * @author altusea */ @Slf4j public class WxChannelServiceHttpComponentsImpl extends BaseWxChannelServiceImpl<HttpClient, HttpHost> { private CloseableHttpClient httpClient; private HttpHost httpProxy; @Override public void initHttp() { WxChannelConfig config = this.getConfig(); HttpComponentsClientBuilder apacheHttpClientBuilder = DefaultHttpComponentsClientBuilder.get(); apacheHttpClientBuilder.httpProxyHost(config.getHttpProxyHost()) .httpProxyPort(config.getHttpProxyPort()) .httpProxyUsername(config.getHttpProxyUsername()) .httpProxyPassword(config.getHttpProxyPassword().toCharArray()); if (config.getHttpProxyHost() != null && config.getHttpProxyPort() > 0) { this.httpProxy = new HttpHost(config.getHttpProxyHost(), config.getHttpProxyPort()); } this.httpClient = apacheHttpClientBuilder.build(); } @Override public CloseableHttpClient getRequestHttpClient() { return httpClient; } @Override public HttpHost getRequestHttpProxy() { return httpProxy; } @Override public HttpClientType getRequestType() { return HttpClientType.HTTP_COMPONENTS; } @Override protected String doGetAccessTokenRequest() throws IOException { WxChannelConfig config = this.getConfig(); String url = StringUtils.isNotEmpty(config.getAccessTokenUrl()) ? config.getAccessTokenUrl() : StringUtils.isNotEmpty(config.getApiHostUrl()) ? GET_ACCESS_TOKEN_URL.replace("https://api.weixin.qq.com", config.getApiHostUrl()) : GET_ACCESS_TOKEN_URL; url = String.format(url, config.getAppid(), config.getSecret()); HttpGet httpGet = new HttpGet(url); if (this.getRequestHttpProxy() != null) { RequestConfig requestConfig = RequestConfig.custom().setProxy(this.getRequestHttpProxy()).build(); httpGet.setConfig(requestConfig); } return getRequestHttpClient().execute(httpGet, BasicResponseHandler.INSTANCE); } /** * 获取稳定版接口调用凭据 * * @param forceRefresh false 为普通模式, true为强制刷新模式 * @return 返回json的字符串 * @throws IOException the io exception */ @Override protected String doGetStableAccessTokenRequest(boolean forceRefresh) throws IOException { WxChannelConfig config = this.getConfig(); String url = GET_STABLE_ACCESS_TOKEN_URL; HttpPost httpPost = new HttpPost(url); if (this.getRequestHttpProxy() != null) { RequestConfig requestConfig = RequestConfig.custom().setProxy(this.getRequestHttpProxy()).build(); httpPost.setConfig(requestConfig); } StableTokenParam requestParam = new StableTokenParam(); requestParam.setAppId(config.getAppid()); requestParam.setSecret(config.getSecret()); requestParam.setGrantType("client_credential"); requestParam.setForceRefresh(forceRefresh); String requestJson = JsonUtils.encode(requestParam); assert requestJson != null; httpPost.setEntity(new StringEntity(requestJson, ContentType.APPLICATION_JSON)); return getRequestHttpClient().execute(httpPost, BasicResponseHandler.INSTANCE); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelLiveDashboardServiceImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelLiveDashboardServiceImpl.java
package me.chanjar.weixin.channel.api.impl; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.WxChannelLiveDashboardService; import me.chanjar.weixin.channel.bean.live.dashboard.LiveDataParam; import me.chanjar.weixin.channel.bean.live.dashboard.LiveDataResponse; import me.chanjar.weixin.channel.bean.live.dashboard.LiveListParam; import me.chanjar.weixin.channel.bean.live.dashboard.LiveListResponse; import me.chanjar.weixin.channel.util.ResponseUtils; import me.chanjar.weixin.common.error.WxErrorException; import org.apache.commons.lang3.ObjectUtils; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.LiveDashboard.*; /** * 视频号助手 直播大屏数据服务实现 * * @author <a href="https://github.com/Winnie-by996">Winnie</a> */ @Slf4j public class WxChannelLiveDashboardServiceImpl implements WxChannelLiveDashboardService { /** * 微信商店服务 */ private final BaseWxChannelServiceImpl<?, ?> shopService; private final ObjectMapper objectMapper = new ObjectMapper(); public WxChannelLiveDashboardServiceImpl(BaseWxChannelServiceImpl<?, ?> shopService) {this.shopService = shopService;} @Override public LiveListResponse getLiveList(Long ds) throws WxErrorException { LiveListParam param = new LiveListParam(ds); String resJson = shopService.post(GET_LIVE_LIST_URL, param); return ResponseUtils.decode(resJson, LiveListResponse.class); } @Override public LiveDataResponse getLiveData(String exportId) throws WxErrorException { LiveDataParam param = new LiveDataParam(exportId); String resJson = shopService.post(GET_LIVE_DATA_URL, param); return this.convertLiveDataResponse(resJson); } /** * 微信接口获取直播数据中存在非标准JSON,方便业务处理返回前做好解析 * 处理参数: * live_dashboard_data,live_comparison_index,live_ec_data_summary,live_ec_conversion_metric, * live_ec_profile,live_distribution_channel,single_live_ec_spu_data_page_v2 * * @param resJson 直播数据返回JSON * @return LiveDataResponse * * @throws WxErrorException 异常 */ private LiveDataResponse convertLiveDataResponse(String resJson) throws WxErrorException { try { ObjectNode rootNode = (ObjectNode) objectMapper.readTree(resJson); String[] dataKeyArray = new String[] { "live_dashboard_data", "live_comparison_index", "live_ec_data_summary", "live_ec_conversion_metric", "live_ec_profile", "live_distribution_channel", "single_live_ec_spu_data_page_v2" }; for(String dataKey : dataKeyArray) { JsonNode jsonNode = rootNode.get(dataKey); if (ObjectUtils.isNotEmpty(jsonNode)) { JsonNode dataJsonNode = objectMapper.readTree(jsonNode.asText()); rootNode.set(dataKey, dataJsonNode); } } String json = objectMapper.writeValueAsString(rootNode); return ResponseUtils.decode(json, LiveDataResponse.class); } catch (JsonProcessingException e) { throw new WxErrorException(e); } } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelCategoryServiceImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelCategoryServiceImpl.java
package me.chanjar.weixin.channel.api.impl; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Category.ADD_CATEGORY_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Category.AVAILABLE_CATEGORY_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Category.CANCEL_CATEGORY_AUDIT_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Category.GET_CATEGORY_AUDIT_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Category.GET_CATEGORY_DETAIL_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Category.LIST_ALL_CATEGORY_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Category.LIST_PASS_CATEGORY_URL; import java.util.Collections; import java.util.List; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.WxChannelCategoryService; import me.chanjar.weixin.channel.bean.audit.AuditApplyResponse; import me.chanjar.weixin.channel.bean.audit.AuditResponse; import me.chanjar.weixin.channel.bean.audit.CategoryAuditInfo; import me.chanjar.weixin.channel.bean.audit.CategoryAuditRequest; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.category.CategoryDetailResult; import me.chanjar.weixin.channel.bean.category.CategoryQualificationResponse; import me.chanjar.weixin.channel.bean.category.PassCategoryResponse; import me.chanjar.weixin.channel.bean.category.ShopCategory; import me.chanjar.weixin.channel.bean.category.ShopCategoryResponse; import me.chanjar.weixin.channel.util.JsonUtils; import me.chanjar.weixin.channel.util.ResponseUtils; import me.chanjar.weixin.common.error.WxErrorException; import me.chanjar.weixin.common.util.http.SimpleGetRequestExecutor; import me.chanjar.weixin.common.util.http.SimplePostRequestExecutor; /** * 视频号小店 商品类目相关接口 * * @author <a href="https://github.com/lixize">Zeyes</a> */ @Slf4j public class WxChannelCategoryServiceImpl implements WxChannelCategoryService { /** 微信商店服务 */ private final BaseWxChannelServiceImpl<?, ?> shopService; public WxChannelCategoryServiceImpl(BaseWxChannelServiceImpl<?, ?> shopService) { this.shopService = shopService; } @Override public CategoryQualificationResponse listAllCategory() throws WxErrorException { // 数据量太大了,不记录日志 String resJson = (String) shopService.executeWithoutLog(SimpleGetRequestExecutor.create(shopService), LIST_ALL_CATEGORY_URL, null); return ResponseUtils.decode(resJson, CategoryQualificationResponse.class); } public List<ShopCategory> listAvailableCategory(String parentId) throws WxErrorException { Long pid = null; try { pid = Long.parseLong(parentId); } catch (Throwable e) { log.error("parentId必须为数字, {}", parentId, e); return Collections.emptyList(); } String reqJson = "{\"f_cat_id\": " + pid + "}"; String resJson = (String) shopService.executeWithoutLog(SimplePostRequestExecutor.create(shopService), AVAILABLE_CATEGORY_URL, reqJson); ShopCategoryResponse response = ResponseUtils.decode(resJson, ShopCategoryResponse.class); return response.getCategories(); } @Override public ShopCategoryResponse listAvailableCategories(String fCatId) throws WxErrorException { String reqJson = "{\"f_cat_id\": " + fCatId + "}"; String resJson = (String) shopService.executeWithoutLog(SimplePostRequestExecutor.create(shopService), AVAILABLE_CATEGORY_URL, reqJson); return ResponseUtils.decode(resJson, ShopCategoryResponse.class); } @Override public CategoryDetailResult getCategoryDetail(String id) throws WxErrorException { Long catId = null; try { catId = Long.parseLong(id); } catch (Throwable e) { log.error("id必须为数字, {}", id, e); return ResponseUtils.internalError(CategoryDetailResult.class); } String reqJson = "{\"cat_id\": " + catId + "}"; String resJson = (String) shopService.executeWithoutLog(SimplePostRequestExecutor.create(shopService), GET_CATEGORY_DETAIL_URL, reqJson); return ResponseUtils.decode(resJson, CategoryDetailResult.class); } @Override public AuditApplyResponse addCategory(String level1, String level2, String level3, List<String> certificate) throws WxErrorException { String reqJson = null; try { Long l1 = Long.parseLong(level1); Long l2 = Long.parseLong(level2); Long l3 = Long.parseLong(level3); CategoryAuditInfo categoryInfo = new CategoryAuditInfo(); categoryInfo.setLevel1(l1); categoryInfo.setLevel2(l2); categoryInfo.setLevel3(l3); categoryInfo.setCertificates(certificate); reqJson = JsonUtils.encode(new CategoryAuditRequest(categoryInfo)); } catch (Throwable e) { log.error("微信请求异常", e); } String resJson = shopService.post(ADD_CATEGORY_URL, reqJson); return ResponseUtils.decode(resJson, AuditApplyResponse.class); } @Override public AuditApplyResponse addCategory(CategoryAuditInfo info) throws WxErrorException { String reqJson = JsonUtils.encode(new CategoryAuditRequest(info)); String resJson = shopService.post(ADD_CATEGORY_URL, reqJson); return ResponseUtils.decode(resJson, AuditApplyResponse.class); } @Override public WxChannelBaseResponse cancelCategoryAudit(String auditId) throws WxErrorException { String resJson = shopService.post(CANCEL_CATEGORY_AUDIT_URL, "{\"audit_id\": \"" + auditId + "\"}"); return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } @Override public AuditResponse getAudit(String auditId) throws WxErrorException { String resJson = shopService.post(GET_CATEGORY_AUDIT_URL, "{\"audit_id\": \"" + auditId + "\"}"); return ResponseUtils.decode(resJson, AuditResponse.class); } @Override public PassCategoryResponse listPassCategory() throws WxErrorException { String resJson = shopService.get(LIST_PASS_CATEGORY_URL, null); return ResponseUtils.decode(resJson, PassCategoryResponse.class); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxFinderLiveServiceImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxFinderLiveServiceImpl.java
package me.chanjar.weixin.channel.api.impl; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.WxFinderLiveService; import me.chanjar.weixin.channel.bean.lead.component.request.GetFinderLiveDataListRequest; import me.chanjar.weixin.channel.bean.lead.component.request.GetFinderLiveLeadsDataRequest; import me.chanjar.weixin.channel.bean.lead.component.response.FinderAttrResponse; import me.chanjar.weixin.channel.bean.lead.component.response.GetFinderLiveDataListResponse; import me.chanjar.weixin.channel.bean.lead.component.response.GetFinderLiveLeadsDataResponse; import me.chanjar.weixin.channel.util.ResponseUtils; import me.chanjar.weixin.common.error.WxErrorException; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.FinderLive.GET_FINDER_ATTR_BY_APPID; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.FinderLive.GET_FINDER_LIVE_DATA_LIST; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.FinderLive.GET_FINDER_LIVE_LEADS_DATA; /** * 视频号助手 留资服务的直播数据服务 * @author imyzt * @date 2024/01/27 */ @RequiredArgsConstructor @Slf4j public class WxFinderLiveServiceImpl implements WxFinderLiveService { /** 微信商店服务 */ private final BaseWxChannelServiceImpl<?, ?> shopService; @Override public FinderAttrResponse getFinderAttrByAppid() throws WxErrorException { String resJson = shopService.post(GET_FINDER_ATTR_BY_APPID, "{}"); return ResponseUtils.decode(resJson, FinderAttrResponse.class); } @Override public GetFinderLiveDataListResponse getFinderLiveDataList(GetFinderLiveDataListRequest req) throws WxErrorException { String resJson = shopService.post(GET_FINDER_LIVE_DATA_LIST, req); return ResponseUtils.decode(resJson, GetFinderLiveDataListResponse.class); } @Override public GetFinderLiveLeadsDataResponse getFinderLiveLeadsData(GetFinderLiveLeadsDataRequest req) throws WxErrorException { String resJson = shopService.post(GET_FINDER_LIVE_LEADS_DATA, req); return ResponseUtils.decode(resJson, GetFinderLiveLeadsDataResponse.class); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxLeaguePromoterServiceImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxLeaguePromoterServiceImpl.java
package me.chanjar.weixin.channel.api.impl; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.ADD_PROMOTER_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.DELETE_PROMOTER_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.EDIT_PROMOTER_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.GET_PROMOTER_LIST_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.League.GET_PROMOTER_URL; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.WxLeaguePromoterService; import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; import me.chanjar.weixin.channel.bean.league.promoter.PromoterInfoResponse; import me.chanjar.weixin.channel.bean.league.promoter.PromoterListParam; import me.chanjar.weixin.channel.bean.league.promoter.PromoterListResponse; import me.chanjar.weixin.channel.util.ResponseUtils; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号小店 达人服务 * * @author <a href="https://github.com/lixize">Zeyes</a> */ @Slf4j public class WxLeaguePromoterServiceImpl implements WxLeaguePromoterService { /** 微信商店服务 */ private final BaseWxChannelServiceImpl<?, ?> shopService; public WxLeaguePromoterServiceImpl(BaseWxChannelServiceImpl<?, ?> shopService) { this.shopService = shopService; } @Override public WxChannelBaseResponse addPromoter(String finderId) throws WxErrorException { String reqJson = "{\"finder_id\":\"" + finderId + "\"}"; String resJson = shopService.post(ADD_PROMOTER_URL, reqJson); return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } @Override public WxChannelBaseResponse updatePromoter(String finderId, int type) throws WxErrorException { String reqJson = "{\"finder_id\":\"" + finderId + "\",\"type\":" + type + "}"; String resJson = shopService.post(EDIT_PROMOTER_URL, reqJson); return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } @Override public WxChannelBaseResponse deletePromoter(String finderId) throws WxErrorException { String reqJson = "{\"finder_id\":\"" + finderId + "\"}"; String resJson = shopService.post(DELETE_PROMOTER_URL, reqJson); return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } @Override public PromoterInfoResponse getPromoterInfo(String finderId) throws WxErrorException { String reqJson = "{\"finder_id\":\"" + finderId + "\"}"; String resJson = shopService.post(GET_PROMOTER_URL, reqJson); return ResponseUtils.decode(resJson, PromoterInfoResponse.class); } @Override public WxChannelBaseResponse addPromoterV2(String promoterId) throws WxErrorException { String reqJson = "{\"promoter_id\":\"" + promoterId + "\"}"; String resJson = shopService.post(ADD_PROMOTER_URL, reqJson); return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } @Override public WxChannelBaseResponse updatePromoterV2(String promoterId, int type) throws WxErrorException { String reqJson = "{\"promoter_id\":\"" + promoterId + "\",\"type\":" + type + "}"; String resJson = shopService.post(EDIT_PROMOTER_URL, reqJson); return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } @Override public WxChannelBaseResponse deletePromoterV2(String promoterId) throws WxErrorException { String reqJson = "{\"promoter_id\":\"" + promoterId + "\"}"; String resJson = shopService.post(DELETE_PROMOTER_URL, reqJson); return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); } @Override public PromoterInfoResponse getPromoterInfoV2(String promoterId) throws WxErrorException { String reqJson = "{\"promoter_id\":\"" + promoterId + "\"}"; String resJson = shopService.post(GET_PROMOTER_URL, reqJson); return ResponseUtils.decode(resJson, PromoterInfoResponse.class); } @Override public PromoterListResponse listPromoter(Integer pageIndex, Integer pageSize, Integer status) throws WxErrorException { PromoterListParam param = new PromoterListParam(pageIndex, pageSize, status); String resJson = shopService.post(GET_PROMOTER_LIST_URL, param); return ResponseUtils.decode(resJson, PromoterListResponse.class); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelFreightTemplateServiceImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelFreightTemplateServiceImpl.java
package me.chanjar.weixin.channel.api.impl; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.FreightTemplate.ADD_TEMPLATE_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.FreightTemplate.GET_TEMPLATE_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.FreightTemplate.LIST_TEMPLATE_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.FreightTemplate.UPDATE_TEMPLATE_URL; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.api.WxChannelFreightTemplateService; import me.chanjar.weixin.channel.bean.freight.FreightTemplate; import me.chanjar.weixin.channel.bean.freight.TemplateAddParam; import me.chanjar.weixin.channel.bean.freight.TemplateIdResponse; import me.chanjar.weixin.channel.bean.freight.TemplateInfoResponse; import me.chanjar.weixin.channel.bean.freight.TemplateListParam; import me.chanjar.weixin.channel.bean.freight.TemplateListResponse; import me.chanjar.weixin.channel.util.ResponseUtils; import me.chanjar.weixin.common.error.WxErrorException; /** * 视频号小店 运费模板服务实现 * * @author <a href="https://github.com/lixize">Zeyes</a> */ @Slf4j public class WxChannelFreightTemplateServiceImpl implements WxChannelFreightTemplateService { /** 微信商店服务 */ private final BaseWxChannelServiceImpl<?, ?> shopService; public WxChannelFreightTemplateServiceImpl(BaseWxChannelServiceImpl<?, ?> shopService) { this.shopService = shopService; } @Override public TemplateListResponse listTemplate(Integer offset, Integer limit) throws WxErrorException { TemplateListParam param = new TemplateListParam(offset, limit); String resJson = shopService.post(LIST_TEMPLATE_URL, param); return ResponseUtils.decode(resJson, TemplateListResponse.class); } @Override public TemplateInfoResponse getTemplate(String templateId) throws WxErrorException { String reqJson = "{\"template_id\": \"" + templateId + "\"}"; String resJson = shopService.post(GET_TEMPLATE_URL, reqJson); return ResponseUtils.decode(resJson, TemplateInfoResponse.class); } @Override public TemplateIdResponse addTemplate(FreightTemplate template) throws WxErrorException { TemplateAddParam param = new TemplateAddParam(template); String resJson = shopService.post(ADD_TEMPLATE_URL, param); return ResponseUtils.decode(resJson, TemplateIdResponse.class); } @Override public TemplateIdResponse updateTemplate(FreightTemplate template) throws WxErrorException { TemplateAddParam param = new TemplateAddParam(template); String resJson = shopService.post(UPDATE_TEMPLATE_URL, param); return ResponseUtils.decode(resJson, TemplateIdResponse.class); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelServiceImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelServiceImpl.java
package me.chanjar.weixin.channel.api.impl; import lombok.extern.slf4j.Slf4j; /** * 视频号小店服务实现 * * @author <a href="https://github.com/lixize">Zeyes</a> */ @Slf4j public class WxChannelServiceImpl extends WxChannelServiceHttpClientImpl { public WxChannelServiceImpl() { } // /** // * 设置获取access_token接口参数. // * // * @param stabled false 表示调用普通模式AccessToken接口, true调用稳定模式接口 // * @param forceRefresh stabled=true使用, true表示强制刷新模式 // * @deprecated 请使用 {@link BaseWxChannelServiceImpl#setConfig(WxChannelConfig) } 替代 // */ // @Deprecated // public WxChannelServiceImpl(Boolean stabled, Boolean forceRefresh) { // } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelServiceOkHttpImpl.java
weixin-java-channel/src/main/java/me/chanjar/weixin/channel/api/impl/WxChannelServiceOkHttpImpl.java
package me.chanjar.weixin.channel.api.impl; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.GET_ACCESS_TOKEN_URL; import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.GET_STABLE_ACCESS_TOKEN_URL; import java.io.IOException; import java.util.Objects; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.channel.bean.token.StableTokenParam; import me.chanjar.weixin.channel.config.WxChannelConfig; import me.chanjar.weixin.channel.util.JsonUtils; import me.chanjar.weixin.common.util.http.HttpClientType; import me.chanjar.weixin.common.util.http.okhttp.DefaultOkHttpClientBuilder; import me.chanjar.weixin.common.util.http.okhttp.OkHttpProxyInfo; import okhttp3.Authenticator; import okhttp3.Credentials; import okhttp3.MediaType; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; import okhttp3.Route; import org.apache.commons.lang3.StringUtils; /** * @author : zhenyun.su * @since : 2024/2/27 */ @Slf4j public class WxChannelServiceOkHttpImpl extends BaseWxChannelServiceImpl<OkHttpClient, OkHttpProxyInfo> { private OkHttpClient httpClient; private OkHttpProxyInfo httpProxy; public WxChannelServiceOkHttpImpl() { } @Override public void initHttp() { log.debug("WxChannelServiceOkHttpImpl initHttp"); if (this.config.getHttpProxyHost() != null && this.config.getHttpProxyPort() > 0) { this.httpProxy = OkHttpProxyInfo.httpProxy(this.config.getHttpProxyHost(), this.config.getHttpProxyPort(), this.config.getHttpProxyUsername(), this.config.getHttpProxyPassword()); okhttp3.OkHttpClient.Builder clientBuilder = new okhttp3.OkHttpClient.Builder(); clientBuilder.proxy(this.getRequestHttpProxy().getProxy()); clientBuilder.proxyAuthenticator(new Authenticator() { @Override public Request authenticate(Route route, Response response) throws IOException { String credential = Credentials.basic(WxChannelServiceOkHttpImpl.this.httpProxy.getProxyUsername(), WxChannelServiceOkHttpImpl.this.httpProxy.getProxyPassword()); return response.request().newBuilder().header("Proxy-Authorization", credential).build(); } }); this.httpClient = clientBuilder.build(); } else { this.httpClient = DefaultOkHttpClientBuilder.get().build(); } } @Override public OkHttpClient getRequestHttpClient() { return this.httpClient; } @Override public OkHttpProxyInfo getRequestHttpProxy() { return this.httpProxy; } @Override public HttpClientType getRequestType() { return HttpClientType.OK_HTTP; } @Override protected String doGetAccessTokenRequest() throws IOException { WxChannelConfig config = this.getConfig(); String url = StringUtils.isNotEmpty(config.getAccessTokenUrl()) ? config.getAccessTokenUrl() : StringUtils.isNotEmpty(config.getApiHostUrl()) ? GET_ACCESS_TOKEN_URL.replace("https://api.weixin.qq.com", config.getApiHostUrl()) : GET_ACCESS_TOKEN_URL; url = String.format(url, config.getAppid(), config.getSecret()); Request request = new Request.Builder().url(url).get().build(); try (Response response = getRequestHttpClient().newCall(request).execute()) { return Objects.requireNonNull(response.body()).string(); } } @Override protected String doGetStableAccessTokenRequest(boolean forceRefresh) throws IOException { WxChannelConfig config = this.getConfig(); String url = StringUtils.isNotEmpty(config.getAccessTokenUrl()) ? config.getAccessTokenUrl() : StringUtils.isNotEmpty(config.getApiHostUrl()) ? GET_STABLE_ACCESS_TOKEN_URL.replace("https://api.weixin.qq.com", config.getApiHostUrl()) : GET_STABLE_ACCESS_TOKEN_URL; StableTokenParam requestParam = new StableTokenParam(); requestParam.setAppId(config.getAppid()); requestParam.setSecret(config.getSecret()); requestParam.setGrantType("client_credential"); requestParam.setForceRefresh(forceRefresh); String requestJson = JsonUtils.encode(requestParam); assert requestJson != null; RequestBody body = RequestBody.Companion.create(requestJson, MediaType.parse("application/json; charset=utf-8")); Request request = new Request.Builder().url(url).post(body).build(); try (Response response = getRequestHttpClient().newCall(request).execute()) { return Objects.requireNonNull(response.body()).string(); } } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false