src/modules/cs/controller/app/msg.ts
@@ -38,7 +38,7 @@ }, ], where: ctx => { return [['d.userId = :userId', { userId: ctx.user?.id }]]; return [['d.userId = :userId', { userId: ctx.user?.userId }]]; }, }, }) @@ -51,7 +51,9 @@ @Get('/unreadCount', { summary: '未读消息数' }) async unreadCount() { return this.ok(await this.csMsgService.unreadCount(this.ctx.user?.id, 1)); return this.ok( await this.csMsgService.unreadCount(this.ctx.user?.userId, 1) ); } @Post('/read', { summary: '标记已读' })