xuzhiheng 1 年間 前
コミット
8986e5350e
1 ファイル変更2 行追加2 行削除
  1. 2 2
      service/company.go

+ 2 - 2
service/company.go

@@ -61,7 +61,7 @@ func DistributeClueShow(this *biservice.DistributeClueShowReq) *biservice.Distri
 		pArr = append(pArr, strconv.FormatInt(c.PositionId, 10))
 	}
 	//
-	sql1 := `SELECT a.cluename,a.position_id FROM dwd_f_crm_clue_info a INNER JOIN (SELECT cluename,position_id FROM dwd_f_crm_clue_info WHERE position_id in (` + strings.Join(pArr, ",") + `) GROUP BY cluename) AS b ON a.cluename = b.cluename WHERE id in (` + this.ClueIdList + `) GROUP BY cluename`
+	sql1 := `SELECT b.cluename,b.position_id FROM dwd_f_crm_clue_info a INNER JOIN (SELECT cluename,position_id FROM dwd_f_crm_clue_info WHERE position_id in (` + strings.Join(pArr, ",") + `) GROUP BY cluename) AS b ON a.cluename = b.cluename WHERE id in (` + this.ClueIdList + `) GROUP BY cluename`
 	log.Println("sql1 ", sql1)
 	sdata := JyBiTidb.SelectBySql(sql1)
 	if sdata != nil && len(*sdata) > 0 {
@@ -84,7 +84,7 @@ func DistributeClueShow(this *biservice.DistributeClueShowReq) *biservice.Distri
 	//
 	clueArrs := []string{}
 	clueArrSync := &sync.Mutex{}
-	sql2 := `SELECT a.id,a.position_id FROM dwd_f_crm_clue_info a INNER JOIN (SELECT id,cluename,position_id FROM dwd_f_crm_clue_info WHERE position_id in (` + strings.Join(pArr, ",") + `) GROUP BY cluename) AS b ON a.cluename = b.cluename WHERE a.id in (` + this.ClueIdList + `)`
+	sql2 := `SELECT b.id,b.position_id FROM dwd_f_crm_clue_info a INNER JOIN (SELECT id,cluename,position_id FROM dwd_f_crm_clue_info WHERE position_id in (` + strings.Join(pArr, ",") + `) GROUP BY cluename) AS b ON a.cluename = b.cluename WHERE a.id in (` + this.ClueIdList + `)`
 	log.Println("sql2 ", sql2)
 	ldata := JyBiTidb.SelectBySql(sql2)
 	if ldata != nil && len(*ldata) > 0 {