|
@@ -1,7 +1,9 @@
|
|
|
package com.ruoyi.benyun.utils.statistics;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.ruoyi.benyun.entity.Brand;
|
|
|
import com.ruoyi.benyun.entity.BrandProvince;
|
|
|
+import com.ruoyi.benyun.mapper.BrandCityDao;
|
|
|
import com.ruoyi.benyun.mapper.BrandDao;
|
|
|
import com.ruoyi.benyun.mapper.BrandProvinceDao;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -19,11 +21,17 @@ public class BrandProvinceStat {
|
|
|
BrandDao brandDao;
|
|
|
@Autowired
|
|
|
BrandProvinceDao brandProvinceDao;
|
|
|
+ @Autowired
|
|
|
+ BrandCityDao cityDao;
|
|
|
|
|
|
public void continueInsert(){
|
|
|
- List<String> notIns = brandProvinceDao.selectIns();
|
|
|
- System.out.println("已处理:" + notIns.size() + "个");
|
|
|
- List<Brand> brands = brandDao.searchNotIns(notIns);
|
|
|
+// List<String> notIns = brandProvinceDao.selectIns();
|
|
|
+// System.out.println("已处理:" + notIns.size() + "个");
|
|
|
+// List<Brand> brands = brandDao.searchNotIns(notIns);
|
|
|
+ List<String> ins = cityDao.selectIns();
|
|
|
+ QueryWrapper<Brand> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.in("brand_id",ins);
|
|
|
+ List<Brand> brands = brandDao.selectList(queryWrapper);
|
|
|
int index = 1;
|
|
|
int total = brands.size();
|
|
|
for (Brand brand : brands){
|