瀏覽代碼

erp 接口提交

xgb 1 月之前
父節點
當前提交
65f9cd0f8f
共有 20 個文件被更改,包括 6340 次插入0 次删除
  1. 16 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/Client.java
  2. 48 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/Pager.java
  3. 18 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/WdtErpException.java
  4. 35 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/WdtTradeAPI.java
  5. 1378 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/PushSelf2Request.java
  6. 54 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/PushSelf2Response.java
  7. 967 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/PushSelfRequest.java
  8. 34 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/PushSelfResponse.java
  9. 393 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/QuerySelfOrderDetailRequest.java
  10. 1439 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/QuerySelfOrderDetailResponse.java
  11. 536 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/RawRefundUploadRequest.java
  12. 60 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/RawRefundUploadResponse.java
  13. 74 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/StockSearch2Request.java
  14. 700 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/StockSearch2Response.java
  15. 17 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/impl/Api.java
  16. 55 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/impl/ApiFactory.java
  17. 342 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/impl/DefaultClient.java
  18. 50 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/impl/ExApiFactory.java
  19. 24 0
      fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/utils/HandUtils.java
  20. 100 0
      fs-service/src/main/java/com/fs/erp/service/impl/WdtTwoErpGoodsServiceImpl.java

+ 16 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/Client.java

@@ -0,0 +1,16 @@
+package com.fs.erp.dto.sdk.wangdianTwo;
+
+import java.io.IOException;
+import java.lang.reflect.Type;
+
+public interface Client
+{
+	/**
+	 * 设置超时时间, 毫秒
+	 *
+	 * @return
+	 */
+	void setTimeout(int ms);
+
+	Object execute(String method, Object[] args, Pager pager, Type returnType) throws WdtErpException, IOException;
+}

+ 48 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/Pager.java

@@ -0,0 +1,48 @@
+package com.fs.erp.dto.sdk.wangdianTwo;
+
+public class Pager
+{
+	// 分页大小
+	private int pageSize = 0;
+	// 页码
+	private int pageNo = 0;
+	// 是否返回总页数
+	private boolean calcTotal = false;
+
+	public Pager(int pageSize, int pageNo, boolean calcTotal)
+	{
+		this.pageSize = pageSize;
+		this.pageNo = pageNo;
+		this.calcTotal = calcTotal;
+	}
+
+	public int getPageSize()
+	{
+		return pageSize;
+	}
+
+	public void setPageSize(int pageSize)
+	{
+		this.pageSize = pageSize;
+	}
+
+	public int getPageNo()
+	{
+		return pageNo;
+	}
+
+	public void setPageNo(int pageNo)
+	{
+		this.pageNo = pageNo;
+	}
+
+	public boolean isCalcTotal()
+	{
+		return calcTotal;
+	}
+
+	public void setCalcTotal(boolean calcTotal)
+	{
+		this.calcTotal = calcTotal;
+	}
+}

+ 18 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/WdtErpException.java

@@ -0,0 +1,18 @@
+package com.fs.erp.dto.sdk.wangdianTwo;
+
+@SuppressWarnings("serial")
+public class WdtErpException extends Exception
+{
+	private int code;
+
+	public WdtErpException(int code, String message)
+	{
+		super(message);
+		this.code = code;
+	}
+
+	public int getCode()
+	{
+		return code;
+	}
+}

+ 35 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/WdtTradeAPI.java

@@ -0,0 +1,35 @@
+package com.fs.erp.dto.sdk.wangdianTwo.api;
+
+
+import com.fs.erp.dto.sdk.wangdianTwo.api.dto.*;
+import com.fs.erp.dto.sdk.wangdianTwo.impl.Api;
+import com.fs.erp.dto.sdk.wangdianTwo.Pager;
+
+import java.util.List;
+public interface WdtTradeAPI
+{
+	// blyjkcy3
+	// 原接口 trade_push.php  ??? ??
+	@Api(value = "sales.RawTrade.pushSelf2", paged = false)
+	PushSelfResponse pushSelf(String shopNo, List<PushSelfRequest.RawTrade> rawTradeList,
+							  List<PushSelfRequest.RawTradeOrder> rawTradeOrderList, List<PushSelfRequest.RawTradeDiscount> rawTradeDiscountList);
+
+
+	// stock_query.php
+	@Api(value = "wms.StockSpec.search2", paged = true)
+	StockSearch2Response search2(StockSearch2Request request, Pager pager);
+
+	// sales_trade_query.php
+	@Api(value = "sales.TradeQuery.querySelfOrderWithDetail", paged = true)
+	QuerySelfOrderDetailResponse querySelfOrderWithDetail(QuerySelfOrderDetailRequest request, Pager pager);
+
+    // sales_refund_push.php
+	@Api(value = "aftersales.refund.RawRefund.upload2", paged = true)
+	StockSearch2Response rawRefundUpload(StockSearch2Request request, Pager pager);
+
+
+
+
+
+
+}

+ 1378 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/PushSelf2Request.java

