增加自动化代码匹配进入业务库功能 (#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:
committed by
GitHub
co-authored by
dzwvip
SliverHorn
parent
28c928890a
commit
03265e03fc
@@ -53,9 +53,9 @@ func (autoCodeHistoryService *AutoCodeHistoryService) First(info *request.GetByI
|
||||
// Repeat 检测重复
|
||||
// Author [SliverHorn](https://github.com/SliverHorn)
|
||||
// Author [songzhibin97](https://github.com/songzhibin97)
|
||||
func (autoCodeHistoryService *AutoCodeHistoryService) Repeat(structName string, Package string) bool {
|
||||
func (autoCodeHistoryService *AutoCodeHistoryService) Repeat(businessDB, structName, Package string) bool {
|
||||
var count int64
|
||||
global.GVA_DB.Model(&system.SysAutoCodeHistory{}).Where("struct_name = ? and package = ? and flag = 0", structName, Package).Count(&count)
|
||||
global.GVA_DB.Model(&system.SysAutoCodeHistory{}).Where("business_db = ? and struct_name = ? and package = ? and flag = 0", businessDB, structName, Package).Count(&count)
|
||||
return count > 0
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ func (autoCodeHistoryService *AutoCodeHistoryService) RollBack(info *systemReq.R
|
||||
}
|
||||
// 删除表
|
||||
if info.DeleteTable {
|
||||
if err = AutoCodeServiceApp.DropTable(md.TableName); err != nil {
|
||||
if err = AutoCodeServiceApp.DropTable(md.BusinessDB, md.TableName); err != nil {
|
||||
global.GVA_LOG.Error("ClearTag DropTable:", zap.Error(err))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user