소스 검색

修改代码

chenweida 7 년 전
부모
커밋
4cc3d4d58f
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsService.java

+ 7 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsService.java

@ -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");
    }
    }