@@ -0,0 +1,1378 @@
+package com.fs.erp.dto.sdk.wangdianTwo.api.dto;
+
+import com.google.gson.annotations.SerializedName;
+import java.math.BigDecimal;
+
+/**
+ * 订单同步接口请求参数实体类
+ */
+public class PushSelf2Request {
+
+    /**
+     * 店铺编号
+     */
+    @SerializedName("shop_no")
+    private String shopNo;
+
+
+
+    // Getters and Setters
+    public String getShopNo() {
+        return shopNo;
+    }
+
+    public void setShopNo(String shopNo) {
+        this.shopNo = shopNo;
+    }
+
+
+    /**
+     * 原始单信息实体类
+     */
+    public static class RawTrade {
+
+        /**
+         * 原始单号(商城、官网等平台的订单编号)
+         */
+        @SerializedName("tid")
+        private String tid;
+
+        /**
+         * 处理状态
+         * 10: 待递交, 20: 已递交,30: 部分发货,40: 已发货,60: 已完成,70: 已取消
+         */
+        @SerializedName("process_status")
+        private Integer processStatus;
+
+        /**
+         * 平台状态
+         * 10未确认 20待尾款 30待发货 40部分发货 50已发货 60已签收 70已完成 80已退款 90已关闭
+         */
+        @SerializedName("trade_status")
+        private Integer tradeStatus;
+
+        /**
+         * 退款状态
+         * 0无退款 1申请退款 2部分退款 3全部退款
+         */
+        @SerializedName("refund_status")
+        private Integer refundStatus;
+
+        /**
+         * 付款状态
+         * 0未付款 1部分付款 2已付款
+         */
+        @SerializedName("pay_status")
+        private Integer payStatus;
+
+        /**
+         * 子订单个数
+         */
+        @SerializedName("order_count")
+        private Integer orderCount;
+
+        /**
+         * 货品总数量
+         */
+        @SerializedName("goods_count")
+        private BigDecimal goodsCount;
+
+        /**
+         * 支付方式
+         * 1在线转帐 2现金,3银行转账,4邮局汇款 5预付款 6刷卡 7支付宝 8微信支付
+         */
+        @SerializedName("pay_method")
+        private Integer payMethod;
+
+        /**
+         * 下单时间
+         */
+        @SerializedName("trade_time")
+        private String tradeTime;
+
+        /**
+         * 支付时间
+         */
+        @SerializedName("pay_time")
+        private String payTime;
+
+        /**
+         * 交易结束时间
+         */
+        @SerializedName("end_time")
+        private String endTime;
+
+        /**
+         * 买家昵称/客户网名
+         */
+        @SerializedName("buyer_nick")
+        private String buyerNick;
+
+        /**
+         * 买家备注
+         */
+        @SerializedName("buyer_message")
+        private String buyerMessage;
+
+        /**
+         * 买家邮箱
+         */
+        @SerializedName("buyer_email")
+        private String buyerEmail;
+
+        /**
+         * 买家地区
+         */
+        @SerializedName("buyer_area")
+        private String buyerArea;
+
+        /**
+         * 收件人姓名
+         */
+        @SerializedName("receiver_name")
+        private String receiverName;
+
+        /**
+         * 省市区(空格分隔,示例:北京 北京市 朝阳区)
+         */
+        @SerializedName("receiver_area")
+        private String receiverArea;
+
+        /**
+         * 地址(不包含省市区,示例:xx街道xx小区xx号楼101)
+         */
+        @SerializedName("receiver_address")
+        private String receiverAddress;
+
+        /**
+         * 收件人邮编
+         */
+        @SerializedName("receiver_zip")
+        private String receiverZip;
+
+        /**
+         * 收件人手机号(11位手机号码)
+         */
+        @SerializedName("receiver_mobile")
+        private String receiverMobile;
+
+        /**
+         * 收件人固话号(11位固话号码)
+         */
+        @SerializedName("receiver_telno")
+        private String receiverTelno;
+
+        /**
+         * 邮费
+         */
+        @SerializedName("post_amount")
+        private BigDecimal postAmount;
+
+        /**
+         * 其他费用
+         */
+        @SerializedName("other_amount")
+        private BigDecimal otherAmount;
+
+        /**
+         * 优惠金额
+         */
+        @SerializedName("discount")
+        private BigDecimal discount;
+
+        /**
+         * 应收金额(售前退款会变化)
+         */
+        @SerializedName("receivable")
+        private BigDecimal receivable;
+
+        /**
+         * 平台费用
+         */
+        @SerializedName("platform_cost")
+        private BigDecimal platformCost;
+
+        /**
+         * 发票类别
+         * 0:不需要 1:普通发票 2:增值税普通发票 3:增值税专用发票
+         */
+        @SerializedName("invoice_type")
+        private Integer invoiceType;
+
+        /**
+         * 发票抬头
+         */
+        @SerializedName("invoice_title")
+        private String invoiceTitle;
+
+        /**
+         * 发票内容
+         * 格式:纳税人识别号:*******;地址:*******;开户银行:*******;银行账号:******;联系电话:*****,电子邮箱*****
+         */
+        @SerializedName("invoice_content")
+        private String invoiceContent;
+
+        /**
+         * 物流类别
+         */
+        @SerializedName("logistics_type")
+        private Integer logisticsType;
+
+        /**
+         * 物流编号(系统物流编号)
+         */
+        @SerializedName("cust_data")
+        private String custData;
+
+        /**
+         * 发货条件
+         * 1款到发货 2货到付款(包含部分货到付款) 3分期付款
+         */
+        @SerializedName("delivery_term")
+        private Integer deliveryTerm;
+
+        /**
+         * 平台支付订单ID
+         */
+        @SerializedName("pay_id")
+        private String payId;
+
+        /**
+         * 客服备注
+         */
+        @SerializedName("remark")
+        private String remark;
+
+        /**
+         * 客服备注标记
+         * 标旗(1 红、2 黄、3 绿、4 蓝、5 紫 无则填0)
+         */
+        @SerializedName("remark_flag")
+        private Integer remarkFlag;
+
+        /**
+         * 货到付款金额(若delivery_term=2,则为应付金额,否则为0)
+         */
+        @SerializedName("cod_amount")
+        private BigDecimal codAmount;
+
+        /**
+         * 是否是自流转
+         * true自流转,false 非自流转
+         */
+        @SerializedName("is_auto_wms")
+        private Boolean isAutoWms;
+
+        /**
+         * 仓库编号(仅自流转订单填写该仓库编号, 非自流转订单传入空字符串即可)
+         */
+        @SerializedName("warehouse_no")
+        private String warehouseNo;
+
+        /**
+         * 买家支付宝帐号
+         */
+        @SerializedName("pay_account")
+        private String payAccount;
+
+        /**
+         * 买家要求的送货日期
+         */
+        @SerializedName("to_deliver_time")
+        private String toDeliverTime;
+
+        /**
+         * 已收金额(已从平台收款的金额)
+         */
+        @SerializedName("received")
+        private BigDecimal received;
+
+        /**
+         * 淘宝新增,物流到货时效,单位小时
+         */
+        @SerializedName("consign_interval")
+        private Integer consignInterval;
+
+        /**
+         * 已付金额
+         */
+        @SerializedName("paid")
+        private BigDecimal paid;
+
+        /**
+         * 是否能合并订单
+         * 0:默认 3:不允许合并
+         */
+        @SerializedName("is_sealed")
+        private Byte isSealed;
+
+        /**
+         * 分销商名称
+         */
+        @SerializedName("fenxiao_nick")
+        private String fenxiaoNick;
+
+        /**
+         * 证件类型
+         * 0:无 1:身份证 2:军官证 3:护照
+         */
+        @SerializedName("id_card_type")
+        private Integer idCardType;
+
+        /**
+         * 证件号
+         */
+        @SerializedName("id_card")
+        private String idCard;
+
+        /**
+         * 省份id
+         */
+        @SerializedName("receiver_province_no")
+        private Integer receiverProvinceNo;
+
+        /**
+         * 市id
+         */
+        @SerializedName("receiver_city_no")
+        private Integer receiverCityNo;
+
+        /**
+         * 区id
+         */
+        @SerializedName("receiver_district_no")
+        private Integer receiverDistrictNo;
+
+        // Getters and Setters
+        public String getTid() {
+            return tid;
+        }
+
+        public void setTid(String tid) {
+            this.tid = tid;
+        }
+
+        public Integer getProcessStatus() {
+            return processStatus;
+        }
+
+        public void setProcessStatus(Integer processStatus) {
+            this.processStatus = processStatus;
+        }
+
+        public Integer getTradeStatus() {
+            return tradeStatus;
+        }
+
+        public void setTradeStatus(Integer tradeStatus) {
+            this.tradeStatus = tradeStatus;
+        }
+
+        public Integer getRefundStatus() {
+            return refundStatus;
+        }
+
+        public void setRefundStatus(Integer refundStatus) {
+            this.refundStatus = refundStatus;
+        }
+
+        public Integer getPayStatus() {
+            return payStatus;
+        }
+
+        public void setPayStatus(Integer payStatus) {
+            this.payStatus = payStatus;
+        }
+
+        public Integer getOrderCount() {
+            return orderCount;
+        }
+
+        public void setOrderCount(Integer orderCount) {
+            this.orderCount = orderCount;
+        }
+
+        public BigDecimal getGoodsCount() {
+            return goodsCount;
+        }
+
+        public void setGoodsCount(BigDecimal goodsCount) {
+            this.goodsCount = goodsCount;
+        }
+
+        public Integer getPayMethod() {
+            return payMethod;
+        }
+
+        public void setPayMethod(Integer payMethod) {
+            this.payMethod = payMethod;
+        }
+
+        public String getTradeTime() {
+            return tradeTime;
+        }
+
+        public void setTradeTime(String tradeTime) {
+            this.tradeTime = tradeTime;
+        }
+
+        public String getPayTime() {
+            return payTime;
+        }
+
+        public void setPayTime(String payTime) {
+            this.payTime = payTime;
+        }
+
+        public String getEndTime() {
+            return endTime;
+        }
+
+        public void setEndTime(String endTime) {
+            this.endTime = endTime;
+        }
+
+        public String getBuyerNick() {
+            return buyerNick;
+        }
+
+        public void setBuyerNick(String buyerNick) {
+            this.buyerNick = buyerNick;
+        }
+
+        public String getBuyerMessage() {
+            return buyerMessage;
+        }
+
+        public void setBuyerMessage(String buyerMessage) {
+            this.buyerMessage = buyerMessage;
+        }
+
+        public String getBuyerEmail() {
+            return buyerEmail;
+        }
+
+        public void setBuyerEmail(String buyerEmail) {
+            this.buyerEmail = buyerEmail;
+        }
+
+        public String getBuyerArea() {
+            return buyerArea;
+        }
+
+        public void setBuyerArea(String buyerArea) {
+            this.buyerArea = buyerArea;
+        }
+
+        public String getReceiverName() {
+            return receiverName;
+        }
+
+        public void setReceiverName(String receiverName) {
+            this.receiverName = receiverName;
+        }
+
+        public String getReceiverArea() {
+            return receiverArea;
+        }
+
+        public void setReceiverArea(String receiverArea) {
+            this.receiverArea = receiverArea;
+        }
+
+        public String getReceiverAddress() {
+            return receiverAddress;
+        }
+
+        public void setReceiverAddress(String receiverAddress) {
+            this.receiverAddress = receiverAddress;
+        }
+
+        public String getReceiverZip() {
+            return receiverZip;
+        }
+
+        public void setReceiverZip(String receiverZip) {
+            this.receiverZip = receiverZip;
+        }
+
+        public String getReceiverMobile() {
+            return receiverMobile;
+        }
+
+        public void setReceiverMobile(String receiverMobile) {
+            this.receiverMobile = receiverMobile;
+        }
+
+        public String getReceiverTelno() {
+            return receiverTelno;
+        }
+
+        public void setReceiverTelno(String receiverTelno) {
+            this.receiverTelno = receiverTelno;
+        }
+
+        public BigDecimal getPostAmount() {
+            return postAmount;
+        }
+
+        public void setPostAmount(BigDecimal postAmount) {
+            this.postAmount = postAmount;
+        }
+
+        public BigDecimal getOtherAmount() {
+            return otherAmount;
+        }
+
+        public void setOtherAmount(BigDecimal otherAmount) {
+            this.otherAmount = otherAmount;
+        }
+
+        public BigDecimal getDiscount() {
+            return discount;
+        }
+
+        public void setDiscount(BigDecimal discount) {
+            this.discount = discount;
+        }
+
+        public BigDecimal getReceivable() {
+            return receivable;
+        }
+
+        public void setReceivable(BigDecimal receivable) {
+            this.receivable = receivable;
+        }
+
+        public BigDecimal getPlatformCost() {
+            return platformCost;
+        }
+
+        public void setPlatformCost(BigDecimal platformCost) {
+            this.platformCost = platformCost;
+        }
+
+        public Integer getInvoiceType() {
+            return invoiceType;
+        }
+
+        public void setInvoiceType(Integer invoiceType) {
+            this.invoiceType = invoiceType;
+        }
+
+        public String getInvoiceTitle() {
+            return invoiceTitle;
+        }
+
+        public void setInvoiceTitle(String invoiceTitle) {
+            this.invoiceTitle = invoiceTitle;
+        }
+
+        public String getInvoiceContent() {
+            return invoiceContent;
+        }
+
+        public void setInvoiceContent(String invoiceContent) {
+            this.invoiceContent = invoiceContent;
+        }
+
+        public Integer getLogisticsType() {
+            return logisticsType;
+        }
+
+        public void setLogisticsType(Integer logisticsType) {
+            this.logisticsType = logisticsType;
+        }
+
+        public String getCustData() {
+            return custData;
+        }
+
+        public void setCustData(String custData) {
+            this.custData = custData;
+        }
+
+        public Integer getDeliveryTerm() {
+            return deliveryTerm;
+        }
+
+        public void setDeliveryTerm(Integer deliveryTerm) {
+            this.deliveryTerm = deliveryTerm;
+        }
+
+        public String getPayId() {
+            return payId;
+        }
+
+        public void setPayId(String payId) {
+            this.payId = payId;
+        }
+
+        public String getRemark() {
+            return remark;
+        }
+
+        public void setRemark(String remark) {
+            this.remark = remark;
+        }
+
+        public Integer getRemarkFlag() {
+            return remarkFlag;
+        }
+
+        public void setRemarkFlag(Integer remarkFlag) {
+            this.remarkFlag = remarkFlag;
+        }
+
+        public BigDecimal getCodAmount() {
+            return codAmount;
+        }
+
+        public void setCodAmount(BigDecimal codAmount) {
+            this.codAmount = codAmount;
+        }
+
+        public Boolean getIsAutoWms() {
+            return isAutoWms;
+        }
+
+        public void setIsAutoWms(Boolean isAutoWms) {
+            this.isAutoWms = isAutoWms;
+        }
+
+        public String getWarehouseNo() {
+            return warehouseNo;
+        }
+
+        public void setWarehouseNo(String warehouseNo) {
+            this.warehouseNo = warehouseNo;
+        }
+
+        public String getPayAccount() {
+            return payAccount;
+        }
+
+        public void setPayAccount(String payAccount) {
+            this.payAccount = payAccount;
+        }
+
+        public String getToDeliverTime() {
+            return toDeliverTime;
+        }
+
+        public void setToDeliverTime(String toDeliverTime) {
+            this.toDeliverTime = toDeliverTime;
+        }
+
+        public BigDecimal getReceived() {
+            return received;
+        }
+
+        public void setReceived(BigDecimal received) {
+            this.received = received;
+        }
+
+        public Integer getConsignInterval() {
+            return consignInterval;
+        }
+
+        public void setConsignInterval(Integer consignInterval) {
+            this.consignInterval = consignInterval;
+        }
+
+        public BigDecimal getPaid() {
+            return paid;
+        }
+
+        public void setPaid(BigDecimal paid) {
+            this.paid = paid;
+        }
+
+        public Byte getIsSealed() {
+            return isSealed;
+        }
+
+        public void setIsSealed(Byte isSealed) {
+            this.isSealed = isSealed;
+        }
+
+        public String getFenxiaoNick() {
+            return fenxiaoNick;
+        }
+
+        public void setFenxiaoNick(String fenxiaoNick) {
+            this.fenxiaoNick = fenxiaoNick;
+        }
+
+        public Integer getIdCardType() {
+            return idCardType;
+        }
+
+        public void setIdCardType(Integer idCardType) {
+            this.idCardType = idCardType;
+        }
+
+        public String getIdCard() {
+            return idCard;
+        }
+
+        public void setIdCard(String idCard) {
+            this.idCard = idCard;
+        }
+
+        public Integer getReceiverProvinceNo() {
+            return receiverProvinceNo;
+        }
+
+        public void setReceiverProvinceNo(Integer receiverProvinceNo) {
+            this.receiverProvinceNo = receiverProvinceNo;
+        }
+
+        public Integer getReceiverCityNo() {
+            return receiverCityNo;
+        }
+
+        public void setReceiverCityNo(Integer receiverCityNo) {
+            this.receiverCityNo = receiverCityNo;
+        }
+
+        public Integer getReceiverDistrictNo() {
+            return receiverDistrictNo;
+        }
+
+        public void setReceiverDistrictNo(Integer receiverDistrictNo) {
+            this.receiverDistrictNo = receiverDistrictNo;
+        }
+    }
+
+    /**
+     * 原始子单信息实体类
+     */
+    public static class RawTradeOrder {
+
+        /**
+         * 原始订单号
+         */
+        @SerializedName("tid")
+        private String tid;
+
+        /**
+         * 原始子单号(平台订单货品表主键,子订单唯一标识)
+         */
+        @SerializedName("oid")
+        private String oid;
+
+        /**
+         * 平台的状态
+         * 10未确认 20待尾款 30待发货 40部分发货 50已发货 60已签收 70已完成 80已退款 90已关闭
+         */
+        @SerializedName("status")
+        private Integer status;
+
+        /**
+         * 退款标记
+         * 0无退款1取消退款,2已申请退款,3等待退货,4等待收货,5退款成功,6未付款关闭
+         */
+        @SerializedName("refund_status")
+        private Integer refundStatus;
+
+        /**
+         * 平台货品ID(平台系统货品SPU的唯一标识)
+         */
+        @SerializedName("goods_id")
+        private String goodsId;
+
+        /**
+         * 平台规格ID(平台系统单品SKU的的唯一标识)
+         */
+        @SerializedName("spec_id")
+        private String specId;
+
+        /**
+         * 货品编号
+         */
+        @SerializedName("goods_no")
+        private String goodsNo;
+
+        /**
+         * 规格编码
+         */
+        @SerializedName("spec_no")
+        private String specNo;
+
+        /**
+         * 货品名称
+         */
+        @SerializedName("goods_name")
+        private String goodsName;
+
+        /**
+         * 规格名称
+         */
+        @SerializedName("spec_name")
+        private String specName;
+
+        /**
+         * 子单类型(0正常货品 1虚拟货品 2服务)
+         */
+        @SerializedName("order_type")
+        private Integer orderType;
+
+        /**
+         * 平台类目
+         */
+        @SerializedName("cid")
+        private String cid;
+
+        /**
+         * 数量
+         */
+        @SerializedName("num")
+        private BigDecimal num;
+
+        /**
+         * 单价
+         */
+        @SerializedName("price")
+        private BigDecimal price;
+
+        /**
+         * 优惠(平台折扣, 不包含手工调整和分摊优惠)
+         */
+        @SerializedName("discount")
+        private BigDecimal discount;
+
+        /**
+         * 分摊优惠(退款不变)
+         */
+        @SerializedName("share_discount")
+        private BigDecimal shareDiscount;
+
+        /**
+         * 总价格
+         */
+        @SerializedName("total_amount")
+        private BigDecimal totalAmount;
+
+        /**
+         * 手工调整的优惠金额
+         */
+        @SerializedName("adjust_amount")
+        private BigDecimal adjustAmount;
+
+        /**
+         * 退款金额
+         */
+        @SerializedName("refund_amount")
+        private BigDecimal refundAmount;
+
+        /**
+         * 备注
+         */
+        @SerializedName("remark")
+        private String remark;
+
+        /**
+         * json串,若无可传空字符串
+         */
+        @SerializedName("json")
+        private String json;
+
+        /**
+         * 赠品方式
+         * 0非赠品 1自动赠送 2手工赠送 4周期购赠送 8平台赠送 32阶梯满赠 64CRM追加赠送 65 主品
+         */
+        @SerializedName("gift_type")
+        private Integer giftType;
+
+        // Getters and Setters
+        public String getTid() {
+            return tid;
+        }
+
+        public void setTid(String tid) {
+            this.tid = tid;
+        }
+
+        public String getOid() {
+            return oid;
+        }
+
+        public void setOid(String oid) {
+            this.oid = oid;
+        }
+
+        public Integer getStatus() {
+            return status;
+        }
+
+        public void setStatus(Integer status) {
+            this.status = status;
+        }
+
+        public Integer getRefundStatus() {
+            return refundStatus;
+        }
+
+        public void setRefundStatus(Integer refundStatus) {
+            this.refundStatus = refundStatus;
+        }
+
+        public String getGoodsId() {
+            return goodsId;
+        }
+
+        public void setGoodsId(String goodsId) {
+            this.goodsId = goodsId;
+        }
+
+        public String getSpecId() {
+            return specId;
+        }
+
+        public void setSpecId(String specId) {
+            this.specId = specId;
+        }
+
+        public String getGoodsNo() {
+            return goodsNo;
+        }
+
+        public void setGoodsNo(String goodsNo) {
+            this.goodsNo = goodsNo;
+        }
+
+        public String getSpecNo() {
+            return specNo;
+        }
+
+        public void setSpecNo(String specNo) {
+            this.specNo = specNo;
+        }
+
+        public String getGoodsName() {
+            return goodsName;
+        }
+
+        public void setGoodsName(String goodsName) {
+            this.goodsName = goodsName;
+        }
+
+        public String getSpecName() {
+            return specName;
+        }
+
+        public void setSpecName(String specName) {
+            this.specName = specName;
+        }
+
+        public Integer getOrderType() {
+            return orderType;
+        }
+
+        public void setOrderType(Integer orderType) {
+            this.orderType = orderType;
+        }
+
+        public String getCid() {
+            return cid;
+        }
+
+        public void setCid(String cid) {
+            this.cid = cid;
+        }
+
+        public BigDecimal getNum() {
+            return num;
+        }
+
+        public void setNum(BigDecimal num) {
+            this.num = num;
+        }
+
+        public BigDecimal getPrice() {
+            return price;
+        }
+
+        public void setPrice(BigDecimal price) {
+            this.price = price;
+        }
+
+        public BigDecimal getDiscount() {
+            return discount;
+        }
+
+        public void setDiscount(BigDecimal discount) {
+            this.discount = discount;
+        }
+
+        public BigDecimal getShareDiscount() {
+            return shareDiscount;
+        }
+
+        public void setShareDiscount(BigDecimal shareDiscount) {
+            this.shareDiscount = shareDiscount;
+        }
+
+        public BigDecimal getTotalAmount() {
+            return totalAmount;
+        }
+
+        public void setTotalAmount(BigDecimal totalAmount) {
+            this.totalAmount = totalAmount;
+        }
+
+        public BigDecimal getAdjustAmount() {
+            return adjustAmount;
+        }
+
+        public void setAdjustAmount(BigDecimal adjustAmount) {
+            this.adjustAmount = adjustAmount;
+        }
+
+        public BigDecimal getRefundAmount() {
+            return refundAmount;
+        }
+
+        public void setRefundAmount(BigDecimal refundAmount) {
+            this.refundAmount = refundAmount;
+        }
+
+        public String getRemark() {
+            return remark;
+        }
+
+        public void setRemark(String remark) {
+            this.remark = remark;
+        }
+
+        public String getJson() {
+            return json;
+        }
+
+        public void setJson(String json) {
+            this.json = json;
+        }
+
+        public Integer getGiftType() {
+            return giftType;
+        }
+
+        public void setGiftType(Integer giftType) {
+            this.giftType = giftType;
+        }
+    }
+
+    /**
+     * 优惠信息实体类
+     * 平台,tid,oid,sn,type 联合组成唯一
+     */
+    public static class DiscountInfo {
+
+        /**
+         * 原始订单号
+         */
+        @SerializedName("tid")
+        private String tid;
+
+        /**
+         * 原始子单号
+         */
+        @SerializedName("oid")
+        private String oid;
+
+        /**
+         * 唯一编码(平台上优惠的唯一标识)
+         */
+        @SerializedName("sn")
+        private String sn;
+
+        /**
+         * 优惠名称
+         */
+        @SerializedName("name")
+        private String name;
+
+        /**
+         * 优惠详情
+         */
+        @SerializedName("detail")
+        private String detail;
+
+        /**
+         * 优惠金额
+         */
+        @SerializedName("amount")
+        private BigDecimal amount;
+
+        // Getters and Setters
+        public String getTid() {
+            return tid;
+        }
+
+        public void setTid(String tid) {
+            this.tid = tid;
+        }
+
+        public String getOid() {
+            return oid;
+        }
+
+        public void setOid(String oid) {
+            this.oid = oid;
+        }
+
+        public String getSn() {
+            return sn;
+        }
+
+        public void setSn(String sn) {
+            this.sn = sn;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public String getDetail() {
+            return detail;
+        }
+
+        public void setDetail(String detail) {
+            this.detail = detail;
+        }
+
+        public BigDecimal getAmount() {
+            return amount;
+        }
+
+        public void setAmount(BigDecimal amount) {
+            this.amount = amount;
+        }
+    }
+
+    /**
+     * 枚举类 - 处理状态
+     */
+    public enum ProcessStatus {
+        WAIT_TO_SUBMIT(10, "待递交"),
+        SUBMITTED(20, "已递交"),
+        PARTIAL_SHIPPED(30, "部分发货"),
+        SHIPPED(40, "已发货"),
+        COMPLETED(60, "已完成"),
+        CANCELED(70, "已取消");
+
+        private final Integer code;
+        private final String desc;
+
+        ProcessStatus(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+
+    /**
+     * 枚举类 - 平台状态
+     */
+    public enum TradeStatus {
+        UNCONFIRMED(10, "未确认"),
+        WAIT_FINAL_PAYMENT(20, "待尾款"),
+        WAIT_SHIPPING(30, "待发货"),
+        PARTIAL_SHIPPED(40, "部分发货"),
+        SHIPPED(50, "已发货"),
+        SIGNED(60, "已签收"),
+        COMPLETED(70, "已完成"),
+        REFUNDED(80, "已退款"),
+        CLOSED(90, "已关闭");
+
+        private final Integer code;
+        private final String desc;
+
+        TradeStatus(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+
+    /**
+     * 枚举类 - 退款状态
+     */
+    public enum RefundStatus {
+        NO_REFUND(0, "无退款"),
+        APPLY_REFUND(1, "申请退款"),
+        PARTIAL_REFUND(2, "部分退款"),
+        FULL_REFUND(3, "全部退款");
+
+        private final Integer code;
+        private final String desc;
+
+        RefundStatus(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+
+    /**
+     * 枚举类 - 支付状态
+     */
+    public enum PayStatus {
+        NOT_PAID(0, "未付款"),
+        PARTIAL_PAID(1, "部分付款"),
+        FULL_PAID(2, "已付款");
+
+        private final Integer code;
+        private final String desc;
+
+        PayStatus(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+
+    /**
+     * 枚举类 - 支付方式
+     */
+    public enum PayMethod {
+        ONLINE_TRANSFER(1, "在线转帐"),
+        CASH(2, "现金"),
+        BANK_TRANSFER(3, "银行转账"),
+        POSTAL_REMITTANCE(4, "邮局汇款"),
+        PREPAYMENT(5, "预付款"),
+        CARD_PAYMENT(6, "刷卡"),
+        ALIPAY(7, "支付宝"),
+        WECHAT_PAY(8, "微信支付");
+
+        private final Integer code;
+        private final String desc;
+
+        PayMethod(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+
+    /**
+     * 枚举类 - 发货条件
+     */
+    public enum DeliveryTerm {
+        PAY_BEFORE_DELIVERY(1, "款到发货"),
+        CASH_ON_DELIVERY(2, "货到付款"),
+        INSTALLMENT(3, "分期付款");
+
+        private final Integer code;
+        private final String desc;
+
+        DeliveryTerm(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+
+    /**
+     * 枚举类 - 发票类型
+     */
+    public enum InvoiceType {
+        NO_INVOICE(0, "不需要"),
+        GENERAL_INVOICE(1, "普通发票"),
+        VAT_GENERAL_INVOICE(2, "增值税普通发票"),
+        VAT_SPECIAL_INVOICE(3, "增值税专用发票");
+
+        private final Integer code;
+        private final String desc;
+
+        InvoiceType(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+
+    /**
+     * 枚举类 - 赠品方式
+     */
+    public enum GiftType {
+        NOT_GIFT(0, "非赠品"),
+        AUTO_GIFT(1, "自动赠送"),
+        MANUAL_GIFT(2, "手工赠送"),
+        SUBSCRIPTION_GIFT(4, "周期购赠送"),
+        PLATFORM_GIFT(8, "平台赠送"),
+        TIERED_GIFT(32, "阶梯满赠"),
+        CRM_ADDITIONAL_GIFT(64, "CRM追加赠送"),
+        MAIN_PRODUCT(65, "主品");
+
+        private final Integer code;
+        private final String desc;
+
+        GiftType(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+}

+ 54 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/PushSelf2Response.java

@@ -0,0 +1,54 @@
+package com.fs.erp.dto.sdk.wangdianTwo.api.dto;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.util.List;
+import java.util.Map;
+
+public class PushSelf2Response
+{
+	/**
+	 * {"status":0,"data":{"chg_count":0,"new_count":1}}
+	 */
+	// 更新订单数
+	@SerializedName("chg_count")
+	private Integer chgCount;
+	// 新增订单数
+	@SerializedName("new_count")
+	private Integer newCount;
+	// 错误信息
+	// 单号 no	String
+	// 错误信息	error	String
+	@SerializedName("error_list")
+	private List<Map<String,Object>> errorList;
+
+	public Integer getChgCount()
+	{
+		return chgCount;
+	}
+
+	public void setChgCount(Integer chgCount)
+	{
+		this.chgCount = chgCount;
+	}
+
+	public Integer getNewCount()
+	{
+		return newCount;
+	}
+
+	public void setNewCount(Integer newCount)
+	{
+		this.newCount = newCount;
+	}
+
+	public List<Map<String,Object>> getErrorList()
+	{
+		return errorList;
+	}
+
+	public void setErrorList(List<Map<String,Object>> errorList)
+	{
+		this.errorList = errorList;
+	}
+}

+ 967 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/PushSelfRequest.java

@@ -0,0 +1,967 @@
+package com.fs.erp.dto.sdk.wangdianTwo.api.dto;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.math.BigDecimal;
+
+public class PushSelfRequest
+{
+	@SerializedName("shop_no")
+	private String shopNo;
+
+	public static class RawTrade
+	{
+		/**
+		 * 平台状态 未确认
+		 */
+		public static final byte TRADE_STATUS_TO_CONFIRM = 10;
+		/**
+		 * 平台状态 待尾款
+		 */
+		public static final byte TRADE_STATUS_PART_PAID = 20;
+		/**
+		 * 平台状态 待发货
+		 */
+		public static final byte TRADE_STATUS_WAIT_CONSIGN = 30;
+		/**
+		 * 平台状态 部分发货
+		 */
+		public static final byte TRADE_STATUS_PART_CONSIGN = 40;
+		/**
+		 * 平台状态 已发货
+		 */
+		public static final byte TRADE_STATUS_CONSIGNED = 50;
+		/**
+		 * 平台状态 已签收
+		 */
+		public static final byte TRADE_STATUS_SIGNED = 60;
+		/**
+		 * 平台状态 已完成
+		 */
+		public static final byte TRADE_STATUS_COMPLETE = 70;
+		/**
+		 * 平台状态 已退款
+		 */
+		public static final byte TRADE_STATUS_REFUND = 80;
+		/**
+		 * 平台状态 已关闭(付款前取消)
+		 */
+		public static final byte TRADE_STATUS_CLOSED = 90;
+
+		// 付款状态
+		public static final byte PAY_STATUS_UNPAY = 0; // 未付款
+		public static final byte PAY_STATUS_PART_PAID = 1; // 部分付款
+		public static final byte PAY_STATUS_FULL_PAID = 2; // 已付款
+
+		// 退款状态
+		public static final byte REFUND_NONE = 0; // 无退款
+		public static final byte REFUND_APPLY = 1; // 申请退款
+		public static final byte REFUND_PART = 2; // 部分退款
+		public static final byte REFUND_FULL = 3; // 全部退款
+
+		/**
+		 ** 款到发货
+		 */
+		public static final byte DELIVERY_TERM_DAP = 1; // 款到发货
+		/**
+		 * 货到付款
+		 */
+		public static final byte DELIVERY_TERM_COD = 2; // 货到付款(包含部分货到付款)
+
+		public static final byte PROCESS_STATUS_WAIT_DELIVERY = 10; // 待递交
+		public static final byte PROCESS_STATUS_CANCEL = 70; // 已取消
+
+		// 1在线转帐 2现金,3银行转账,4邮局汇款 5预付款 6刷卡
+		public static final byte PAY_METHOD_ONLINE = 1;
+		public static final byte PAY_METHOD_CASH = 2;
+		public static final byte PAY_METHOD_BANK = 3;
+		public static final byte PAY_METHOD_REMITTANCE = 4;
+		public static final byte PAY_METHOD_ADVANCES = 5;
+		public static final byte PAY_METHOD_CARD = 5;
+
+		// 0 不需要,1普通发票,2增值税发票
+		public static final byte INVOICE_TYPE_NONE = 0;
+		public static final byte INVOICE_TYPE_ORDINARY = 1;
+		public static final byte INVOICE_TYPE_VAT = 2;
+
+		@SerializedName("delivery_term")
+		private int deliveryTerm = DELIVERY_TERM_DAP;
+		@SerializedName("refund_status")
+		private byte refundStatus = REFUND_NONE;
+		@SerializedName("trade_status")
+		private byte tradeStatus = TRADE_STATUS_WAIT_CONSIGN;
+		@SerializedName("pay_status")
+		private byte payStatus = PAY_STATUS_FULL_PAID;
+		@SerializedName("process_status")
+		private byte processStatus = PROCESS_STATUS_WAIT_DELIVERY;
+
+		@SerializedName("tid")
+		private String tid;
+
+		// !!!
+		@SerializedName("is_auto_wms")
+		private Boolean autoWms;
+		@SerializedName("warehouse_no")
+		private String warehouseNo;
+		@SerializedName("goods_count")
+		private BigDecimal goodsCount = new BigDecimal(0.0000D);
+		@SerializedName("order_count")
+		private Integer orderCount = 0;
+		@SerializedName("trade_time")
+		private String tradeTime;
+		@SerializedName("remark_flag")
+		private Integer remarkFlag;
+		@SerializedName("consign_interval")
+		private Integer consignInterval;
+		@SerializedName("to_deliver_time")
+		private String toDeliverTime;
+		@SerializedName("platform_cost")
+		private BigDecimal platformCost;
+		@SerializedName("logistics_type")
+		private Integer logisticsType;
+		@SerializedName("end_time")
+		private String endTime;
+		@SerializedName("pay_time")
+		private String payTime;
+		@SerializedName("pay_method")
+		private Byte payMethod;
+		@SerializedName("remark")
+		private String remark = "";
+		@SerializedName("pay_account")
+		private String payAccount = "";
+		@SerializedName("pay_id")
+		private String payId = "";
+		@SerializedName("receiver_zip")
+		private String receiverZip = "";
+		@SerializedName("receiver_telno")
+		private String receiverTelno = "";
+		@SerializedName("receiver_name")
+		private String receiverName = "";
+		@SerializedName("receiver_area")
+		private String receiverArea = "";
+		@SerializedName("receiver_mobile")
+		private String receiverMobile = "";
+		@SerializedName("receiver_address")
+		private String receiverAddress = "";
+		@SerializedName("buyer_nick")
+		private String buyerNick = "";
+		@SerializedName("buyer_email")
+		private String buyerEmail = "";
+		@SerializedName("buyer_message")
+		private String buyerMessage = "";
+		@SerializedName("buyer_area")
+		private String buyerArea = "";
+		@SerializedName("invoice_type")
+		private Byte invoiceType;
+		@SerializedName("invoice_content")
+		private String invoiceContent = "";
+		@SerializedName("invoice_title")
+		private String invoiceTitle = "";
+		@SerializedName("receivable")
+		private BigDecimal receivable = BigDecimal.ZERO; // 应收金额
+		@SerializedName("post_amount")
+		private BigDecimal postAmount = BigDecimal.ZERO; // 邮费
+		@SerializedName("discount")
+		private BigDecimal discount = BigDecimal.ZERO; // 折扣
+		@SerializedName("received")
+		private BigDecimal received = BigDecimal.ZERO; // 已收金额
+		@SerializedName("cod_amount")
+		private BigDecimal codAmount = BigDecimal.ZERO; // COD金额
+		@SerializedName("other_amount")
+		private BigDecimal otherAmount = BigDecimal.ZERO; // 其他费用
+
+		public String getWarehouseNo()
+		{
+			return warehouseNo;
+		}
+
+		public void setWarehouseNo(String warehouseNo)
+		{
+			this.warehouseNo = warehouseNo;
+		}
+
+		public int getDeliveryTerm()
+		{
+			return deliveryTerm;
+		}
+
+		public void setDeliveryTerm(int deliveryTerm)
+		{
+			this.deliveryTerm = deliveryTerm;
+		}
+
+		public byte getRefundStatus()
+		{
+			return refundStatus;
+		}
+
+		public void setRefundStatus(byte refundStatus)
+		{
+			this.refundStatus = refundStatus;
+		}
+
+		public byte getTradeStatus()
+		{
+			return tradeStatus;
+		}
+
+		public void setTradeStatus(byte tradeStatus)
+		{
+			this.tradeStatus = tradeStatus;
+		}
+
+		public byte getPayStatus()
+		{
+			return payStatus;
+		}
+
+		public void setPayStatus(byte payStatus)
+		{
+			this.payStatus = payStatus;
+		}
+
+		public byte getProcessStatus()
+		{
+			return processStatus;
+		}
+
+		public void setProcessStatus(byte processStatus)
+		{
+			this.processStatus = processStatus;
+		}
+
+		public String getTid()
+		{
+			return tid;
+		}
+
+		public void setTid(String tid)
+		{
+			this.tid = tid;
+		}
+
+		public Boolean getAutoWms()
+		{
+			return autoWms;
+		}
+
+		public void setAutoWms(Boolean autoWms)
+		{
+			this.autoWms = autoWms;
+		}
+
+		public BigDecimal getGoodsCount()
+		{
+			return goodsCount;
+		}
+
+		public void setGoodsCount(BigDecimal goodsCount)
+		{
+			this.goodsCount = goodsCount;
+		}
+
+		public Integer getOrderCount()
+		{
+			return orderCount;
+		}
+
+		public void setOrderCount(Integer orderCount)
+		{
+			this.orderCount = orderCount;
+		}
+
+		public String getTradeTime()
+		{
+			return tradeTime;
+		}
+
+		public void setTradeTime(String tradeTime)
+		{
+			this.tradeTime = tradeTime;
+		}
+
+		public Integer getRemarkFlag()
+		{
+			return remarkFlag;
+		}
+
+		public void setRemarkFlag(Integer remarkFlag)
+		{
+			this.remarkFlag = remarkFlag;
+		}
+
+		public Integer getConsignInterval()
+		{
+			return consignInterval;
+		}
+
+		public void setConsignInterval(Integer consignInterval)
+		{
+			this.consignInterval = consignInterval;
+		}
+
+		public String getToDeliverTime()
+		{
+			return toDeliverTime;
+		}
+
+		public void setToDeliverTime(String toDeliverTime)
+		{
+			this.toDeliverTime = toDeliverTime;
+		}
+
+		public BigDecimal getPlatformCost()
+		{
+			return platformCost;
+		}
+
+		public void setPlatformCost(BigDecimal platformCost)
+		{
+			this.platformCost = platformCost;
+		}
+
+		public Integer getLogisticsType()
+		{
+			return logisticsType;
+		}
+
+		public void setLogisticsType(Integer logisticsType)
+		{
+			this.logisticsType = logisticsType;
+		}
+
+		public String getEndTime()
+		{
+			return endTime;
+		}
+
+		public void setEndTime(String endTime)
+		{
+			this.endTime = endTime;
+		}
+
+		public String getPayTime()
+		{
+			return payTime;
+		}
+
+		public void setPayTime(String payTime)
+		{
+			this.payTime = payTime;
+		}
+
+		public Byte getPayMethod()
+		{
+			return payMethod;
+		}
+
+		public void setPayMethod(Byte payMethod)
+		{
+			this.payMethod = payMethod;
+		}
+
+		public String getRemark()
+		{
+			return remark;
+		}
+
+		public void setRemark(String remark)
+		{
+			this.remark = remark;
+		}
+
+		public String getPayAccount()
+		{
+			return payAccount;
+		}
+
+		public void setPayAccount(String payAccount)
+		{
+			this.payAccount = payAccount;
+		}
+
+		public String getPayId()
+		{
+			return payId;
+		}
+
+		public void setPayId(String payId)
+		{
+			this.payId = payId;
+		}
+
+		public String getReceiverZip()
+		{
+			return receiverZip;
+		}
+
+		public void setReceiverZip(String receiverZip)
+		{
+			this.receiverZip = receiverZip;
+		}
+
+		public String getReceiverTelno()
+		{
+			return receiverTelno;
+		}
+
+		public void setReceiverTelno(String receiverTelno)
+		{
+			this.receiverTelno = receiverTelno;
+		}
+
+		public String getReceiverName()
+		{
+			return receiverName;
+		}
+
+		public void setReceiverName(String receiverName)
+		{
+			this.receiverName = receiverName;
+		}
+
+		public String getReceiverArea()
+		{
+			return receiverArea;
+		}
+
+		public void setReceiverArea(String receiverArea)
+		{
+			this.receiverArea = receiverArea;
+		}
+
+		public String getReceiverMobile()
+		{
+			return receiverMobile;
+		}
+
+		public void setReceiverMobile(String receiverMobile)
+		{
+			this.receiverMobile = receiverMobile;
+		}
+
+		public String getReceiverAddress()
+		{
+			return receiverAddress;
+		}
+
+		public void setReceiverAddress(String receiverAddress)
+		{
+			this.receiverAddress = receiverAddress;
+		}
+
+		public String getBuyerNick()
+		{
+			return buyerNick;
+		}
+
+		public void setBuyerNick(String buyerNick)
+		{
+			this.buyerNick = buyerNick;
+		}
+
+		public String getBuyerEmail()
+		{
+			return buyerEmail;
+		}
+
+		public void setBuyerEmail(String buyerEmail)
+		{
+			this.buyerEmail = buyerEmail;
+		}
+
+		public String getBuyerMessage()
+		{
+			return buyerMessage;
+		}
+
+		public void setBuyerMessage(String buyerMessage)
+		{
+			this.buyerMessage = buyerMessage;
+		}
+
+		public String getBuyerArea()
+		{
+			return buyerArea;
+		}
+
+		public void setBuyerArea(String buyerArea)
+		{
+			this.buyerArea = buyerArea;
+		}
+
+		public Byte getInvoiceType()
+		{
+			return invoiceType;
+		}
+
+		public void setInvoiceType(Byte invoiceType)
+		{
+			this.invoiceType = invoiceType;
+		}
+
+		public String getInvoiceContent()
+		{
+			return invoiceContent;
+		}
+
+		public void setInvoiceContent(String invoiceContent)
+		{
+			this.invoiceContent = invoiceContent;
+		}
+
+		public String getInvoiceTitle()
+		{
+			return invoiceTitle;
+		}
+
+		public void setInvoiceTitle(String invoiceTitle)
+		{
+			this.invoiceTitle = invoiceTitle;
+		}
+
+		public BigDecimal getReceivable()
+		{
+			return receivable;
+		}
+
+		public void setReceivable(BigDecimal receivable)
+		{
+			this.receivable = receivable;
+		}
+
+		public BigDecimal getPostAmount()
+		{
+			return postAmount;
+		}
+
+		public void setPostAmount(BigDecimal postAmount)
+		{
+			this.postAmount = postAmount;
+		}
+
+		public BigDecimal getDiscount()
+		{
+			return discount;
+		}
+
+		public void setDiscount(BigDecimal discount)
+		{
+			this.discount = discount;
+		}
+
+		public BigDecimal getReceived()
+		{
+			return received;
+		}
+
+		public void setReceived(BigDecimal received)
+		{
+			this.received = received;
+		}
+
+		public BigDecimal getCodAmount()
+		{
+			return codAmount;
+		}
+
+		public void setCodAmount(BigDecimal codAmount)
+		{
+			this.codAmount = codAmount;
+		}
+
+		public BigDecimal getOtherAmount()
+		{
+			return otherAmount;
+		}
+
+		public void setOtherAmount(BigDecimal otherAmount)
+		{
+			this.otherAmount = otherAmount;
+		}
+	}
+
+	public static class RawTradeOrder
+	{
+		public static final byte ORDER_TYPE_NORMAL = 0; // 普通货品
+		public static final byte ORDER_TYPE_VIRTUAL = 1; // 虚拟货品
+		public static final byte ORDER_TYPE_SERVICE = 2; // 服务
+
+		// 退款状态
+		public static final byte REFUND_STATUS_NONE = 0; // 无退款
+		public static final byte REFUND_STATUS_CANCEL = 1; // 取消退款,
+		public static final byte REFUND_STATUS_APPLY = 2; // 已申请退款,
+		public static final byte REFUND_STATUS_AGREE = 3; // 等待退货,
+		public static final byte REFUND_STATUS_WAIT_RECEIVE = 4; // 等待收货,
+		public static final byte REFUND_STATUS_SUCCESS = 5; // 退款成功
+		public static final byte REFUND_STATUS_DISCARD = 6; // 未付款关闭
+
+		// 平台状态
+		public static final byte PLATFORM_STATUS = 30;
+
+		@SerializedName("tid")
+		private String tid;
+		@SerializedName("oid")
+		private String oid;
+		@SerializedName("status")
+		private Byte status;
+		@SerializedName("refund_status")
+		private Byte refundStatus;
+		@SerializedName("goods_id")
+		private String goodsId;
+		@SerializedName("spec_id")
+		private String specId;
+		@SerializedName("goods_no")
+		private String goodsNo;
+		@SerializedName("spec_no")
+		private String specNo;
+		@SerializedName("goods_name")
+		private String goodsName;
+		@SerializedName("spec_name")
+		private String specName;
+		@SerializedName("order_type")
+		private Byte orderType = ORDER_TYPE_NORMAL;
+		@SerializedName("cid")
+		private String cid = "";
+		@SerializedName("num")
+		private BigDecimal num;
+		@SerializedName("price")
+		private BigDecimal price;
+		@SerializedName("discount")
+		private BigDecimal discount;
+		@SerializedName("share_discount")
+		private BigDecimal shareDiscount;
+		@SerializedName("adjust_amount")
+		private BigDecimal adjustAmount;
+		@SerializedName("refund_amount")
+		private BigDecimal refundAmount;
+		@SerializedName("total_amount")
+		private BigDecimal totalAmount;
+		@SerializedName("remark")
+		private String remark;
+		@SerializedName("json")
+		private String json;
+
+
+
+		public String getTid()
+		{
+			return tid;
+		}
+
+		public void setTid(String tid)
+		{
+			this.tid = tid;
+		}
+
+		public String getOid()
+		{
+			return oid;
+		}
+
+		public void setOid(String oid)
+		{
+			this.oid = oid;
+		}
+
+		public Byte getStatus()
+		{
+			return status;
+		}
+
+		public void setStatus(Byte status)
+		{
+			this.status = status;
+		}
+
+		public Byte getRefundStatus()
+		{
+			return refundStatus;
+		}
+
+		public void setRefundStatus(Byte refundStatus)
+		{
+			this.refundStatus = refundStatus;
+		}
+
+		public Byte getOrderType()
+		{
+			return orderType;
+		}
+
+		public void setOrderType(Byte orderType)
+		{
+			this.orderType = orderType;
+		}
+
+		public String getGoodsName()
+		{
+			return goodsName;
+		}
+
+		public void setGoodsName(String goodsName)
+		{
+			this.goodsName = goodsName;
+		}
+
+		public String getGoodsNo()
+		{
+			return goodsNo;
+		}
+
+		public void setGoodsNo(String goodsNo)
+		{
+			this.goodsNo = goodsNo;
+		}
+
+		public String getGoodsId()
+		{
+			return goodsId;
+		}
+
+		public void setGoodsId(String goodsId)
+		{
+			this.goodsId = goodsId;
+		}
+
+		public String getSpecNo()
+		{
+			return specNo;
+		}
+
+		public void setSpecNo(String specNo)
+		{
+			this.specNo = specNo;
+		}
+
+		public String getSpecId()
+		{
+			return specId;
+		}
+
+		public void setSpecId(String specId)
+		{
+			this.specId = specId;
+		}
+
+		public String getJson()
+		{
+			return json;
+		}
+
+		public void setJson(String json)
+		{
+			this.json = json;
+		}
+
+		public String getSpecName()
+		{
+			return specName;
+		}
+
+		public void setSpecName(String specName)
+		{
+			this.specName = specName;
+		}
+
+		public String getRemark()
+		{
+			return remark;
+		}
+
+		public void setRemark(String remark)
+		{
+			this.remark = remark;
+		}
+
+		public String getCid()
+		{
+			return cid;
+		}
+
+		public void setCid(String cid)
+		{
+			this.cid = cid;
+		}
+
+		public BigDecimal getNum()
+		{
+			return num;
+		}
+
+		public void setNum(BigDecimal num)
+		{
+			this.num = num;
+		}
+
+		public BigDecimal getPrice()
+		{
+			return price;
+		}
+
+		public void setPrice(BigDecimal price)
+		{
+			this.price = price;
+		}
+
+		public BigDecimal getShareDiscount()
+		{
+			return shareDiscount;
+		}
+
+		public void setShareDiscount(BigDecimal shareDiscount)
+		{
+			this.shareDiscount = shareDiscount;
+		}
+
+		public BigDecimal getDiscount()
+		{
+			return discount;
+		}
+
+		public void setDiscount(BigDecimal discount)
+		{
+			this.discount = discount;
+		}
+
+		public BigDecimal getAdjustAmount()
+		{
+			return adjustAmount;
+		}
+
+		public void setAdjustAmount(BigDecimal adjustAmount)
+		{
+			this.adjustAmount = adjustAmount;
+		}
+
+		public BigDecimal getRefundAmount()
+		{
+			return refundAmount;
+		}
+
+		public void setRefundAmount(BigDecimal refundAmount)
+		{
+			this.refundAmount = refundAmount;
+		}
+
+		public BigDecimal getTotalAmount()
+		{
+			return totalAmount;
+		}
+
+		public void setTotalAmount(BigDecimal totalAmount)
+		{
+			this.totalAmount = totalAmount;
+		}
+	}
+
+	public static class RawTradeDiscount
+	{
+		@SerializedName("tid")
+		private String tid;
+		@SerializedName("oid")
+		private String oid;
+		@SerializedName("sn")
+		private String sn;
+		@SerializedName("type")
+		private String type;
+		@SerializedName("name")
+		private String name;
+		@SerializedName("is_bonus")
+		private Byte isBonus;
+		@SerializedName("detail")
+		private String detail;
+		@SerializedName("amount")
+		private BigDecimal amount;
+
+		public String getTid()
+		{
+			return tid;
+		}
+
+		public void setTid(String tid)
+		{
+			this.tid = tid;
+		}
+
+		public String getOid()
+		{
+			return oid;
+		}
+
+		public void setOid(String oid)
+		{
+			this.oid = oid;
+		}
+
+		public String getSn()
+		{
+			return sn;
+		}
+
+		public void setSn(String sn)
+		{
+			this.sn = sn;
+		}
+
+		public String getType()
+		{
+			return type;
+		}
+
+		public void setType(String type)
+		{
+			this.type = type;
+		}
+
+		public String getName()
+		{
+			return name;
+		}
+
+		public void setName(String name)
+		{
+			this.name = name;
+		}
+
+		public Byte getIsBonus()
+		{
+			return isBonus;
+		}
+
+		public void setIsBonus(Byte isBonus)
+		{
+			this.isBonus = isBonus;
+		}
+
+		public String getDetail()
+		{
+			return detail;
+		}
+
+		public void setDetail(String detail)
+		{
+			this.detail = detail;
+		}
+
+		public BigDecimal getAmount()
+		{
+			return amount;
+		}
+
+		public void setAmount(BigDecimal amount)
+		{
+			this.amount = amount;
+		}
+	}
+
+	public String getShopNo()
+	{
+		return shopNo;
+	}
+
+	public void setShopNo(String shopNo)
+	{
+		this.shopNo = shopNo;
+	}
+}

+ 34 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/PushSelfResponse.java

@@ -0,0 +1,34 @@
+package com.fs.erp.dto.sdk.wangdianTwo.api.dto;
+
+import com.google.gson.annotations.SerializedName;
+
+public class PushSelfResponse
+{
+	/**
+	 * {"status":0,"data":{"chg_count":0,"new_count":1}}
+	 */
+	@SerializedName("chg_count")
+	private Integer chgCount;
+	@SerializedName("new_count")
+	private Integer newCount;
+
+	public Integer getChgCount()
+	{
+		return chgCount;
+	}
+
+	public void setChgCount(Integer chgCount)
+	{
+		this.chgCount = chgCount;
+	}
+
+	public Integer getNewCount()
+	{
+		return newCount;
+	}
+
+	public void setNewCount(Integer newCount)
+	{
+		this.newCount = newCount;
+	}
+}

+ 393 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/QuerySelfOrderDetailRequest.java

@@ -0,0 +1,393 @@
+package com.fs.erp.dto.sdk.wangdianTwo.api.dto;
+
+import com.google.gson.annotations.SerializedName;
+
+/**
+ * 订单查询接口请求参数实体类
+ */
+public class QuerySelfOrderDetailRequest {
+
+    /**
+     * 开始时间(修改起始时间)
+     * 若无订单编号/原始单号/物流单号,则为必填
+     * 示例:"2021-11-11 00:00:00"
+     */
+    @SerializedName("start_time")
+    private String startTime;
+
+    /**
+     * 结束时间(修改结束时间)
+     * 若无订单编号/原始单号/物流单号,则为必填
+     * 示例:"2021-11-11 01:00:00"
+     */
+    @SerializedName("end_time")
+    private String endTime;
+
+    /**
+     * 仓库编号
+     */
+    @SerializedName("warehouse_no")
+    private String warehouseNo;
+
+    /**
+     * 订单状态
+     * 若多个状态则以","隔开
+     * 订单状态: 4线下退款 5已取消 6待转预订单(待审核) 7待转已完成 10未付款 12待尾款 15等未付 16延时审核
+     * 19预订单前处理 20审核前处理 21自流转待发货 23异常订单 24换货预订单 25待处理预订单 27待分配预订单
+     * 30待客审 35待财审 40审核中 55已审核 95已发货 96成本确认 101已过账 110已完成
+     */
+    @SerializedName("status")
+    private String status;
+
+    /**
+     * 订单编号
+     */
+    @SerializedName("trade_no")
+    private String tradeNo;
+
+    /**
+     * 店铺编号(暂不支持批量查询)
+     */
+    @SerializedName("shop_no")
+    private String shopNo;
+
+    /**
+     * 物流单号(V1.4.9.9版本以上支持按照物流单号查询不传入时间范围)
+     */
+    @SerializedName("logistics_no")
+    private String logisticsNo;
+
+    /**
+     * 原始单号,多个原始单号之间使用英文逗号分隔
+     */
+    @SerializedName("src_tid")
+    private String srcTid;
+
+    /**
+     * 是否使用从库查询
+     * 使用:true 不使用:false(仅对开通从库配置客户生效)
+     */
+    @SerializedName("is_slave")
+    private Boolean isSlave;
+
+    /**
+     * 是否计算分摊邮费
+     * 默认false,计算:true 不计算:false
+     */
+    @SerializedName("cal_share_post_amount")
+    private Boolean calSharePostAmount;
+
+    /**
+     * 订单来源
+     * 1、API抓单 2、手工建单 3、导入 4、复制订单 5、接口推送 6、补发订单 7、PDA选货开单 8、分销补发订单
+     */
+    @SerializedName("trade_from")
+    private String tradeFrom;
+
+    /**
+     * 排序类型
+     * 0:默认排序 1:修改时间降序
+     */
+    @SerializedName("order_type")
+    private Integer orderType;
+
+    /**
+     * 时间类型
+     * 1:修改时间 2:付款时间 3:下单时间 默认1
+     */
+    @SerializedName("time_type")
+    private Integer timeType;
+
+    /**
+     * 是否返回赠品关联关系
+     * 0:不返回 1:返回 默认1
+     */
+    @SerializedName("need_gift_relation")
+    private Boolean needGiftRelation;
+
+    /**
+     * 是否强制指定src_tid精准查询(避免模糊查)
+     * 0:(默认值)否 1:是
+     */
+    @SerializedName("accurate_query")
+    private Boolean accurateQuery;
+
+    /**
+     * 是否截取物流单号
+     * 0: (默认值) 不截取 1:截取
+     */
+    @SerializedName("cut_logistics_no")
+    private Boolean cutLogisticsNo;
+
+    // Getters and Setters
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+    public String getWarehouseNo() {
+        return warehouseNo;
+    }
+
+    public void setWarehouseNo(String warehouseNo) {
+        this.warehouseNo = warehouseNo;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getTradeNo() {
+        return tradeNo;
+    }
+
+    public void setTradeNo(String tradeNo) {
+        this.tradeNo = tradeNo;
+    }
+
+    public String getShopNo() {
+        return shopNo;
+    }
+
+    public void setShopNo(String shopNo) {
+        this.shopNo = shopNo;
+    }
+
+    public String getLogisticsNo() {
+        return logisticsNo;
+    }
+
+    public void setLogisticsNo(String logisticsNo) {
+        this.logisticsNo = logisticsNo;
+    }
+
+    public String getSrcTid() {
+        return srcTid;
+    }
+
+    public void setSrcTid(String srcTid) {
+        this.srcTid = srcTid;
+    }
+
+    public Boolean getIsSlave() {
+        return isSlave;
+    }
+
+    public void setIsSlave(Boolean isSlave) {
+        this.isSlave = isSlave;
+    }
+
+    public Boolean getCalSharePostAmount() {
+        return calSharePostAmount;
+    }
+
+    public void setCalSharePostAmount(Boolean calSharePostAmount) {
+        this.calSharePostAmount = calSharePostAmount;
+    }
+
+    public String getTradeFrom() {
+        return tradeFrom;
+    }
+
+    public void setTradeFrom(String tradeFrom) {
+        this.tradeFrom = tradeFrom;
+    }
+
+    public Integer getOrderType() {
+        return orderType;
+    }
+
+    public void setOrderType(Integer orderType) {
+        this.orderType = orderType;
+    }
+
+    public Integer getTimeType() {
+        return timeType;
+    }
+
+    public void setTimeType(Integer timeType) {
+        this.timeType = timeType;
+    }
+
+    public Boolean getNeedGiftRelation() {
+        return needGiftRelation;
+    }
+
+    public void setNeedGiftRelation(Boolean needGiftRelation) {
+        this.needGiftRelation = needGiftRelation;
+    }
+
+    public Boolean getAccurateQuery() {
+        return accurateQuery;
+    }
+
+    public void setAccurateQuery(Boolean accurateQuery) {
+        this.accurateQuery = accurateQuery;
+    }
+
+    public Boolean getCutLogisticsNo() {
+        return cutLogisticsNo;
+    }
+
+    public void setCutLogisticsNo(Boolean cutLogisticsNo) {
+        this.cutLogisticsNo = cutLogisticsNo;
+    }
+
+    /**
+     * 订单状态枚举
+     */
+    public enum OrderStatus {
+        OFFLINE_REFUND(4, "线下退款"),
+        CANCELED(5, "已取消"),
+        WAIT_PREORDER(6, "待转预订单(待审核)"),
+        WAIT_COMPLETE(7, "待转已完成"),
+        UNPAID(10, "未付款"),
+        WAIT_FINAL_PAYMENT(12, "待尾款"),
+        WAIT_UNPAID(15, "等未付"),
+        DELAY_REVIEW(16, "延时审核"),
+        PRE_ORDER_PREPROCESS(19, "预订单前处理"),
+        BEFORE_REVIEW_PREPROCESS(20, "审核前处理"),
+        AUTO_FLOW_WAIT_SHIP(21, "自流转待发货"),
+        ABNORMAL_ORDER(23, "异常订单"),
+        EXCHANGE_PREORDER(24, "换货预订单"),
+        PENDING_PREORDER(25, "待处理预订单"),
+        WAIT_ASSIGN_PREORDER(27, "待分配预订单"),
+        WAIT_CUSTOMER_REVIEW(30, "待客审"),
+        WAIT_FINANCE_REVIEW(35, "待财审"),
+        UNDER_REVIEW(40, "审核中"),
+        REVIEWED(55, "已审核"),
+        SHIPPED(95, "已发货"),
+        COST_CONFIRMATION(96, "成本确认"),
+        POSTED(101, "已过账"),
+        COMPLETED(110, "已完成");
+
+        private final Integer code;
+        private final String desc;
+
+        OrderStatus(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+
+        /**
+         * 将多个状态转换为逗号分隔的字符串
+         */
+        public static String toStatusString(OrderStatus... statuses) {
+            if (statuses == null || statuses.length == 0) {
+                return "";
+            }
+
+            StringBuilder sb = new StringBuilder();
+            for (int i = 0; i < statuses.length; i++) {
+                if (i > 0) {
+                    sb.append(",");
+                }
+                sb.append(statuses[i].getCode());
+            }
+            return sb.toString();
+        }
+    }
+
+    /**
+     * 订单来源枚举
+     */
+    public enum TradeFrom {
+        API_CRAWL(1, "API抓单"),
+        MANUAL_CREATE(2, "手工建单"),
+        IMPORT(3, "导入"),
+        COPY_ORDER(4, "复制订单"),
+        INTERFACE_PUSH(5, "接口推送"),
+        RESEND_ORDER(6, "补发订单"),
+        PDA_CREATE(7, "PDA选货开单"),
+        DISTRIBUTION_RESEND(8, "分销补发订单");
+
+        private final Integer code;
+        private final String desc;
+
+        TradeFrom(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+
+    /**
+     * 排序类型枚举
+     */
+    public enum OrderType {
+        DEFAULT(0, "默认排序"),
+        MODIFY_TIME_DESC(1, "修改时间降序");
+
+        private final Integer code;
+        private final String desc;
+
+        OrderType(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+
+    /**
+     * 时间类型枚举
+     */
+    public enum TimeType {
+        MODIFY_TIME(1, "修改时间"),
+        PAY_TIME(2, "付款时间"),
+        ORDER_TIME(3, "下单时间");
+
+        private final Integer code;
+        private final String desc;
+
+        TimeType(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+
+}

+ 1439 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/QuerySelfOrderDetailResponse.java

@@ -0,0 +1,1439 @@
+package com.fs.erp.dto.sdk.wangdianTwo.api.dto;
+
+import com.google.gson.annotations.SerializedName;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 订单查询响应实体类
+ */
+public class QuerySelfOrderDetailResponse {
+
+    /**
+     * 总数(查询条件总单据数)
+     */
+    @SerializedName("total_count")
+    private Integer totalCount;
+
+    /**
+     * 单据数据(订单相关数据)
+     */
+    @SerializedName("order")
+    private List<Map<String, Object>> order;
+
+    // Getters and Setters
+    public Integer getTotalCount() {
+        return totalCount;
+    }
+
+    public void setTotalCount(Integer totalCount) {
+        this.totalCount = totalCount;
+    }
+
+    public List<Map<String, Object>> getOrder() {
+        return order;
+    }
+
+    public void setOrder(List<Map<String, Object>> order) {
+        this.order = order;
+    }
+
+    /**
+     * 订单主信息实体类
+     */
+    public static class OrderInfo {
+
+        /**
+         * 订单唯一键
+         */
+        @SerializedName("trade_id")
+        private Long tradeId;
+
+        /**
+         * 订单编号(旺店通系统订单号)
+         */
+        @SerializedName("trade_no")
+        private String tradeNo;
+
+        /**
+         * 平台ID
+         */
+        @SerializedName("platform_id")
+        private Integer platformId;
+
+        /**
+         * 仓库类型
+         * 1、普通仓库,大于1为委外仓库(如京东仓储,物流宝等)
+         */
+        @SerializedName("warehouse_type")
+        private Integer warehouseType;
+
+        /**
+         * 原始单号(平台订单号),如果有多个,以","分隔
+         */
+        @SerializedName("src_tids")
+        private String srcTids;
+
+        /**
+         * 平台支付帐号
+         */
+        @SerializedName("pay_account")
+        private String payAccount;
+
+        /**
+         * 订单状态
+         */
+        @SerializedName("trade_status")
+        private Integer tradeStatus;
+
+        /**
+         * 订单类型
+         * 1、网店销售 2、线下订单 3、售后换货 4、批发业务 5、保修换新 6、保修完成 7、现款销售 8、分销订单
+         * 101-110、自定义类型一到十
+         */
+        @SerializedName("trade_type")
+        private Integer tradeType;
+
+        /**
+         * 发货条件
+         * 1、款到发货 2、货到付款(包含部分货到付款) 3、分期付款 4、挂账
+         */
+        @SerializedName("delivery_term")
+        private Integer deliveryTerm;
+
+        /**
+         * 京东几环(淘宝模糊化后的买家昵称)
+         */
+        @SerializedName("receiver_ring")
+        private String receiverRing;
+
+        /**
+         * 冻结原因
+         */
+        @SerializedName("freeze_reason")
+        private String freezeReason;
+
+        /**
+         * 退款状态
+         * 0、无退款 1、申请退款 2、部分退款 3、全部退款
+         */
+        @SerializedName("refund_status")
+        private Integer refundStatus;
+
+        /**
+         * 分销类别
+         * 0、非分销订单 1、代销 2、经销
+         */
+        @SerializedName("fenxiao_type")
+        private Integer fenxiaoType;
+
+        /**
+         * 分销商昵称
+         */
+        @SerializedName("fenxiao_nick")
+        private String fenxiaoNick;
+
+        /**
+         * 下单时间(毫秒级时间戳,例如:1631861379000)
+         */
+        @SerializedName("trade_time")
+        private String tradeTime;
+
+        /**
+         * 付款时间,例如:2020-10-19 00:00:00
+         */
+        @SerializedName("pay_time")
+        private String payTime;
+
+        /**
+         * 发货时间(毫秒级时间戳,例如:1631861379000)
+         */
+        @SerializedName("consign_time")
+        private String consignTime;
+
+        /**
+         * 客户网名
+         */
+        @SerializedName("buyer_nick")
+        private String buyerNick;
+
+        /**
+         * 收货人/收件人
+         */
+        @SerializedName("receiver_name")
+        private String receiverName;
+
+        /**
+         * 省份id
+         */
+        @SerializedName("receiver_province")
+        private Integer receiverProvince;
+
+        /**
+         * 城市id
+         */
+        @SerializedName("receiver_city")
+        private Integer receiverCity;
+
+        /**
+         * 地区id
+         */
+        @SerializedName("receiver_district")
+        private Integer receiverDistrict;
+
+        /**
+         * 收件人地址
+         */
+        @SerializedName("receiver_address")
+        private String receiverAddress;
+
+        /**
+         * 手机
+         */
+        @SerializedName("receiver_mobile")
+        private String receiverMobile;
+
+        /**
+         * 固话
+         */
+        @SerializedName("receiver_telno")
+        private String receiverTelno;
+
+        /**
+         * 邮编
+         */
+        @SerializedName("receiver_zip")
+        private String receiverZip;
+
+        /**
+         * 地区(省市区空格分隔)
+         */
+        @SerializedName("receiver_area")
+        private String receiverArea;
+
+        /**
+         * 大头笔
+         */
+        @SerializedName("receiver_dtb")
+        private String receiverDtb;
+
+        /**
+         * 异常订单原因(位运算)
+         * 2、修改地址 4、修改发票 8、更换仓库 16、修改备注 32、更换货品 128、拦截赠品 256、拦截换货
+         * 512、买家留言变化 1024、拦截平台已发货
+         */
+        @SerializedName("bad_reason")
+        private Integer badReason;
+
+        /**
+         * 物流单号
+         */
+        @SerializedName("logistics_no")
+        private String logisticsNo;
+
+        /**
+         * 买家留言
+         */
+        @SerializedName("buyer_message")
+        private String buyerMessage;
+
+        /**
+         * 客服备注
+         */
+        @SerializedName("cs_remark")
+        private String csRemark;
+
+        /**
+         * 标旗(1 红、2 黄、3 绿、4 蓝、5 紫、6 橙、7 浅蓝、8 浅粉、9 深绿、10 桃红)
+         */
+        @SerializedName("remark_flag")
+        private Integer remarkFlag;
+
+        /**
+         * 打印备注
+         */
+        @SerializedName("print_remark")
+        private String printRemark;
+
+        /**
+         * 货品种类数
+         */
+        @SerializedName("goods_type_count")
+        private BigDecimal goodsTypeCount;
+
+        /**
+         * 货品总量
+         */
+        @SerializedName("goods_count")
+        private BigDecimal goodsCount;
+
+        /**
+         * 总货款(折前总额)
+         */
+        @SerializedName("goods_amount")
+        private BigDecimal goodsAmount;
+
+        /**
+         * 邮费(买家支付邮费)
+         */
+        @SerializedName("post_amount")
+        private BigDecimal postAmount;
+
+        /**
+         * 其他费用
+         */
+        @SerializedName("other_amount")
+        private BigDecimal otherAmount;
+
+        /**
+         * 优惠
+         */
+        @SerializedName("discount")
+        private BigDecimal discount;
+
+        /**
+         * 应收
+         */
+        @SerializedName("receivable")
+        private BigDecimal receivable;
+
+        /**
+         * COD金额(货到付款金额)
+         */
+        @SerializedName("cod_amount")
+        private BigDecimal codAmount;
+
+        /**
+         * 买家COD费用
+         */
+        @SerializedName("ext_cod_fee")
+        private BigDecimal extCodFee;
+
+        /**
+         * 预估货品成本
+         */
+        @SerializedName("goods_cost")
+        private BigDecimal goodsCost;
+
+        /**
+         * 预估邮资成本
+         */
+        @SerializedName("post_cost")
+        private BigDecimal postCost;
+
+        /**
+         * 预估重量(kg)
+         */
+        @SerializedName("weight")
+        private BigDecimal weight;
+
+        /**
+         * 预估毛利
+         */
+        @SerializedName("profit")
+        private BigDecimal profit;
+
+        /**
+         * 税额
+         */
+        @SerializedName("tax")
+        private BigDecimal tax;
+
+        /**
+         * 税率
+         */
+        @SerializedName("tax_rate")
+        private BigDecimal taxRate;
+
+        /**
+         * 佣金
+         */
+        @SerializedName("commission")
+        private BigDecimal commission;
+
+        /**
+         * 发票类型
+         * 0:不需要 1:普通发票 2:增值税普通发票 3:增值税专用发票
+         */
+        @SerializedName("invoice_type")
+        private Integer invoiceType;
+
+        /**
+         * 发票抬头
+         */
+        @SerializedName("invoice_title")
+        private String invoiceTitle;
+
+        /**
+         * 发票内容
+         */
+        @SerializedName("invoice_content")
+        private String invoiceContent;
+
+        /**
+         * 业务员
+         */
+        @SerializedName("salesman_name")
+        private String salesmanName;
+
+        /**
+         * 审核人
+         */
+        @SerializedName("checker_name")
+        private String checkerName;
+
+        /**
+         * 财审人
+         */
+        @SerializedName("fchecker_name")
+        private String fcheckerName;
+
+        /**
+         * 签出人
+         */
+        @SerializedName("checkouter_name")
+        private String checkouterName;
+
+        /**
+         * 出库单号(系统产生的出库单号)
+         */
+        @SerializedName("stockout_no")
+        private String stockoutNo;
+
+        /**
+         * 标记名称
+         */
+        @SerializedName("flag_name")
+        private String flagName;
+
+        /**
+         * 订单来源
+         * 1、API抓单 2、手工建单 3、导入 4、复制订单 5、接口推送 6、补发订单 7、PDA选货开单 8、分销补发订单
+         */
+        @SerializedName("trade_from")
+        private Integer tradeFrom;
+
+        /**
+         * 货品商家编码,多种货品为空,组合装时为组合装编码
+         */
+        @SerializedName("single_spec_no")
+        private String singleSpecNo;
+
+        /**
+         * 原始货品数量
+         */
+        @SerializedName("raw_goods_count")
+        private BigDecimal rawGoodsCount;
+
+        /**
+         * 原始货品种类数
+         */
+        @SerializedName("raw_goods_type_count")
+        private Integer rawGoodsTypeCount;
+
+        /**
+         * 币种
+         */
+        @SerializedName("currency")
+        private String currency;
+
+        /**
+         * 发票ID(自增生成),0代表没有发票或已取消/已冲红
+         */
+        @SerializedName("invoice_id")
+        private Integer invoiceId;
+
+        /**
+         * 版本号
+         */
+        @SerializedName("version_id")
+        private Integer versionId;
+
+        /**
+         * 修改时间,例如:2020-10-19 00:00:00
+         */
+        @SerializedName("modified")
+        private String modified;
+
+        /**
+         * 递交时间(毫秒级时间戳,例如:1631861379000)
+         */
+        @SerializedName("created")
+        private String created;
+
+        /**
+         * 审核时间
+         */
+        @SerializedName("check_time")
+        private String checkTime;
+
+        /**
+         * 证件类别
+         */
+        @SerializedName("id_card_type")
+        private Integer idCardType;
+
+        /**
+         * 店铺编号
+         */
+        @SerializedName("shop_no")
+        private String shopNo;
+
+        /**
+         * 店铺名称
+         */
+        @SerializedName("shop_name")
+        private String shopName;
+
+        /**
+         * 店铺备注
+         */
+        @SerializedName("shop_remark")
+        private String shopRemark;
+
+        /**
+         * 仓库编号,如订单无仓库的话,则不返回该字段
+         */
+        @SerializedName("warehouse_no")
+        private String warehouseNo;
+
+        /**
+         * 客户姓名
+         */
+        @SerializedName("customer_name")
+        private String customerName;
+
+        /**
+         * 客户编码
+         */
+        @SerializedName("customer_no")
+        private String customerNo;
+
+        /**
+         * 物流公司名称
+         */
+        @SerializedName("logistics_name")
+        private String logisticsName;
+
+        /**
+         * 物流公司编号
+         */
+        @SerializedName("logistics_code")
+        private String logisticsCode;
+
+        /**
+         * 物流类型名称
+         */
+        @SerializedName("logistics_type_name")
+        private String logisticsTypeName;
+
+        /**
+         * 送货时间,例如:2020-10-19 00:00:00
+         */
+        @SerializedName("to_deliver_time")
+        private String toDeliverTime;
+
+        /**
+         * 计划发货时间
+         */
+        @SerializedName("delay_to_time")
+        private String delayToTime;
+
+        /**
+         * 最晚发货时间
+         */
+        @SerializedName("estimate_consign_time")
+        private String estimateConsignTime;
+
+        /**
+         * 店铺id
+         */
+        @SerializedName("shop_id")
+        private Integer shopId;
+
+        /**
+         * 仓库id
+         */
+        @SerializedName("warehouse_id")
+        private Integer warehouseId;
+
+        /**
+         * 体积
+         */
+        @SerializedName("volume")
+        private BigDecimal volume;
+
+        /**
+         * 订单标签
+         */
+        @SerializedName("trade_label")
+        private String tradeLabel;
+
+        /**
+         * 订单掩码
+         * 1:使用智选物流 2:货品标签 4:预订单自动激活失败 16:订单货品指定批次 32:平台自动流转仓库
+         * 64:部分发货 128:全部发货 256:优先占用 512:待分配转审核失败或订单审核失败
+         * 1024:催未付款订单短信发送标记 2048:拆分
+         * 在判断的时候使用&运算
+         */
+        @SerializedName("trade_mask")
+        private Integer tradeMask;
+
+        /**
+         * 店铺平台id
+         */
+        @SerializedName("shop_platform_id")
+        private Integer shopPlatformId;
+
+        /**
+         * 子平台id
+         */
+        @SerializedName("sub_platform_id")
+        private Integer subPlatformId;
+
+        /**
+         * 包装
+         */
+        @SerializedName("package_name")
+        private String packageName;
+
+        /**
+         * 包装id
+         */
+        @SerializedName("package_id")
+        private Integer packageId;
+
+        /**
+         * 包装成本(计划成本)
+         */
+        @SerializedName("package_cost")
+        private BigDecimal packageCost;
+
+        /**
+         * 已付
+         */
+        @SerializedName("paid")
+        private BigDecimal paid;
+
+        /**
+         * 大件类型
+         * 1:普通套件 2:独立套件 3:分组单发,未使用 -1:非单发件
+         */
+        @SerializedName("large_type")
+        private Integer largeType;
+
+        /**
+         * 赠品标记
+         * 1:自动赠送 2:手工赠送 4:回购赠送 8:平台赠送
+         * (注意:如果是3,则表示既有自动赠送也有手工赠送"1+2")
+         */
+        @SerializedName("gift_mask")
+        private Integer giftMask;
+
+        /**
+         * 客户id
+         */
+        @SerializedName("customer_id")
+        private Integer customerId;
+
+        /**
+         * 其他成本
+         */
+        @SerializedName("other_cost")
+        private BigDecimal otherCost;
+
+        /**
+         * 不可合并拆分
+         */
+        @SerializedName("is_sealed")
+        private Boolean isSealed;
+
+        /**
+         * 客户类型(0:普通客户;1:分销商;2:线下批发)
+         */
+        @SerializedName("customer_type")
+        private Integer customerType;
+
+        /**
+         * 物流公司id
+         */
+        @SerializedName("logistics_id")
+        private Integer logisticsId;
+
+        /**
+         * 取消原因
+         */
+        @SerializedName("cancel_reason")
+        private String cancelReason;
+
+        /**
+         * 驳回原因
+         */
+        @SerializedName("revert_reason")
+        private String revertReason;
+
+        /**
+         * 订单标签掩码
+         */
+        @SerializedName("new_trade_label")
+        private String newTradeLabel;
+
+        /**
+         * 分销原始单号(无长度限制)
+         */
+        @SerializedName("fenxiao_tid")
+        private String fenxiaoTid;
+
+        /**
+         * 客户唯一编码
+         */
+        @SerializedName("customer_unique_id")
+        private String customerUniqueId;
+
+        /**
+         * 平台标签
+         */
+        @SerializedName("platform_label")
+        private String platformLabel;
+
+        /**
+         * 分销商编号
+         */
+        @SerializedName("fenxiao_nick_no")
+        private String fenxiaoNickNo;
+
+        /**
+         * 预物流同步单号
+         */
+        @SerializedName("pre_sync_logistics_no")
+        private String preSyncLogisticsNo;
+
+        /**
+         * 预物流同步时间
+         */
+        @SerializedName("pre_sync_time")
+        private String preSyncTime;
+
+        /**
+         * 订单结束时间
+         */
+        @SerializedName("end_time")
+        private String endTime;
+
+        /**
+         * 订单结算时间
+         */
+        @SerializedName("settle_time")
+        private String settleTime;
+
+        /**
+         * 订单便签
+         */
+        @SerializedName("tasks")
+        private String tasks;
+
+        /**
+         * 冻结原因id
+         */
+        @SerializedName("freeze_reason_id")
+        private Integer freezeReasonId;
+
+        /**
+         * 标记id
+         */
+        @SerializedName("flag_id")
+        private Integer flagId;
+
+        /**
+         * 订单明细
+         */
+        @SerializedName("detail_list")
+        private List<OrderDetail> detailList;
+
+        // Getters and Setters 省略,请根据需要添加...
+    }
+
+    /**
+     * 订单明细实体类
+     */
+    public static class OrderDetail {
+
+        /**
+         * 订单唯一键
+         */
+        @SerializedName("trade_id")
+        private Long tradeId;
+
+        /**
+         * 订单明细唯一键
+         */
+        @SerializedName("rec_id")
+        private Long recId;
+
+        /**
+         * 平台ID
+         */
+        @SerializedName("platform_id")
+        private Integer platformId;
+
+        /**
+         * 原始子单号
+         */
+        @SerializedName("src_oid")
+        private String srcOid;
+
+        /**
+         * 原始单号
+         */
+        @SerializedName("src_tid")
+        private String srcTid;
+
+        /**
+         * 赠品方式
+         * 0非赠品 1自动赠送 2手工赠送 4周期购赠送 8平台赠送 32阶梯满赠 64CRM追加赠送 65 主品
+         */
+        @SerializedName("gift_type")
+        private Integer giftType;
+
+        /**
+         * 支付状态(0:未付款 1:部分付款 2:已付款)
+         */
+        @SerializedName("pay_status")
+        private Integer payStatus;
+
+        /**
+         * 退款状态
+         * 0、无退款 1、取消退款 2、申请退款 3、待退款 4、待还原 5、退款成功 6、已退(未付款关闭)
+         */
+        @SerializedName("refund_status")
+        private Integer refundStatus;
+
+        /**
+         * 退款模式(1、担保 2、非担保 3、在线非担保)
+         */
+        @SerializedName("guarantee_mode")
+        private Integer guaranteeMode;
+
+        /**
+         * 子单平台状态
+         * 10、未确认 20、待尾款 30、待发货 40、部分发货 50、已发货 60、已签收 70、已完成 80、已退款 90、已关闭
+         */
+        @SerializedName("platform_status")
+        private Integer platformStatus;
+
+        /**
+         * 发货条件(1、款到发货 2、货到付款(包含部分货到付款) 3、分期付款)
+         */
+        @SerializedName("delivery_term")
+        private Integer deliveryTerm;
+
+        /**
+         * 数量
+         */
+        @SerializedName("num")
+        private BigDecimal num;
+
+        /**
+         * 标价,手工新建时使用货品属性中的"零售价"
+         */
+        @SerializedName("price")
+        private BigDecimal price;
+
+        /**
+         * 售后退款数量
+         */
+        @SerializedName("refund_num")
+        private BigDecimal refundNum;
+
+        /**
+         * 成交价,原始单折扣及分摊之后的价格
+         */
+        @SerializedName("order_price")
+        private BigDecimal orderPrice;
+
+        /**
+         * 分摊后价格,进入ERP后再次调整的价格,默认值与order_price一致
+         */
+        @SerializedName("share_price")
+        private BigDecimal sharePrice;
+
+        /**
+         * 手工调整价,正数为加价,负数为减价,暂未处理
+         */
+        @SerializedName("adjust")
+        private BigDecimal adjust;
+
+        /**
+         * 优惠
+         */
+        @SerializedName("discount")
+        private BigDecimal discount;
+
+        /**
+         * 分摊后总价
+         */
+        @SerializedName("share_amount")
+        private BigDecimal shareAmount;
+
+        /**
+         * 税率
+         */
+        @SerializedName("tax_rate")
+        private BigDecimal taxRate;
+
+        /**
+         * 货品名称
+         */
+        @SerializedName("goods_name")
+        private String goodsName;
+
+        /**
+         * 货品编号
+         */
+        @SerializedName("goods_no")
+        private String goodsNo;
+
+        /**
+         * 规格名称
+         */
+        @SerializedName("spec_name")
+        private String specName;
+
+        /**
+         * 商家编码
+         */
+        @SerializedName("spec_no")
+        private String specNo;
+
+        /**
+         * 规格码
+         */
+        @SerializedName("spec_code")
+        private String specCode;
+
+        /**
+         * 组合装编码
+         */
+        @SerializedName("suite_no")
+        private String suiteNo;
+
+        /**
+         * 如果是组合装拆分的,此为组合装名称
+         */
+        @SerializedName("suite_name")
+        private String suiteName;
+
+        /**
+         * 组合装数量,不受拆分合并影响
+         */
+        @SerializedName("suite_num")
+        private BigDecimal suiteNum;
+
+        /**
+         * 组合装分摊后总价
+         */
+        @SerializedName("suite_amount")
+        private BigDecimal suiteAmount;
+
+        /**
+         * 组合装优惠
+         */
+        @SerializedName("suite_discount")
+        private BigDecimal suiteDiscount;
+
+        /**
+         * 平台货品名称
+         */
+        @SerializedName("api_goods_name")
+        private String apiGoodsName;
+
+        /**
+         * 平台规格名称
+         */
+        @SerializedName("api_spec_name")
+        private String apiSpecName;
+
+        /**
+         * 平台货品id
+         */
+        @SerializedName("api_goods_id")
+        private String apiGoodsId;
+
+        /**
+         * 平台规格id
+         */
+        @SerializedName("api_spec_id")
+        private String apiSpecId;
+
+        /**
+         * 货品id(系统货品主键)
+         */
+        @SerializedName("goods_id")
+        private Integer goodsId;
+
+        /**
+         * 单品id(系统单品主键)
+         */
+        @SerializedName("spec_id")
+        private Integer specId;
+
+        /**
+         * 佣金
+         */
+        @SerializedName("commission")
+        private BigDecimal commission;
+
+        /**
+         * 货品类型
+         * 0:其它 1:销售货品 2:原材料 3:包装物 4:周转材料 5:虚拟商品 6:固定资产 8:分装箱
+         */
+        @SerializedName("goods_type")
+        private Integer goodsType;
+
+        /**
+         * 订单内部来源
+         * 0:无来源 1:手机 2:聚划算 32:开具电子发票 2048:当日达 4096:次日达 8192:承诺时效
+         * 2097152:区域零售 4194304:拼多多厂家代打 8388608:周期购 1048576:预售单
+         * 33554432:前N有礼 524288:天猫物流升级 64:按需配送 256:承诺结构化/QIC 16384:商仓鸟配
+         */
+        @SerializedName("from_mask")
+        private Integer fromMask;
+
+        /**
+         * 订单内部来源扩展
+         * 2:小时达订单 4:自选物流 16:国补订单
+         */
+        @SerializedName("from_mask_ext")
+        private Integer fromMaskExt;
+
+        /**
+         * 子单备注
+         */
+        @SerializedName("remark")
+        private String remark;
+
+        /**
+         * 修改时间(毫秒级时间戳,例如:1631861379000)
+         */
+        @SerializedName("modified")
+        private String modified;
+
+        /**
+         * 创建时间(毫秒级时间戳,例如:1631861379000)
+         */
+        @SerializedName("created")
+        private String created;
+
+        /**
+         * 单品自定义属性1
+         */
+        @SerializedName("prop1")
+        private String prop1;
+
+        /**
+         * 单品自定义属性2
+         */
+        @SerializedName("prop2")
+        private String prop2;
+
+        /**
+         * 单品自定义属性3
+         */
+        @SerializedName("prop3")
+        private String prop3;
+
+        /**
+         * 单品自定义属性4
+         */
+        @SerializedName("prop4")
+        private String prop4;
+
+        /**
+         * 单品自定义属性5
+         */
+        @SerializedName("prop5")
+        private String prop5;
+
+        /**
+         * 单品自定义属性6
+         */
+        @SerializedName("prop6")
+        private String prop6;
+
+        /**
+         * 货品重量(子单预估货品总重量)
+         */
+        @SerializedName("weight")
+        private BigDecimal weight;
+
+        /**
+         * 图片路径
+         */
+        @SerializedName("img_url")
+        private String imgUrl;
+
+        /**
+         * 实发数量(此数量为发货数量,删除操作等于将此值设置为0)
+         */
+        @SerializedName("actual_num")
+        private BigDecimal actualNum;
+
+        /**
+         * 条码
+         */
+        @SerializedName("barcode")
+        private String barcode;
+
+        /**
+         * 已付
+         */
+        @SerializedName("paid")
+        private BigDecimal paid;
+
+        /**
+         * 组合装id
+         */
+        @SerializedName("suite_id")
+        private Integer suiteId;
+
+        /**
+         * bind_oid
+         */
+        @SerializedName("bind_oid")
+        private String bindOid;
+
+        /**
+         * 打印组合装(0:组合装明细 1:组合装及明细 2:组合装)
+         */
+        @SerializedName("print_suite_mode")
+        private Integer printSuiteMode;
+
+        /**
+         * 天猫物流升级信息(mask类型值,在判断的时候使用&运算)
+         * 1:天猫物流升级-顺丰配送 2:需要回传 4:天猫物流升级-按需配送 8:天猫物流升级-承诺发货时效
+         * 16:天猫物流升级-承诺达时效 32:天猫物流升级-预售下沉 64:天猫物流升级-预计到货时效
+         * 128:天猫物流升级-配送线路异常 1024:定金链接 2048:补款链接 4096:确认收货
+         */
+        @SerializedName("flag")
+        private Integer flag;
+
+        /**
+         * 库存保留情况
+         * 0:未保留(取消的订单或完成) 1:无库存记录 2:未付款 3:已保留待审核 4:待发货 5:预订单库存
+         */
+        @SerializedName("stock_state")
+        private Integer stockState;
+
+        /**
+         * 平台已发货
+         */
+        @SerializedName("is_consigned")
+        private Boolean isConsigned;
+
+        /**
+         * 是否付款
+         */
+        @SerializedName("is_received")
+        private Integer isReceived;
+
+        /**
+         * 平台类目主键
+         */
+        @SerializedName("cid")
+        private Integer cid;
+
+        /**
+         * 最后更新时间,DateTime格式
+         */
+        @SerializedName("modified_date")
+        private String modifiedDate;
+
+        /**
+         * 创建时间,DateTime格式
+         */
+        @SerializedName("created_date")
+        private String createdDate;
+
+        /**
+         * 分摊邮费
+         */
+        @SerializedName("share_post_price")
+        private BigDecimal sharePostPrice;
+
+        /**
+         * 发票内容
+         */
+        @SerializedName("invoice_content")
+        private String invoiceContent;
+
+        /**
+         * 支付时间,DateTime格式,取自原始订单支付时间
+         */
+        @SerializedName("pay_time")
+        private String payTime;
+
+        /**
+         * 货品简称
+         */
+        @SerializedName("short_name")
+        private String shortName;
+
+        /**
+         * 赠品关联关系
+         */
+        @SerializedName("goods_gift_relation")
+        private String goodsGiftRelation;
+
+        /**
+         * 成本价
+         */
+        @SerializedName("avg_cost")
+        private BigDecimal avgCost;
+
+        /**
+         * 分类名称
+         */
+        @SerializedName("class_name")
+        private String className;
+
+        /**
+         * 基本单位id
+         */
+        @SerializedName("base_unit_id")
+        private Integer baseUnitId;
+
+        /**
+         * 基本单位名称
+         */
+        @SerializedName("base_unit_name")
+        private String baseUnitName;
+
+        /**
+         * 分销商id
+         */
+        @SerializedName("fenxiao_rec_id")
+        private Integer fenxiaoRecId;
+
+        // Getters and Setters 省略,请根据需要添加...
+    }
+
+    /**
+     * 订单状态枚举
+     */
+    public enum OrderStatus {
+        OFFLINE_REFUND(4, "线下退款"),
+        CANCELED(5, "已取消"),
+        WAIT_PREORDER(6, "待转预订单(待审核)"),
+        WAIT_COMPLETE(7, "待转已完成"),
+        UNPAID(10, "未付款"),
+        WAIT_FINAL_PAYMENT(12, "待尾款"),
+        WAIT_UNPAID(15, "等未付"),
+        DELAY_REVIEW(16, "延时审核"),
+        PRE_ORDER_PREPROCESS(19, "预订单前处理"),
+        BEFORE_REVIEW_PREPROCESS(20, "审核前处理"),
+        AUTO_FLOW_WAIT_SHIP(21, "自流转待发货"),
+        ABNORMAL_ORDER(23, "异常订单"),
+        EXCHANGE_PREORDER(24, "换货预订单"),
+        PENDING_PREORDER(25, "待处理预订单"),
+        WAIT_ASSIGN_PREORDER(27, "待分配预订单"),
+        WAIT_CUSTOMER_REVIEW(30, "待客审"),
+        WAIT_FINANCE_REVIEW(35, "待财审"),
+        UNDER_REVIEW(40, "审核中"),
+        REVIEWED(55, "已审核"),
+        SHIPPED(95, "已发货"),
+        COST_CONFIRMATION(96, "成本确认"),
+        POSTED(101, "已过账"),
+        COMPLETED(110, "已完成");
+
+        private final Integer code;
+        private final String desc;
+
+        OrderStatus(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+
+    /**
+     * 订单类型枚举
+     */
+    public enum TradeType {
+        ONLINE_SALES(1, "网店销售"),
+        OFFLINE_ORDER(2, "线下订单"),
+        AFTER_SALES_EXCHANGE(3, "售后换货"),
+        WHOLESALE_BUSINESS(4, "批发业务"),
+        WARRANTY_RENEWAL(5, "保修换新"),
+        WARRANTY_COMPLETED(6, "保修完成"),
+        CASH_SALES(7, "现款销售"),
+        DISTRIBUTION_ORDER(8, "分销订单"),
+        CUSTOM_TYPE_1(101, "自定义类型一"),
+        CUSTOM_TYPE_2(102, "自定义类型二"),
+        CUSTOM_TYPE_3(103, "自定义类型三"),
+        CUSTOM_TYPE_4(104, "自定义类型四"),
+        CUSTOM_TYPE_5(105, "自定义类型五"),
+        CUSTOM_TYPE_6(106, "自定义类型六"),
+        CUSTOM_TYPE_7(107, "自定义类型七"),
+        CUSTOM_TYPE_8(108, "自定义类型八"),
+        CUSTOM_TYPE_9(109, "自定义类型九"),
+        CUSTOM_TYPE_10(110, "自定义类型十");
+
+        private final Integer code;
+        private final String desc;
+
+        TradeType(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+
+    /**
+     * 发货条件枚举
+     */
+    public enum DeliveryTerm {
+        PAY_BEFORE_DELIVERY(1, "款到发货"),
+        CASH_ON_DELIVERY(2, "货到付款"),
+        INSTALLMENT(3, "分期付款"),
+        CREDIT_SALES(4, "挂账");
+
+        private final Integer code;
+        private final String desc;
+
+        DeliveryTerm(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+
+    /**
+     * 退款状态枚举
+     */
+    public enum RefundStatus {
+        NO_REFUND(0, "无退款"),
+        APPLY_REFUND(1, "申请退款"),
+        PARTIAL_REFUND(2, "部分退款"),
+        FULL_REFUND(3, "全部退款");
+
+        private final Integer code;
+        private final String desc;
+
+        RefundStatus(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+
+    /**
+     * 分销类别枚举
+     */
+    public enum FenxiaoType {
+        NOT_FENXIAO(0, "非分销订单"),
+        CONSIGNMENT(1, "代销"),
+        DISTRIBUTION(2, "经销");
+
+        private final Integer code;
+        private final String desc;
+
+        FenxiaoType(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+
+    /**
+     * 发票类型枚举
+     */
+    public enum InvoiceType {
+        NO_INVOICE(0, "不需要"),
+        GENERAL_INVOICE(1, "普通发票"),
+        VAT_GENERAL_INVOICE(2, "增值税普通发票"),
+        VAT_SPECIAL_INVOICE(3, "增值税专用发票");
+
+        private final Integer code;
+        private final String desc;
+
+        InvoiceType(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+
+    /**
+     * 订单来源枚举
+     */
+    public enum TradeFrom {
+        API_CRAWL(1, "API抓单"),
+        MANUAL_CREATE(2, "手工建单"),
+        IMPORT(3, "导入"),
+        COPY_ORDER(4, "复制订单"),
+        INTERFACE_PUSH(5, "接口推送"),
+        RESEND_ORDER(6, "补发订单"),
+        PDA_CREATE(7, "PDA选货开单"),
+        DISTRIBUTION_RESEND(8, "分销补发订单");
+
+        private final Integer code;
+        private final String desc;
+
+        TradeFrom(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+
+}

+ 536 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/RawRefundUploadRequest.java

@@ -0,0 +1,536 @@
+package com.fs.erp.dto.sdk.wangdianTwo.api.dto;
+
+import com.google.gson.annotations.SerializedName;
+import java.math.BigDecimal;
+
+
+/**
+ * 退款单同步接口请求参数实体类
+ */
+public class RawRefundUploadRequest {
+
+    /**
+     * 店铺编号
+     */
+    @SerializedName("shop_no")
+    private String shopNo;
+
+
+    // Getters and Setters
+    public String getShopNo() {
+        return shopNo;
+    }
+
+    public void setShopNo(String shopNo) {
+        this.shopNo = shopNo;
+    }
+
+    /**
+     * 原始退款单实体类
+     */
+    public static class RefundOrder {
+
+        /**
+         * 原始退款单号
+         */
+        @SerializedName("refund_no")
+        private String refundNo;
+
+        /**
+         * 货品数量
+         */
+        @SerializedName("num")
+        private BigDecimal num;
+
+        /**
+         * 原始单号
+         */
+        @SerializedName("tid")
+        private String tid;
+
+        /**
+         * 原始子单号
+         */
+        @SerializedName("oid")
+        private String oid;
+
+        /**
+         * 退款单类型
+         * 0取消订单 1退款(未发货,退款申请) 2退货 3换货 4退款不退货
+         * 当type=3时原始退款单递交不会生成系统退货单
+         */
+        @SerializedName("type")
+        private Integer type;
+
+        /**
+         * 平台状态
+         * 1取消退款,2已申请退款,3等待退货,4等待收货,5退款成功
+         */
+        @SerializedName("status")
+        private Integer status;
+
+        /**
+         * 退款版本,默认传1即可
+         */
+        @SerializedName("refund_version")
+        private String refundVersion;
+
+        /**
+         * 申请退款金额
+         */
+        @SerializedName("refund_amount")
+        private BigDecimal refundAmount;
+
+        /**
+         * 实际退款金额
+         */
+        @SerializedName("actual_refund_amount")
+        private BigDecimal actualRefundAmount;
+
+        /**
+         * 标题,对应原始退款单页面主单货品字段,若无传空字符串
+         */
+        @SerializedName("title")
+        private String title;
+
+        /**
+         * 物流公司名称(支持自定义推送),若无传空字符串
+         */
+        @SerializedName("logistics_name")
+        private String logisticsName;
+
+        /**
+         * 物流单号,若无传空字符串
+         */
+        @SerializedName("logistics_no")
+        private String logisticsNo;
+
+        /**
+         * 客户网名
+         */
+        @SerializedName("buyer_nick")
+        private String buyerNick;
+
+        /**
+         * 退款创建时间
+         */
+        @SerializedName("refund_time")
+        private String refundTime;
+
+        /**
+         * 退款成功时间
+         */
+        @SerializedName("current_phase_timeout")
+        private String currentPhaseTimeout;
+
+        /**
+         * 是否售后退款单
+         * 0:否 1:是
+         */
+        @SerializedName("is_aftersale")
+        private Integer isAftersale;
+
+        /**
+         * 退款原因
+         */
+        @SerializedName("reason")
+        private String reason;
+
+        /**
+         * 单价
+         */
+        @SerializedName("price")
+        private BigDecimal price;
+
+        /**
+         * 买家支付帐号
+         */
+        @SerializedName("pay_account")
+        private String payAccount;
+
+        /**
+         * 支付订单号
+         */
+        @SerializedName("pay_no")
+        private String payNo;
+
+        /**
+         * 备注
+         */
+        @SerializedName("remark")
+        private String remark;
+
+        /**
+         * 退款货品总价
+         */
+        @SerializedName("total_amount")
+        private BigDecimal totalAmount;
+
+        /**
+         * 平台规格编号
+         */
+        @SerializedName("spec_no")
+        private String specNo;
+
+        /**
+         * 平台规格id
+         */
+        @SerializedName("spec_id")
+        private String specId;
+
+        /**
+         * 平台货品编号
+         */
+        @SerializedName("goods_no")
+        private String goodsNo;
+
+        /**
+         * 平台货品id
+         */
+        @SerializedName("goods_id")
+        private String goodsId;
+
+        /**
+         * 修改掩码
+         * 1:新订单 2:状态变化 4:金额变化
+         */
+        @SerializedName("modify_flag")
+        private Integer modifyFlag;
+
+        // Getters and Setters
+        public String getRefundNo() {
+            return refundNo;
+        }
+
+        public void setRefundNo(String refundNo) {
+            this.refundNo = refundNo;
+        }
+
+        public BigDecimal getNum() {
+            return num;
+        }
+
+        public void setNum(BigDecimal num) {
+            this.num = num;
+        }
+
+        public String getTid() {
+            return tid;
+        }
+
+        public void setTid(String tid) {
+            this.tid = tid;
+        }
+
+        public String getOid() {
+            return oid;
+        }
+
+        public void setOid(String oid) {
+            this.oid = oid;
+        }
+
+        public Integer getType() {
+            return type;
+        }
+
+        public void setType(Integer type) {
+            this.type = type;
+        }
+
+        public Integer getStatus() {
+            return status;
+        }
+
+        public void setStatus(Integer status) {
+            this.status = status;
+        }
+
+        public String getRefundVersion() {
+            return refundVersion;
+        }
+
+        public void setRefundVersion(String refundVersion) {
+            this.refundVersion = refundVersion;
+        }
+
+        public BigDecimal getRefundAmount() {
+            return refundAmount;
+        }
+
+        public void setRefundAmount(BigDecimal refundAmount) {
+            this.refundAmount = refundAmount;
+        }
+
+        public BigDecimal getActualRefundAmount() {
+            return actualRefundAmount;
+        }
+
+        public void setActualRefundAmount(BigDecimal actualRefundAmount) {
+            this.actualRefundAmount = actualRefundAmount;
+        }
+
+        public String getTitle() {
+            return title;
+        }
+
+        public void setTitle(String title) {
+            this.title = title;
+        }
+
+        public String getLogisticsName() {
+            return logisticsName;
+        }
+
+        public void setLogisticsName(String logisticsName) {
+            this.logisticsName = logisticsName;
+        }
+
+        public String getLogisticsNo() {
+            return logisticsNo;
+        }
+
+        public void setLogisticsNo(String logisticsNo) {
+            this.logisticsNo = logisticsNo;
+        }
+
+        public String getBuyerNick() {
+            return buyerNick;
+        }
+
+        public void setBuyerNick(String buyerNick) {
+            this.buyerNick = buyerNick;
+        }
+
+        public String getRefundTime() {
+            return refundTime;
+        }
+
+        public void setRefundTime(String refundTime) {
+            this.refundTime = refundTime;
+        }
+
+        public String getCurrentPhaseTimeout() {
+            return currentPhaseTimeout;
+        }
+
+        public void setCurrentPhaseTimeout(String currentPhaseTimeout) {
+            this.currentPhaseTimeout = currentPhaseTimeout;
+        }
+
+        public Integer getIsAftersale() {
+            return isAftersale;
+        }
+
+        public void setIsAftersale(Integer isAftersale) {
+            this.isAftersale = isAftersale;
+        }
+
+        public String getReason() {
+            return reason;
+        }
+
+        public void setReason(String reason) {
+            this.reason = reason;
+        }
+
+        public BigDecimal getPrice() {
+            return price;
+        }
+
+        public void setPrice(BigDecimal price) {
+            this.price = price;
+        }
+
+        public String getPayAccount() {
+            return payAccount;
+        }
+
+        public void setPayAccount(String payAccount) {
+            this.payAccount = payAccount;
+        }
+
+        public String getPayNo() {
+            return payNo;
+        }
+
+        public void setPayNo(String payNo) {
+            this.payNo = payNo;
+        }
+
+        public String getRemark() {
+            return remark;
+        }
+
+        public void setRemark(String remark) {
+            this.remark = remark;
+        }
+
+        public BigDecimal getTotalAmount() {
+            return totalAmount;
+        }
+
+        public void setTotalAmount(BigDecimal totalAmount) {
+            this.totalAmount = totalAmount;
+        }
+
+        public String getSpecNo() {
+            return specNo;
+        }
+
+        public void setSpecNo(String specNo) {
+            this.specNo = specNo;
+        }
+
+        public String getSpecId() {
+            return specId;
+        }
+
+        public void setSpecId(String specId) {
+            this.specId = specId;
+        }
+
+        public String getGoodsNo() {
+            return goodsNo;
+        }
+
+        public void setGoodsNo(String goodsNo) {
+            this.goodsNo = goodsNo;
+        }
+
+        public String getGoodsId() {
+            return goodsId;
+        }
+
+        public void setGoodsId(String goodsId) {
+            this.goodsId = goodsId;
+        }
+
+        public Integer getModifyFlag() {
+            return modifyFlag;
+        }
+
+        public void setModifyFlag(Integer modifyFlag) {
+            this.modifyFlag = modifyFlag;
+        }
+    }
+
+    /**
+     * 退款单类型枚举
+     */
+    public enum RefundType {
+        CANCEL_ORDER(0, "取消订单"),
+        REFUND_BEFORE_SHIP(1, "退款(未发货,退款申请)"),
+        RETURN_GOODS(2, "退货"),
+        EXCHANGE_GOODS(3, "换货"),
+        REFUND_WITHOUT_RETURN(4, "退款不退货");
+
+        private final Integer code;
+        private final String desc;
+
+        RefundType(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+
+    /**
+     * 退款单状态枚举
+     */
+    public enum RefundStatus {
+        CANCEL_REFUND(1, "取消退款"),
+        APPLY_REFUND(2, "已申请退款"),
+        WAIT_RETURN(3, "等待退货"),
+        WAIT_RECEIVE(4, "等待收货"),
+        REFUND_SUCCESS(5, "退款成功");
+
+        private final Integer code;
+        private final String desc;
+
+        RefundStatus(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+
+    /**
+     * 是否售后退款单枚举
+     */
+    public enum IsAftersale {
+        NO(0, "否"),
+        YES(1, "是");
+
+        private final Integer code;
+        private final String desc;
+
+        IsAftersale(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+    }
+
+    /**
+     * 修改掩码枚举
+     */
+    public enum ModifyFlag {
+        NEW_ORDER(1, "新订单"),
+        STATUS_CHANGE(2, "状态变化"),
+        AMOUNT_CHANGE(4, "金额变化");
+
+        private final Integer code;
+        private final String desc;
+
+        ModifyFlag(Integer code, String desc) {
+            this.code = code;
+            this.desc = desc;
+        }
+
+        public Integer getCode() {
+            return code;
+        }
+
+        public String getDesc() {
+            return desc;
+        }
+
+        /**
+         * 组合修改掩码(使用位运算)
+         */
+        public static Integer combine(ModifyFlag... flags) {
+            if (flags == null || flags.length == 0) {
+                return 0;
+            }
+
+            int result = 0;
+            for (ModifyFlag flag : flags) {
+                result |= flag.getCode();
+            }
+            return result;
+        }
+    }
+
+}

+ 60 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/RawRefundUploadResponse.java

@@ -0,0 +1,60 @@
+package com.fs.erp.dto.sdk.wangdianTwo.api.dto;
+
+
+import com.google.gson.annotations.SerializedName;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 退款单同步接口响应参数实体类
+ */
+public class RawRefundUploadResponse {
+
+    /**
+     * {"status":0,"data":{"chg_count":0,"new_count":1}}
+     */
+    // 更新订单数
+    @SerializedName("chg_count")
+    private Integer chgCount;
+    // 新增订单数
+    @SerializedName("new_count")
+    private Integer newCount;
+
+    // 错误信息
+    // 单号 no	String
+    // 错误信息	error	String
+    @SerializedName("error_list")
+    private List<Map<String,Object>> errorList;
+
+    public Integer getChgCount()
+    {
+        return chgCount;
+    }
+
+    public void setChgCount(Integer chgCount)
+    {
+        this.chgCount = chgCount;
+    }
+
+    public Integer getNewCount()
+    {
+        return newCount;
+    }
+
+    public void setNewCount(Integer newCount)
+    {
+        this.newCount = newCount;
+    }
+
+    public List<Map<String,Object>> getErrorList()
+    {
+        return errorList;
+    }
+
+    public void setErrorList(List<Map<String,Object>> errorList)
+    {
+        this.errorList = errorList;
+    }
+}

+ 74 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/StockSearch2Request.java

@@ -0,0 +1,74 @@
+package com.fs.erp.dto.sdk.wangdianTwo.api.dto;
+
+import java.util.List;
+
+public class StockSearch2Request
+{
+	private String startTime;
+	private String endTime;
+	private List<String> specNos;
+	private String warehouseNo;
+	private Integer mask;
+
+	private Integer needAlarmInfo;
+
+	public String getStartTime()
+	{
+		return startTime;
+	}
+
+	public void setStartTime(String startTime)
+	{
+		this.startTime = startTime;
+	}
+
+	public String getEndTime()
+	{
+		return endTime;
+	}
+
+	public void setEndTime(String endTime)
+	{
+		this.endTime = endTime;
+	}
+
+	public List<String> getSpecNos()
+	{
+		return specNos;
+	}
+
+	public void setSpecNos(List<String> specNos)
+	{
+		this.specNos = specNos;
+	}
+
+	public String getWarehouseNo()
+	{
+		return warehouseNo;
+	}
+
+	public void setWarehouseNo(String warehouseNo)
+	{
+		this.warehouseNo = warehouseNo;
+	}
+
+	public Integer getMask()
+	{
+		return mask;
+	}
+
+	public void setMask(Integer mask)
+	{
+		this.mask = mask;
+	}
+
+	public Integer getNeedAlarmInfo()
+	{
+		return needAlarmInfo;
+	}
+
+	public void setNeedAlarmInfo(Integer needAlarmInfo)
+	{
+		this.needAlarmInfo = needAlarmInfo;
+	}
+}

+ 700 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/api/dto/StockSearch2Response.java

@@ -0,0 +1,700 @@
+package com.fs.erp.dto.sdk.wangdianTwo.api.dto;
+
+import com.google.gson.annotations.SerializedName;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+public class StockSearch2Response
+{
+	@SerializedName("total_count") private Integer total;
+	@SerializedName("detail_list") private List<Detail> detailList;
+
+	public Integer getTotal()
+	{
+		return total;
+	}
+
+	public void setTotal(Integer total)
+	{
+		this.total = total;
+	}
+
+	public List<Detail> getDetailList()
+	{
+		return detailList;
+	}
+
+	public void setDetailList(List<Detail> detailList)
+	{
+		this.detailList = detailList;
+	}
+
+	public static class Detail
+	{
+		@SerializedName("spec_code") private String specCode;
+		@SerializedName("to_transfer_num") private BigDecimal toTransferNum;
+		@SerializedName("warehouse_type") private Integer warehouseType;
+		@SerializedName("brand_no") private String brandNo;
+		@SerializedName("wms_stock_diff") private Integer wmsStockDiff;
+		@SerializedName("refund_exch_num") private BigDecimal refundExchNum;
+		@SerializedName("spec_no") private String specNo;
+		@SerializedName("defect") private Boolean defect;
+		@SerializedName("modified") private Long modified;
+		@SerializedName("barcode") private String barcode;
+		@SerializedName("part_paid_num") private BigDecimal partPaidNum;
+		@SerializedName("goods_name") private String goodsName;
+		@SerializedName("lock_num") private BigDecimal lockNum;
+		@SerializedName("created") private Long created;
+		@SerializedName("available_send_stock") private BigDecimal availableSendStock;
+		@SerializedName("subscribe_num") private BigDecimal subscribeNum;
+		@SerializedName("weight") private BigDecimal weight;
+		@SerializedName("brand_name") private String brandName;
+		@SerializedName("unpay_num") private BigDecimal unpayNum;
+		@SerializedName("sending_num") private BigDecimal sendingNum;
+		@SerializedName("to_process_in_num") private BigDecimal toProcessInNum;
+		@SerializedName("warehouse_name") private String warehouseName;
+		@SerializedName("img_url") private String imgUrl;
+		@SerializedName("refund_num") private BigDecimal refundNum;
+		@SerializedName("to_process_out_num") private BigDecimal toProcessOutNum;
+		@SerializedName("order_num") private BigDecimal orderNum;
+		@SerializedName("status") private Integer status;
+		@SerializedName("flag_id") private Integer flagId;
+		@SerializedName("wms_sync_stock") private BigDecimal wmsSyncStock;
+		@SerializedName("to_purchase_num") private BigDecimal toPurchaseNum;
+		@SerializedName("wms_preempty_stock") private BigDecimal wmsPreemptyStock;
+		@SerializedName("goods_no") private String goodsNo;
+		@SerializedName("stock_num") private BigDecimal stockNum;
+		@SerializedName("purchase_arrive_num") private BigDecimal purchaseArriveNum;
+		@SerializedName("wms_preempty_diff") private BigDecimal wmsPreemptyDiff;
+		@SerializedName("remark") private String remark;
+		@SerializedName("flag_name") private String flagName;
+		@SerializedName("return_num") private BigDecimal returnNum;
+		@SerializedName("purchase_num") private BigDecimal purchaseNum;
+		@SerializedName("warehouse_no") private String warehouseNo;
+		@SerializedName("spec_id") private Integer specId;
+		@SerializedName("return_exch_num") private BigDecimal returnExchNum;
+		@SerializedName("rec_id") private Integer recId;
+		@SerializedName("to_other_in_num") private BigDecimal toOtherInNum;
+		@SerializedName("to_other_out_num") private BigDecimal toOtherOutNum;
+		@SerializedName("refund_onway_num") private BigDecimal refundOnwayNum;
+		@SerializedName("transfer_num") private BigDecimal transferNum;
+		@SerializedName("spec_name") private String specName;
+		@SerializedName("return_onway_num") private BigDecimal returnOnwayNum;
+		@SerializedName("warehouse_id") private Integer warehouseId;
+		@SerializedName("last_inout_time") private String lastInoutTime;
+		@SerializedName("last_pd_time") private String lastPdTime;
+
+
+		@SerializedName("aux_unit_name")
+		private String auxUnitName;
+
+		@SerializedName("safe_stock")
+		private BigDecimal safeStock;
+
+		@SerializedName("safe_stock_upper")
+		private BigDecimal safeStockUpper;
+
+		@SerializedName("alarm_type")
+		private Integer alarmType;
+
+		@SerializedName("alarm_days")
+		private BigDecimal alarmDays;
+
+		@SerializedName("alarm_days_upper")
+		private BigDecimal alarmDaysUpper;
+
+		@SerializedName("cycle_days")
+		private BigDecimal cycleDays;
+
+		public String getSpecCode()
+		{
+			return specCode;
+		}
+
+		public void setSpecCode(String specCode)
+		{
+			this.specCode = specCode;
+		}
+
+		public BigDecimal getToTransferNum()
+		{
+			return toTransferNum;
+		}
+
+		public void setToTransferNum(BigDecimal toTransferNum)
+		{
+			this.toTransferNum = toTransferNum;
+		}
+
+		public Integer getWarehouseType()
+		{
+			return warehouseType;
+		}
+
+		public void setWarehouseType(Integer warehouseType)
+		{
+			this.warehouseType = warehouseType;
+		}
+
+		public String getBrandNo()
+		{
+			return brandNo;
+		}
+
+		public void setBrandNo(String brandNo)
+		{
+			this.brandNo = brandNo;
+		}
+
+		public Integer getWmsStockDiff()
+		{
+			return wmsStockDiff;
+		}
+
+		public void setWmsStockDiff(Integer wmsStockDiff)
+		{
+			this.wmsStockDiff = wmsStockDiff;
+		}
+
+		public BigDecimal getRefundExchNum()
+		{
+			return refundExchNum;
+		}
+
+		public void setRefundExchNum(BigDecimal refundExchNum)
+		{
+			this.refundExchNum = refundExchNum;
+		}
+
+		public String getSpecNo()
+		{
+			return specNo;
+		}
+
+		public void setSpecNo(String specNo)
+		{
+			this.specNo = specNo;
+		}
+
+		public Boolean getDefect()
+		{
+			return defect;
+		}
+
+		public void setDefect(Boolean defect)
+		{
+			this.defect = defect;
+		}
+
+		public Long getModified()
+		{
+			return modified;
+		}
+
+		public void setModified(Long modified)
+		{
+			this.modified = modified;
+		}
+
+		public String getBarcode()
+		{
+			return barcode;
+		}
+
+		public void setBarcode(String barcode)
+		{
+			this.barcode = barcode;
+		}
+
+		public BigDecimal getPartPaidNum()
+		{
+			return partPaidNum;
+		}
+
+		public void setPartPaidNum(BigDecimal partPaidNum)
+		{
+			this.partPaidNum = partPaidNum;
+		}
+
+		public String getGoodsName()
+		{
+			return goodsName;
+		}
+
+		public void setGoodsName(String goodsName)
+		{
+			this.goodsName = goodsName;
+		}
+
+		public BigDecimal getLockNum()
+		{
+			return lockNum;
+		}
+
+		public void setLockNum(BigDecimal lockNum)
+		{
+			this.lockNum = lockNum;
+		}
+
+		public Long getCreated()
+		{
+			return created;
+		}
+
+		public void setCreated(Long created)
+		{
+			this.created = created;
+		}
+
+		public BigDecimal getAvailableSendStock()
+		{
+			return availableSendStock;
+		}
+
+		public void setAvailableSendStock(BigDecimal availableSendStock)
+		{
+			this.availableSendStock = availableSendStock;
+		}
+
+		public BigDecimal getSubscribeNum()
+		{
+			return subscribeNum;
+		}
+
+		public void setSubscribeNum(BigDecimal subscribeNum)
+		{
+			this.subscribeNum = subscribeNum;
+		}
+
+		public BigDecimal getWeight()
+		{
+			return weight;
+		}
+
+		public void setWeight(BigDecimal weight)
+		{
+			this.weight = weight;
+		}
+
+		public String getBrandName()
+		{
+			return brandName;
+		}
+
+		public void setBrandName(String brandName)
+		{
+			this.brandName = brandName;
+		}
+
+		public BigDecimal getUnpayNum()
+		{
+			return unpayNum;
+		}
+
+		public void setUnpayNum(BigDecimal unpayNum)
+		{
+			this.unpayNum = unpayNum;
+		}
+
+		public BigDecimal getSendingNum()
+		{
+			return sendingNum;
+		}
+
+		public void setSendingNum(BigDecimal sendingNum)
+		{
+			this.sendingNum = sendingNum;
+		}
+
+		public BigDecimal getToProcessInNum()
+		{
+			return toProcessInNum;
+		}
+
+		public void setToProcessInNum(BigDecimal toProcessInNum)
+		{
+			this.toProcessInNum = toProcessInNum;
+		}
+
+		public String getWarehouseName()
+		{
+			return warehouseName;
+		}
+
+		public void setWarehouseName(String warehouseName)
+		{
+			this.warehouseName = warehouseName;
+		}
+
+		public String getImgUrl()
+		{
+			return imgUrl;
+		}
+
+		public void setImgUrl(String imgUrl)
+		{
+			this.imgUrl = imgUrl;
+		}
+
+		public BigDecimal getRefundNum()
+		{
+			return refundNum;
+		}
+
+		public void setRefundNum(BigDecimal refundNum)
+		{
+			this.refundNum = refundNum;
+		}
+
+		public BigDecimal getToProcessOutNum()
+		{
+			return toProcessOutNum;
+		}
+
+		public void setToProcessOutNum(BigDecimal toProcessOutNum)
+		{
+			this.toProcessOutNum = toProcessOutNum;
+		}
+
+		public BigDecimal getOrderNum()
+		{
+			return orderNum;
+		}
+
+		public void setOrderNum(BigDecimal orderNum)
+		{
+			this.orderNum = orderNum;
+		}
+
+		public Integer getStatus()
+		{
+			return status;
+		}
+
+		public void setStatus(Integer status)
+		{
+			this.status = status;
+		}
+
+		public Integer getFlagId()
+		{
+			return flagId;
+		}
+
+		public void setFlagId(Integer flagId)
+		{
+			this.flagId = flagId;
+		}
+
+		public BigDecimal getWmsSyncStock()
+		{
+			return wmsSyncStock;
+		}
+
+		public void setWmsSyncStock(BigDecimal wmsSyncStock)
+		{
+			this.wmsSyncStock = wmsSyncStock;
+		}
+
+		public BigDecimal getToPurchaseNum()
+		{
+			return toPurchaseNum;
+		}
+
+		public void setToPurchaseNum(BigDecimal toPurchaseNum)
+		{
+			this.toPurchaseNum = toPurchaseNum;
+		}
+
+		public BigDecimal getWmsPreemptyStock()
+		{
+			return wmsPreemptyStock;
+		}
+
+		public void setWmsPreemptyStock(BigDecimal wmsPreemptyStock)
+		{
+			this.wmsPreemptyStock = wmsPreemptyStock;
+		}
+
+		public String getGoodsNo()
+		{
+			return goodsNo;
+		}
+
+		public void setGoodsNo(String goodsNo)
+		{
+			this.goodsNo = goodsNo;
+		}
+
+		public BigDecimal getStockNum()
+		{
+			return stockNum;
+		}
+
+		public void setStockNum(BigDecimal stockNum)
+		{
+			this.stockNum = stockNum;
+		}
+
+		public BigDecimal getPurchaseArriveNum()
+		{
+			return purchaseArriveNum;
+		}
+
+		public void setPurchaseArriveNum(BigDecimal purchaseArriveNum)
+		{
+			this.purchaseArriveNum = purchaseArriveNum;
+		}
+
+		public BigDecimal getWmsPreemptyDiff()
+		{
+			return wmsPreemptyDiff;
+		}
+
+		public void setWmsPreemptyDiff(BigDecimal wmsPreemptyDiff)
+		{
+			this.wmsPreemptyDiff = wmsPreemptyDiff;
+		}
+
+		public String getRemark()
+		{
+			return remark;
+		}
+
+		public void setRemark(String remark)
+		{
+			this.remark = remark;
+		}
+
+		public String getFlagName()
+		{
+			return flagName;
+		}
+
+		public void setFlagName(String flagName)
+		{
+			this.flagName = flagName;
+		}
+
+		public BigDecimal getReturnNum()
+		{
+			return returnNum;
+		}
+
+		public void setReturnNum(BigDecimal returnNum)
+		{
+			this.returnNum = returnNum;
+		}
+
+		public BigDecimal getPurchaseNum()
+		{
+			return purchaseNum;
+		}
+
+		public void setPurchaseNum(BigDecimal purchaseNum)
+		{
+			this.purchaseNum = purchaseNum;
+		}
+
+		public String getWarehouseNo()
+		{
+			return warehouseNo;
+		}
+
+		public void setWarehouseNo(String warehouseNo)
+		{
+			this.warehouseNo = warehouseNo;
+		}
+
+		public Integer getSpecId()
+		{
+			return specId;
+		}
+
+		public void setSpecId(Integer specId)
+		{
+			this.specId = specId;
+		}
+
+		public BigDecimal getReturnExchNum()
+		{
+			return returnExchNum;
+		}
+
+		public void setReturnExchNum(BigDecimal returnExchNum)
+		{
+			this.returnExchNum = returnExchNum;
+		}
+
+		public Integer getRecId()
+		{
+			return recId;
+		}
+
+		public void setRecId(Integer recId)
+		{
+			this.recId = recId;
+		}
+
+		public BigDecimal getToOtherInNum()
+		{
+			return toOtherInNum;
+		}
+
+		public void setToOtherInNum(BigDecimal toOtherInNum)
+		{
+			this.toOtherInNum = toOtherInNum;
+		}
+
+		public BigDecimal getToOtherOutNum()
+		{
+			return toOtherOutNum;
+		}
+
+		public void setToOtherOutNum(BigDecimal toOtherOutNum)
+		{
+			this.toOtherOutNum = toOtherOutNum;
+		}
+
+		public BigDecimal getRefundOnwayNum()
+		{
+			return refundOnwayNum;
+		}
+
+		public void setRefundOnwayNum(BigDecimal refundOnwayNum)
+		{
+			this.refundOnwayNum = refundOnwayNum;
+		}
+
+		public BigDecimal getTransferNum()
+		{
+			return transferNum;
+		}
+
+		public void setTransferNum(BigDecimal transferNum)
+		{
+			this.transferNum = transferNum;
+		}
+
+		public String getSpecName()
+		{
+			return specName;
+		}
+
+		public void setSpecName(String specName)
+		{
+			this.specName = specName;
+		}
+
+		public BigDecimal getReturnOnwayNum()
+		{
+			return returnOnwayNum;
+		}
+
+		public void setReturnOnwayNum(BigDecimal returnOnwayNum)
+		{
+			this.returnOnwayNum = returnOnwayNum;
+		}
+
+		public Integer getWarehouseId()
+		{
+			return warehouseId;
+		}
+
+		public void setWarehouseId(Integer warehouseId)
+		{
+			this.warehouseId = warehouseId;
+		}
+
+		public String getLastInoutTime()
+		{
+			return lastInoutTime;
+		}
+
+		public void setLastInoutTime(String lastInoutTime)
+		{
+			this.lastInoutTime = lastInoutTime;
+		}
+
+		public String getLastPdTime()
+		{
+			return lastPdTime;
+		}
+
+		public void setLastPdTime(String lastPdTime)
+		{
+			this.lastPdTime = lastPdTime;
+		}
+
+		public String getAuxUnitName()
+		{
+			return auxUnitName;
+		}
+
+		public void setAuxUnitName(String auxUnitName)
+		{
+			this.auxUnitName = auxUnitName;
+		}
+
+		public BigDecimal getSafeStock()
+		{
+			return safeStock;
+		}
+
+		public void setSafeStock(BigDecimal safeStock)
+		{
+			this.safeStock = safeStock;
+		}
+
+		public BigDecimal getSafeStockUpper()
+		{
+			return safeStockUpper;
+		}
+
+		public void setSafeStockUpper(BigDecimal safeStockUpper)
+		{
+			this.safeStockUpper = safeStockUpper;
+		}
+
+		public Integer getAlarmType()
+		{
+			return alarmType;
+		}
+
+		public void setAlarmType(Integer alarmType)
+		{
+			this.alarmType = alarmType;
+		}
+
+		public BigDecimal getAlarmDays()
+		{
+			return alarmDays;
+		}
+
+		public void setAlarmDays(BigDecimal alarmDays)
+		{
+			this.alarmDays = alarmDays;
+		}
+
+		public BigDecimal getAlarmDaysUpper()
+		{
+			return alarmDaysUpper;
+		}
+
+		public void setAlarmDaysUpper(BigDecimal alarmDaysUpper)
+		{
+			this.alarmDaysUpper = alarmDaysUpper;
+		}
+
+		public BigDecimal getCycleDays()
+		{
+			return cycleDays;
+		}
+
+		public void setCycleDays(BigDecimal cycleDays)
+		{
+			this.cycleDays = cycleDays;
+		}
+	}
+}

+ 17 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/impl/Api.java

@@ -0,0 +1,17 @@
+package com.fs.erp.dto.sdk.wangdianTwo.impl;
+
+import java.lang.annotation.*;
+
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface Api
+{
+	// 方法名
+	public String value();
+
+	// 是否分页
+	public boolean paged() default false;
+
+
+}

+ 55 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/impl/ApiFactory.java

@@ -0,0 +1,55 @@
+package com.fs.erp.dto.sdk.wangdianTwo.impl;
+
+
+
+import com.fs.erp.dto.sdk.wangdianTwo.Client;
+import com.fs.erp.dto.sdk.wangdianTwo.Pager;
+import com.fs.erp.dto.sdk.wangdianTwo.WdtErpException;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.lang.reflect.Type;
+
+public class ApiFactory
+{
+	private static class DynamicProxy implements InvocationHandler
+	{
+		private Client client;
+
+		public DynamicProxy(Client client)
+		{
+			this.client = client;
+		}
+
+		@Override
+		public Object invoke(Object inst, Method method, Object[] args) throws Throwable
+		{
+			Api api = method.getAnnotation(Api.class);
+			if (api == null)
+				throw new WdtErpException(-1, "Api Name not indicated");
+
+			Pager pager = null;
+			// 如果分页查询, 最后一个参数是pager
+			if (api.paged())
+			{
+				int len = args.length;
+				pager = (Pager) args[len - 1];
+
+				Object[] newParams = new Object[len - 1];
+				System.arraycopy(args, 0, newParams, 0, len - 1);
+				args = newParams;
+			}
+
+			Type returnType = method.getGenericReturnType();
+
+			return this.client.execute(api.value(), args, pager, returnType);
+		}
+	}
+
+	@SuppressWarnings("unchecked")
+	public static <T> T get(Client client, Class<T> iface)
+	{
+		return (T) Proxy.newProxyInstance(iface.getClassLoader(), new Class<?>[] { iface }, new DynamicProxy(client));
+	}
+}

+ 342 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/impl/DefaultClient.java

@@ -0,0 +1,342 @@
+package com.fs.erp.dto.sdk.wangdianTwo.impl;
+
+
+import com.fs.erp.dto.sdk.wangdianTwo.Client;
+import com.fs.erp.dto.sdk.wangdianTwo.Pager;
+import com.fs.erp.dto.sdk.wangdianTwo.WdtErpException;
+import com.google.gson.*;
+
+import java.io.*;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.Map;
+import java.util.TreeMap;
+
+public class DefaultClient implements Client
+{
+	private static final String WDT_SERVICE_URL = "http://wdt.wangdian.cn/";
+	// 协议版本号
+	public static final String version = "1.0";
+	private static final int WDT_UNIX_TIMESTAMP_DIFF = 1325347200;
+
+	private String sid; // 卖家标识
+	private String url; // 服务器URL
+	private String key; // openapi key
+	private String secret; // openapi secret
+	private String salt; // openapi salt
+	private int timeout = 30000; // http超时时间, 默认30秒
+	private boolean isMultiTenantMode = false ;
+
+	private static class BooleanJsonDeserializer implements JsonDeserializer<Boolean>
+	{
+		@Override
+		public Boolean deserialize(JsonElement json, Type type, JsonDeserializationContext context)
+				throws JsonParseException
+		{
+			if (json.isJsonPrimitive())
+			{
+				JsonPrimitive primitive = (JsonPrimitive) json;
+				if (primitive.isBoolean())
+					return primitive.getAsBoolean();
+
+				if (primitive.isNumber())
+				{
+					Number num = primitive.getAsNumber();
+					if (num instanceof Integer || num instanceof Long || num instanceof Short || num instanceof Byte)
+						return num.intValue() != 0;
+
+					return num.doubleValue() != 0;
+				}
+			}
+
+			return !json.isJsonNull();
+		}
+
+		static final BooleanJsonDeserializer INSTANCE = new BooleanJsonDeserializer();
+	}
+
+	private static Gson gson = new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)
+			.registerTypeAdapter(boolean.class, BooleanJsonDeserializer.INSTANCE)
+			.registerTypeAdapter(Boolean.class, BooleanJsonDeserializer.INSTANCE).create();
+
+	private static JsonParser parser = new JsonParser();
+
+	private DefaultClient(String sid, String url, String key, String secret, boolean isMultiTenantMode)
+	{
+		if (url.endsWith("/"))
+			url += "openapi";
+		else
+			url += "/openapi";
+		this.url = url;
+
+		this.sid = sid;
+		this.key = key;
+
+		int pos = secret.indexOf(':');
+		this.secret = secret.substring(0, pos);
+		this.salt = secret.substring(pos + 1);
+		this.isMultiTenantMode = isMultiTenantMode;
+	}
+
+	private String urlEncode(String data) throws UnsupportedEncodingException
+	{
+		return URLEncoder.encode(data, StandardCharsets.UTF_8.name());
+	}
+
+	private String ToQueryString(Map<String, String> args) throws UnsupportedEncodingException
+	{
+		StringBuilder sb = new StringBuilder();
+
+		boolean first = true;
+		for (Map.Entry<String, String> item : args.entrySet())
+		{
+			if (!first)
+				sb.append('&');
+			else
+				first = false;
+
+			sb.append(urlEncode(item.getKey()));
+			sb.append('=');
+			sb.append(urlEncode(item.getValue()));
+		}
+
+		return sb.toString();
+	}
+
+	private static String md5(String info)
+	{
+		try
+		{
+			// 获取 MessageDigest 对象,参数为 MD5 字符串,表示这是一个 MD5 算法(其他还有 SHA1 算法等):
+			MessageDigest md5 = MessageDigest.getInstance("MD5");
+			// update(byte[])方法,输入原数据
+			// 类似StringBuilder对象的append()方法,追加模式,属于一个累计更改的过程
+			md5.update(info.getBytes(StandardCharsets.UTF_8));
+			// digest()被调用后,MessageDigest对象就被重置,即不能连续再次调用该方法计算原数据的MD5值。可以手动调用reset()方法重置输入源。
+			// digest()返回值16位长度的哈希值,由byte[]承接
+			byte[] md5Array = md5.digest();
+			// byte[]通常我们会转化为十六进制的32位长度的字符串来使用,本文会介绍三种常用的转换方法
+			return bytesToHex(md5Array);
+		}
+		catch (NoSuchAlgorithmException e)
+		{
+			throw new RuntimeException(e);
+		}
+	}
+
+	private static String bytesToHex(byte[] md5Array)
+	{
+		StringBuilder strBuilder = new StringBuilder();
+		for (int i = 0; i < md5Array.length; i++)
+		{
+			int temp = 0xff & md5Array[i];
+			String hexString = Integer.toHexString(temp);
+			if (hexString.length() == 1)
+			{// 如果是十六进制的0f,默认只显示f,此时要补上0
+				strBuilder.append("0").append(hexString);
+			}
+			else
+			{
+				strBuilder.append(hexString);
+			}
+		}
+
+		return strBuilder.toString();
+	}
+
+	/**
+	 * 计算签名
+	 * @param args 请求参数
+	 * @param secret secret
+	 * @return 签名
+	 */
+	private String sign(Map<String, String> args, String secret)
+	{
+		StringBuilder sb = new StringBuilder();
+		sb.append(secret);
+		for (Map.Entry<String, String> item : args.entrySet())
+		{
+			if (item.getKey().equals("sign"))
+				continue;
+
+			sb.append(item.getKey());
+			sb.append(item.getValue());
+		}
+		sb.append(secret);
+
+		return md5(sb.toString());
+	}
+
+	/**
+	 *
+	 * @param method 方法名称
+	 * @param args 请求参数
+	 * @param pager 分页参数
+	 * @param returnType 返回值类型
+	 * @return 响应信息
+	 * @throws WdtErpException wdt返回的错误信息
+	 * @throws IOException 请求异常
+	 */
+	@Override
+	public Object execute(String method, Object[] args, Pager pager, Type returnType)
+			throws WdtErpException, IOException
+	{
+		Map<String, String> requestParams = new TreeMap<>();
+		requestParams.put("sid", this.sid);
+		requestParams.put("key", this.key);
+		requestParams.put("method", method);
+		requestParams.put("salt", this.salt);
+		requestParams.put("timestamp",
+				Integer.toString((int) (System.currentTimeMillis() / 1000 - WDT_UNIX_TIMESTAMP_DIFF)));
+		requestParams.put("v", version);
+
+		if (pager != null)
+		{
+			requestParams.put("page_size", Integer.toString(pager.getPageSize()));
+			requestParams.put("page_no", Integer.toString(pager.getPageNo()));
+			requestParams.put("calc_total", pager.isCalcTotal() ? "1" : "0");
+		}
+
+		// 请求参数
+		String body = gson.toJson(args);
+		requestParams.put("body", body);
+
+		// 计算签名
+		String sign = this.sign(requestParams, this.secret);
+		requestParams.remove("body");
+		requestParams.put("sign", sign);
+
+		String requestUrl = this.url + "?" + this.ToQueryString(requestParams);
+
+		PrintWriter outWriter = null;
+		BufferedReader inReader = null;
+		String responseBody;
+		try
+		{
+			URL url = new URL(requestUrl);
+
+			HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+			conn.setConnectTimeout(timeout);
+			conn.setReadTimeout(timeout);
+
+			if (this.isMultiTenantMode)
+				conn.setRequestProperty("Connection", "close");
+
+			conn.setRequestProperty("Content-Type", "application/json");
+			conn.setDoOutput(true);
+			conn.setDoInput(true);
+
+			OutputStream outStream = conn.getOutputStream();
+			outWriter = new PrintWriter(new OutputStreamWriter(outStream, StandardCharsets.UTF_8));
+
+			outWriter.write(body);
+			outWriter.flush();
+
+			InputStream in = conn.getInputStream();
+			inReader = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8));
+
+			StringBuilder sb = new StringBuilder();
+			int len;
+			char[] tmp = new char[256];
+			while ((len = inReader.read(tmp)) > 0)
+			{
+				sb.append(tmp, 0, len);
+			}
+			responseBody = sb.toString();
+		}
+		finally
+		{
+			if (outWriter != null)
+				outWriter.close();
+
+			if (inReader != null)
+				inReader.close();
+		}
+
+		JsonObject jsonResponse = parser.parse(responseBody).getAsJsonObject();
+
+		int status = jsonResponse.get("status").getAsInt();
+		if (status > 0)
+		{
+			String message = jsonResponse.get("message").getAsString();
+			throw new WdtErpException(status, message);
+		}
+
+		if (returnType.equals(void.class) || returnType.equals(Void.class))
+			return null;
+
+		Object result;
+		if (!jsonResponse.has("data"))
+			result = null;
+		else if (jsonResponse.get("data").isJsonArray())
+			result = gson.fromJson(jsonResponse, returnType);
+		else
+			result = gson.fromJson(jsonResponse.get("data"), returnType);
+
+		if (pager == null || !pager.isCalcTotal() || result == null || !(returnType instanceof Class))
+			return result;
+
+		if (!jsonResponse.has("total"))
+			return result;
+
+		Class<?> returnClass = (Class<?>) returnType;
+		try
+		{
+			Method[] methods = returnClass.getDeclaredMethods();
+			for (Method m : methods)
+			{
+				if (m.getName().equals("setTotal"))
+				{
+					Class<?>[] argsType = m.getParameterTypes();
+					if (argsType.length == 1)
+					{
+						Class<?> argType = argsType[0];
+						if (argType == Integer.class || argType == int.class)
+							m.invoke(result, jsonResponse.get("total").getAsInt());
+						else if (argType == Long.class || argType == long.class)
+							m.invoke(result, jsonResponse.get("total").getAsLong());
+						else
+							continue;
+
+						break;
+					}
+				}
+			}
+		}
+		catch (SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e)
+		{
+			e.printStackTrace();
+		}
+
+		return result;
+
+	}
+
+	@Override
+	public void setTimeout(int timeout)
+	{
+		this.timeout = timeout;
+	}
+
+	public static Client get(String sid, String url, String key, String secret, boolean isMultiTenantMode)
+	{
+		return new DefaultClient(sid, url, key, secret, isMultiTenantMode);
+	}
+
+	public static Client get(String sid, String url, String key, String secret)
+	{
+		return new DefaultClient(sid, url, key, secret, false);
+	}
+
+	public static Client get(String sid, String key, String secret)
+	{
+		return new DefaultClient(sid, WDT_SERVICE_URL, key, secret, false);
+	}
+}

+ 50 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/impl/ExApiFactory.java

@@ -0,0 +1,50 @@
+package com.fs.erp.dto.sdk.wangdianTwo.impl;
+
+
+
+import com.fs.erp.dto.sdk.wangdianTwo.Client;
+import com.fs.erp.dto.sdk.wangdianTwo.WdtErpException;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+
+public class ExApiFactory
+{
+	private static class DynamicProxy implements InvocationHandler
+	{
+		private Client client;
+
+		public DynamicProxy(Client client)
+		{
+			this.client = client;
+		}
+
+		@Override
+		public Object invoke(Object inst, Method method, Object[] args) throws Throwable
+		{
+			Api api = method.getAnnotation(Api.class);
+			if (api == null)
+				throw new WdtErpException(-1, "Api Name not indicated");
+
+			// 如果分页查询, 最后一个参数是pager
+			if (api.paged())
+				throw new IllegalArgumentException("Pagination is not supported for Script Api");
+
+			int len = args.length;
+
+			Object[] newParams = new Object[len + 1];
+			newParams[0] = api.value();
+			System.arraycopy(args, 0, newParams, 1, len);
+
+			return this.client.execute("system.ScriptExtension.call", newParams, null, method.getReturnType());
+		}
+	}
+
+	@SuppressWarnings("unchecked")
+	public static <T> T get(Client client, Class<T> iface)
+	{
+		return (T) Proxy.newProxyInstance(iface.getClassLoader(), new Class<?>[] { iface }, new DynamicProxy(client));
+	}
+
+}

+ 24 - 0
fs-service/src/main/java/com/fs/erp/dto/sdk/wangdianTwo/utils/HandUtils.java

@@ -0,0 +1,24 @@
+package com.fs.erp.dto.sdk.wangdianTwo.utils;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class HandUtils
+{
+	/**
+	 * 校验是否为合法的datetime字符串
+	 *
+	 * @param datetime
+	 * @return
+	 */
+	public static boolean dateValidityCheck(String datetime)
+	{
+		String regex = "^((\\d{2}(([02468][048])|([13579][26]))[\\-\\/\\s]?((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))"
+				+ "[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])))))|(\\d{2}(([02468][1235679])|([13579][01345789]))"
+				+ "[\\-\\/\\s]?((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|"
+				+ "(0?2[\\-\\/\\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\\s(((0?[0-9])|([1][0-9])|([2][0-4]))\\:([0-5]?[0-9])((\\s)|(\\:([0-5]?[0-9])))))?$";
+		Pattern p = Pattern.compile(regex);
+		Matcher m = p.matcher(datetime);
+		return m.matches();
+	}
+}

+ 100 - 0
fs-service/src/main/java/com/fs/erp/service/impl/WdtTwoErpGoodsServiceImpl.java

@@ -0,0 +1,100 @@
+package com.fs.erp.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.PropertyNamingStrategy;
+import com.alibaba.fastjson.parser.ParserConfig;
+import com.fs.erp.domain.ErpGoods;
+import com.fs.erp.domain.ErpGoodsStock;
+import com.fs.erp.dto.*;
+import com.fs.erp.dto.sdk.wangdian.api.WdtClient;
+import com.fs.erp.dto.wdt.*;
+import com.fs.erp.service.IErpGoodsService;
+import com.hc.openapi.tool.util.ObjectUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.exception.ExceptionUtils;
+import org.apache.http.util.Asserts;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
+import org.springframework.stereotype.Service;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 旗舰版 erp
+ * @Param:
+ * @Return:
+ * @Author xgb
+ * @Date 2026/1/26 9:31
+ */
+@Slf4j
+@Service
+@Primary
+public class WdtTwoErpGoodsServiceImpl implements IErpGoodsService {
+    @Autowired
+    private WdtClient client;
+
+    @Override
+    public BaseResponse addGoods(ErpGoods goods) {
+        return null;
+    }
+
+    @Override
+    public BaseResponse addGoodsScrm(ErpGoods goods) {
+        return null;
+    }
+
+    @Override
+    public ErpGoodsQueryResponse getGoods(ErpGoodsQueryRequert param) {
+        return null;
+    }
+
+    @Override
+    public ErpGoodsQueryResponse getGoodsScrm(ErpGoodsQueryRequert param) {
+        return null;
+    }
+
+    @Override
+    public ErpGoodsStockQueryResponse getGoodsStock(ErpGoodsStockQueryRequert param) {
+        String barcode = param.getBarcode();
+        Asserts.notNull(barcode,"barcode不能为空!");
+
+        Map<String,String> map = new HashMap<>();
+        map.put("spec_no",barcode);
+        try {
+            String response = client.execute("stock_query.php", map);
+            ParserConfig config = new ParserConfig();
+            config.propertyNamingStrategy = PropertyNamingStrategy.CamelCase;
+            ErpWdtStockRespDTO erpWdtStockRespDTO = JSON.parseObject(response, ErpWdtStockRespDTO.class,config);
+            List<ErpGoodsStock> list = new ArrayList<>();
+            if(ObjectUtils.equals(0,erpWdtStockRespDTO.getCode())){
+                List<ErpWdtStockDTO> stocks = erpWdtStockRespDTO.getStocks();
+                for (ErpWdtStockDTO stock : stocks) {
+                    ErpGoodsStock erpGoodsStock = new ErpGoodsStock();
+                    erpGoodsStock.setBarcode(barcode);
+                    erpGoodsStock.setQty(stock.getStock_num().split("\\.")[0]); //999979.0000
+                    erpGoodsStock.setSalable_qty(stock.getAvaliable_num().split("\\.")[0]); //999976.0000
+                    list.add(erpGoodsStock);
+                }
+            } else {
+                log.info("获取erp库存失败! 错误原因: {}", JSON.toJSONString(erpWdtStockRespDTO));
+                throw new RuntimeException(erpWdtStockRespDTO.getMessage());
+            }
+            ErpGoodsStockQueryResponse erpGoodsStockQueryResponse = new ErpGoodsStockQueryResponse();
+            erpGoodsStockQueryResponse.setStocks(list);
+            return erpGoodsStockQueryResponse;
+        } catch (IOException e) {
+            log.info("获取erp库存失败! 错误原因: {}", ExceptionUtils.getStackTrace(e));
+            throw new RuntimeException(e);
+        }
+    }
+
+    @Override
+    public ErpGoodsStockQueryResponse getGoodsStockScrm(ErpGoodsStockQueryRequert param) {
+        return null;
+    }
+}
+