2025-09-30

未读变已读
查询列表排序
This commit is contained in:
2025-09-30 16:41:10 +08:00
parent 51052e59a2
commit 541d7842ce
11 changed files with 153 additions and 53 deletions

View File

@@ -0,0 +1,23 @@
import {Body, Controller, Get, Post, Query} from "@nestjs/common";
import {MessageService} from "../service";
import {ProgramGroupMessageEntity, ReadDto} from "../entity";
@Controller('message')
export class MessageController {
constructor(private messageService: MessageService) {
}
// 获取未读消息
@Get("unread")
async getUnread(@Query() readDto: ReadDto) {
return await this.messageService.getUnread(readDto)
}
// 将未读消息置为已读
@Post('read')
async read(@Body() readDto: ReadDto) {
return await this.messageService.read(readDto)
}
}