
package com.tmerclub.cloud.common.order.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serial;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Date;
import java.util.List;


/**
 * @author tmerclub
 */
public class OrderSearchDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 用户id
     */
    private Long userId;
    /**
     * 店铺id
     */
    private Long shopId;
    /**
     * 供应商id
     */
    private Long supplierId;

    @Schema(description = "订单状态")
    private Integer status;

    @Schema(description = "订单状态列表")
    private List<Integer> statusList;

    @Schema(description = "要过滤的订单状态列表")
    private List<Integer> mustNotStatusList;

    @Schema(description = "供应商订单状态")
    private List<Integer> supplierOrderStatus;


    @Schema(description = "订单类型参考orderType ,0普通商品 1团购订单 2秒杀订单,3积分订单")
    private Integer orderType;

    @Schema(description = "排除的订单类型")
    private Integer exOrderType;

    @Schema(description = "是否已经支付，1：已经支付过，0：，没有支付过")
    private Integer isPayed;

    /**
     * 订购流水号
     */
    @Schema(description = "订单号")
    private Long orderId;

    @Schema(description = "订单号列表")
    private List<Long> orderIds;

    @Schema(description = "订单项id列表")
    private List<Long> orderItemIds;

    @Schema(description = "下单的时间范围:开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @Schema(description = "下单的时间范围:结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @Schema(description = "店铺名称")
    private String shopName;

    @Schema(description = "商品名称")
    private String spuName;

    @Schema(description = "收货人姓名")
    private String consignee;

    @Schema(description = "收货人手机号")
    private String mobile;

    @Schema(description = "物流类型  1:快递 2:自提 3：无需快递 4：同城快递")
    private Integer deliveryType;

    @Schema(description = "订单退款状态参考refundStatus（1:申请退款 2:退款成功 3:部分退款成功 4:退款失败）")
    private Integer refundStatus;

    @Schema(description = "不等于订单退款状态")
    private Integer notRefundStatus;

    @Schema(description = "自提点名称")
    private String stationName;

    @Schema(description = "支付类型  1:积分支付 2:微信支付 3：支付宝支付")
    private Integer payType;

    @Schema(description = "是否已评论")
    private Integer isComm;

    @Schema(description = "开始页")
    private Integer pageNum;


    @Schema(description = "每页大小")
    private Integer pageSize;

    @Schema(description = "是否待采购 1.是 0.否 2.已处理")
    private Integer waitPurchase;

    @Schema(description = "是否待采购(1:是, 0:否(包含状态0和2))")
    private Integer isWaitPurchase;

    @Schema(description = "是否预售订单 1.是 0.否")
    private Integer isPreSale;

    @Schema(description = "供应商商品发货方式 1.供应商发货 2.仓库发货")
    private Integer supplierDeliveryType;

    /**
     * 支付时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 发货时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date deliveryTime;

    /**
     * 确认收货时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date finallyTime;
    @Schema(description = "商品编码")
    private String spuCodes;

    @Schema(description = "sku编码")
    private String partyCodes;

    @Schema(description = "是否为虚拟商品订单 1.是 0.否")
    private Integer orderMold;

    @Schema(description = "预售类型 0.全款预售类型 1.定金预售")
    private Integer preSaleType;

    @Schema(description = "最小尾款金额")
    private Long minBalanceAmount;

    @Schema(description = "最大尾款金额")
    private Long maxBalanceAmount;

    /**
     * 尾款支付开始时间
     */
    private Date balanceStartTime;

    /**
     * 尾款结束开始时间
     */
    private Date balanceEndTime;

    /**
     * 实际总值
     */
    private Long actualTotal;

    /**
     * 实际总值区间，下线
     */
    private Long actualTotalMin;

    /**
     * 支付类型列表
     */
    private List<Integer> payTypeList;

    /**
     * es开始的索引
     */
    private Integer begin;

    /**
     * 用户订单删除状态，0：没有删除， 1：回收站， 2：永久删除
     */
    private Integer deleteStatus;

    /**
     * 是否已经进行结算
     */
    private Integer isSettled;

    /**
     * 实际总值区间，上线
     */
    private Long actualTotalMax;

    /**
     * 响应数据字段数组
     */
    private String[] fetchSource;

    /**
     * 自提点id
     */
    private Long stationId;

    /**
     * 支付时间是否按gte进行过滤
     */
    private Boolean gtePayTime;

    /**
     * 自提提货码
     */
    private String stationCode;

    /**
     * 核销码
     */
    private String writeOffCode;

    /**
     * 订单核销状态 0.待核销 1.核销完成
     */
    private Integer writeOffStatus;

    /**
     * 店铺ids
     */
    private List<Long> shopIds;

    /**
     * 供应商名称
     */
    private String supplierName;

    /**
     * 供应商idS
     */
    private List<Long> supplierIds;
    @Schema(description = "主单号,在组合商品拆单时会存在")
    private Long mainOrderId;

    public Long getMainOrderId() {
        return mainOrderId;
    }

    public void setMainOrderId(Long mainOrderId) {
        this.mainOrderId = mainOrderId;
    }
    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public List<Long> getSupplierIds() {
        return supplierIds;
    }

    public void setSupplierIds(List<Long> supplierIds) {
        this.supplierIds = supplierIds;
    }

    public Boolean getGtePayTime() {
        return gtePayTime;
    }

    public List<Long> getShopIds() {
        return shopIds;
    }

    public void setShopIds(List<Long> shopIds) {
        this.shopIds = shopIds;
    }

    public Integer getWriteOffStatus() {
        return writeOffStatus;
    }

    public void setWriteOffStatus(Integer writeOffStatus) {
        this.writeOffStatus = writeOffStatus;
    }

    public String getWriteOffCode() {
        return writeOffCode;
    }

    public void setWriteOffCode(String writeOffCode) {
        this.writeOffCode = writeOffCode;
    }

    public Boolean isGtePayTime() {
        return gtePayTime;
    }

    public void setGtePayTime(Boolean gtePayTime) {
        this.gtePayTime = gtePayTime;
    }

    public String getStationCode() {
        return stationCode;
    }

    public void setStationCode(String stationCode) {
        this.stationCode = stationCode;
    }

    public Long getStationId() {
        return stationId;
    }

    public void setStationId(Long stationId) {
        this.stationId = stationId;
    }

    public Integer getIsPreSale() {
        return isPreSale;
    }

    public void setIsPreSale(Integer isPreSale) {
        this.isPreSale = isPreSale;
    }

    public Integer getOrderMold() {
        return orderMold;
    }

    public void setOrderMold(Integer orderMold) {
        this.orderMold = orderMold;
    }

    public List<Integer> getSupplierOrderStatus() {
        return supplierOrderStatus;
    }

    public void setSupplierOrderStatus(List<Integer> supplierOrderStatus) {
        this.supplierOrderStatus = supplierOrderStatus;
    }

    public String getSpuCodes() {
        return spuCodes;
    }

    public void setSpuCodes(String spuCodes) {
        this.spuCodes = spuCodes;
    }

    public String getPartyCodes() {
        return partyCodes;
    }

    public void setPartyCodes(String partyCodes) {
        this.partyCodes = partyCodes;
    }

    public Integer getSupplierDeliveryType() {
        return supplierDeliveryType;
    }

    public void setSupplierDeliveryType(Integer supplierDeliveryType) {
        this.supplierDeliveryType = supplierDeliveryType;
    }

    public Integer getWaitPurchase() {
        return waitPurchase;
    }

    public void setWaitPurchase(Integer waitPurchase) {
        this.waitPurchase = waitPurchase;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    public Integer getExOrderType() {
        return exOrderType;
    }

    public void setExOrderType(Integer exOrderType) {
        this.exOrderType = exOrderType;
    }

    public Integer getIsPayed() {
        return isPayed;
    }

    public void setIsPayed(Integer isPayed) {
        this.isPayed = isPayed;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getSpuName() {
        return spuName;
    }

    public void setSpuName(String spuName) {
        this.spuName = spuName;
    }

    public String getConsignee() {
        return consignee;
    }

    public void setConsignee(String consignee) {
        this.consignee = consignee;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public Integer getDeliveryType() {
        return deliveryType;
    }

    public void setDeliveryType(Integer deliveryType) {
        this.deliveryType = deliveryType;
    }

    public Integer getRefundStatus() {
        return refundStatus;
    }

    public void setRefundStatus(Integer refundStatus) {
        this.refundStatus = refundStatus;
    }

    public String getStationName() {
        return stationName;
    }

    public void setStationName(String stationName) {
        this.stationName = stationName;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public Integer getIsComm() {
        return isComm;
    }

    public void setIsComm(Integer isComm) {
        this.isComm = isComm;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public List<Integer> getPayTypeList() {
        return payTypeList;
    }

    public void setPayTypeList(List<Integer> payTypeList) {
        this.payTypeList = payTypeList;
    }

    public Integer getBegin() {
        return begin;
    }

    public void setBegin(Integer begin) {
        this.begin = begin;
    }

    public Integer getDeleteStatus() {
        return deleteStatus;
    }

    public void setDeleteStatus(Integer deleteStatus) {
        this.deleteStatus = deleteStatus;
    }

    public Long getActualTotal() {
        return actualTotal;
    }

    public void setActualTotal(Long actualTotal) {
        this.actualTotal = actualTotal;
    }

    public Long getActualTotalMin() {
        return actualTotalMin;
    }

    public void setActualTotalMin(Long actualTotalMin) {
        this.actualTotalMin = actualTotalMin;
    }

    public Long getActualTotalMax() {
        return actualTotalMax;
    }

    public void setActualTotalMax(Long actualTotalMax) {
        this.actualTotalMax = actualTotalMax;
    }

    public List<Long> getOrderIds() {
        return orderIds;
    }

    public void setOrderIds(List<Long> orderIds) {
        this.orderIds = orderIds;
    }

    public Integer getIsSettled() {
        return isSettled;
    }

    public void setIsSettled(Integer isSettled) {
        this.isSettled = isSettled;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getDeliveryTime() {
        return deliveryTime;
    }

    public void setDeliveryTime(Date deliveryTime) {
        this.deliveryTime = deliveryTime;
    }

    public Date getFinallyTime() {
        return finallyTime;
    }

    public void setFinallyTime(Date finallyTime) {
        this.finallyTime = finallyTime;
    }

    public String[] getFetchSource() {
        return fetchSource;
    }

    public void setFetchSource(String[] fetchSource) {
        this.fetchSource = fetchSource;
    }

    public Integer getPreSaleType() {
        return preSaleType;
    }

    public void setPreSaleType(Integer preSaleType) {
        this.preSaleType = preSaleType;
    }

    public Long getMaxBalanceAmount() {
        return maxBalanceAmount;
    }

    public void setMaxBalanceAmount(Long maxBalanceAmount) {
        this.maxBalanceAmount = maxBalanceAmount;
    }

    public Date getBalanceStartTime() {
        return balanceStartTime;
    }

    public void setBalanceStartTime(Date balanceStartTime) {
        this.balanceStartTime = balanceStartTime;
    }

    public Date getBalanceEndTime() {
        return balanceEndTime;
    }

    public void setBalanceEndTime(Date balanceEndTime) {
        this.balanceEndTime = balanceEndTime;
    }

    public List<Long> getOrderItemIds() {
        return orderItemIds;
    }

    public void setOrderItemIds(List<Long> orderItemIds) {
        this.orderItemIds = orderItemIds;
    }

    public List<Integer> getStatusList() {
        return statusList;
    }

    public void setStatusList(List<Integer> statusList) {
        this.statusList = statusList;
    }

    public Long getMinBalanceAmount() {
        return minBalanceAmount;
    }

    public void setMinBalanceAmount(Long minBalanceAmount) {
        this.minBalanceAmount = minBalanceAmount;
    }

    public Integer getNotRefundStatus() {
        return notRefundStatus;
    }

    public void setNotRefundStatus(Integer notRefundStatus) {
        this.notRefundStatus = notRefundStatus;
    }

    public List<Integer> getMustNotStatusList() {
        return mustNotStatusList;
    }

    public void setMustNotStatusList(List<Integer> mustNotStatusList) {
        this.mustNotStatusList = mustNotStatusList;
    }

    public Integer getIsWaitPurchase() {
        return isWaitPurchase;
    }

    public void setIsWaitPurchase(Integer isWaitPurchase) {
        this.isWaitPurchase = isWaitPurchase;
    }

    @Override
    public String toString() {
        return "OrderSearchDTO{" +
                "userId=" + userId +
                ", shopId=" + shopId +
                ", supplierId=" + supplierId +
                ", status=" + status +
                ", statusList=" + statusList +
                ", mustNotStatusList=" + mustNotStatusList +
                ", supplierOrderStatus=" + supplierOrderStatus +
                ", orderType=" + orderType +
                ", exOrderType=" + exOrderType +
                ", isPayed=" + isPayed +
                ", orderId=" + orderId +
                ", orderIds=" + orderIds +
                ", orderItemIds=" + orderItemIds +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", shopName='" + shopName + '\'' +
                ", spuName='" + spuName + '\'' +
                ", consignee='" + consignee + '\'' +
                ", mobile='" + mobile + '\'' +
                ", deliveryType=" + deliveryType +
                ", refundStatus=" + refundStatus +
                ", notRefundStatus=" + notRefundStatus +
                ", stationName='" + stationName + '\'' +
                ", payType=" + payType +
                ", isComm=" + isComm +
                ", pageNum=" + pageNum +
                ", pageSize=" + pageSize +
                ", waitPurchase=" + waitPurchase +
                ", isWaitPurchase=" + isWaitPurchase +
                ", isPreSale=" + isPreSale +
                ", supplierDeliveryType=" + supplierDeliveryType +
                ", payTime=" + payTime +
                ", updateTime=" + updateTime +
                ", deliveryTime=" + deliveryTime +
                ", finallyTime=" + finallyTime +
                ", spuCodes='" + spuCodes + '\'' +
                ", partyCodes='" + partyCodes + '\'' +
                ", orderMold=" + orderMold +
                ", preSaleType=" + preSaleType +
                ", minBalanceAmount=" + minBalanceAmount +
                ", maxBalanceAmount=" + maxBalanceAmount +
                ", balanceStartTime=" + balanceStartTime +
                ", balanceEndTime=" + balanceEndTime +
                ", actualTotal=" + actualTotal +
                ", actualTotalMin=" + actualTotalMin +
                ", payTypeList=" + payTypeList +
                ", begin=" + begin +
                ", deleteStatus=" + deleteStatus +
                ", isSettled=" + isSettled +
                ", actualTotalMax=" + actualTotalMax +
                ", fetchSource=" + Arrays.toString(fetchSource) +
                ", stationId=" + stationId +
                ", gtePayTime=" + gtePayTime +
                ", stationCode='" + stationCode + '\'' +
                ", writeOffCode='" + writeOffCode + '\'' +
                ", writeOffStatus=" + writeOffStatus +
                ", shopIds=" + shopIds +
                ", supplierName='" + supplierName + '\'' +
                ", supplierIds=" + supplierIds +
                ", mainOrderId=" + mainOrderId +
                '}';
    }
}
