perf:listPublished页面加入更多使用者资讯
This commit is contained in:
父節點
008ffdfd7c
當前提交
2eb3d40009
@ -13,9 +13,8 @@ export class PostModel {
|
||||
}
|
||||
|
||||
async findPostsByStatus(status: TPostStatus, page: number) {
|
||||
let arr = await db.query('select * from posts where status=? order by time desc '
|
||||
return db.query('select p.*,u.realName,u.avatar from posts p left join users u on u.id=p.userId where p.status=? order by p.time desc '
|
||||
+ pageToLimitSqlSegment(page), [status])
|
||||
return arr.map((single: any) => fillIPost(single))
|
||||
}
|
||||
|
||||
async findPostById(id: number) {
|
||||
|
載入中…
x
新增問題並參考
Block a user