package com.njzscloud.common.wechat.param;

import cn.hutool.extra.spring.SpringUtil;
import com.njzscloud.common.wechat.config.WechatProperties;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

@Getter
@Setter
@ToString
@Accessors(chain = true)
public class GetAccessTokenParam {
    private String grant_type = "client_credential";
    private String appid;
    private String secret;

    public GetAccessTokenParam() {
        WechatProperties wechatProperties = SpringUtil.getBean(WechatProperties.class);
        this.appid = wechatProperties.getAppId();
        this.secret = wechatProperties.getAppSecret();
    }
}
