added BatchDelete action
This commit is contained in:
1 parent
f116859711
commit
8d844b00dd
9 files changed
+48
-21
No files matched your search
+1
-1
@@ -193,7 +193,7 @@ func (e *Dept) Update(id int) (update Dept, err error) {
|
||||
}
|
||||
|
||||
func (e *Dept) Delete(id int) (success bool, err error) {
|
||||
if err = orm.Eloquent.Table(e.TableName()).Where("dept_id = ?", e.DeptId).Delete(&Dept{}).Error; err != nil {
|
||||
if err = orm.Eloquent.Table(e.TableName()).Where("dept_id = ?", id).Delete(&Dept{}).Error; err != nil {
|
||||
success = false
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user