added BatchDelete action

This commit is contained in:
zhangwenjian committed 2020-05-05 02:02:58 +08:00
1 parent f116859711
commit 8d844b00dd
9 files changed
+48 -21

No files matched your search

+8
View File
@@ -105,3 +105,11 @@ 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
}