Browse Source

统计代码提交

chenweida 8 years ago
parent
commit
eb72dbdd0f

+ 3 - 2
patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/job/business/CurrentDayAllQuotaJob.java

@ -96,7 +96,7 @@ public class CurrentDayAllQuotaJob implements Job {
    @Value("${fv.jdbc.password}")
    String fv_jdbc_password;
    @Value("${redis.quota.current.expire}")
    Integer currentExpire=2;
    String currentExpire="2";
    @Override
@ -170,8 +170,9 @@ public class CurrentDayAllQuotaJob implements Job {
        quartzJobLog.setJobType("1");
        quartzJobLog.setJobEndTime(new Date());
        quartzJobLogDao.save(quartzJobLog);
        for (String key :RedisStorage.keys){
            redisTemplate.expire(key, currentExpire, TimeUnit.HOURS);//2小时过期
            redisTemplate.expire(key, Integer.valueOf(currentExpire), TimeUnit.HOURS);//2小时过期
        }
        RedisStorage.keys.clear();//清空Key

+ 7 - 4
patient-co-statistics/src/main/resources/application.yml

@ -53,10 +53,7 @@ spring:
      max-wait: -1 # Maximum amount of time (in milliseconds) a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely.
      min-idle: 1 # Target for the minimum number of idle connections to maintain in the pool. This setting only has an effect if it is positive.
redis:
  quota:
    current:
      expire: 2 #实时统计redis 的过期时间 默认是2小时
multipart:
  max-file-size: 100MB
@ -73,6 +70,12 @@ security:
logging:
  level:
    root: INFO
redis:
  quota:
    current:
      expire: 2 #实时统计redis 的过期时间 默认是2小时
---
spring:
  profiles: cwd