作者 陈志颖

fix:修复共创申请人编号

... ... @@ -65,7 +65,7 @@ func (cooperationApplicationService *CooperationApplicationService) ApplyForCoop
// 获取申请人
var applicant *domain.User
if data, err := userService.UserFrom(applyForCooperationCommand.CompanyId, applyForCooperationCommand.OrgId, applyForCooperationCommand.UserId); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取申请人失败")
} else {
applicant = data
}
... ... @@ -81,7 +81,7 @@ func (cooperationApplicationService *CooperationApplicationService) ApplyForCoop
// 获取公司信息
var company *domain.Company
if data, err := companyService.CompanyFrom(applyForCooperationCommand.CompanyId); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取公司信息失败")
} else {
company = data
}
... ... @@ -97,7 +97,7 @@ func (cooperationApplicationService *CooperationApplicationService) ApplyForCoop
// 获取组织机构信息
var organization *domain.Org
if data, err := organizationService.OrgFrom(applyForCooperationCommand.CompanyId, applyForCooperationCommand.OrgId); err != nil {
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取组织机构数据失败")
} else {
organization = data
}
... ...
... ... @@ -13,5 +13,5 @@ type UserInfo struct {
// 用户账号,区别于手机号,冗余字段
UserAccount string `json:"userAccount"`
// 用户编码
UserCode string `json:"用户编码"`
UserCode string `json:"userCode"`
}
... ...
... ... @@ -74,7 +74,7 @@ func (translator *UserTranslator) ToRelevantFromRepresentation(user *UserDetail)
var roles []*domain.Role
for _, role := range user.UserRole {
roles = append(roles, &domain.Role{
RoleId: int64(role.RoleID),
RoleId: role.RoleID,
RoleName: role.RoleName,
})
}
... ... @@ -104,6 +104,7 @@ func (translator *UserTranslator) ToRelevantFromRepresentation(user *UserDetail)
UserName: user.UserInfo.UserName,
UserPhone: user.UserInfo.Phone,
UserAccount: "",
UserCode: user.UserCode,
},
UserType: user.UserType,
UserName: user.UserInfo.UserName,
... ... @@ -269,6 +270,7 @@ func (translator *UserTranslator) ToSalesmanFromRepresentation(user *UserDetail)
UserName: user.UserInfo.UserName,
UserPhone: user.UserInfo.Phone,
UserAccount: "",
UserCode: user.UserCode,
},
UserType: user.UserType,
UserName: user.UserInfo.UserName,
... ... @@ -316,6 +318,7 @@ func (translator *UserTranslator) ToOperatorFromRepresentation(user *UserDetail)
UserName: user.UserInfo.UserName,
UserPhone: user.UserInfo.Phone,
UserAvatar: user.UserInfo.Avatar,
UserCode: user.UserCode,
},
UserType: user.UserType,
UserName: user.UserInfo.UserName,
... ... @@ -369,6 +372,7 @@ func (translator *UserTranslator) ToUserFromRepresentation(user *UserDetail) (*d
UserName: user.UserInfo.UserName,
UserPhone: user.UserInfo.Phone,
UserAvatar: user.UserInfo.Avatar,
UserCode: user.UserCode,
},
UserType: user.UserType,
UserName: user.UserInfo.UserName,
... ...