...
This commit is contained in:
parent
d0090f5709
commit
d5a18c49d5
@ -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,
|
||||
]);
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user