fix:优化代码

This commit is contained in:
zhangwenjian
2021-02-19 10:48:27 +08:00
parent 981e992f28
commit 9186c6ce04
5 changed files with 62 additions and 12 deletions
+2 -3
View File
@@ -2,10 +2,9 @@ package models
import (
"errors"
"fmt"
"gorm.io/gorm"
"go-admin/common/log"
"go-admin/tools"
"go-admin/tools/config"
)
@@ -21,7 +20,7 @@ func (e *DataPermission) GetDataScope(tbname string, table *gorm.DB) (*gorm.DB,
if !config.ApplicationConfig.EnableDP {
usageStr := `数据权限已经为您` + tools.Green(`关闭`) + `,如需开启请参考配置文件字段说明`
fmt.Printf("%s\n", usageStr)
log.Debug("%s\n", usageStr)
return table, nil
}
SysUser := new(SysUser)