修复上次错误的提交
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 4m20s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 4m20s
This commit is contained in:
@@ -66,12 +66,6 @@ func RegisterDataPermissionCallback(db *gorm.DB, shopStore ShopStoreInterface) e
|
||||
return
|
||||
}
|
||||
|
||||
// 0. 软删除过滤(优先处理,确保所有查询都过滤已删除记录)
|
||||
// 检查表是否有 deleted_at 字段,且未使用 Unscoped()
|
||||
if hasDeletedAtField(tx.Statement.Schema) && !tx.Statement.Unscoped {
|
||||
tx.Where("deleted_at IS NULL")
|
||||
}
|
||||
|
||||
// 1. 检查是否跳过数据权限过滤
|
||||
if skip, ok := ctx.Value(SkipDataPermissionKey).(bool); ok && skip {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user