feat: Mysql 数据库删除增加强制删除、删除备份选项

This commit is contained in:
ssongliu
2022-12-26 14:47:08 +08:00
committed by ssongliu
parent 9ce02b14c8
commit cfeb158d0a
25 changed files with 324 additions and 202 deletions

View File

@@ -217,7 +217,7 @@ func (b *BaseApi) DeleteCheckMysql(c *gin.Context) {
}
func (b *BaseApi) DeleteMysql(c *gin.Context) {
var req dto.OperateByID
var req dto.MysqlDBDelete
if err := c.ShouldBindJSON(&req); err != nil {
helper.ErrorWithDetail(c, constant.CodeErrBadRequest, constant.ErrTypeInvalidParams, err)
return
@@ -227,7 +227,7 @@ func (b *BaseApi) DeleteMysql(c *gin.Context) {
return
}
if err := mysqlService.Delete(req.ID); err != nil {
if err := mysqlService.Delete(req); err != nil {
helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypeInternalServer, err)
return
}