Browse Source

fix:重复生成判断回滚

main
songzhibin97 3 years ago
parent
commit
ad8c27bc09
  1. 2
      server/service/system/sys_autocode_history.go

2
server/service/system/sys_autocode_history.go

@ -25,7 +25,7 @@ var AutoCodeHistoryServiceApp = new(AutoCodeHistoryService)
func (autoCodeHistoryService *AutoCodeHistoryService) Repeat(structName string) bool { func (autoCodeHistoryService *AutoCodeHistoryService) Repeat(structName string) bool {
var count int64 var count int64
global.GVA_DB.Model(&system.SysAutoCodeHistory{}).Where("struct_name = ?", structName).Count(&count)
global.GVA_DB.Model(&system.SysAutoCodeHistory{}).Where("struct_name = ? and flag = 0", structName).Count(&count)
return count > 0 return count > 0
} }

Loading…
Cancel
Save