Răsfoiți Sursa

Merge branch 'dev_v1.0.4_wh' of CRM/application into hotfix/v1.0.4.2

王浩 1 an în urmă
părinte
comite
804c5cd27a
1 a modificat fișierele cu 2 adăugiri și 3 ștergeri
  1. 2 3
      api/internal/service/owner.go

+ 2 - 3
api/internal/service/owner.go

@@ -203,7 +203,6 @@ func ConnectionsHandle(buyerArr []string, positionId int64, isAll bool) []map[st
 		return returnData
 	}
 	a5 := time.Now().Unix()
-
 	returnData = append(returnData, Findwinner(buyerArr)...)
 	a6 := time.Now().Unix()
 	logx.Info("供应商", a6-a5)
@@ -391,14 +390,14 @@ func FindMiddleman(buyerArr []string, positionId int64, returnData []map[string]
 	}
 	//中间人  作为可介绍业主    企业名称
 	companyArr := CrmMysql.SelectBySql(
-		fmt.Sprintf("select DISTINCT  b.company_id,b.company_name,a.relate_id,a.relate_name,b.contact_person   from  connection_introduce a  INNER JOIN  connection   b  on  a.position_id=%d  and a.connection_id=b.id  and   a.relate_Id in (%s) and  a.itype =1  and  b.itype=4 and  b.status=1 ", positionId, strings.Join(buyerArr, ",")))
+		fmt.Sprintf("select DISTINCT b.id, b.company_id,b.company_name,a.relate_id,a.relate_name,b.contact_person   from  connection_introduce a  INNER JOIN  connection   b  on  a.position_id=%d  and a.connection_id=b.id  and   a.relate_Id in (%s) and  a.itype =1  and  b.itype=4 and  b.status=1 ", positionId, strings.Join(buyerArr, ",")))
 	for _, v := range *companyArr {
 		companyId := gconv.String(v["company_id"])
 		companyName := gconv.String(v["company_name"])
 		relateName := gconv.String(v["relate_name"])
 		relateId := gconv.String(v["relate_id"])
-		//key := fmt.Sprintf("%s_%s", relateId, companyId)
 		returnData = append(returnData, map[string]interface{}{
+			"c_id":         gconv.String(v["id"]),
 			"b_id":         companyId,
 			"b_name":       companyName,
 			"a_name":       relateName,