All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.binarywang.wxpay.bean.request.WxPayOrderQueryRequest Maven / Gradle / Ivy

There is a newer version: 4.6.9.B
Show newest version
package com.github.binarywang.wxpay.bean.request;

import com.github.binarywang.wxpay.exception.WxPayException;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import lombok.*;
import org.apache.commons.lang3.StringUtils;

/**
 * 
 * 订单查询请求对象
 * Created by Binary Wang on 2016-10-24.
 * 注释中各行每个字段描述对应如下:
 * 
  • 字段名 *
  • 变量名 *
  • 是否必填 *
  • 类型 *
  • 示例值 *
  • 描述 *
  • * * @author Binary Wang */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class WxPayOrderQueryRequest extends BaseWxPayRequest { /** *
       * 微信订单号
       * transaction_id
       * 二选一
       * String(32)
       * 1009660380201506130728806387
       * 微信的订单号,优先使用
       * 
    */ @XStreamAlias("transaction_id") private String transactionId; /** *
       * 商户订单号
       * out_trade_no
       * 二选一
       * String(32)
       * 20150806125346
       * 商户系统内部的订单号,当没提供transaction_id时需要传这个。
       * 
    */ @XStreamAlias("out_trade_no") private String outTradeNo; @Override protected void checkConstraints() throws WxPayException { if ((StringUtils.isBlank(transactionId) && StringUtils.isBlank(outTradeNo)) || (StringUtils.isNotBlank(transactionId) && StringUtils.isNotBlank(outTradeNo))) { throw new WxPayException("transaction_id 和 out_trade_no 不能同时存在或同时为空,必须二选一"); } } }




    © 2015 - 2025 Weber Informatics LLC | Privacy Policy