|
@@ -533,6 +533,8 @@ func DrawClueSync(this *biservice.DrawClueReq) (int, int) {
|
|
|
}
|
|
|
|
|
|
func DrawClues(positionId, count1, count2, count3 int64) int {
|
|
|
+ nowTime := time.Now().Format("2006-01-02 15:04:05")
|
|
|
+ seatNumber, name := getSeatNumber(positionId)
|
|
|
data1, data2, data3, drawCount := &[]map[string]interface{}{}, &[]map[string]interface{}{}, &[]map[string]interface{}{}, 0
|
|
|
if count1 > 0 {
|
|
|
data1 = JyBiTidb.SelectBySql(`SELECT * from dwd_f_crm_clue_info where is_assign = 0 and level_open = ? and cluename in (SELECT cluename from dwd_f_crm_clue_info where position_id = ? GROUP BY cluename)`, 1, positionId)
|
|
@@ -571,6 +573,19 @@ func DrawClues(positionId, count1, count2, count3 int64) int {
|
|
|
}
|
|
|
}
|
|
|
//
|
|
|
+ if data1 != nil && len(*data1) > 0 {
|
|
|
+ count := batchDraw(*data1, nowTime, seatNumber, name, positionId)
|
|
|
+ drawCount += count
|
|
|
+ }
|
|
|
+ if data2 != nil && len(*data2) > 0 {
|
|
|
+ count := batchDraw(*data2, nowTime, seatNumber, name, positionId)
|
|
|
+ drawCount += count
|
|
|
+ }
|
|
|
+ if data3 != nil && len(*data3) > 0 {
|
|
|
+ count := batchDraw(*data3, nowTime, seatNumber, name, positionId)
|
|
|
+ drawCount += count
|
|
|
+ }
|
|
|
+ //
|
|
|
if count1 > 0 {
|
|
|
data1 = JyBiTidb.SelectBySql(`SELECT max(c.createTime) as ctime,a.id,a.trailstatus FROM dwd_f_crm_clue_info a
|
|
|
LEFT JOIN Call_Accounting.voice_record c ON c.CalledNo = a.phone
|
|
@@ -586,8 +601,6 @@ func DrawClues(positionId, count1, count2, count3 int64) int {
|
|
|
LEFT JOIN Call_Accounting.voice_record c ON c.CalledNo = a.phone
|
|
|
WHERE a.level_open = ? AND a.is_assign = 0 AND a.uid !="" AND a.is_transfer != 1 GROUP BY a.id ORDER BY ctime asc limit ?`, 3, count3)
|
|
|
}
|
|
|
- nowTime := time.Now().Format("2006-01-02 15:04:05")
|
|
|
- seatNumber, name := getSeatNumber(positionId)
|
|
|
if data1 != nil && len(*data1) > 0 {
|
|
|
count := batchDraw(*data1, nowTime, seatNumber, name, positionId)
|
|
|
drawCount += count
|