浏览代码

查询缓慢处理

WH01243 8 月之前
父节点
当前提交
7068e80071
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      clueSync/jobutil.go

+ 4 - 2
clueSync/jobutil.go

@@ -1364,8 +1364,10 @@ func GetCompanyType(companyName string) (int, int) {
 		isGroup = 1
 	}
 	//是否在工商库
-	if c := MgoQyxy.Count("qyxy_std", map[string]interface{}{"company_name": companyName, "company_type": map[string]interface{}{"$ne": "个体工商户"}}); c > 0 {
-		isCommerce = 1
+	if companyName != "" {
+		if c := MgoQyxy.Count("qyxy_std", map[string]interface{}{"company_name": companyName, "company_type": map[string]interface{}{"$ne": "个体工商户"}}); c > 0 {
+			isCommerce = 1
+		}
 	}
 	return isGroup, isCommerce
 }