feat: 开发持仓、股票信息相关接口

This commit is contained in:
R524809
2026-01-12 17:38:55 +08:00
parent 67e4dc6382
commit 838a021ce5
46 changed files with 4407 additions and 12 deletions
+12 -2
View File
@@ -193,11 +193,18 @@ export class UserService {
take: limit,
});
// 移除 passwordHash 字段
const listWithoutPassword = list.map((user) => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { passwordHash, ...userWithoutPassword } = user;
return userWithoutPassword as User;
});
// 计算总页数
const total_page = Math.ceil(total / limit);
return {
list,
list: listWithoutPassword,
pagination: {
total,
total_page,
@@ -247,7 +254,10 @@ export class UserService {
throw new NotFoundException(`未找到ID为 ${id} 的用户`);
}
return user;
// 移除 passwordHash 字段
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { passwordHash, ...userWithoutPassword } = user;
return userWithoutPassword as User;
}
/**