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

+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)
}