package com.sandu.ximon.admin.config;
|
|
/**
|
* @Author liuhaonan
|
* @Version 1.0
|
*/
|
public class C3mRedisConfig {
|
|
// C3充电桩最长离线时间(s)
|
public static Long OUTLINE_TIME = 60 * 3L;
|
// 设置C3心跳包时间
|
public static Long HEART_BEAT_TIME = 60L;
|
// C3订单超时时间
|
public static Long ORDER_MAX_TIME = 60 * 5L;
|
// C3订单扫描间隔时间
|
public static Long ORDER_QUERY_TIME = 20L;
|
// C3充电最大时长
|
public static Long CHARGING_MAX_TIME = 60 * 60 * 24L * 2;
|
// C3故障码超时时间
|
public static Long ERROR_REPORT_MAX_TIME = 60 * 60 * 24 * 7L;
|
|
public static void reFlushTime(int onlineCount) {
|
if(onlineCount > 60) {
|
HEART_BEAT_TIME = Long.parseLong(onlineCount+"");
|
OUTLINE_TIME = 3 * HEART_BEAT_TIME;
|
}else if(onlineCount < 60){
|
HEART_BEAT_TIME = 60L;
|
OUTLINE_TIME = 3 * HEART_BEAT_TIME;
|
}
|
}
|
public static Integer parseInt(Long l){
|
return Integer.parseInt(l+"");
|
}
|
}
|