作者 Your Name

修复一些问题

... ... @@ -570,12 +570,12 @@ func (srv StaffAssessServeice) createStaffAssessSelf(assessTemp domain.StaffAsse
assessTemp.TargetUser = domain.StaffDesc{
UserId: int(usr.Id),
Account: usr.Account,
UserName: usr.Account,
UserName: usr.Name,
}
assessTemp.Executor = domain.StaffDesc{
UserId: int(usr.Id),
Account: usr.Account,
UserName: usr.Account,
UserName: usr.Name,
}
if depList, ok := userDepartmentMap[usr.Id]; ok {
for _, dep := range depList {
... ...
... ... @@ -28,12 +28,14 @@ func (repo *UserRepository) Insert(user *domain.User) (*domain.User, error) {
AvatarUrl: user.AvatarUrl,
CompanyId: user.CompanyId,
AdminType: user.AdminType,
DepartmentId: user.DepartmentId,
PositionId: user.PositionId,
Name: user.Name,
Email: user.Email,
Status: user.Status,
UpdatedAt: user.UpdatedAt,
DepartmentId: user.DepartmentId,
PositionId: user.PositionId,
EntryTime: user.EntryTime,
CreatedAt: user.CreatedAt,
UpdatedAt: user.UpdatedAt,
DeletedAt: user.DeletedAt,
}
tx := repo.transactionContext.PgTx
... ... @@ -52,13 +54,14 @@ func (repo *UserRepository) Update(user *domain.User) (*domain.User, error) {
AvatarUrl: user.AvatarUrl,
CompanyId: user.CompanyId,
AdminType: user.AdminType,
DepartmentId: user.DepartmentId,
PositionId: user.PositionId,
Name: user.Name,
Email: user.Email,
Status: user.Status,
UpdatedAt: user.UpdatedAt,
DepartmentId: user.DepartmentId,
PositionId: user.PositionId,
EntryTime: user.EntryTime,
CreatedAt: user.CreatedAt,
UpdatedAt: user.UpdatedAt,
DeletedAt: user.DeletedAt,
}
tx := repo.transactionContext.PgTx
... ... @@ -139,16 +142,19 @@ func (repo *UserRepository) Find(queryOptions map[string]interface{}) (int, []*d
func (repo *UserRepository) TransformToUserDomain(user *models.User) *domain.User {
return &domain.User{
Id: user.Id,
Account: user.Account,
AvatarUrl: user.AvatarUrl,
CompanyId: user.CompanyId,
AdminType: user.AdminType,
Name: user.Name,
Email: user.Email,
Status: user.Status,
UpdatedAt: user.UpdatedAt,
CreatedAt: user.CreatedAt,
DeletedAt: user.DeletedAt,
Id: user.Id,
Account: user.Account,
AvatarUrl: user.AvatarUrl,
CompanyId: user.CompanyId,
AdminType: user.AdminType,
Name: user.Name,
Email: user.Email,
Status: user.Status,
DepartmentId: user.DepartmentId,
PositionId: user.PositionId,
EntryTime: user.EntryTime,
UpdatedAt: user.UpdatedAt,
DeletedAt: user.DeletedAt,
CreatedAt: user.CreatedAt,
}
}
... ...