|
@@ -1,6 +1,9 @@
|
|
|
package com.ruoyi.benyun.utils.statistics;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.ruoyi.benyun.entity.AddrCategory;
|
|
|
import com.ruoyi.benyun.entity.BrandZone;
|
|
|
+import com.ruoyi.benyun.mapper.AddrCategoryDao;
|
|
|
import com.ruoyi.benyun.mapper.BrandZoneDao;
|
|
|
import com.ruoyi.benyun.mapper.StoreDao;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -17,6 +20,8 @@ public class BrandZoneStat {
|
|
|
StoreDao storeDao;
|
|
|
@Autowired
|
|
|
BrandZoneDao brandZoneDao;
|
|
|
+ @Autowired
|
|
|
+ AddrCategoryDao addrCategoryDao;
|
|
|
|
|
|
public void continueQuicklyInsert(){
|
|
|
List<String> notIns = brandZoneDao.searchStatedBrandIds(null);
|
|
@@ -27,6 +32,16 @@ public class BrandZoneStat {
|
|
|
for (BrandZone zone : zones) {
|
|
|
zone.setDisId(UUID.randomUUID().toString().replace("-",""));
|
|
|
zone.setUpdateTime(LocalDateTime.now(ZoneId.of("Asia/Shanghai")));
|
|
|
+
|
|
|
+ QueryWrapper<AddrCategory> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("addr_code",zone.getAddrCode());
|
|
|
+ AddrCategory one = addrCategoryDao.selectOne(queryWrapper);
|
|
|
+ zone.setZone(one.getDistrict());
|
|
|
+ zone.setCity(one.getCity());
|
|
|
+ zone.setProvince(one.getProvince());
|
|
|
+ zone.setLat(one.getLatGd());
|
|
|
+ zone.setLng(one.getLngGd());
|
|
|
+
|
|
|
i += brandZoneDao.insert(zone);
|
|
|
System.out.println(i+"/"+total);
|
|
|
}
|