added batch delete action
This commit is contained in:
1 parent
9e2726cbbb
commit
ef26a2b864
6 files changed
+34
-17
No files matched your search
@@ -105,3 +105,12 @@ func (e *SysConfig) Delete() (success bool, err error) {
|
||||
success = true
|
||||
return
|
||||
}
|
||||
|
||||
func (e *SysConfig) BatchDelete(id []int) (Result bool, err error) {
|
||||
if err = orm.Eloquent.Table(e.TableName()).Where("config_id in (?)", id).Delete(&SysConfig{}).Error; err != nil {
|
||||
return
|
||||
}
|
||||
Result = true
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user