|
@ -178,6 +178,8 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
quartzJobLog.setJobEndTime(new Date());
|
|
|
quartzJobLogDao.save(quartzJobLog);
|
|
|
|
|
|
initCurrentExpire();//初始化生命周期
|
|
|
|
|
|
for (String key :RedisStorage.keys){
|
|
|
redisTemplate.expire(key, Integer.valueOf(currentExpire), TimeUnit.HOURS);//2小时过期
|
|
|
}
|
|
@ -190,6 +192,24 @@ public class CurrentDayAllQuotaJob implements Job {
|
|
|
redisTemplate.opsForValue().set("quota:timeKey",RedisStorage.timeKey);
|
|
|
}
|
|
|
|
|
|
private void initCurrentExpire() {
|
|
|
try{
|
|
|
if(StringUtils.isEmpty(currentExpire)){
|
|
|
currentExpire="2";//默认是2小时
|
|
|
}
|
|
|
if(!org.apache.commons.lang.StringUtils.isNumeric(currentExpire)){
|
|
|
currentExpire="2";//默认是2小时
|
|
|
}else{
|
|
|
Integer cout =Integer.valueOf(currentExpire);
|
|
|
if(cout<=0){
|
|
|
currentExpire="2";//默认是2小时
|
|
|
}
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
currentExpire="2";//默认是2小时
|
|
|
}
|
|
|
}
|
|
|
|
|
|
private void computequota_17(String sql, List<SignFamily> signFamilies, Object o) {
|
|
|
String quotaId="17";
|
|
|
try{
|