feat: 支持客户查询咨询详情

This commit is contained in:
que01 committed 2026-09-23 09:42:17 +08:00
1 parent b299c313d1
commit 3186757d93
4 files changed
+46 -1

No files matched your search

+14
View File
@@ -497,6 +497,20 @@ export class CustomerInquirySubmissionController {
return submissions.map((submission) => this.present(submission));
}
@Get(":id")
async get(@Req() request: FastifyRequest, @Param("id") id: string): Promise<unknown> {
const identity = this.identity(request);
const submission = await this.prisma.inquirySubmission.findFirst({
where: { id, brandId: identity.brandId, customerSubject: identity.subject },
include: {
inquiryForm: { select: { name: true, purpose: true } },
offering: { select: { id: true, name: true } },
},
});
if (!submission) throw new NotFoundException("咨询记录不存在");
return this.present(submission);
}
@Post()
async create(
@Req() request: FastifyRequest,