feat:完善项目信息

This commit is contained in:
henry
2022-01-11 14:54:20 +08:00
parent 8006d57506
commit 72c2cb091d
15 changed files with 299 additions and 38 deletions

View File

@ -21,6 +21,8 @@ type synchronized struct {
}
func (this *Instance) Handle() {
fmt.Println("========================\n=== 数据开始迁移 ===\n========================")
db := this.gormDB
successCount, failureCount := 0, 0
@ -136,17 +138,16 @@ func (this *Instance) Handle() {
&synchronized{iModel: model.NewTechnologyAchievement()}, &synchronized{iModel: model.NewTechnologyDemand()},
&synchronized{iModel: model.NewTechnologyPaper()}, &synchronized{iModel: model.NewTechnologyProduct()},
&synchronized{iModel: model.NewTechnologyProject()}, &synchronized{iModel: model.NewTechnologyTopic()},
&synchronized{iModel: model.NewServiceDocking()}, &synchronized{iModel: model.NewServiceMessage()},
&synchronized{iModel: model.NewServiceDocking()},
&synchronized{iModel: model.NewServiceMessage()}, &synchronized{iModel: model.NewServiceMessageLog()},
&synchronized{iModel: model.NewServiceSolutionCase()}, &synchronized{iModel: model.NewServiceSolutionCaseKind()},
&synchronized{iModel: model.NewServiceInnovate()}, &synchronized{iModel: model.NewServiceInnovateKind()},
// 活动管理
&synchronized{iModel: model.NewActivityInstance()}, &synchronized{iModel: model.NewActivityApply()},
&synchronized{iModel: model.NewActivityExamine()}, &synchronized{iModel: model.NewActivityJoin()},
)
fmt.Println("=== 数据开始迁移 ===")
fmt.Printf("=== 成功【%d】 ===\n", successCount)
fmt.Printf("=== 失败【%d】 ===\n", failureCount)
fmt.Println("=== 数据完成迁移 ===")
fmt.Printf("========================\n=== 数据完成迁移,成功【%d】失败【%d】 ===\n========================\n",
successCount, failureCount)
}
func WithGormDBOption(db *gorm.DB) Option {