mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-02-19 14:46:25 +08:00
🆕 #2059 【小程序】增加小程序交易组件部分接口
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopAddOrderResult implements Serializable {
|
||||
/**
|
||||
* 交易组件平台订单ID
|
||||
*/
|
||||
@SerializedName("order_id")
|
||||
private Long orderId;
|
||||
/**
|
||||
* 交易组件平台订单ID
|
||||
*/
|
||||
@SerializedName("out_order_id")
|
||||
private String outOrderId;
|
||||
/**
|
||||
* 拉起收银台的ticket
|
||||
*/
|
||||
@SerializedName("ticket")
|
||||
private String ticket;
|
||||
/**
|
||||
* ticket有效截止时间
|
||||
*/
|
||||
@SerializedName("ticket_expire_time")
|
||||
private String ticketExpireTime;
|
||||
/**
|
||||
* 订单最终价格(单位:分)
|
||||
*/
|
||||
@SerializedName("final_price")
|
||||
private Integer finalPrice;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description: 添加商品参数返回
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopAddSpuResult implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 2520459849240776617L;
|
||||
/**
|
||||
* 交易组件平台内部商品ID
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("product_id")
|
||||
private String productId;
|
||||
|
||||
/**
|
||||
* 商家自定义商品ID
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("out_product_id")
|
||||
private String outProductId;
|
||||
|
||||
/**
|
||||
* 创建时间,新建时返回
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("create_time")
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* 更新时间,修改时返回
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("update_time")
|
||||
private String updateTime;
|
||||
/**
|
||||
* sku数组
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("skus")
|
||||
private List<WxMaShopSkuResult> skus;
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopAddressInfo implements Serializable {
|
||||
/**
|
||||
* 收件人姓名
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("receiver_name")
|
||||
private String receiverName;
|
||||
/**
|
||||
* 详细收货地址信息
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("detailed_address")
|
||||
private String detailedAddress;
|
||||
/**
|
||||
* 收件人手机号码
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("tel_number")
|
||||
private String telNumber;
|
||||
/**
|
||||
* 国家
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("country")
|
||||
private String country;
|
||||
/**
|
||||
* 省份
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("province")
|
||||
private String province;
|
||||
/**
|
||||
* 城市
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("city")
|
||||
private String city;
|
||||
/**
|
||||
* 乡镇
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("town")
|
||||
private String town;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopDeliveryDetail implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 9074573142867543744L;
|
||||
|
||||
/**
|
||||
*
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("delivery_type")
|
||||
private Integer deliveryType;
|
||||
|
||||
// 以下字段仅作为返回数据展示填充
|
||||
|
||||
/**
|
||||
* 是否发货完成
|
||||
*/
|
||||
@SerializedName("finish_all_delivery")
|
||||
private Integer finishAllDelivery;
|
||||
|
||||
/**
|
||||
* 快递信息
|
||||
*/
|
||||
@SerializedName("delivery_list")
|
||||
private List<WxMaShopDeliveryItem> deliveryList;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopDeliveryItem implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -161617470937369136L;
|
||||
|
||||
/**
|
||||
* 快递公司ID,通过获取快递公司列表获取
|
||||
*/
|
||||
@SerializedName("delivery_id")
|
||||
private String deliveryId;
|
||||
|
||||
/**
|
||||
* 快递单号
|
||||
*/
|
||||
@SerializedName("waybill_id")
|
||||
private String waybillId;
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopGetSpuResult extends WxMaShopSpuInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -3859372286926181933L;
|
||||
/**
|
||||
* 商品审核信息
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("audit_info")
|
||||
private WxMaShopSpuAudit auditInfo;
|
||||
|
||||
/**
|
||||
* 商品线上状态
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 商品草稿状态
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("edit_status")
|
||||
private Integer editStatus;
|
||||
/**
|
||||
* 创建时间
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("create_time")
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("update_time")
|
||||
private String updateTime;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopOrderDetail implements Serializable {
|
||||
|
||||
/**
|
||||
* 下单商品信息
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("product_infos")
|
||||
private List<WxMaShopProductInfo> productInfos;
|
||||
|
||||
/**
|
||||
* 支付信息 (当作为返回结果,payorder时action_type!=6时存在)
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("pay_info")
|
||||
private WxMaShopPayInfo payInfo;
|
||||
|
||||
/**
|
||||
* 价格信息
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("price_info")
|
||||
private WxMaShopPriceInfo priceInfo;
|
||||
|
||||
// 以下字段仅作为结果返回展示字段
|
||||
/**
|
||||
* payorder时action_type=6时存在
|
||||
*/
|
||||
@SerializedName("multi_pay_info")
|
||||
private List<WxMaShopPayInfo> multiPayInfo;
|
||||
|
||||
/**
|
||||
* 必须调过发货接口才会存在这个字段
|
||||
*/
|
||||
@SerializedName("delivery_detail")
|
||||
private WxMaShopDeliveryDetail deliveryDetail;
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WxMaShopOrderInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -159624260640727372L;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("create_time")
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* 商家自定义订单ID
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("out_order_id")
|
||||
private String outOrderId;
|
||||
|
||||
/**
|
||||
* 用户的openid
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("openid")
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* 商家小程序该订单的页面path,用于微信侧订单中心跳转
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("path")
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 商家小程序该订单的用户id
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("out_user_id")
|
||||
private String outUserId;
|
||||
|
||||
/**
|
||||
* 订单详情
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("order_detail")
|
||||
private WxMaShopOrderDetail orderDetail;
|
||||
|
||||
/**
|
||||
* 快递信息
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("delivery_detail")
|
||||
private WxMaShopDeliveryDetail deliveryDetail;
|
||||
|
||||
/**
|
||||
* 地址信息
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("address_info")
|
||||
private WxMaShopAddressInfo addressInfo;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopOrderResult implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -2665426592693969921L;
|
||||
|
||||
/**
|
||||
* 交易组件平台订单ID
|
||||
*/
|
||||
@SerializedName("order_id")
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 商家自定义订单ID
|
||||
*/
|
||||
@SerializedName("out_order_id")
|
||||
private String outOrderId;
|
||||
|
||||
/**
|
||||
* 订单状态
|
||||
*/
|
||||
@SerializedName("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 商家小程序该订单的页面path,用于微信侧订单中心跳转
|
||||
*/
|
||||
@SerializedName("path")
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 商家小程序该订单的用户id
|
||||
*/
|
||||
@SerializedName("out_user_id")
|
||||
private String outUserId;
|
||||
|
||||
/**
|
||||
* 订单详情
|
||||
*/
|
||||
@SerializedName("order_detail")
|
||||
private WxMaShopOrderDetail orderDetail;
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopPayInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 687488209024968647L;
|
||||
|
||||
/**
|
||||
* 支付方式(目前只有"微信支付")
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("pay_method")
|
||||
private String payMethod;
|
||||
|
||||
/**
|
||||
* 预支付ID
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("prepay_id")
|
||||
private String prepayId;
|
||||
|
||||
/**
|
||||
* 预付款时间(拿到prepay_id的时间)
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("prepay_time")
|
||||
private String prepayTime;
|
||||
|
||||
// 以下字段仅作为返回数据
|
||||
/**
|
||||
* 支付ID,调过同步订单支付结果且action_type=1时才存在
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("transaction_id")
|
||||
private String transactionId;
|
||||
|
||||
/**
|
||||
* 付款时间(拿到transaction_id的时间)
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("pay_time")
|
||||
private String payTime;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopPriceInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1588840927992523263L;
|
||||
/**
|
||||
* 该订单最终的金额(单位:分)
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("order_price")
|
||||
private Integer orderPrice;
|
||||
/**
|
||||
* 运费(单位:分)
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("freight")
|
||||
private Integer freight;
|
||||
/**
|
||||
* 优惠金额(单位:分)
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("discounted_price")
|
||||
private Integer discountedPrice;
|
||||
/**
|
||||
* 附加金额(单位:分)
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("additional_price")
|
||||
private Integer additionalPrice;
|
||||
/**
|
||||
* 附加金额备注
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("additional_remarks")
|
||||
private String additionalRemarks;
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopProductInfo {
|
||||
/**
|
||||
* 商家自定义商品ID
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("out_product_id")
|
||||
private String outProductId;
|
||||
/**
|
||||
* 商家自定义商品skuID,可填空字符串(如果这个product_id下没有sku)
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("out_sku_id")
|
||||
private String outSkuId;
|
||||
/**
|
||||
* 购买的数量
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("product_cnt")
|
||||
private Integer productCnt;
|
||||
/**
|
||||
* 生成订单时商品的售卖价(单位:分),可以跟上传商品接口的价格不一致
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("sale_price")
|
||||
private Integer salePrice;
|
||||
/**
|
||||
* 生成订单时商品的头图
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("head_img")
|
||||
private String headImg;
|
||||
/**
|
||||
* 生成订单时商品的标题
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("title")
|
||||
private String title;
|
||||
/**
|
||||
* 绑定的小程序商品路径
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("path")
|
||||
private String path;
|
||||
|
||||
// 以下字段仅作为订单信息返回字段
|
||||
/**
|
||||
* 交易组件平台内部商品ID
|
||||
*/
|
||||
@SerializedName("product_id")
|
||||
private Integer productId;
|
||||
|
||||
/**
|
||||
* 交易组件平台内部skuID,可填0(如果这个product_id下没有sku)
|
||||
*/
|
||||
@SerializedName("sku_id")
|
||||
private Integer skuId;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* sku对象
|
||||
* </pre>
|
||||
*
|
||||
* @author <a href="https://github.com/borisbao">boris</a>
|
||||
* @since 2021-03-22
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class WxMaShopSkuAttribute implements Serializable {
|
||||
|
||||
|
||||
private static final long serialVersionUID = -3617077838017818865L;
|
||||
|
||||
|
||||
/**
|
||||
* 销售属性key(自定义)
|
||||
* <pre>
|
||||
* 是否必填: 否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("attr_key")
|
||||
private String attrKey;
|
||||
|
||||
@SerializedName("attr_value")
|
||||
private String attrValue;
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* sku对象
|
||||
* </pre>
|
||||
*
|
||||
* @author <a href="https://github.com/borisbao">boris</a>
|
||||
* @since 2021-03-22
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class WxMaShopSkuInfo implements Serializable {
|
||||
|
||||
|
||||
private static final long serialVersionUID = -3617077838017818865L;
|
||||
|
||||
/**
|
||||
* 商家自定义商品ID
|
||||
* <pre>
|
||||
* 是否必填: 是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("out_product_id")
|
||||
private String outProductId;
|
||||
|
||||
/**
|
||||
* 商家自定义商品ID
|
||||
* <pre>
|
||||
* 是否必填: 是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("out_sku_id")
|
||||
private String outSkuId;
|
||||
|
||||
|
||||
/**
|
||||
* sku小图
|
||||
* <pre>
|
||||
* 是否必填: 是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("thumb_img")
|
||||
private String thumbImg;
|
||||
|
||||
/**
|
||||
* 售卖价格,以分为单位
|
||||
* <pre>
|
||||
* 是否必填: 是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("sale_price")
|
||||
private Integer salePrice;
|
||||
|
||||
/**
|
||||
* 售卖价格,以分为单位
|
||||
* <pre>
|
||||
* 是否必填: 是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("market_price")
|
||||
private Integer marketPrice;
|
||||
|
||||
/**
|
||||
* 库存
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("stock_num")
|
||||
private Integer stockNum;
|
||||
|
||||
|
||||
/**
|
||||
* 条形码
|
||||
* <pre>
|
||||
* 是否必填: 否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("barcode")
|
||||
private String barcode;
|
||||
|
||||
|
||||
/**
|
||||
* 商品编码
|
||||
* <pre>
|
||||
* 是否必填: 否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("sku_code")
|
||||
private String skuCode;
|
||||
|
||||
/**
|
||||
* 销售属性
|
||||
* <pre>
|
||||
* 是否必填: 是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("sku_attrs")
|
||||
private List<WxMaShopSkuAttribute> skuAttributeList;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopSkuResult implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 7127892618805299305L;
|
||||
/**
|
||||
* 交易组件平台自定义skuID
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("sku_id")
|
||||
private String skuId;
|
||||
|
||||
/**
|
||||
* 商家自定义skuID
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("out_sku_id")
|
||||
private String outSkuId;
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopSkuWithoutAuditInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3354108922805323888L;
|
||||
|
||||
/**
|
||||
* 商家自定义skuID
|
||||
* <pre>
|
||||
* 是否必填: 是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("out_sku_id")
|
||||
private String outSkuId;
|
||||
|
||||
/**
|
||||
* 售卖价格,以分为单位
|
||||
* <pre>
|
||||
* 是否必填: 是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("sale_price")
|
||||
private Integer salePrice;
|
||||
|
||||
/**
|
||||
* 售卖价格,以分为单位
|
||||
* <pre>
|
||||
* 是否必填: 是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("market_price")
|
||||
private Integer marketPrice;
|
||||
|
||||
/**
|
||||
* 库存
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("stock_num")
|
||||
private Integer stockNum;
|
||||
|
||||
|
||||
/**
|
||||
* 条形码
|
||||
* <pre>
|
||||
* 是否必填: 否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("barcode")
|
||||
private String barcode;
|
||||
|
||||
|
||||
/**
|
||||
* 商品编码
|
||||
* <pre>
|
||||
* 是否必填: 否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("sku_code")
|
||||
private String skuCode;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopSpuAudit implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -3793445161382782265L;
|
||||
/**
|
||||
* 上一次审核时间, yyyy-MM-dd HH:mm:ss
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("audit_time")
|
||||
private String auditTime;
|
||||
|
||||
/**
|
||||
* 拒绝理由
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("reject_reason")
|
||||
private String rejectReason;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 交易组件-spu商品详情图文
|
||||
* </pre>
|
||||
* @author <a href="https://github.com/borisbao">boris</a>
|
||||
* @since 2021-03-22
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class WxMaShopSpuDescInfo {
|
||||
|
||||
/**
|
||||
* 商品详情图文-描述
|
||||
* <pre>
|
||||
* 是否必填: 否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("desc")
|
||||
private String desc;
|
||||
|
||||
/**
|
||||
* 商品详情图片
|
||||
* <pre>
|
||||
* 是否必填: 否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("imgs")
|
||||
private List<String> imgList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WxMaShopSpuInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 7237829277693177420L;
|
||||
|
||||
/**
|
||||
* 交易组件平台内部商品ID,修改时与out_product_id二选一
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("product_id")
|
||||
private String productId;
|
||||
|
||||
/**
|
||||
* 商家自定义商品ID,新建必填,修改时与product_id二选一
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("out_product_id")
|
||||
private String outProductId;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("title")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 绑定的小程序商品路径
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("path")
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 主图,多张,列表
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("head_img")
|
||||
private List<String> headImg;
|
||||
|
||||
/**
|
||||
* 商品资质图片
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("qualification_pics")
|
||||
private List<String> qualificationPics;
|
||||
|
||||
/**
|
||||
* 商品详情
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("desc_info")
|
||||
private WxMaShopSpuDescInfo descInfo;
|
||||
|
||||
/**
|
||||
* 第三级类目ID
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("third_cat_id")
|
||||
private Integer thirdCatId;
|
||||
|
||||
/**
|
||||
* 品牌id
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("brand_id")
|
||||
private Integer brandId;
|
||||
|
||||
/**
|
||||
* sku数组
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("skus")
|
||||
private List<WxMaShopSkuInfo> skus;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopSpuWithoutAuditInfo {
|
||||
|
||||
/**
|
||||
* 交易组件平台内部商品ID,修改时与out_product_id二选一
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("product_id")
|
||||
private String productId;
|
||||
|
||||
/**
|
||||
* 商家自定义商品ID,新建必填,修改时与product_id二选一
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("out_product_id")
|
||||
private String outProductId;
|
||||
|
||||
/**
|
||||
* 绑定的小程序商品路径
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("path")
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* sku数组
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("skus")
|
||||
private List<WxMaShopSkuWithoutAuditInfo> skus;
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop.request;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopOrderPayRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -954667936670521398L;
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("order_id")
|
||||
private Long orderId;
|
||||
/**
|
||||
* 商家自定义订单ID,与 order_id 二选一
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("out_order_id")
|
||||
private String outOrderId;
|
||||
/**
|
||||
* 用户的openid
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("openid")
|
||||
private String openid;
|
||||
/**
|
||||
* 类型,默认1:支付成功,2:支付失败,3:用户取消,4:超时未支付;5:商家取消
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("action_type")
|
||||
private Integer actionType;
|
||||
/**
|
||||
* 其他具体原因
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("action_remark")
|
||||
private String actionRemark;
|
||||
/**
|
||||
* 支付订单号,action_type=1时必填
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("transaction_id")
|
||||
private String transactionId;
|
||||
/**
|
||||
* 支付完成时间,action_type=1时必填
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("pay_time")
|
||||
private String payTime;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop.request;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description: spu分页参数
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopSpuPageRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -4927300283039328661L;
|
||||
|
||||
/**
|
||||
* 商品状态
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 开始创建时间
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("start_create_time")
|
||||
private String startCreateTime;
|
||||
|
||||
/**
|
||||
* 结束创建时间
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("end_create_time")
|
||||
private String endCreateTime;
|
||||
|
||||
/**
|
||||
* 开始更新时间
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("start_update_time")
|
||||
private String startUpdateTime;
|
||||
|
||||
/**
|
||||
* 结束更新时间
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("end_update_time")
|
||||
private String endUpdateTime;
|
||||
|
||||
/**
|
||||
* 默认0:获取线上数据, 1:获取草稿数据
|
||||
* <pre>
|
||||
* 是否必填:否
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("need_edit_spu")
|
||||
private Integer needEditSpu;
|
||||
|
||||
/**
|
||||
* 页号
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("page")
|
||||
private Integer page;
|
||||
|
||||
/**
|
||||
* 页面大小
|
||||
* <pre>
|
||||
* 是否必填:是
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("page_size")
|
||||
private Integer pageSize;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop.response;
|
||||
|
||||
import cn.binarywang.wx.miniapp.bean.shop.WxMaShopAddOrderResult;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopAddOrderResponse extends WxMaShopBaseResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -8923439859095040010L;
|
||||
|
||||
@SerializedName("data")
|
||||
private WxMaShopAddOrderResult date;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop.response;
|
||||
|
||||
import cn.binarywang.wx.miniapp.bean.shop.WxMaShopAddSpuResult;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopAddSpuResponse extends WxMaShopBaseResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 4370719678135233135L;
|
||||
|
||||
|
||||
@SerializedName("data")
|
||||
private WxMaShopAddSpuResult data;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop.response;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopBaseResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -4647161641538864187L;
|
||||
|
||||
/**
|
||||
* 错误码
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("errcode")
|
||||
private Integer errcode;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("errmsg")
|
||||
private String errmsg;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop.response;
|
||||
|
||||
import cn.binarywang.wx.miniapp.bean.shop.WxMaShopOrderResult;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopGetOrderResponse extends WxMaShopBaseResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -5036075669789800464L;
|
||||
|
||||
@SerializedName("order")
|
||||
private WxMaShopOrderResult order;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop.response;
|
||||
|
||||
import cn.binarywang.wx.miniapp.bean.shop.WxMaShopGetSpuResult;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopGetSpuListResponse extends WxMaShopBaseResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1423766388278762123L;
|
||||
|
||||
/**
|
||||
* 总数
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("total_num")
|
||||
private Integer totalNum;
|
||||
|
||||
/**
|
||||
* spu信息
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("spus")
|
||||
private List<WxMaShopGetSpuResult> spus;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package cn.binarywang.wx.miniapp.bean.shop.response;
|
||||
|
||||
import cn.binarywang.wx.miniapp.bean.shop.WxMaShopGetSpuResult;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author leiin
|
||||
* @date 2021/3/23
|
||||
* @description:
|
||||
*/
|
||||
@Data
|
||||
public class WxMaShopGetSpuResponse extends WxMaShopBaseResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -3781992184787152637L;
|
||||
|
||||
/**
|
||||
* spu信息
|
||||
* <pre>
|
||||
* 是否必填:
|
||||
* </pre>
|
||||
*/
|
||||
@SerializedName("spu")
|
||||
private WxMaShopGetSpuResult spu;
|
||||
}
|
||||
Reference in New Issue
Block a user