package com.yeejoin.amos.boot.module.jcs.api.feign;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.format.DateTimeFormatter;

/**
 * @Description: 常量类
 * @Author: duanwei
 * @Date: 2019/7/29
 */
public class Constant {


    static String  SMALL_PRO_PRCODE = "SMALL_PRO_PRCODE_";


    static String RESULT_SUCCESS = "SUCCESS";

    static String RESULT_FAILURE = "FAILURE";


    /**
     * 任务-作业交底
     */
    static Integer JOB_TYPE = 0;

    /**
     * 任务-三交三查
     */
    static Integer HAND_QUERY = 1;

    /**
     * 违规管理
     */
    static Integer BAD_MANAGEMENT = 2;


    static Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;

    static String FILE_SEPARATOR = System.getProperty("file.separator");

    static DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");


    static String PAGE_NUM = "0";

    static String SIZE_NUM = "20";

    static String PAGE = "page";

    static String SIZE = "size";


    static String ZERO = "0";

    static String ONE = "1";

    static String TWO = "2";

    static String THREE = "3";

    static String FOUR = "4";

    static String FIVE = "5";

    static String NULL = "";

    static String JSON_NULL = "[]";


    /**
     * 请求成功
     */
    static String SUCCESS = "200";
    /**
     * 请求错误
     */
    static String ERROR = "300";

    /**
     * 无权限
     */
    static String PERMISSION = "401";
    /**
     * 请求成功，其他错误
     */
    static String DATA_NULL = "402";
    /**
     * 请求失败
     */
    static  String FAILED = "999";

    /**
     * 最大值
     */
    static  Integer MAX = 32767;


    /**
     * 数据请求返回码
     */
    public static final int RESCODE_SUCCESS = 1000;                //成功
    public static final int RESCODE_SUCCESS_MSG = 1001;            //成功(有返回信息)
    public static final int RESCODE_EXCEPTION = 1002;            //请求抛出异常
    public static final int RESCODE_NOLOGIN = 1003;                //未登陆状态
    public static final int RESCODE_NOEXIST = 1004;                //查询结果为空
    public static final int RESCODE_NOAUTH = 1005;                //无操作权限
    public static final int RESCODE_LOGINEXPIRE = 1006;                //登录过期
    /**
     * token
     */
    public static final int JWT_ERRCODE_EXPIRE = 1007;//Token过期
    public static final int JWT_ERRCODE_FAIL = 1008;//验证不通过

    /**
     * jwt
     */
    public static final String JWT_ID = "jwt-black";//jwt签发者
    public static final String JWT_SECRET = "Isi5Ob9OfvJt+4IHoMJlHkS1ttg=";//密匙
    public static final int JWT_TTL = 60 * 60 * 1000; // 60*60*1000;  //millisecond
    public static final int JWT_REFRESH_INTERVAL = 18 * 1000; //55*60*1000;  //millisecond
    public static final int JWT_REFRESH_TTL = 60 * 1000; // 12*60*60*1000;  //millisecond


    private Constant() {
    }
}
