fix: remove legacy knowledge card tables and compatibility code

This commit is contained in:
Eric 1549169735@qq.com
2026-08-20 21:58:04 +08:00
parent ebaf9b0b05
commit 6185e6cd49
36 changed files with 545 additions and 546 deletions

View File

@@ -56,8 +56,7 @@ func loadStartPresentation(db *gorm.DB, node model.SOPNode, tenantID uint64, con
if len(keys) > 0 {
if err := db.Table("scenario_fields sf").Select("sf.*").
Joins("JOIN sops s ON s.scenario_id = sf.scenario_id").
Joins("JOIN sop_versions sv ON sv.sop_id = s.id").
Where("sv.id = ? AND sf.tenant_id = ? AND sf.field_key IN ?", node.SOPVersionID, tenantID, keys).
Where("s.id = ? AND sf.tenant_id = ? AND sf.field_key IN ?", node.SOPID, tenantID, keys).
Find(&fields).Error; err != nil {
return nil, err
}