package com.bonus.core.pay.common.dto;

import cn.hutool.core.collection.CollUtil;
import com.bonus.core.common.utils.TenantContextHolder;
import com.bonus.core.order.deprecated.param.OrderDetailParam;
import com.bonus.core.pay.api.dto.UnifyPayDTO;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.List;

public class PayBaseDTO {
   private Long tradeId;
   private BigDecimal amount;
   private BigDecimal totalAmount;
   private Integer payType;
   private Integer payChannel;
   private Integer tradeType;
   private Integer onlineState = 1;
   private Long couponId;
   private Long custId;
   private String custName;
   private String custNum;
   private String openid;
   private Integer sourceType;
   private Long canteenId;
   private String canteenName;
   private Long stallId;
   private String stallName;
   private Integer mealtimeType;
   private String mealtimeName;
   private String remark;
   private String attach;
   private List<UnifyPayDTO.Order> orderList = CollUtil.newArrayList(new UnifyPayDTO.Order[0]);
   private List<OrderDetailParam> detailParamList;
   private String thirdSerialNum;
   private String custThirdId;
   private LocalDateTime orderTime;
   private Long ordTimestamp;
   private LocalDateTime tradeTime;
   private boolean ifRecharge;
   private String alipayContractNum;

   public Long getOrdTimestamp() {
      return this.orderTime != null ? this.orderTime.toInstant(ZoneOffset.of("+8")).toEpochMilli() : System.currentTimeMillis();
   }

   public String getAttach() {
      Long var10000 = TenantContextHolder.getTenantId();
      return "" + var10000 + "_" + String.valueOf(this.canteenId != null ? this.canteenId : "");
   }

   public Long getTradeId() {
      return this.tradeId;
   }

   public BigDecimal getAmount() {
      return this.amount;
   }

   public BigDecimal getTotalAmount() {
      return this.totalAmount;
   }

   public Integer getPayType() {
      return this.payType;
   }

   public Integer getPayChannel() {
      return this.payChannel;
   }

   public Integer getTradeType() {
      return this.tradeType;
   }

   public Integer getOnlineState() {
      return this.onlineState;
   }

   public Long getCouponId() {
      return this.couponId;
   }

   public Long getCustId() {
      return this.custId;
   }

   public String getCustName() {
      return this.custName;
   }

   public String getCustNum() {
      return this.custNum;
   }

   public String getOpenid() {
      return this.openid;
   }

   public Integer getSourceType() {
      return this.sourceType;
   }

   public Long getCanteenId() {
      return this.canteenId;
   }

   public String getCanteenName() {
      return this.canteenName;
   }

   public Long getStallId() {
      return this.stallId;
   }

   public String getStallName() {
      return this.stallName;
   }

   public Integer getMealtimeType() {
      return this.mealtimeType;
   }

   public String getMealtimeName() {
      return this.mealtimeName;
   }

   public String getRemark() {
      return this.remark;
   }

   public List<UnifyPayDTO.Order> getOrderList() {
      return this.orderList;
   }

   public List<OrderDetailParam> getDetailParamList() {
      return this.detailParamList;
   }

   public String getThirdSerialNum() {
      return this.thirdSerialNum;
   }

   public String getCustThirdId() {
      return this.custThirdId;
   }

   public LocalDateTime getOrderTime() {
      return this.orderTime;
   }

   public LocalDateTime getTradeTime() {
      return this.tradeTime;
   }

   public boolean isIfRecharge() {
      return this.ifRecharge;
   }

   public String getAlipayContractNum() {
      return this.alipayContractNum;
   }

   public void setTradeId(final Long tradeId) {
      this.tradeId = tradeId;
   }

   public void setAmount(final BigDecimal amount) {
      this.amount = amount;
   }

   public void setTotalAmount(final BigDecimal totalAmount) {
      this.totalAmount = totalAmount;
   }

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

   public void setPayChannel(final Integer payChannel) {
      this.payChannel = payChannel;
   }

   public void setTradeType(final Integer tradeType) {
      this.tradeType = tradeType;
   }

   public void setOnlineState(final Integer onlineState) {
      this.onlineState = onlineState;
   }

   public void setCouponId(final Long couponId) {
      this.couponId = couponId;
   }

   public void setCustId(final Long custId) {
      this.custId = custId;
   }

   public void setCustName(final String custName) {
      this.custName = custName;
   }

   public void setCustNum(final String custNum) {
      this.custNum = custNum;
   }

   public void setOpenid(final String openid) {
      this.openid = openid;
   }

   public void setSourceType(final Integer sourceType) {
      this.sourceType = sourceType;
   }

   public void setCanteenId(final Long canteenId) {
      this.canteenId = canteenId;
   }

   public void setCanteenName(final String canteenName) {
      this.canteenName = canteenName;
   }

   public void setStallId(final Long stallId) {
      this.stallId = stallId;
   }

   public void setStallName(final String stallName) {
      this.stallName = stallName;
   }

   public void setMealtimeType(final Integer mealtimeType) {
      this.mealtimeType = mealtimeType;
   }

   public void setMealtimeName(final String mealtimeName) {
      this.mealtimeName = mealtimeName;
   }

   public void setRemark(final String remark) {
      this.remark = remark;
   }

   public void setAttach(final String attach) {
      this.attach = attach;
   }

   public void setOrderList(final List<UnifyPayDTO.Order> orderList) {
      this.orderList = orderList;
   }

   public void setDetailParamList(final List<OrderDetailParam> detailParamList) {
      this.detailParamList = detailParamList;
   }

   public void setThirdSerialNum(final String thirdSerialNum) {
      this.thirdSerialNum = thirdSerialNum;
   }

   public void setCustThirdId(final String custThirdId) {
      this.custThirdId = custThirdId;
   }

   public void setOrderTime(final LocalDateTime orderTime) {
      this.orderTime = orderTime;
   }

   public void setOrdTimestamp(final Long ordTimestamp) {
      this.ordTimestamp = ordTimestamp;
   }

   public void setTradeTime(final LocalDateTime tradeTime) {
      this.tradeTime = tradeTime;
   }

   public void setIfRecharge(final boolean ifRecharge) {
      this.ifRecharge = ifRecharge;
   }

   public void setAlipayContractNum(final String alipayContractNum) {
      this.alipayContractNum = alipayContractNum;
   }
}
