fix: 移除项目查询中的 del_flag 条件
- 从 CcdiProjectMapper.xml 中移除 p.del_flag = '0' 条件 - 保留 sys_user 表的 del_flag 过滤(用户逻辑删除) - 修复前端查询错误
This commit is contained in:
11
sql/fix_ccdi_project_table.sql
Normal file
11
sql/fix_ccdi_project_table.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
-- 修复 ccdi_project 表 - 添加缺失的字段
|
||||
-- 执行时间: 2026-02-27
|
||||
|
||||
-- 1. 添加 del_flag 字段(如果不存在)
|
||||
ALTER TABLE ccdi_project ADD COLUMN IF NOT EXISTS `del_flag` CHAR(1) DEFAULT '0' COMMENT '删除标志:0-存在,2-删除';
|
||||
|
||||
-- 2. 添加 del_flag 索引(如果不存在)
|
||||
CREATE INDEX IF NOT EXISTS idx_del_flag ON ccdi_project(del_flag);
|
||||
|
||||
-- 3. 更新所有现有记录的 del_flag 默认值
|
||||
UPDATE ccdi_project SET del_flag = '0' WHERE del_flag IS NULL;
|
||||
Reference in New Issue
Block a user