|
@ -36,6 +36,7 @@ import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.context.annotation.Scope;
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@ -74,6 +75,8 @@ public class CurrentMysqlToEsQuotaJob implements Job {
|
|
|
private String esIndex;
|
|
|
@Autowired
|
|
|
private QuartzJobConfigDao quartzJobConfigDao;
|
|
|
@Autowired
|
|
|
private StringRedisTemplate redisTemplate;
|
|
|
|
|
|
|
|
|
public void execute(JobExecutionContext context)
|
|
@ -162,6 +165,9 @@ public class CurrentMysqlToEsQuotaJob implements Job {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
});
|
|
|
//更新统计时间
|
|
|
redisTemplate.opsForValue().set("quota:date", DateUtil.dateToStrLong(new Date()));
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|