package com.aiotagro.common.core.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * @author zhangq
 * @date 2022/8/17 16:32
 * @description 系统常量
 */
public class TencentCloudConstants {


    /**
     * 密码加密前缀
     */
    public static final String USER_PASSWORD_PREFIX = "aiot";


    /**
     * 令牌
     */
    public static final String TOKEN = "token";

    /**
     * 登录用户
     */
    public static final String LOGIN_USER = "loginUser";

    /**
     * 令牌前缀
     */
    public static final String TOKEN_PREFIX = "Bearer ";


    /**
     * 登录用户 redis key
     */
    public static final String LOGIN_TOKEN_KEY = "login_tokens:";

    /**
     * 登录用户角色 key
     */
    public static final String LOGIN_ROLE_ID = "login_role_id:";

    /**
     * 令牌前缀
     */
    public static final String LOGIN_USER_KEY = "login_user_key";


    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 腾讯云id
     */
    public static String TENCENT_CLOUD_SECRETID = "AKIDMXTAjEKZM3g4GDvnHVTQMwGLfmjQ9KRI";

    /**
     * 腾讯云key
     */
    public static String TENCENT_CLOUD_SECRETKEY = "wcw0qQvARefTLzMVWhiIi1FyUq1xjYCk";

    /**
     * 腾讯云爱彼特id
     */
    public static String TENCENT_CLOUD_AIPITE_SECRETID = "AKIDgP1B8sPiogN4YnocEcmiU4PXTEm6HUWL";

    /**
     * 腾讯云爱彼特key
     */
    public static String TENCENT_CLOUD_AIPITE_SECRETKEY = "iEYecnlW9bszt54uX396d5NRI0Xq078L";

    /**
     * 腾讯云时区
     */
    public static String TENCENT_CLOUD_REGION = "ap-guangzhou";

    /**
     * 腾讯云Bucket名称
     */
    public static String TENCENT_CLOUD_BUCKET = "smart-1251449951";


    /**
     * 微信验证码key
     */
    public static final String WECHAT_SMS_KEY = "wechat_sms_key:";

    /**
     * 微信验证码发送频率控制
     */
    public static final String WECHAT_SMS_INTERVAL_KEY = "wechat_sms_interval_key:";

    public static final String AIPETELEFENCE_KEY = "aipet_elefence_key:";

    public static final String AIPITE_I18N = "aipet_i18n:";

    /**
     * 短信验证码有效期
     */
    public static final Integer smsExpireTime = 10;

    /**
     * 短信频率控制 2分钟
     */
    public static final Integer smsIntervalTime = 2;

    /**
     * 微信登录token
     */
    public static final String WECHAT_LOGIN_KEY = "wechat_login_token:";


    /**
     * 微信小程序 :0-生资交易 1-云满牛 2-宠物项圈
     */
    public static final Map<String,String> wechatAppIdMap;
    static {
        wechatAppIdMap = new HashMap<String,String>();
        wechatAppIdMap.put("0","wx944d8cc44a8025ad");
        wechatAppIdMap.put("1","wx569c227c3129dd13");
        wechatAppIdMap.put("2","wx903c6e697ac3db97");
    };

    /**
     * 微信小程序Secret :0-生资交易 1-云满牛 2-宠物项圈
     */
    public static HashMap<String,String> wechatAppSecretMap;
    static {
        wechatAppSecretMap = new HashMap<String,String>();
        wechatAppSecretMap.put("0","fe6dd856a9004b39dd82374f6d34382d");
        wechatAppSecretMap.put("1","a52ff1c654b7410f8abef5a8164da511");
        wechatAppSecretMap.put("2","abb4a58a76f5fe510e28f4196d18563a");

    };


    /**
     * 微信小程序Mchid :0-生资交易 1-云满牛
     */
    public static HashMap<String,String> wechatMchidMap;
    static {
        wechatMchidMap = new HashMap<String,String>();
        wechatMchidMap.put("0","1540683851");
        wechatMchidMap.put("1","1540683851");

    };

    /**
     * 微信小程序回调地址 :0-生资交易 1-云满牛
     */
    public static HashMap<String,String> wechatNotifyMap;
    static {
        wechatNotifyMap = new HashMap<String,String>();
        wechatNotifyMap.put("0","http://134.175.105.94:8989/wechat/sz/notify");
        wechatNotifyMap.put("1","http://134.175.105.94:8989/wechat/ymn/notify");

    };


    /**
     * 微信小程序服务地址
     */
    public static final String WECHAT_URL = "https://api.weixin.qq.com/sns/jscode2session";

    /**
     * 微信支付地址
     */
    public static final String WECHAT_PAY_URL = "https://api.mch.weixin.qq.com";


    /**
     * 微信支付V3 uri
     */
    public static final String WECHAT_PAY_V3_URL = WECHAT_PAY_URL + "/v3/pay/transactions/jsapi";


    public static final String WECHAT_PAY_V3_KEY = "740d316d372da28fd37eb9b34dbc92c0";

    /**
     * 微信支付结果查询uri
     */
    public static final String WECHAT_PAY_QUERY_URL = WECHAT_PAY_URL + "/v3/pay/transactions/out-trade-no/%s?mchid=%s";

    /**
     * 微信支付私钥路径
     */
    public static final String WECHAT_PAY_PRIVATE_PATH = "static/private_key.pem";


    /**
     * 微信支付码
     */
    public static String WECHAT_PAY_SERIAL_NO="508AED7BA545FF42CBD75C72A8940228C913698E";

    /**
     * 微信token获取地址
     */
    public static final String WECHAT_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token";

    /**
     * 微信获取用户手机号
     */
    public static final String WECHAT_CELLPHONE_URL = "https://api.weixin.qq.com/wxa/business/getuserphonenumber";

    /**
     * 腾讯坐标转换地址
     */
    public static final String TENCENT_LOCATION_URL = "https://apis.map.qq.com/ws/coord/v1/translate";

    /**
     * 腾讯坐标转换key
     */
    public static final String TENCENT_LOCATION_KEY = "5ENBZ-65EKQ-HDT5D-4SVW5-XVTFO-JCFBO";

    /**
     * 经纬度转地名
     */
    public static final String TENCENT_TRANS_KEY = "f9c298affa8aedea29d604ffb26c7078";
}
