自动化回滚可以回滚gorm.go 和 router.go
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
systemReq "github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/utils/ast"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -120,6 +121,9 @@ func (autoCodeHistoryService *AutoCodeHistoryService) RollBack(info *systemReq.R
|
||||
_ = utils.AutoClearCode(meta[0], meta[2])
|
||||
}
|
||||
}
|
||||
|
||||
ast.RollBackAst(md.Package, md.StructName)
|
||||
|
||||
md.Flag = 1
|
||||
return global.GVA_DB.Save(&md).Error
|
||||
}
|
||||
|
Reference in New Issue
Block a user