diff --git a/backend/src/routes/portal.routes.ts b/backend/src/routes/portal.routes.ts index 72cfcdb..19b363d 100644 --- a/backend/src/routes/portal.routes.ts +++ b/backend/src/routes/portal.routes.ts @@ -1055,7 +1055,7 @@ router.post('/attachments', portalAuth, async (req: any, res, next) => { return res.status(400).json({ success: false, error: { code: 'BAD_REQUEST', message: '文件名和文件内容不能为空' } }) } const attachment = await prisma.employeeAttachment.create({ - data: { orgId, employeeId, fileName, fileType: fileType || 'OTHER', fileUrl, fileSize: fileSize || 0 }, + data: { orgId, employeeId, fileName, fileType: fileType || 'OTHER', fileUrl, fileSize: fileSize || 0, uploadedBy: req.employee.id }, }) res.json({ success: true, data: attachment }) } catch (err) { next(err) }