| | |
| | | package com.lf.server.service.sys; |
| | | |
| | | import com.lf.server.entity.all.RedisCacheKey; |
| | | import com.lf.server.entity.all.SettingData; |
| | | import com.lf.server.entity.all.StaticData; |
| | | import com.lf.server.entity.ctrl.CoordinateEntity; |
| | | import com.lf.server.entity.ctrl.CountEntity; |
| | |
| | | import com.lf.server.mapper.sys.ReportMapper; |
| | | import com.lf.server.service.all.RedisService; |
| | | import com.lf.server.service.data.DownloadService; |
| | | import com.lf.server.service.data.PublishService; |
| | | import org.apache.commons.logging.Log; |
| | | import org.apache.commons.logging.LogFactory; |
| | | import org.locationtech.jts.geom.Coordinate; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | @Override |
| | | public List<CountEntity> countExplorationPoints() { |
| | | String key = RedisCacheKey.dataCountKey("countExplorationPoints"); |
| | | // Object obj = redisService.get(key); |
| | | // if (obj instanceof List<?>) { |
| | | // return (List<CountEntity>) obj; |
| | | // } |
| | | Object obj = redisService.get(key); |
| | | if (obj instanceof List<?>) { |
| | | return (List<CountEntity>) obj; |
| | | } |
| | | |
| | | List<CountEntity> list = reportMapper.countExplorationPoints(); |
| | | if (null != list && list.size() > 0) { |
| | | countExplorationArea(list); |
| | | redisService.put(key, list, SettingData.CACHE_EXPIRE, TimeUnit.MINUTES); |
| | | redisService.put(key, list, StaticData.I2, TimeUnit.MINUTES); |
| | | } |
| | | |
| | | return list; |