作者 yangfu

共创项目修改

... ... @@ -13,7 +13,7 @@ type CreateCooperationProjectCommand struct {
// 模式编码,唯一确定
CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"`
// 发起组织ID
OrgId int64 `json:"departmentId" valid:"Required"`
OrgId int `json:"departmentId" valid:"Required"`
// 共创项目名称
CooperationProjectName string `json:"cooperationProjectName" valid:"Required"`
// 共创发起人id
... ...
... ... @@ -35,7 +35,7 @@ type CreditAccountItem struct {
Company domain.CompanyData `json:"company"` // 公司
CreatedAt int64 `json:"createdAt"` // 创建时间
UpdatedAt int64 `json:"updatedAt"` // 更新时间
AccountDetail []struct {
AccountDetail struct {
DividendsEstimateOrderNumber string `json:"dividendsEstimateOrderNumber"`
DividendsType int `json:"dividendsType"`
DividendsAmount float64 `json:"dividendsAmount"`
... ...
... ... @@ -41,6 +41,9 @@ func (srv CooperationApplicationsService) GetCooperationApplications(application
resultApplication.CooperationProject.CooperationMode.CooperationModeNumber = resultProject.CooperationMode.CooperationModeNumber
resultApplication.CooperationProject.CooperationMode.CooperationModeName = resultProject.CooperationMode.CooperationModeName
resultApplication.CooperationProject.CooperationMode.CooperationModeId = resultProject.CooperationMode.CooperationModeId
resultApplication.Department.DepartmentID = resultApplication.Org.OrgID
resultApplication.Department.DepartmentName = resultApplication.Org.OrgName
return resultApplication, nil
}
... ... @@ -75,6 +78,10 @@ func (srv CooperationApplicationsService) SearchCooperationApplications(applicat
CompanyId: int(applicationQuery.Operator.CompanyId),
CooperationApplicationStatus: applicationQuery.Status,
})
for i := 0; i < len(resultApplications.Grid.List); i++ {
resultApplications.Grid.List[i].Department.DepartmentID = resultApplications.Grid.List[i].Org.OrgID
resultApplications.Grid.List[i].Department.DepartmentName = resultApplications.Grid.List[i].Org.OrgName
}
if err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
}
... ...
... ... @@ -27,6 +27,7 @@ func (srv CooperationProjectService) CreateCooperationProject(createCooperationP
SponsorUid: createCooperationProjectCommand.CooperationProjectSponsor,
CooperationProjectUndertakerType: createCooperationProjectCommand.CooperationProjectUndertakerType,
Attachment: createCooperationProjectCommand.Attachment,
DepartmentId: createCooperationProjectCommand.OrgId,
})
if err != nil {
... ... @@ -92,6 +93,7 @@ func (srv CooperationProjectService) SearchCooperationProject(projectQuery *comm
PageNumber: projectQuery.PageNumber,
PageSize: projectQuery.PageSize,
Status: int(projectQuery.Status),
OrgId: projectQuery.Operator.OrgId,
})
if err != nil {
return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ...
... ... @@ -13,7 +13,7 @@ type UpdateUserInfoCommand struct {
//操作人
Operator domain.Operator `json:"-"`
// 头像
Avatar string `cname:"头像" json:"avatar" valid:"Required"`
Avatar string `cname:"头像" json:"avatar"`
// 用户姓名
UserName string `cname:"用户姓名" json:"userName" valid:"Required"`
// 邮箱
... ...
... ... @@ -100,7 +100,9 @@ func (srv UserService) UpdateUserBaseInfo(updateUserInfoCommand *command.UpdateU
if err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, "用户不存在")
}
if _, ok := updateUserInfoCommand.BodyKV["avatar"]; !ok {
updateUserInfoCommand.Avatar = user.UserInfo.Avatar
}
if _, ok := updateUserInfoCommand.BodyKV["email"]; !ok {
updateUserInfoCommand.Email = user.UserInfo.Email
}
... ...
... ... @@ -57,6 +57,10 @@ type CooperationApplication struct {
OrgID int `json:"orgId"`
OrgName string `json:"orgName"`
} `json:"org"`
Department struct {
DepartmentID int `json:"departmentId"`
DepartmentName string `json:"departmentName"`
} `json:"department"`
IsCanceled bool `json:"isCanceled"`
Company struct {
CompanyID int `json:"companyId"`
... ...