diff --git a/internal/rpc/organization/organization.go b/internal/rpc/organization/organization.go index dc80ce188..894fa643d 100644 --- a/internal/rpc/organization/organization.go +++ b/internal/rpc/organization/organization.go @@ -171,6 +171,7 @@ func (s *organizationServer) CreateOrganizationUser(ctx context.Context, req *rp } organizationUser := db.OrganizationUser{} utils.CopyStructFields(&organizationUser, req.OrganizationUser) + organizationUser.Birth = utils.UnixSecondToTime(int64(req.OrganizationUser.Birth)) log.Debug(req.OperationID, "src ", *req.OrganizationUser, "dst ", organizationUser) err := imdb.CreateOrganizationUser(&organizationUser) if err != nil { diff --git a/pkg/common/db/mysql_model/im_mysql_model/organization_model.go b/pkg/common/db/mysql_model/im_mysql_model/organization_model.go index bf44972ab..0b7f1621e 100644 --- a/pkg/common/db/mysql_model/im_mysql_model/organization_model.go +++ b/pkg/common/db/mysql_model/im_mysql_model/organization_model.go @@ -68,6 +68,7 @@ func CreateOrganizationUser(organizationUser *db.OrganizationUser) error { return err } organizationUser.CreateTime = time.Now() + return dbConn.Table("organization_users").Create(organizationUser).Error }