正在显示
2 个修改的文件
包含
25 行增加
和
19 行删除
@@ -570,12 +570,12 @@ func (srv StaffAssessServeice) createStaffAssessSelf(assessTemp domain.StaffAsse | @@ -570,12 +570,12 @@ func (srv StaffAssessServeice) createStaffAssessSelf(assessTemp domain.StaffAsse | ||
570 | assessTemp.TargetUser = domain.StaffDesc{ | 570 | assessTemp.TargetUser = domain.StaffDesc{ |
571 | UserId: int(usr.Id), | 571 | UserId: int(usr.Id), |
572 | Account: usr.Account, | 572 | Account: usr.Account, |
573 | - UserName: usr.Account, | 573 | + UserName: usr.Name, |
574 | } | 574 | } |
575 | assessTemp.Executor = domain.StaffDesc{ | 575 | assessTemp.Executor = domain.StaffDesc{ |
576 | UserId: int(usr.Id), | 576 | UserId: int(usr.Id), |
577 | Account: usr.Account, | 577 | Account: usr.Account, |
578 | - UserName: usr.Account, | 578 | + UserName: usr.Name, |
579 | } | 579 | } |
580 | if depList, ok := userDepartmentMap[usr.Id]; ok { | 580 | if depList, ok := userDepartmentMap[usr.Id]; ok { |
581 | for _, dep := range depList { | 581 | for _, dep := range depList { |
@@ -28,12 +28,14 @@ func (repo *UserRepository) Insert(user *domain.User) (*domain.User, error) { | @@ -28,12 +28,14 @@ func (repo *UserRepository) Insert(user *domain.User) (*domain.User, error) { | ||
28 | AvatarUrl: user.AvatarUrl, | 28 | AvatarUrl: user.AvatarUrl, |
29 | CompanyId: user.CompanyId, | 29 | CompanyId: user.CompanyId, |
30 | AdminType: user.AdminType, | 30 | AdminType: user.AdminType, |
31 | - DepartmentId: user.DepartmentId, | ||
32 | - PositionId: user.PositionId, | ||
33 | Name: user.Name, | 31 | Name: user.Name, |
32 | + Email: user.Email, | ||
34 | Status: user.Status, | 33 | Status: user.Status, |
35 | - UpdatedAt: user.UpdatedAt, | 34 | + DepartmentId: user.DepartmentId, |
35 | + PositionId: user.PositionId, | ||
36 | + EntryTime: user.EntryTime, | ||
36 | CreatedAt: user.CreatedAt, | 37 | CreatedAt: user.CreatedAt, |
38 | + UpdatedAt: user.UpdatedAt, | ||
37 | DeletedAt: user.DeletedAt, | 39 | DeletedAt: user.DeletedAt, |
38 | } | 40 | } |
39 | tx := repo.transactionContext.PgTx | 41 | tx := repo.transactionContext.PgTx |
@@ -52,13 +54,14 @@ func (repo *UserRepository) Update(user *domain.User) (*domain.User, error) { | @@ -52,13 +54,14 @@ func (repo *UserRepository) Update(user *domain.User) (*domain.User, error) { | ||
52 | AvatarUrl: user.AvatarUrl, | 54 | AvatarUrl: user.AvatarUrl, |
53 | CompanyId: user.CompanyId, | 55 | CompanyId: user.CompanyId, |
54 | AdminType: user.AdminType, | 56 | AdminType: user.AdminType, |
55 | - DepartmentId: user.DepartmentId, | ||
56 | - PositionId: user.PositionId, | ||
57 | Name: user.Name, | 57 | Name: user.Name, |
58 | Email: user.Email, | 58 | Email: user.Email, |
59 | Status: user.Status, | 59 | Status: user.Status, |
60 | - UpdatedAt: user.UpdatedAt, | 60 | + DepartmentId: user.DepartmentId, |
61 | + PositionId: user.PositionId, | ||
62 | + EntryTime: user.EntryTime, | ||
61 | CreatedAt: user.CreatedAt, | 63 | CreatedAt: user.CreatedAt, |
64 | + UpdatedAt: user.UpdatedAt, | ||
62 | DeletedAt: user.DeletedAt, | 65 | DeletedAt: user.DeletedAt, |
63 | } | 66 | } |
64 | tx := repo.transactionContext.PgTx | 67 | tx := repo.transactionContext.PgTx |
@@ -139,16 +142,19 @@ func (repo *UserRepository) Find(queryOptions map[string]interface{}) (int, []*d | @@ -139,16 +142,19 @@ func (repo *UserRepository) Find(queryOptions map[string]interface{}) (int, []*d | ||
139 | 142 | ||
140 | func (repo *UserRepository) TransformToUserDomain(user *models.User) *domain.User { | 143 | func (repo *UserRepository) TransformToUserDomain(user *models.User) *domain.User { |
141 | return &domain.User{ | 144 | return &domain.User{ |
142 | - Id: user.Id, | ||
143 | - Account: user.Account, | ||
144 | - AvatarUrl: user.AvatarUrl, | ||
145 | - CompanyId: user.CompanyId, | ||
146 | - AdminType: user.AdminType, | ||
147 | - Name: user.Name, | ||
148 | - Email: user.Email, | ||
149 | - Status: user.Status, | ||
150 | - UpdatedAt: user.UpdatedAt, | ||
151 | - CreatedAt: user.CreatedAt, | ||
152 | - DeletedAt: user.DeletedAt, | 145 | + Id: user.Id, |
146 | + Account: user.Account, | ||
147 | + AvatarUrl: user.AvatarUrl, | ||
148 | + CompanyId: user.CompanyId, | ||
149 | + AdminType: user.AdminType, | ||
150 | + Name: user.Name, | ||
151 | + Email: user.Email, | ||
152 | + Status: user.Status, | ||
153 | + DepartmentId: user.DepartmentId, | ||
154 | + PositionId: user.PositionId, | ||
155 | + EntryTime: user.EntryTime, | ||
156 | + UpdatedAt: user.UpdatedAt, | ||
157 | + DeletedAt: user.DeletedAt, | ||
158 | + CreatedAt: user.CreatedAt, | ||
153 | } | 159 | } |
154 | } | 160 | } |
-
请 注册 或 登录 后发表评论