增加自动化代码匹配进入业务库功能 (#1249)
* Update api.go.tpl 修复不创建资源标识时 批量删除 方法内 deletedBy 未声明的问题 * 可自动创建业务库 * 自动化业务库回滚适配 * 修复断点续传路径穿越漏洞 * 增加指定菜单亮起功能 * 增加菜单高亮功能,调整版本号 * fixed: 用户后台注册没接收手机号和邮箱 Co-authored-by: dzwvip <dzwvip@qq.com> Co-authored-by: SliverHorn <503551462@qq.com>
This commit is contained in:
@@ -252,7 +252,7 @@ func (autoCodeService *AutoCodeService) CreateTemp(autoCode system.AutoCodeStruc
|
||||
}
|
||||
}
|
||||
// 增加判断: 重复创建struct
|
||||
if autoCode.AutoMoveFile && AutoCodeHistoryServiceApp.Repeat(autoCode.StructName, autoCode.Package) {
|
||||
if autoCode.AutoMoveFile && AutoCodeHistoryServiceApp.Repeat(autoCode.BusinessDB, autoCode.StructName, autoCode.Package) {
|
||||
return RepeatErr
|
||||
}
|
||||
dataList, fileList, needMkdir, err := autoCodeService.getNeedList(&autoCode)
|
||||
@@ -393,8 +393,12 @@ func (autoCodeService *AutoCodeService) GetAllTplFile(pathName string, fileList
|
||||
//@param: tableName string, dbName string
|
||||
//@return: err error, Columns []request.ColumnReq
|
||||
|
||||
func (autoCodeService *AutoCodeService) DropTable(tableName string) error {
|
||||
return global.GVA_DB.Exec("DROP TABLE " + tableName).Error
|
||||
func (autoCodeService *AutoCodeService) DropTable(BusinessDb, tableName string) error {
|
||||
if BusinessDb != "" {
|
||||
return global.GVA_DB.Exec("DROP TABLE " + tableName).Error
|
||||
} else {
|
||||
return global.MustGetGlobalDBByDBName(BusinessDb).Exec("DROP TABLE " + tableName).Error
|
||||
}
|
||||
}
|
||||
|
||||
//@author: [SliverHorn](https://github.com/SliverHorn)
|
||||
|
Reference in New Issue
Block a user