package com.bonus.core.account.v3.web.dto;


import com.bonus.core.account.v3.mq.listener.po.AccRechargeBackPO;
import com.bonus.core.pay.api.vo.UnifyPaySelectVO;
import com.bonus.core.pay.common.vo.AndroidPayVO;

public class AccRechargeBackDTO {
   private Long accTradeId;
   private Long payTradeId;
   private Integer payState;
   private String tradeResult;
   private String thirdTradeNo;

   public static AccRechargeBackDTO convert(AccRechargeBackPO accRechargeBack) {
      return (new AccRechargeBackDTO()).setAccTradeId(accRechargeBack.getAccTradeId()).setPayTradeId(accRechargeBack.getOrdId()).setPayState(accRechargeBack.getPayState()).setTradeResult(accRechargeBack.getTradeResult());
   }

   public static AccRechargeBackDTO convert(Long accTradeId, AndroidPayVO androidPayVO) {
      return (new AccRechargeBackDTO()).setAccTradeId(accTradeId).setPayTradeId(androidPayVO.getTradeId()).setPayState(androidPayVO.getCode()).setTradeResult(androidPayVO.getMsg()).setThirdTradeNo(androidPayVO.getOutTradeNo());
   }

   public static AccRechargeBackDTO convert(Long accTradeId, UnifyPaySelectVO paySelectVO) {
      return (new AccRechargeBackDTO()).setAccTradeId(accTradeId).setPayTradeId(paySelectVO.getTradeId())
              .setPayState(paySelectVO.getCode()).setTradeResult(paySelectVO.getMsg()).setThirdTradeNo(paySelectVO.getOutTradeNo());
   }

   public Long getAccTradeId() {
      return this.accTradeId;
   }

   public Long getPayTradeId() {
      return this.payTradeId;
   }

   public Integer getPayState() {
      return this.payState;
   }

   public String getTradeResult() {
      return this.tradeResult;
   }

   public String getThirdTradeNo() {
      return this.thirdTradeNo;
   }

   public AccRechargeBackDTO setAccTradeId(final Long accTradeId) {
      this.accTradeId = accTradeId;
      return this;
   }

   public AccRechargeBackDTO setPayTradeId(final Long payTradeId) {
      this.payTradeId = payTradeId;
      return this;
   }

   public AccRechargeBackDTO setPayState(final Integer payState) {
      this.payState = payState;
      return this;
   }

   public AccRechargeBackDTO setTradeResult(final String tradeResult) {
      this.tradeResult = tradeResult;
      return this;
   }

   public AccRechargeBackDTO setThirdTradeNo(final String thirdTradeNo) {
      this.thirdTradeNo = thirdTradeNo;
      return this;
   }

}
