feat:完善项目信息

This commit is contained in:
henry
2022-01-06 22:02:09 +08:00
parent a92801b1ce
commit 657fdc5750
31 changed files with 177 additions and 612 deletions

View File

@ -1,10 +1,10 @@
package tenant
import (
"SciencesServer/app/api/admin/controller"
model3 "SciencesServer/app/api/admin/model"
model2 "SciencesServer/app/common/model"
"SciencesServer/app/service"
"SciencesServer/app/session"
"SciencesServer/serve/logger"
"SciencesServer/serve/orm"
"SciencesServer/utils"
@ -13,9 +13,9 @@ import (
"gorm.io/gorm"
)
type Auth struct{ *controller.Platform }
type Auth struct{ *session.Admin }
type AuthHandle func(session *service.Session) *Auth
type AuthHandle func(session *session.Admin) *Auth
// delete 删除所有权限
func (c *Auth) delete(tenantID uint64, tenantKey string, tx *gorm.DB) error {
@ -101,7 +101,7 @@ func (c *Auth) Bind(tenantID uint64, authIDs []uint64) error {
}
func NewAuth() AuthHandle {
return func(session *service.Session) *Auth {
return &Auth{Platform: &controller.Platform{Session: session}}
return func(session *session.Admin) *Auth {
return &Auth{Admin: session}
}
}