Quellcode durchsuchen

fix: 信息价相关

vian vor 3 Jahren
Ursprung
Commit
485fe401ce
1 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen
  1. 6 0
      web/over_write/crawler/guangdong_2018_price_crawler.js

+ 6 - 0
web/over_write/crawler/guangdong_2018_price_crawler.js

@@ -476,6 +476,12 @@ async function crawlData(from, to, compilationID) {
       } else { // 需求变更,需要排序
         await priceInfoAreaModel.update({ ID: areaItem.ID }, { $set: { serialNo } });
       }
+
+      const existCount = await priceInfoItemModel.count({ compilationID, period, areaID: areaItem.ID });
+      if (existCount) {
+        continue;
+      }
+
       // 存入信息价相关数据
       const sourceData = await getPriceInfoSource(token, sourcePeriod, city, county);
       if (typeof sourceData === 'string') {