diff --git a/Juno b/Juno index 0452a9fe..5bf5d1ed 100755 Binary files a/Juno and b/Juno differ diff --git a/src/lib/sendMail.go b/src/lib/sendMail.go index e4ab6a38..bfa3e13e 100644 --- a/src/lib/sendMail.go +++ b/src/lib/sendMail.go @@ -110,7 +110,7 @@ func SendMail(addr string, mail model.Message, tmpl string) { } // Send the email to Bob, Cora and Dan. if err := d.DialAndSend(m); err != nil { - logger.DefaultLogger.Errorf("send mail", err) + logger.DefaultLogger.Errorf("send mail:%s", err) return } } diff --git a/src/service/migrate.go b/src/service/migrate.go index aafc9432..42baedb2 100644 --- a/src/service/migrate.go +++ b/src/service/migrate.go @@ -19,6 +19,7 @@ import ( "Yearning-go/src/model" "encoding/json" "fmt" + "github.com/google/uuid" "github.com/gookit/gcli/v2/interact" "os" "time" @@ -30,7 +31,8 @@ func DataInit(o *engine.AuditRole, other *model.Other, ldap *model.Ldap, message l, _ := json.Marshal(ldap) m, _ := json.Marshal(message) ak, _ := json.Marshal(a) - group, _ := json.Marshal([]string{"admin"}) + sId := uuid.New().String() + group, _ := json.Marshal([]string{sId}) model.DB().Debug().Create(&model.CoreAccount{ Username: "admin", RealName: "超级管理员", @@ -52,6 +54,7 @@ func DataInit(o *engine.AuditRole, other *model.Other, ldap *model.Ldap, message model.DB().Debug().Create(&model.CoreRoleGroup{ Name: "admin", Permissions: ak, + GroupId: sId, }) } @@ -108,6 +111,7 @@ func Migrate() { AllowCreatePartition: false, AllowCreateView: false, AllowSpecialType: false, + DDLEnablePrimaryKey: false, } other := model.Other{