|
@@ -1,5 +1,6 @@
|
|
|
package com.ruoyi.demo.utils;
|
|
|
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.lang.Console;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
@@ -112,7 +113,7 @@ public class WdRedisStoreage {
|
|
|
}
|
|
|
Long total = wdInfoDao.selectCount(queryWrapper);
|
|
|
|
|
|
- queryWrapper.select("wd_id", "addr_code", "lng", "lat");
|
|
|
+ queryWrapper.select("wd_id", "addr_code", "lng", "lat").orderByAsc("collect_time");
|
|
|
|
|
|
//使用sqlSessionFactory打开一个sqlSession,在没有读取完数据之前不要提交事务或关闭sqlSession
|
|
|
Console.log("----开启sqlSession");
|
|
@@ -132,7 +133,7 @@ public class WdRedisStoreage {
|
|
|
RedisUtils.getClient().getGeo(wdInfo.getAddrCode().substring(0, 4)).add(wdInfo.getLng().doubleValue(), wdInfo.getLat().doubleValue(), wdInfo.getWdId());
|
|
|
wdTagAnalyse(wdInfo);
|
|
|
//存入已处理网点的时间
|
|
|
- RedisUtils.setCacheObject(RedisContant.WD_TAG_LASTTIME, wdInfo.getCollectTime());
|
|
|
+ RedisUtils.setCacheObject(RedisContant.WD_TAG_LASTTIME, DateUtil.formatDateTime(wdInfo.getCollectTime()));
|
|
|
}
|
|
|
if (cursor.isConsumed()) {
|
|
|
Console.log("----查询sql匹配中的数据已经消费完毕!");
|