package cn.iocoder.yudao.module.system.enums.oauth2;

/**
 * @Author: jinyd
 * @CreateTime: 2024/11/25  16:29
 * @Description:
 * @Version: 4.0
 */


public class EnterpriseWeChatConstants {

    public final static String redisKey = "CorpWechat:%s:%s:accessToken";

    public final static String redisFieldAccessToken = "accessToken";

    /**
     * 基本信息
     */
    public static final String AUTHORIZE_SCOPE_BASE = "snsapi_base";

    /**
     *
     */
    public static final String AUTHORIZE_SCOPE_PRIVATEINFO = "snsapi_privateinfo";

    /**
     * 授权登陆url
     */
    public static final String OAUTH2_AUTHORIZE_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?" +
            "appid=%s&redirect_uri=%s&response_type=code&scope="+ AUTHORIZE_SCOPE_PRIVATEINFO +"&state=%s&agentid=%s#wechat_redirect";



    public static final String CORP_WECHAT_URL = "https://qyapi.weixin.qq.com/cgi-bin/";
    public static final String GET_TOKEN_URL = "gettoken";
    public static final String USER_INFO_URL = "auth/getuserinfo?access_token=%s";
    public static final String GET_USER_INFO_URL = CORP_WECHAT_URL + USER_INFO_URL;


    public static final String GET_USER_BY_CODE_URL = CORP_WECHAT_URL + "auth/getuserdetail?access_token=%s";

    public static final String SEND_MESSAGE_URL = CORP_WECHAT_URL + "message/send?access_token=%s";

    public static final String GET_USER_BY_MOBILE_URL = CORP_WECHAT_URL + "user/getuserid?access_token=%s";

    public static final String SSO_URL = "http://www.kangyijian.com/authorize";

    public static final String BPM_DETAIL_URL = "/pages/approval/detail/index&processInstanceId=%s&activeName=%s&status=%s";


}
