自动化代码可分包 (#982)
* [style] 修改右上角图标,选择统一风格的iconfont * 增加路由排错处理 * 未输入tablename时前端自动生成下划线表名方式回滚误删表 * 支持自动化生成package功能 Co-authored-by: bypanghu <bypanghu@163.com> Co-authored-by: songzhibin97 <718428482@qq.com>
This commit is contained in:
@@ -69,19 +69,9 @@ func (autoCodeHistoryService *AutoCodeHistoryService) RollBack(info *request.Get
|
||||
if err != nil {
|
||||
global.GVA_LOG.Error("ClearTag DeleteApiByIds:", zap.Error(err))
|
||||
}
|
||||
// 获取全部表名
|
||||
dbNames, err := AutoCodeServiceApp.Database().GetTables(global.GVA_CONFIG.Mysql.Dbname)
|
||||
if err != nil {
|
||||
global.GVA_LOG.Error("ClearTag GetTables:", zap.Error(err))
|
||||
}
|
||||
// 删除表
|
||||
for _, name := range dbNames {
|
||||
if strings.Contains(strings.ToUpper(strings.Replace(name.TableName, "_", "", -1)), strings.ToUpper(md.TableName)) {
|
||||
// 删除表
|
||||
if err = AutoCodeServiceApp.DropTable(name.TableName); err != nil {
|
||||
global.GVA_LOG.Error("ClearTag DropTable:", zap.Error(err))
|
||||
}
|
||||
}
|
||||
if err = AutoCodeServiceApp.DropTable(md.TableName); err != nil {
|
||||
global.GVA_LOG.Error("ClearTag DropTable:", zap.Error(err))
|
||||
}
|
||||
// 删除文件
|
||||
|
||||
|
Reference in New Issue
Block a user