perf:listPublished页面加入更多使用者资讯
This commit is contained in:
		| @@ -13,9 +13,8 @@ export class PostModel { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     async findPostsByStatus(status: TPostStatus, page: number) { |     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]) |             + pageToLimitSqlSegment(page), [status]) | ||||||
|         return arr.map((single: any) => fillIPost(single)) |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     async findPostById(id: number) { |     async findPostById(id: number) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user