package cn.pluss.platform.wx;

import lombok.Data;

/**
 *
 *微信请求参数封装
 *@author: bzg
 *@time: 2021/11/29 15:23
 */
@Data
public class WxAccessTokenRequest {

    /**
     * 类型 普通
     * @date: 2021/11/30 11:31
     */
    public static final Integer WX_ACCESS_TOKEN_TYPE = 1;

    /**
     * 类型对应下方的类型 网页授权
     * @date: 2021/11/30 11:31
     */
    public static final Integer WX_OAUTH2_ACCESS_TOKEN_TYPE = 2;

    private String appid;

    private String secret;

    private String code;

    private String url;


    public static WxAccessTokenRequest buidWxToken(String appid,String secret,String code,String url){
        WxAccessTokenRequest request = new WxAccessTokenRequest();
        request.setAppid(appid);
        request.setSecret(secret);
        request.setCode(code);
        request.setUrl(url);
        return request;
    }

    public static WxAccessTokenRequest buidWxToken(String appid,String secret){
        WxAccessTokenRequest request = new WxAccessTokenRequest();
        request.setAppid(appid);
        request.setSecret(secret);
        return request;
    }

}
