作者 tangxvhui

添加数据 输出字段

... ... @@ -234,7 +234,12 @@ func (srv StaffAssessServeice) ListAssessInviteUserV2(param *query.ListInviteUse
assessReps := factory.CreateStaffAssessRepository(map[string]interface{}{
"transactionContext": transactionContext,
})
companyReps := factory.CreateCompanyRepository(map[string]interface{}{
"transactionContext": transactionContext,
})
companyInfo, _ := companyReps.FindOne(map[string]interface{}{
"id": param.CompanyId,
})
assessTaskRepo := factory.CreateStaffAssessTaskRepository(map[string]interface{}{
"transactionContext": transactionContext,
})
... ... @@ -281,11 +286,17 @@ func (srv StaffAssessServeice) ListAssessInviteUserV2(param *query.ListInviteUse
result.EndTime = v.EndTime.Local().Format("2006-01-02 15:04:05")
break
}
companyName := ""
if companyInfo != nil {
companyName = companyInfo.Name
}
for _, v := range assessList {
if v.Types == domain.AssessInviteDiffSuper {
v.Executor.CompanyName = companyName
result.InviteDiffSuper = append(result.InviteDiffSuper, v.Executor)
}
if v.Types == domain.AssessInviteSameSuper {
v.Executor.CompanyName = companyName
result.InviteSameSuper = append(result.InviteSameSuper, v.Executor)
}
}
... ...
... ... @@ -3,6 +3,7 @@ package domain
//员工基本信息描述
type StaffDesc struct {
UserId int `json:"userId,string"` //用户id
CompanyName string `json:"companyName"` //公司名称
Account string `json:"account"` //用户的账号
UserName string `json:"userName"` //用户的名称
}
... ...