瀏覽代碼

fix: 信息价相关

vian 4 年之前
父節點
當前提交
485fe401ce
共有 1 個文件被更改,包括 6 次插入0 次删除
  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') {