...
|
...
|
@@ -30,7 +30,7 @@ func GetUserBaseInfoAggregation(uid int64, companyId int64) (v *protocol.UserBas |
|
|
|
|
|
go func() {
|
|
|
defer wg.Done()
|
|
|
if v.Department, err = repository.Department.GetDepartmentById(v.UserCompany.DepartmentId); err != nil {
|
|
|
if err = repository.UserDepartment.GetUserDepartment(uid, companyId, &v.Department); err != nil {
|
|
|
log.Error(err)
|
|
|
return
|
|
|
}
|
...
|
...
|
@@ -38,7 +38,7 @@ func GetUserBaseInfoAggregation(uid int64, companyId int64) (v *protocol.UserBas |
|
|
|
|
|
go func() {
|
|
|
defer wg.Done()
|
|
|
if v.Position, err = repository.Position.GetPositionById(v.UserCompany.PositionId); err != nil {
|
|
|
if err = repository.UserPosition.GetUserPositions(uid, companyId, &v.Position); err != nil {
|
|
|
log.Error(err)
|
|
|
return
|
|
|
}
|
...
|
...
|
@@ -57,8 +57,9 @@ func GetUserBaseInfo(uid int64, companyId int64) (v *protocol.BaseUserInfo, err |
|
|
v = &protocol.BaseUserInfo{
|
|
|
UserId: agg.User.Id,
|
|
|
NickName: agg.User.NickName,
|
|
|
Department: agg.Department.Name,
|
|
|
Position: agg.Position.Name,
|
|
|
Department: agg.Department[0].Name,
|
|
|
Position: agg.Position[0].Name,
|
|
|
CompanyName: agg.Company.Name,
|
|
|
}
|
|
|
return
|
|
|
}
|
...
|
...
|
|