瀏覽代碼

新增列表接口

chenweida 7 年之前
父節點
當前提交
122c97f427

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

@ -30,6 +30,7 @@ import org.springframework.stereotype.Service;
import org.apache.commons.lang3.StringUtils;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
@ -90,8 +91,8 @@ public class StatisticsService extends BaseService {
     *
     * @return
     */
    public boolean peopleNumToRedis() {
        List<PopulationBase> peopleNums = peopleNumDao.findByYear(Calendar.getInstance().get(Calendar.YEAR));
    public boolean peopleNumToRedis() throws Exception {
        List<PopulationBase> peopleNums = peopleNumDao.findByYear(Integer.valueOf(Constant.getNowYear()));
        for (PopulationBase peopleNum : peopleNums) {
            redisTemplate.opsForValue().set("people:num:" + peopleNum.getCode(), new JSONObject(peopleNum).toString());