修复一些数据同步问题,更新文档,取消在配置文件读取值作为同步数据的标志,改为方法注释的方式

This commit is contained in:
SliverHorn
2020-08-25 18:17:33 +08:00
parent cf73dbd0d9
commit d4101f7f34
10 changed files with 62 additions and 38 deletions

View File

@@ -7,9 +7,6 @@ import (
func Data() {
var err error
if global.GVA_CONFIG.System.Data {
return
}
err = service.InitSysApi()
err = service.InitSysUser()
err = service.InitExaCustomer()
@@ -25,6 +22,5 @@ func Data() {
if err != nil {
global.GVA_LOG.Error("initialize data failed", err)
}
global.GVA_VP.Set("data", true)
global.GVA_LOG.Debug("initialize data success")
}

View File

@@ -23,6 +23,7 @@ func Mysql() {
if admin.LogMode { //根据配置决定是否开启日志
gormConfig = &gorm.Config{
Logger: logger.Default.LogMode(logger.Info),
DisableForeignKeyConstraintWhenMigrating: true,
}
} else {
gormConfig = &gorm.Config{