fix: 修复代码审查安全与稳定性问题并清理日历跳转残留筛选
修复第三方代码审查报告中的安全、账单导入事务与 AI 稳定性问题,并附带修复日历页跳转收支记录时未清空残留筛选条件、可能只显示当天被筛掉后部分记录的问题。 变更内容: - 安全性:JWT 签名密钥改为环境变量 JWT_SECRET 优先、未配置回退内置默认;CORS 由全放开收窄为 localhost 与 192.168/10/172 局域网网段 - 账单导入:新增 BillImportWriteService,以 REQUIRES_NEW 独立事务承载批量插入与失败回退,避免批量失败污染外层事务;findExistingExternalNos 改为分批查询;压缩包临时文件删除失败记录 warn、读取条目失败记录 debug - AI 稳定性:DeepSeekClient 对超时/连接层异常/5xx/429 做指数退避重试(最多 2 次);图片记账 SSE 线程池固定为 8 线程、连接 5 分钟超时,并每 15s 发送注释行心跳 - 日历:跳转收支记录页时清空上次残留的类型/分类/渠道/备注/金额/标签筛选
This commit is contained in:
@@ -401,7 +401,13 @@ async function openDetail(year: number, month: number, date: number) {
|
||||
}
|
||||
}
|
||||
|
||||
/** 跳转到收支记录页并按当日筛选 */
|
||||
/**
|
||||
* 跳转到收支记录页并按当日筛选
|
||||
*
|
||||
* 日历入口以「日期」为唯一上下文,除日期范围与计入统计外,
|
||||
* 需清空上次在记录页/统计面板残留的类型、分类、渠道、备注、金额、标签筛选,
|
||||
* 避免只看到当天被筛掉后的部分记录(甚至空列表)。
|
||||
*/
|
||||
function goToTransactions() {
|
||||
const [y, m, d] = detailDate.value.split('-').map(Number)
|
||||
if (!y || !m || !d) return
|
||||
@@ -411,6 +417,13 @@ function goToTransactions() {
|
||||
new Date(y, m - 1, d, 23, 59, 59).getTime(),
|
||||
],
|
||||
filterIncludeInStats: statsScopePref(),
|
||||
filterType: [],
|
||||
filterCategory: [],
|
||||
filterChannel: [],
|
||||
filterRemark: '',
|
||||
filterMinAmount: null,
|
||||
filterMaxAmount: null,
|
||||
filterTag: [],
|
||||
})
|
||||
detailShow.value = false
|
||||
router.push('/transactions')
|
||||
|
||||
Reference in New Issue
Block a user