This commit is contained in:
张成
2026-02-28 10:38:28 +08:00
parent 1a011bcc01
commit dfd3119163
44 changed files with 449 additions and 13555 deletions

View File

@@ -277,7 +277,7 @@ module.exports = {
const records = await chat_records.findAll({
where: { jobId, sn_code },
order: [['sendTime', 'ASC'], ['receiveTime', 'ASC'], ['id', 'ASC']]
order: [['updateTime', 'ASC'], ['id', 'ASC']]
});
return ctx.success(records);
@@ -338,8 +338,7 @@ module.exports = {
content,
chatType,
direction: 'sent',
sendStatus: 'pending',
sendTime: new Date()
// 对话会话表当前不再区分单条消息时间,这里仅保留必要字段
});
console.log(`[聊天管理] 消息待发送到设备 ${sn_code}:`, content);
@@ -482,8 +481,8 @@ module.exports = {
record.direction || '',
record.chatType || '',
`"${(record.content || '').replace(/"/g, '""')}"`,
record.sendTime || '',
record.receiveTime || '',
'',
'',
record.hasReply ? '是' : '否'
];
csvContent += row.join(',') + '\n';