feat: 完成网站备份功能

This commit is contained in:
ssongliu
2022-11-29 17:39:10 +08:00
committed by ssongliu
parent 1f717bea0e
commit 7b21bcbe7f
28 changed files with 413 additions and 165 deletions

View File

@@ -146,25 +146,6 @@ func (b *BaseApi) ListDBName(c *gin.Context) {
helper.SuccessWithData(c, list)
}
func (b *BaseApi) SearchDBBackups(c *gin.Context) {
var req dto.SearchBackupsWithPage
if err := c.ShouldBindJSON(&req); err != nil {
helper.ErrorWithDetail(c, constant.CodeErrBadRequest, constant.ErrTypeInvalidParams, err)
return
}
total, list, err := mysqlService.SearchBackupsWithPage(req)
if err != nil {
helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypeInternalServer, err)
return
}
helper.SuccessWithData(c, dto.PageResult{
Items: list,
Total: total,
})
}
func (b *BaseApi) BackupMysql(c *gin.Context) {
var req dto.BackupDB
if err := c.ShouldBindJSON(&req); err != nil {