added BatchDelete action

This commit is contained in:
zhangwenjian committed 2020-05-05 12:25:17 +08:00
1 parent 38eed4a8fe
commit 77a4f183d5
9 files changed
+48 -21

No files matched your search

+8
View File
@@ -119,3 +119,11 @@ func (e *DictType) Delete(id int) (success bool, err error) {
success = true
return
}
func (e *DictType) BatchDelete(id []int) (Result bool, err error) {
if err = orm.Eloquent.Table(e.TableName()).Where("dict_id in (?)", id).Delete(&DictType{}).Error; err != nil {
return
}
Result = true
return
}