sync: soul-api 接口逻辑 | 原因: 后端接口逻辑修改
This commit is contained in:
@@ -211,8 +211,16 @@ func MatchUsers(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
// 排除当天已匹配过的用户
|
||||
var todayMatchedIDs []string
|
||||
db.Model(&model.MatchRecord{}).Where("user_id = ? AND created_at >= CURDATE()", body.UserID).
|
||||
Pluck("matched_user_id", &todayMatchedIDs)
|
||||
|
||||
var users []model.User
|
||||
q := db.Where("id != ?", body.UserID)
|
||||
if len(todayMatchedIDs) > 0 {
|
||||
q = q.Where("id NOT IN ?", todayMatchedIDs)
|
||||
}
|
||||
// 按池子来源筛选
|
||||
switch poolSource {
|
||||
case "vip":
|
||||
|
||||
Reference in New Issue
Block a user