gorm升级到v2版本
This commit is contained in:
1 parent
93cfe443d6
commit
60c7496f7b
56 files changed
+630
-477
No files matched your search
+1
-1
@@ -52,7 +52,7 @@ func (e *SysDept) Create() (SysDept, error) {
|
||||
}
|
||||
var mp = map[string]string{}
|
||||
mp["deptPath"] = deptPath
|
||||
if err := orm.Eloquent.Table(e.TableName()).Where("dept_id = ?", e.DeptId).Update(mp).Error; err != nil {
|
||||
if err := orm.Eloquent.Table(e.TableName()).Where("dept_id = ?", e.DeptId).Updates(mp).Error; err != nil {
|
||||
err := result.Error
|
||||
return doc, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user