feat:回滚自动化生产代码

This commit is contained in:
songzhibin97
2021-07-10 17:39:24 +08:00
parent 44e7b643f9
commit 76d38c1108
9 changed files with 177 additions and 7 deletions

View File

@@ -15,6 +15,24 @@ import (
"go.uber.org/zap"
)
// @Tags AutoCode
// @Summary 回滚
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body uint true "回滚自动生成代码"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"回滚成功"}"
// @Router /autoCode/preview [post]
func RollBack(c *gin.Context) {
var id model.AutoHistoryByID
_ = c.ShouldBindJSON(&id)
if err := service.RollBack(id.ID); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithMessage("回滚成功", c)
}
// @Tags AutoCode
// @Summary 预览创建后的代码
// @Security ApiKeyAuth