瀏覽代碼

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

王浩 1 年之前
父節點
當前提交
bb0e54a96f
共有 1 個文件被更改,包括 10 次插入6 次删除
  1. 10 6
      api/internal/service/owner.go

+ 10 - 6
api/internal/service/owner.go

@@ -941,12 +941,16 @@ func (t *OwnerService) OwnerCooperate() []map[string]interface{} {
 	dataArr := []TimeConnectionsEntity{}
 	if t.CooperateType == "supplier" {
 		//供应商
-		supplierSql := fmt.Sprintf(`SELECT DISTINCT  a.zbtime as zbtime,a.project_id as project_id,a.project_name as project_name 
-	FROM 
-	   (select zbtime,project_id,project_name,winner_id as winnerId,buyer_id   from  transaction_info     
-	ARRAY JOIN  winner_id ) a 
-	inner join ent_contact  b   on a.buyer_id = '%s' and a.winnerId='%s' and  a.winnerId=b.id
-	inner join ent_info  c   on a.winnerId=c.id order by a.zbtime,a.winnerId`, t.BuyerId, t.WinnerId)
+		supplierSql := fmt.Sprintf(`SELECT
+			zbtime,
+			project_id,
+			project_name
+			
+		FROM
+			transaction_info     
+		ARRAY 
+		JOIN winner_id  as  winnerId  
+		where  buyer_id= '%s' and  winnerId='%s'`, t.BuyerId, t.WinnerId)
 		dataArr = TimeFindConnectionsHandle(supplierSql)
 	} else if t.CooperateType == "agency" {
 		//代理机构