package com.heyu.api.data.constants;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ApiConstants {
    public static final Integer Int_0 = new Integer(0);
    public static final Integer Int_1 = new Integer(1);
    public static final Integer Int_2 = new Integer(2);
    public static final Integer Int_3 = new Integer(3);



    public static final String STR_1 = "1";


    public static final String STR_2 = "2";

    /**
     * 不需要 注解名称
     */
    public static final String NOT_INTERCEPT_ANNOTATION_NAME = "NotIntercept";
    /**
     * token相关的所有信息
     */
    public static final String TOKEN_INFO = "TOKEN_INFO$";

    /**
     * account 信息
     */
    public static final String ACCOUNT_INFO = "ACCOUNT_INFO$";

    /**
     * token 一分钟访问次数
     */
    public static final String TOKEN_MINUTES_VISIT_COUNT = "TOKEN_MINUTES_VISIT_COUNT$";

    /**
     * account账号一分钟访问次数
     */
    public static final String ACCOUNT_MINUTES_VISIT_COUNT = "ACCOUNT_MINUTES_VISIT_COUNT$";

    /**
     * update account amount lock
     */
    public static final String UPDATE_ACCOUNT_AMOUNT_LOCK = "UPDATE_ACCOUNT_AMOUNT_LOCK$";


    public static String SYSTEM = "system";

    public static String USER_NAME = "user_name";

    public static String TOKEN = "token";


    public static String ACCESS_TOKEN_EQUALS= "access_token=";


    public static String QUESTION_MARK= "?";




    /**
     * 任务调度参数key
     */
    public static final String JOB_PARAM_KEY = "JOB_PARAM_KEY";
    public static Integer warning_flag = 500;
    public static final String Merge = "Merge";
    public static final String List = "List";
    public static final String set = "set";

    public static final String GET_BUYER_ID = "getBuyerId";

    public static final String SET_USER_NAME = "setUsername";

    public static final String SET_ADMIN_ID = "setAdminId";

    public static final String APP_URI_START = "/app/";

    public static final String MM_URI_START = "/mm/";

    public static final String APP_TOKEN = "token";

    public static final String MM_TOKEN = "mmToken";

    public static final String MM_ADMIN_LOGIN_RUI = "/mm/admin/login";
    public static final String get  = "get";
    public static String NOT_SIGN_RECEIPT = "not_sign_receipt";
    public static String SIGN_RECEIPT = "sign_receipt";

    public static String SET_TOKEN = "setToken";


    public static String SET_BUYER_ID = "setBuyerId";

    public static String SET_BUYER_NAME = "setBuyerName";

    public static final String token_activity = "token_activity";
    public static String WAIT_COMMENT = "wait_comment";

    /**
     * 定时任务状态
     *
     * @author chenshun
     * @email sunlightcs@gmail.com
     * @date 2016年12月3日 上午12:07:22
     */
    public enum ScheduleStatus {
        /**
         * 正常
         */
        NORMAL(0),
        /**
         * 暂停
         */
        PAUSE(1);

        private int value;

        ScheduleStatus(int value) {
            this.value = value;
        }

        public int getValue() {
            return value;
        }
    }


    public static final String VERIFY_INTERFACE = "verifyInterface";

    public static final String ECHOBACK = "echoback";
    public static final String X_FORWARDED_PATH = "X-Forwarded-Path";

    public static final String API_USER = "api-user";
    public static final String JPG = "jpg";


    public static List<String> suportMaskReturnType = Arrays.asList("mask", "whiteBK", "crop");


    public static Map<String, String> suportLanguage = new HashMap<>();
    public static Map<String, String> suportStandLanguage = new HashMap<>();
    public static Map<String, String> bigOrSmall = new HashMap<>();
    public static Map<String, Object> handwringOnlyOrHandprintMix = new HashMap<>();

    static {
        suportLanguage.put("auto_detect", "自动检测语言，并识别");
        suportLanguage.put("CHN_ENG", "中英文混合");
        suportLanguage.put("ENG", "英文");
        suportLanguage.put("JAP", "日语");
        suportLanguage.put("KOR", "韩语");
        suportLanguage.put("FRE", "法语");
        suportLanguage.put("SPA", "西班牙语");
        suportLanguage.put("POR", "葡萄牙语");
        suportLanguage.put("GER", "德语");
        suportLanguage.put("ITA", "意大利语");
        suportLanguage.put("RUS", "俄语");
        suportLanguage.put("DAN", "丹麦语");
        suportLanguage.put("DUT", "荷兰语");
        suportLanguage.put("MAL", "马来语");
        suportLanguage.put("SWE", "瑞典语");
        suportLanguage.put("IND", "印尼语");
        suportLanguage.put("POL", "波兰语");
        suportLanguage.put("ROM", "罗马尼亚语");
        suportLanguage.put("TUR", "土耳其语");
        suportLanguage.put("GRE", "希腊语");
        suportLanguage.put("HUN", "匈牙利语");
        suportLanguage.put("THA", "泰语");
        suportLanguage.put("VIE", "越南语");
        suportLanguage.put("ARA", "阿拉伯语");
        suportLanguage.put("HIN", "印地语");



        suportStandLanguage.put("CHN_ENG","中英文");
        suportStandLanguage.put("ENG","英文");
        suportStandLanguage.put("JAP","日语");
        suportStandLanguage.put("KOR","韩语");
        suportStandLanguage.put("FRE","法语");
        suportStandLanguage.put("SPA","西班牙语");
        suportStandLanguage.put("POR","葡萄牙语");
        suportStandLanguage.put("GER","德语");
        suportStandLanguage.put("ITA","意大利语");
        suportStandLanguage.put("RUS","俄语");

        bigOrSmall.put("big","不定位单字符位置");
        bigOrSmall.put("small","定位单字符位置");


        handwringOnlyOrHandprintMix.put("handwring_only","手写文字识别");
        handwringOnlyOrHandprintMix.put("handprint_mix","手写印刷混排识别");

    }




    public final static List<String> trueOrFalse = Arrays.asList("true", "false");


    /**
     * word/letter
     */
    public final static List<String> wordAndLetter = Arrays.asList("word", "letter");
    /**
     *front
     * /back
     */
    public final static List<String> frontOrback = Arrays.asList("front", "back");


    /**
     * 正面
     */
    public final static String front = "front";

    /**
     * 反面
     */
    public final static String back = "back";

    /**
     * normal ,
     * roll
     */
    public final static List<String> normalOrRoll = Arrays.asList("normal", "roll");

    /***
     *
     * 识别语言类型，默认为CHN_ENG
     * 可选值包括：
     * = CHN_ENG：中英文
     * = ENG：英文
     *
     */
    public final static List<String> chnEngOREng = Arrays.asList("CHN_ENG", "ENG");


    /**
     * traceId ,日志编号
     */
    public static String TRACE_ID = "logid";






    /**
     * traceId ,日志编号
     */
    public static String on = "on";

    /**
     * traceId ,日志编号
     */
    public static String trace_id = "traceId";

    /**
     * ip 值
     */
    public static String IP = "request_ip";


    /**
     * 请求uri
     */
    public static String URI = "request_uri";

    /**
     * 耗时
     */
    public static String START_TIME = "start_time";

    public static String normal = "normal";

    /***
     * 银行卡支持的要素
     */
    public static final List<String> bank_card_meta_list = Arrays.asList("BANK_CARD_2_META","BANK_CARD_3_META","BANK_CARD_4_META");

    public final static String BANK_CARD_2_META = "BANK_CARD_2_META";

    public final static String BANK_CARD_3_META = "BANK_CARD_3_META";


    public final static String BANK_CARD_4_META = "BANK_CARD_4_META";



    public final static Map<String, String> aliErrCodeMap = new HashMap<String, String>(){{
        put("101", "验证通过。");
        put("201", "认证信息不一致，持卡人信息有误。");
        put("202", "认证信息不一致，银行卡未开通认证支付。");
        put("203", "认证信息不一致，银行卡已过期。");
        put("204", "认证信息不一致，银行卡为受限制的卡。");
        put("205", "认证信息不一致，此卡被没收。");
        put("206", "认证信息不一致，银行卡无效。");
        put("207", "认证信息不一致，此卡无对应发卡行。");
        put("208", "认证信息不一致，该卡未初始化或睡眠卡。");
        put("209", "认证信息不一致，此卡为作弊卡、吞卡。");
        put("210", "认证信息不一致，此卡已挂失。");
        put("211", "认证信息不一致，密码错误次数超限。");
        put("212", "认证信息不一致，发卡行不支持此交易。");
        put("213", "认证信息不一致，卡状态不正常或卡无效。");
        put("214", "认证信息不一致，未预留手机号。");
        put("215", "认证信息不一致，输入的密码、有效期或CVN2有误。");
        put("216", "认证信息不一致，其他卡异常情况。");
        put("301", "无法验证，银行卡不支持该业务。");
        put("302", "无法验证，验证失败或银行拒绝验证，请联系发卡行。");
        put("303", "无法验证，银行卡暂不支持手机号验证。");
        put("304", "无法验证，银行卡号有误。");
        put("305", "无法验证，其他原因。");
        put("306", "无法验证，验证次数超限");


        put("0", "认证通过");
        put("1", "认证未通过");
        put("4", "持卡人信息有误");
        put("5", "未开通无卡支付");
        put("6", "此卡被没收");
        put("7", "无效卡号");
        put("8", "此卡无对应发卡行");
        put("9", "该卡未初始化或睡眠卡");
        put("10", "作弊卡、吞卡");
        put("11", "此卡已挂失");
        put("12", "该卡已过期");
        put("13", "受限制的卡");
        put("14", "密码错误次数超限");
        put("15", "发卡行不支持此交易");
        put("-2", "姓名校验不通过");
        put("-3", "银行卡号码有误");
        put("-16", "验证中心服务繁忙");
        put("-17", "验证次数超限，请次日重试");
    }};





    public static final String SUCCESS = "1";
    public static final String FAILED = "0";



    public static final String face = "face";
    public static final String TENCENT_AUTH = "20C7941B2CCAD689A90C796A4A9DF04A";



    /**
     * 不需要 注解名称
     */
    public static final String EB_AUTHENTICATION = "EbAuthentication";


    public static final String t_auth = "t_auth";


    /***
     * 腾讯
     */
    public static final String tencent = "tencent";



    /***
     * 第三方
     */
    public static final String third = "third";

    public static final String IDCARD_VERIFICATION_TENCENT = "idcard_verification_tencent";
    public static final String IDCARD_VERIFICATION_THIRD = "idcard_verification_third";


    public static final String APP_CODE = "72579fb099fd490d8b7cf6f7eec637b8";



    public static final String bankcard_verification_4 = "bankcard_verification_4";
    public static final String mobile_verification_3 = "mobile_verification_3";

    public static final String AnonymousUserLogin_pre= "goudezhao$132_";

    public static final String AnonymousUserLogin_aes_password= "qhzhixing";


    public static final String PS= "PS";


}
