From ecc47dcfbbb5cbcd1974c1995228c0b440a72668 Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Sun, 17 Apr 2022 14:54:51 +0800 Subject: [PATCH] organization --- internal/rpc/organization/organization.go | 1 + pkg/common/db/mysql_model/im_mysql_model/organization_model.go | 1 + 2 files changed, 2 insertions(+) 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 }