From 1c05e4c1da6841697e7e789c46de22b85940237c Mon Sep 17 00:00:00 2001 From: gazebo Date: Thu, 5 Dec 2019 14:00:15 +0800 Subject: [PATCH] =?UTF-8?q?dao.GetUsers=20keyword=E6=94=AF=E6=8C=81id?= =?UTF-8?q?=E6=9F=A5=E6=89=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/model/dao/dao_user2.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/business/model/dao/dao_user2.go b/business/model/dao/dao_user2.go index 51572c40d..3a4ee6b66 100644 --- a/business/model/dao/dao_user2.go +++ b/business/model/dao/dao_user2.go @@ -67,8 +67,8 @@ func GetUsers(db *DaoDB, userType int, keyword string, userIDs []string, userID2 } if keyword != "" { keywordLike := "%" + keyword + "%" - sql += " AND (t1.user_id2 LIKE ? OR t1.mobile LIKE ? OR t1.email LIKE ? OR t1.name LIKE ?)" - sqlParams = append(sqlParams, keywordLike, keywordLike, keywordLike, keywordLike) + sql += " AND (t1.user_id LIKE ? OR t1.user_id2 LIKE ? OR t1.mobile LIKE ? OR t1.email LIKE ? OR t1.name LIKE ?)" + sqlParams = append(sqlParams, keywordLike, keywordLike, keywordLike, keywordLike, keywordLike) } sql += " LIMIT ? OFFSET ?" sqlParams = append(sqlParams, pageSize, offset)