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

+5 -4
View File
@@ -139,10 +139,11 @@ func UpdateConfig(c *gin.Context) {
// @Router /api/v1/config/{configId} [delete]
func DeleteConfig(c *gin.Context) {
var data models.SysConfig
id, err := tools.StringToInt(c.Param("configId"))
data.UpdateBy = tools.GetUserIdStr(c)
data.ConfigId = id
_, err = data.Delete()
IDS := tools.IdsStrToIdsIntGroup("configId", c)
result, err := data.BatchDelete(IDS)
tools.HasError(err, "修改失败", 500)
app.OK(c, nil, msg.DeletedSuccess)
app.OK(c, result, msg.DeletedSuccess)
}