fix g.Log()的使用

This commit is contained in:
maxbad
2023-05-07 22:35:29 +08:00
parent e8a0a41cb4
commit 67a0a38fd4
10 changed files with 16 additions and 16 deletions

View File

@@ -56,7 +56,7 @@ func FilterAuthWithField(filterField string) func(m *gdb.Model) *gdb.Model {
}
if role == nil {
g.Log().Panicf(ctx, "failed to role information roleModel == nil")
g.Log().Panic(ctx, "failed to role information roleModel == nil")
}
sq := g.Model("admin_member").Fields("id")
@@ -77,7 +77,7 @@ func FilterAuthWithField(filterField string) func(m *gdb.Model) *gdb.Model {
case consts.RoleDataSelfAndAllSub: // 自己和全部下级
m = m.WhereIn(filterField, GetSelfAndAllSub(co.User.Id))
default:
g.Log().Panicf(ctx, "dataScope is not registered")
g.Log().Panic(ctx, "dataScope is not registered")
}
return m