- GetUsers添加userID参数
This commit is contained in:
@@ -23,7 +23,7 @@ func GetUserByID(db *DaoDB, fieldName, fieldValue string) (user *model.User, err
|
||||
return user, err
|
||||
}
|
||||
|
||||
func GetUsers(db *DaoDB, userType int, userID2, mobile, userName string) (userList []*model.User, err error) {
|
||||
func GetUsers(db *DaoDB, userType int, userID, userID2, mobile, userName string) (userList []*model.User, err error) {
|
||||
if userType == 0 {
|
||||
userType = 255
|
||||
}
|
||||
@@ -35,6 +35,10 @@ func GetUsers(db *DaoDB, userType int, userID2, mobile, userName string) (userLi
|
||||
utils.DefaultTimeValue,
|
||||
userType,
|
||||
}
|
||||
if userID != "" {
|
||||
sql += " AND t1.user_id = ?"
|
||||
sqlParams = append(sqlParams, userID)
|
||||
}
|
||||
if userID2 != "" {
|
||||
sql += " AND t1.user_id2 = ?"
|
||||
sqlParams = append(sqlParams, userID2)
|
||||
|
||||
Reference in New Issue
Block a user