added BatchDelete action
This commit is contained in:
1 parent
f116859711
commit
8d844b00dd
9 files changed
+48
-21
No files matched your search
@@ -131,3 +131,12 @@ func (e *DictData) Delete(id int) (success bool, err error) {
|
||||
success = true
|
||||
return
|
||||
}
|
||||
|
||||
func (e *DictData) BatchDelete(id []int) (Result bool, err error) {
|
||||
if err = orm.Eloquent.Table(e.TableName()).Where("dict_code in (?)", id).Delete(&DictData{}).Error; err != nil {
|
||||
return
|
||||
}
|
||||
Result = true
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user