|
@@ -64,7 +64,7 @@ func DistributeClueShow(this *biservice.DistributeClueShowReq) *biservice.Distri
|
|
|
pArr = append(pArr, strconv.FormatInt(c.PositionId, 10))
|
|
|
}
|
|
|
//
|
|
|
- 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, ",") + `) AND id not in (` + this.ClueIdList + `) AND company_nature = 0 AND company_verification = 1 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,count(*) as count 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, ",") + `) AND id not in (` + this.ClueIdList + `) AND company_nature = 0 AND company_verification = 1 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 {
|
|
@@ -81,7 +81,6 @@ func DistributeClueShow(this *biservice.DistributeClueShowReq) *biservice.Distri
|
|
|
rdata[k].ClueCount += int64(count)
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
//
|
|
@@ -109,14 +108,12 @@ func DistributeClueShow(this *biservice.DistributeClueShowReq) *biservice.Distri
|
|
|
ids := strconv.FormatInt(id, 10)
|
|
|
if a == ids {
|
|
|
isOk = false
|
|
|
- log.Println("isOk2 ", isOk)
|
|
|
if this.DataType == 3 {
|
|
|
//分线索
|
|
|
dclue(id, positionId, this.IsTask, this.PositionId)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- log.Println("isOk1 ", isOk, a)
|
|
|
if isOk {
|
|
|
clueArrSync.Lock()
|
|
|
clueArrs = append(clueArrs, a)
|