Răsfoiți Sursa

企业名称搜索处理

WH01243 1 an în urmă
părinte
comite
0993a166d0
1 a modificat fișierele cu 17 adăugiri și 15 ștergeri
  1. 17 15
      api/internal/service/owner.go

+ 17 - 15
api/internal/service/owner.go

@@ -510,26 +510,28 @@ func BuyerProjectMerge(dataMap, projectMap *map[string]map[string]interface{}, s
 			count = gconv.Int64(projectMap["count"])
 			money := gconv.Int64(projectMap["money"])
 			zbtime := gconv.Int64(projectMap["zbtime"])
+			if count >= 2 {
+				highSuccessNumber++
+			}
 			if sourceType == "1" {
 				if count < 2 {
 					continue
 				}
-				highSuccessNumber++
-				returnData = append(returnData, BuyerProject{
-					BuyerId:   buyerId,
-					BuyerName: buyerName,
-					Project: ProjectEntity{
-						Number:          count,
-						EstimatedAmount: money,
-						Connections:     []map[string]interface{}{},
-					},
-					Area:             gconv.String(projectMap["area"]),
-					Zbtime:           zbtime,
-					IsIgnore:         gconv.Bool(buyerMap["isIgnore"]),
-					IsMonitor:        gconv.Bool(buyerMap["isMonitor"]),
-					IsCreateCustomer: gconv.Bool(buyerMap["isCreateCustomer"]),
-				})
 			}
+			returnData = append(returnData, BuyerProject{
+				BuyerId:   buyerId,
+				BuyerName: buyerName,
+				Project: ProjectEntity{
+					Number:          count,
+					EstimatedAmount: money,
+					Connections:     []map[string]interface{}{},
+				},
+				Area:             gconv.String(projectMap["area"]),
+				Zbtime:           zbtime,
+				IsIgnore:         gconv.Bool(buyerMap["isIgnore"]),
+				IsMonitor:        gconv.Bool(buyerMap["isMonitor"]),
+				IsCreateCustomer: gconv.Bool(buyerMap["isCreateCustomer"]),
+			})
 		} else {
 			if sourceType == "1" {
 				if count < 2 {