Files
doorcontrol/base/RuoYi-Vue-master/sql/upgrade_hotfix_auth_status.sql
T
zfjia 271e4ca77c chore: 导入门锁迭代开发工程基线
包含 RuoYi-Vue 后端(ruoyi-iot 门禁模块)、RuoYi-Vue2 前端、设计文档与升级脚本。
忽略构建产物(target/node_modules/dist)、IDE 配置、运行日志与数据库转储。
2026-11-01 19:44:40 +08:00

18 lines
932 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.
-- =========================================================================
-- 热修复:lock_auth.status 为 NULL 导致授权补偿永远捞不到
--
-- 现象:批量下发两条人脸授权时,第二条被同网关串行闸门正确排队(sync_status=0),
-- 但补偿任务每 5 秒查 selectPendingAuths 都是 0 行,这笔授权一直不下发。
--
-- 原因:授权表单没有状态项,insertAuth 的 SQL 显式列出 status 列并写入 NULL,
-- 列默认值 '0' 不生效;而 selectPendingAuths 条件为 status='0'。
--
-- 代码侧已修:insertAuth 缺省时补 '0',查询侧把 NULL 视为正常。
-- 本脚本只修存量数据,可重复执行。
-- =========================================================================
update lock_auth set status = '0' where status is null;
-- 核对:应为 0
select count(*) as null_status_auth from lock_auth where status is null;