Sfoglia il codice sorgente

fix: 信息价相关

vian 3 anni fa
parent
commit
485fe401ce
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  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') {