Browse Source

Merge branch 'crm/crm_16.5' of http://8.136.199.33:3000/hongze/hz_crm_api into debug

zhangchuanxing 1 month ago
parent
commit
e4e46030ad
1 changed files with 2 additions and 1 deletions
  1. 2 1
      models/cygx/wx_user_rai_label.go

+ 2 - 1
models/cygx/wx_user_rai_label.go

@@ -156,6 +156,7 @@ func GetWxUserRaiLabelListByUserIds(userIdArr []int) (list []*WxUserRaiLabelList
 				( SELECT @row_number := 0, @prev_user_id := NULL ) AS vars 
 			WHERE
 				user_id IN ( ` + utils.GetOrmInReplace(lenArr) + ` ) 
+				AND create_time > ?
 			ORDER BY
 				create_time DESC 
 			) AS t 
@@ -163,7 +164,7 @@ func GetWxUserRaiLabelListByUserIds(userIdArr []int) (list []*WxUserRaiLabelList
 			t.rank <= 10 
 		ORDER BY
 			t.create_time DESC  `
-	_, err = o.Raw(sql, userIdArr).QueryRows(&list)
+	_, err = o.Raw(sql, userIdArr, time.Now().AddDate(0, -4, 0).Format(utils.FormatDate)).QueryRows(&list)
 	return
 }