-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
feat(channel): 新增售后保障单模块 6 个 API 支持 #4035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| package me.chanjar.weixin.channel.bean.after; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonInclude; | ||
| import com.fasterxml.jackson.annotation.JsonInclude.Include; | ||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import lombok.Data; | ||
| import lombok.EqualsAndHashCode; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| /** | ||
| * 商家协商保障单请求参数. | ||
| */ | ||
| @Data | ||
| @NoArgsConstructor | ||
| @EqualsAndHashCode(callSuper = true) | ||
| @JsonInclude(Include.NON_NULL) | ||
| public class GuaranteeModifyRequest extends GuaranteeOrderIdParam { | ||
|
|
||
| private static final long serialVersionUID = -7142671437465099549L; | ||
|
|
||
| /** 协商金额(单位:分). */ | ||
| @JsonProperty("amount") | ||
| private Integer amount; | ||
|
|
||
| /** 协商描述. */ | ||
| @JsonProperty("desc") | ||
| private String desc; | ||
|
|
||
| public GuaranteeModifyRequest(String guaranteeOrderId, Integer amount, String desc) { | ||
| super(guaranteeOrderId); | ||
| this.amount = amount; | ||
| this.desc = desc; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| package me.chanjar.weixin.channel.bean.after; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonInclude; | ||
| import com.fasterxml.jackson.annotation.JsonInclude.Include; | ||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import java.io.Serializable; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| /** | ||
| * 保障单id参数. | ||
| */ | ||
| @Data | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| @JsonInclude(Include.NON_NULL) | ||
| public class GuaranteeOrderIdParam implements Serializable { | ||
|
|
||
| private static final long serialVersionUID = 773665483877442194L; | ||
|
|
||
| /** 保障单号. */ | ||
| @JsonProperty("guarantee_order_id") | ||
| private String guaranteeOrderId; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| package me.chanjar.weixin.channel.bean.after; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import java.io.Serializable; | ||
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| /** | ||
| * 保障单信息. | ||
| */ | ||
| @Data | ||
| @NoArgsConstructor | ||
| public class GuaranteeOrderInfo implements Serializable { | ||
|
|
||
| private static final long serialVersionUID = -2590210285444450666L; | ||
|
|
||
| /** 保障单号. */ | ||
| @JsonProperty("guarantee_order_id") | ||
| private String guaranteeOrderId; | ||
|
|
||
| /** 订单号. */ | ||
| @JsonProperty("order_id") | ||
| private String orderId; | ||
|
|
||
| /** 保障单状态. */ | ||
| @JsonProperty("status") | ||
| private Integer status; | ||
|
|
||
| /** 保障单类型. */ | ||
| @JsonProperty("type") | ||
| private Integer type; | ||
|
|
||
| /** 申请原因. */ | ||
| @JsonProperty("reason") | ||
| private String reason; | ||
|
|
||
| /** 创建时间. */ | ||
| @JsonProperty("create_time") | ||
| private Long createTime; | ||
|
|
||
| /** 更新时间. */ | ||
| @JsonProperty("update_time") | ||
| private Long updateTime; | ||
|
|
||
| /** 买家openid. */ | ||
| @JsonProperty("openid") | ||
| private String openid; | ||
|
|
||
| /** 买家unionid. */ | ||
| @JsonProperty("unionid") | ||
| private String unionid; | ||
|
|
||
| /** 商品信息. */ | ||
| @JsonProperty("product_info") | ||
| private AfterSaleProductInfo productInfo; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| package me.chanjar.weixin.channel.bean.after; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import lombok.Data; | ||
| import lombok.EqualsAndHashCode; | ||
| import lombok.NoArgsConstructor; | ||
| import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; | ||
|
|
||
| /** | ||
| * 保障单详情响应. | ||
| */ | ||
| @Data | ||
| @NoArgsConstructor | ||
| @EqualsAndHashCode(callSuper = true) | ||
| public class GuaranteeOrderInfoResponse extends WxChannelBaseResponse { | ||
|
|
||
| private static final long serialVersionUID = 7532731716811792648L; | ||
|
|
||
| /** 保障单详情. */ | ||
| @JsonProperty("guarantee_order") | ||
| private GuaranteeOrderInfo guaranteeOrder; | ||
|
Comment on lines
+20
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| package me.chanjar.weixin.channel.bean.after; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonInclude; | ||
| import com.fasterxml.jackson.annotation.JsonInclude.Include; | ||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import java.io.Serializable; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| /** | ||
| * 保障单列表请求参数. | ||
| */ | ||
| @Data | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| @JsonInclude(Include.NON_NULL) | ||
| public class GuaranteeOrderListParam implements Serializable { | ||
|
|
||
| private static final long serialVersionUID = -8822052330671632588L; | ||
|
|
||
| /** 订单创建启始时间 unix时间戳. */ | ||
| @JsonProperty("begin_create_time") | ||
| private Long beginCreateTime; | ||
|
|
||
| /** 订单创建结束时间,end_create_time减去begin_create_time不得大于24小时 unix时间戳. */ | ||
| @JsonProperty("end_create_time") | ||
| private Long endCreateTime; | ||
|
|
||
| /** 保障单更新起始时间. */ | ||
| @JsonProperty("begin_update_time") | ||
| private Long beginUpdateTime; | ||
|
|
||
| /** 保障单更新结束时间,end_update_time减去begin_update_time不得大于24小时. */ | ||
| @JsonProperty("end_update_time") | ||
| private Long endUpdateTime; | ||
|
|
||
| /** 翻页参数,从第二页开始传,来源于上一页的返回值. */ | ||
| @JsonProperty("next_key") | ||
| private String nextKey; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package me.chanjar.weixin.channel.bean.after; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import java.util.List; | ||
| import lombok.Data; | ||
| import lombok.EqualsAndHashCode; | ||
| import lombok.NoArgsConstructor; | ||
| import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; | ||
|
|
||
| /** | ||
| * 保障单列表响应. | ||
| */ | ||
| @Data | ||
| @NoArgsConstructor | ||
| @EqualsAndHashCode(callSuper = true) | ||
| public class GuaranteeOrderListResponse extends WxChannelBaseResponse { | ||
|
|
||
| private static final long serialVersionUID = -6136894046806166855L; | ||
|
|
||
| /** 保障单号列表. */ | ||
| @JsonProperty("guarantee_order_id_list") | ||
| private List<String> guaranteeOrderIdList; | ||
|
Comment on lines
+20
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The search-guarantee endpoint returns a Useful? React with 👍 / 👎. |
||
|
|
||
| /** 翻页参数. */ | ||
| @JsonProperty("next_key") | ||
| private String nextKey; | ||
|
|
||
| /** 是否还有数据. */ | ||
| @JsonProperty("has_more") | ||
| private Boolean hasMore; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| package me.chanjar.weixin.channel.bean.after; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonInclude; | ||
| import com.fasterxml.jackson.annotation.JsonInclude.Include; | ||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import java.util.List; | ||
| import lombok.Data; | ||
| import lombok.EqualsAndHashCode; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| /** | ||
| * 商家举证保障单请求参数. | ||
| */ | ||
| @Data | ||
| @NoArgsConstructor | ||
| @EqualsAndHashCode(callSuper = true) | ||
| @JsonInclude(Include.NON_NULL) | ||
| public class GuaranteeProofRequest extends GuaranteeOrderIdParam { | ||
|
|
||
| private static final long serialVersionUID = -4521077589624343197L; | ||
|
|
||
| /** 举证图片media_id列表. */ | ||
| @JsonProperty("media_ids") | ||
| private List<String> mediaIds; | ||
|
|
||
| /** 举证描述. */ | ||
| @JsonProperty("desc") | ||
| private String desc; | ||
|
Comment on lines
+22
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The proof endpoint expects evidence as a Useful? React with 👍 / 👎. |
||
|
|
||
| public GuaranteeProofRequest(String guaranteeOrderId, List<String> mediaIds, String desc) { | ||
| super(guaranteeOrderId); | ||
| this.mediaIds = mediaIds; | ||
| this.desc = desc; | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| package me.chanjar.weixin.channel.bean.after; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonInclude; | ||
| import com.fasterxml.jackson.annotation.JsonInclude.Include; | ||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import lombok.Data; | ||
| import lombok.EqualsAndHashCode; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| /** | ||
| * 商家拒绝保障单请求参数. | ||
| */ | ||
| @Data | ||
| @NoArgsConstructor | ||
| @EqualsAndHashCode(callSuper = true) | ||
| @JsonInclude(Include.NON_NULL) | ||
| public class GuaranteeRefuseRequest extends GuaranteeOrderIdParam { | ||
|
|
||
| private static final long serialVersionUID = 6632720364917208597L; | ||
|
|
||
| /** 拒绝原因. */ | ||
| @JsonProperty("reason") | ||
| private String reason; | ||
|
|
||
| public GuaranteeRefuseRequest(String guaranteeOrderId, String reason) { | ||
| super(guaranteeOrderId); | ||
| this.reason = reason; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The guarantee APIs expect the request field to be
guarantee_id, notguarantee_order_id; because all detail/action DTOs inherit this field, calls to get/accept/modify/proof/refuse a guarantee send the id under the wrong key and are treated as missing the required guarantee id even when the caller passes a valid value.Useful? React with 👍 / 👎.