feat:增加删除历史记录api

This commit is contained in:
songzhibin97
2021-07-14 18:25:18 +08:00
parent 607022bc08
commit 739e8bb06c
3 changed files with 35 additions and 8 deletions

View File

@@ -16,6 +16,26 @@ import (
"go.uber.org/zap"
)
// @Tags AutoCode
// @Summary 删除回滚记录
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.AutoHistoryByID true "删除回滚记录"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /autoCode/delSysHistory [post]
func DelSysHistory(c *gin.Context) {
var id request.AutoHistoryByID
_ = c.ShouldBindJSON(&id)
err := service.DeletePage(id.ID)
if err != nil {
global.GVA_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
}
response.OkWithMessage("删除成功", c)
}
// @Tags AutoCode
// @Summary 查询回滚记录
// @Security ApiKeyAuth