|
@ -20,6 +20,8 @@ import com.yihu.wlyy.util.MapListUtils;
|
|
import com.yihu.wlyy.util.SystemConf;
|
|
import com.yihu.wlyy.util.SystemConf;
|
|
import org.json.JSONArray;
|
|
import org.json.JSONArray;
|
|
import org.json.JSONObject;
|
|
import org.json.JSONObject;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
@ -39,6 +41,8 @@ import java.util.*;
|
|
*/
|
|
*/
|
|
@Service
|
|
@Service
|
|
public class StatisticsService extends BaseService {
|
|
public class StatisticsService extends BaseService {
|
|
|
|
|
|
|
|
private Logger logger= LoggerFactory.getLogger(StatisticsService.class);
|
|
@Autowired
|
|
@Autowired
|
|
CityDao cityDao;
|
|
CityDao cityDao;
|
|
@Autowired
|
|
@Autowired
|
|
@ -4235,6 +4239,9 @@ public class StatisticsService extends BaseService {
|
|
private int getLevel1NumForRedis(String index, String level, String code, String timeKey) {
|
|
private int getLevel1NumForRedis(String index, String level, String code, String timeKey) {
|
|
String key37 = "quota:" + index + ":" + level + ":" + code + ":" + timeKey;
|
|
String key37 = "quota:" + index + ":" + level + ":" + code + ":" + timeKey;
|
|
JSONObject switchJo = new JSONObject(redisTemplate.opsForValue().get(key37));
|
|
JSONObject switchJo = new JSONObject(redisTemplate.opsForValue().get(key37));
|
|
|
|
logger.info(key37);
|
|
|
|
logger.info(redisTemplate==null?"true":"false");
|
|
|
|
logger.info(switchJo.toString());
|
|
return switchJo.getInt("num");
|
|
return switchJo.getInt("num");
|
|
}
|
|
}
|
|
|
|
|