修改,兼容go-admin sdk方案

This commit is contained in:
linwenxiang committed 2021-03-09 19:12:49 +08:00
1 parent c541d09076
commit 25d8364bf4
151 files changed
+578 -3525

No files matched your search

+2 -2
View File
@@ -2,6 +2,7 @@ package service
import (
"errors"
"github.com/go-admin-team/go-admin-core/sdk/pkg"
"gorm.io/gorm"
@@ -9,7 +10,6 @@ import (
"go-admin/app/admin/service/dto"
cDto "go-admin/common/dto"
"go-admin/common/service"
"go-admin/tools"
)
type SysDept struct {
@@ -64,7 +64,7 @@ func (e *SysDept) InsertSysDept(model *system.SysDept) error {
e.Log.Errorf("db error:%s", err)
return err
}
deptPath := "/" + tools.IntToString(model.DeptId)
deptPath := "/" + pkg.IntToString(model.DeptId)
if model.ParentId != 0 {
var deptP system.SysDept
e.Orm.Model(&data).First(&deptP, model.ParentId)