From d5a18c49d527b172b3848af0bd696c1d9d2c4e53 Mon Sep 17 00:00:00 2001 From: lightings <17062401@qq.com> Date: Tue, 25 Jul 2023 15:55:51 +0800 Subject: [PATCH] ... --- game-server/app/dao/userDao.js | 3 ++- proxy/client_bak.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/game-server/app/dao/userDao.js b/game-server/app/dao/userDao.js index 0e23d38..72d6de4 100644 --- a/game-server/app/dao/userDao.js +++ b/game-server/app/dao/userDao.js @@ -51,11 +51,12 @@ class UserDao { if (limit>20) { throw new Error(`limit too large: ${limit}`); } - const query = `SELECT idx, account_id, CAST(name as CHAR) as name FROM t_user WHERE idx>? AND (CAST(account_id as CHAR) = ? OR CAST(name as CHAR) LIKE ?) LIMIT ?`; + const query = `SELECT idx, account_id, CAST(name as CHAR) as name FROM t_user WHERE idx>? AND (CAST(account_id as CHAR) = ? OR CAST(name as CHAR) LIKE ?) AND account_id != ? LIMIT ?`; const results = await query_game(query, [ last_idx, name, "%" + name + "%", + uid, limit, ]); diff --git a/proxy/client_bak.js b/proxy/client_bak.js index 20e955a..615a92b 100644 --- a/proxy/client_bak.js +++ b/proxy/client_bak.js @@ -88,7 +88,7 @@ stick.onBody((msgId, data) => { msg = await rpc("chat.chatHandler.worldChat", { content: "hello" }); console.log(msg); msg = await rpc("friend.friendHandler.findUser", { name: "Xiao", last_idx: 0, limit: 5 }); - console.log(msg); + console.log(JSON.stringify(msg, null, 2)); msg = await rpc("guild.guildHandler.createGuild", { guildName: "newGuild1", logo: "test001"}); console.log(msg);