Files
monisuo/fix_orders.sql
sion 4f17e7ea8a fix: 修复订单审批状态不更新的问题
主要修复:
1. 添加 MetaObjectHandler 自动填充时间字段
2. 启用 @EnableTransactionManagement 显式事务管理
3. 使用 LambdaUpdateWrapper 强制更新订单状态
4. 完善 MyBatis Plus 配置和字段更新策略
5. 添加详细的调试日志配置
6. 前端集成 vconsole 调试工具

关键修改文件:
- SpcCloudApplication.java: 添加 @EnableTransactionManagement
- FundService.java: 使用 LambdaUpdateWrapper 显式更新
- MyBatisPlusMetaObjectHandler.java: 自动填充时间字段
- application-dev.yml: 完善配置和日志
- monisuo-admin: 添加 vconsole 调试工具
2026-03-24 09:41:23 +08:00

29 lines
521 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 修复现有订单状态
-- 将已审批但状态仍为2的订单更新为状态3已完成
UPDATE order_fund
SET status = 3,
update_time = NOW()
WHERE order_no IN (
'F20260324013123000002',
'F202603240004937000000'
)
AND status = 2
AND approve_time IS NOT NULL;
-- 验证更新结果
SELECT
id,
order_no,
type,
status,
amount,
approve_time,
confirm_time,
update_time
FROM order_fund
WHERE order_no IN (
'F20260324013123000002',
'F202603240004937000000'
);