正在显示
7 个修改的文件
包含
19 行增加
和
4 行删除
| @@ -13,7 +13,7 @@ type CreateCooperationProjectCommand struct { | @@ -13,7 +13,7 @@ type CreateCooperationProjectCommand struct { | ||
| 13 | // 模式编码,唯一确定 | 13 | // 模式编码,唯一确定 |
| 14 | CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"` | 14 | CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"` |
| 15 | // 发起组织ID | 15 | // 发起组织ID |
| 16 | - OrgId int64 `json:"departmentId" valid:"Required"` | 16 | + OrgId int `json:"departmentId" valid:"Required"` |
| 17 | // 共创项目名称 | 17 | // 共创项目名称 |
| 18 | CooperationProjectName string `json:"cooperationProjectName" valid:"Required"` | 18 | CooperationProjectName string `json:"cooperationProjectName" valid:"Required"` |
| 19 | // 共创发起人id | 19 | // 共创发起人id |
| @@ -35,7 +35,7 @@ type CreditAccountItem struct { | @@ -35,7 +35,7 @@ type CreditAccountItem struct { | ||
| 35 | Company domain.CompanyData `json:"company"` // 公司 | 35 | Company domain.CompanyData `json:"company"` // 公司 |
| 36 | CreatedAt int64 `json:"createdAt"` // 创建时间 | 36 | CreatedAt int64 `json:"createdAt"` // 创建时间 |
| 37 | UpdatedAt int64 `json:"updatedAt"` // 更新时间 | 37 | UpdatedAt int64 `json:"updatedAt"` // 更新时间 |
| 38 | - AccountDetail []struct { | 38 | + AccountDetail struct { |
| 39 | DividendsEstimateOrderNumber string `json:"dividendsEstimateOrderNumber"` | 39 | DividendsEstimateOrderNumber string `json:"dividendsEstimateOrderNumber"` |
| 40 | DividendsType int `json:"dividendsType"` | 40 | DividendsType int `json:"dividendsType"` |
| 41 | DividendsAmount float64 `json:"dividendsAmount"` | 41 | DividendsAmount float64 `json:"dividendsAmount"` |
| @@ -41,6 +41,9 @@ func (srv CooperationApplicationsService) GetCooperationApplications(application | @@ -41,6 +41,9 @@ func (srv CooperationApplicationsService) GetCooperationApplications(application | ||
| 41 | resultApplication.CooperationProject.CooperationMode.CooperationModeNumber = resultProject.CooperationMode.CooperationModeNumber | 41 | resultApplication.CooperationProject.CooperationMode.CooperationModeNumber = resultProject.CooperationMode.CooperationModeNumber |
| 42 | resultApplication.CooperationProject.CooperationMode.CooperationModeName = resultProject.CooperationMode.CooperationModeName | 42 | resultApplication.CooperationProject.CooperationMode.CooperationModeName = resultProject.CooperationMode.CooperationModeName |
| 43 | resultApplication.CooperationProject.CooperationMode.CooperationModeId = resultProject.CooperationMode.CooperationModeId | 43 | resultApplication.CooperationProject.CooperationMode.CooperationModeId = resultProject.CooperationMode.CooperationModeId |
| 44 | + | ||
| 45 | + resultApplication.Department.DepartmentID = resultApplication.Org.OrgID | ||
| 46 | + resultApplication.Department.DepartmentName = resultApplication.Org.OrgName | ||
| 44 | return resultApplication, nil | 47 | return resultApplication, nil |
| 45 | } | 48 | } |
| 46 | 49 | ||
| @@ -75,6 +78,10 @@ func (srv CooperationApplicationsService) SearchCooperationApplications(applicat | @@ -75,6 +78,10 @@ func (srv CooperationApplicationsService) SearchCooperationApplications(applicat | ||
| 75 | CompanyId: int(applicationQuery.Operator.CompanyId), | 78 | CompanyId: int(applicationQuery.Operator.CompanyId), |
| 76 | CooperationApplicationStatus: applicationQuery.Status, | 79 | CooperationApplicationStatus: applicationQuery.Status, |
| 77 | }) | 80 | }) |
| 81 | + for i := 0; i < len(resultApplications.Grid.List); i++ { | ||
| 82 | + resultApplications.Grid.List[i].Department.DepartmentID = resultApplications.Grid.List[i].Org.OrgID | ||
| 83 | + resultApplications.Grid.List[i].Department.DepartmentName = resultApplications.Grid.List[i].Org.OrgName | ||
| 84 | + } | ||
| 78 | if err != nil { | 85 | if err != nil { |
| 79 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | 86 | return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) |
| 80 | } | 87 | } |
| @@ -27,6 +27,7 @@ func (srv CooperationProjectService) CreateCooperationProject(createCooperationP | @@ -27,6 +27,7 @@ func (srv CooperationProjectService) CreateCooperationProject(createCooperationP | ||
| 27 | SponsorUid: createCooperationProjectCommand.CooperationProjectSponsor, | 27 | SponsorUid: createCooperationProjectCommand.CooperationProjectSponsor, |
| 28 | CooperationProjectUndertakerType: createCooperationProjectCommand.CooperationProjectUndertakerType, | 28 | CooperationProjectUndertakerType: createCooperationProjectCommand.CooperationProjectUndertakerType, |
| 29 | Attachment: createCooperationProjectCommand.Attachment, | 29 | Attachment: createCooperationProjectCommand.Attachment, |
| 30 | + DepartmentId: createCooperationProjectCommand.OrgId, | ||
| 30 | }) | 31 | }) |
| 31 | 32 | ||
| 32 | if err != nil { | 33 | if err != nil { |
| @@ -92,6 +93,7 @@ func (srv CooperationProjectService) SearchCooperationProject(projectQuery *comm | @@ -92,6 +93,7 @@ func (srv CooperationProjectService) SearchCooperationProject(projectQuery *comm | ||
| 92 | PageNumber: projectQuery.PageNumber, | 93 | PageNumber: projectQuery.PageNumber, |
| 93 | PageSize: projectQuery.PageSize, | 94 | PageSize: projectQuery.PageSize, |
| 94 | Status: int(projectQuery.Status), | 95 | Status: int(projectQuery.Status), |
| 96 | + OrgId: projectQuery.Operator.OrgId, | ||
| 95 | }) | 97 | }) |
| 96 | if err != nil { | 98 | if err != nil { |
| 97 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 99 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
| @@ -13,7 +13,7 @@ type UpdateUserInfoCommand struct { | @@ -13,7 +13,7 @@ type UpdateUserInfoCommand struct { | ||
| 13 | //操作人 | 13 | //操作人 |
| 14 | Operator domain.Operator `json:"-"` | 14 | Operator domain.Operator `json:"-"` |
| 15 | // 头像 | 15 | // 头像 |
| 16 | - Avatar string `cname:"头像" json:"avatar" valid:"Required"` | 16 | + Avatar string `cname:"头像" json:"avatar"` |
| 17 | // 用户姓名 | 17 | // 用户姓名 |
| 18 | UserName string `cname:"用户姓名" json:"userName" valid:"Required"` | 18 | UserName string `cname:"用户姓名" json:"userName" valid:"Required"` |
| 19 | // 邮箱 | 19 | // 邮箱 |
| @@ -100,7 +100,9 @@ func (srv UserService) UpdateUserBaseInfo(updateUserInfoCommand *command.UpdateU | @@ -100,7 +100,9 @@ func (srv UserService) UpdateUserBaseInfo(updateUserInfoCommand *command.UpdateU | ||
| 100 | if err != nil { | 100 | if err != nil { |
| 101 | return nil, application.ThrowError(application.BUSINESS_ERROR, "用户不存在") | 101 | return nil, application.ThrowError(application.BUSINESS_ERROR, "用户不存在") |
| 102 | } | 102 | } |
| 103 | - | 103 | + if _, ok := updateUserInfoCommand.BodyKV["avatar"]; !ok { |
| 104 | + updateUserInfoCommand.Avatar = user.UserInfo.Avatar | ||
| 105 | + } | ||
| 104 | if _, ok := updateUserInfoCommand.BodyKV["email"]; !ok { | 106 | if _, ok := updateUserInfoCommand.BodyKV["email"]; !ok { |
| 105 | updateUserInfoCommand.Email = user.UserInfo.Email | 107 | updateUserInfoCommand.Email = user.UserInfo.Email |
| 106 | } | 108 | } |
| @@ -57,6 +57,10 @@ type CooperationApplication struct { | @@ -57,6 +57,10 @@ type CooperationApplication struct { | ||
| 57 | OrgID int `json:"orgId"` | 57 | OrgID int `json:"orgId"` |
| 58 | OrgName string `json:"orgName"` | 58 | OrgName string `json:"orgName"` |
| 59 | } `json:"org"` | 59 | } `json:"org"` |
| 60 | + Department struct { | ||
| 61 | + DepartmentID int `json:"departmentId"` | ||
| 62 | + DepartmentName string `json:"departmentName"` | ||
| 63 | + } `json:"department"` | ||
| 60 | IsCanceled bool `json:"isCanceled"` | 64 | IsCanceled bool `json:"isCanceled"` |
| 61 | Company struct { | 65 | Company struct { |
| 62 | CompanyID int `json:"companyId"` | 66 | CompanyID int `json:"companyId"` |
-
请 注册 或 登录 后发表评论