| | |
| | | import com.ycl.platform.service.ICheckIndexFaceService; |
| | | import com.ycl.platform.service.ITMonitorService; |
| | | import com.ycl.system.mapper.SysConfigMapper; |
| | | import constant.ApiConstants; |
| | | import constant.CheckConstants; |
| | | import constant.CheckSnapCountConstants; |
| | | import constant.CheckThreadConstants; |
| | | import constant.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | |
| | | // 判断今天是否是本月的第一天 |
| | | if (today.equals(firstDayOfMonth)) { |
| | | // 如果是,则清除Redis中记录中断次数的数据 |
| | | redisTemplate.delete(CheckThreadConstants.Check_Face_ViewConnect); |
| | | redisTemplate.delete(RedisConstant.Check_Face_ViewConnect); |
| | | } |
| | | for (SnapshotDataMonitorResult result : list) { |
| | | TMonitorVO monitor = monitorMap.get(result.getExternalIndexCode()); |
| | |
| | | } |
| | | //视图库对接稳定性 |
| | | //Redis记录该区县当月无数据上传次数 |
| | | Integer noDateCount = (Integer) redisTemplate.opsForHash().get(CheckThreadConstants.Check_Face_ViewConnect, key); |
| | | Integer noDateCount = (Integer) redisTemplate.opsForHash().get(RedisConstant.Check_Face_ViewConnect, key); |
| | | // 如果值为null,则初始化为0 |
| | | if (noDateCount == null) { |
| | | noDateCount = 0; |
| | |
| | | noDateCount++; |
| | | } |
| | | // 将新的值放回Hash中 |
| | | redisTemplate.opsForHash().put(CheckThreadConstants.Check_Face_ViewConnect, key, noDateCount); |
| | | redisTemplate.opsForHash().put(RedisConstant.Check_Face_ViewConnect, key, noDateCount); |
| | | return checkIndexFace; |
| | | } |
| | | } |