package com.jeequan.jeepay.core.model;

import com.jeequan.jeepay.core.exception.BizException;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/**
 * TODO
 * 微信托管支付参数
 * @author crystal
 * @date 2023/11/29 11:03
 */
@Data
public class WxAppletParams {


    private String appid;

    private String code;

    private QRCodeParams qrCodeParams;

    public void preCheck(QRCodeParams qrCodeParams) {
        if(StringUtils.isEmpty(code)){
            throw new BizException("缺失[code]参数");
        }
        if(StringUtils.isEmpty(appid)){
            throw new BizException("缺失[appid]参数");
        }
        this.qrCodeParams = qrCodeParams;
    }
}
