Merge branch 'dev' of http://gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway into dev
正在显示
13 个修改的文件
包含
130 行增加
和
97 行删除
lastupdate.tmp
已删除
100644 → 0
| 1 | -{"D:\\workspaceGo\\src\\allied-creation-gateway\\pkg\\port\\beego\\routers":1628844413608624400} |
| @@ -15,7 +15,7 @@ type UpdateCooperationProjectCommand struct { | @@ -15,7 +15,7 @@ type UpdateCooperationProjectCommand struct { | ||
| 15 | // 模式编码,唯一确定 | 15 | // 模式编码,唯一确定 |
| 16 | CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"` | 16 | CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"` |
| 17 | // 组织ID | 17 | // 组织ID |
| 18 | - OrgId int64 `json:"departmentId" valid:"Required"` | 18 | + OrgId int `json:"departmentId" valid:"Required"` |
| 19 | // 共创项目名称 | 19 | // 共创项目名称 |
| 20 | CooperationProjectName string `json:"cooperationProjectName" valid:"Required"` | 20 | CooperationProjectName string `json:"cooperationProjectName" valid:"Required"` |
| 21 | // 共创发起人id | 21 | // 共创发起人id |
| @@ -80,7 +80,7 @@ func (srv CooperationProjectService) UpdateCooperationProject(updateCooperationP | @@ -80,7 +80,7 @@ func (srv CooperationProjectService) UpdateCooperationProject(updateCooperationP | ||
| 80 | PublisherUid: strconv.Itoa(int(updateCooperationProjectCommand.Operator.UserId)), | 80 | PublisherUid: strconv.Itoa(int(updateCooperationProjectCommand.Operator.UserId)), |
| 81 | CooperationProjectDescription: updateCooperationProjectCommand.CooperationProjectDescription, | 81 | CooperationProjectDescription: updateCooperationProjectCommand.CooperationProjectDescription, |
| 82 | Attachment: updateCooperationProjectCommand.Attachment, | 82 | Attachment: updateCooperationProjectCommand.Attachment, |
| 83 | - OrgId: updateCooperationProjectCommand.OrgId, | 83 | + DepartmentId: updateCooperationProjectCommand.OrgId, |
| 84 | }) | 84 | }) |
| 85 | if err != nil { | 85 | if err != nil { |
| 86 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 86 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
| @@ -10,22 +10,23 @@ import ( | @@ -10,22 +10,23 @@ import ( | ||
| 10 | type CreateCooperationContractCommand struct { | 10 | type CreateCooperationContractCommand struct { |
| 11 | //操作人 | 11 | //操作人 |
| 12 | Operator domain.Operator `json:"-"` | 12 | Operator domain.Operator `json:"-"` |
| 13 | - // 共创合约描述 | ||
| 14 | - CooperationContractDescription string `json:"cooperationContractDescription"` | ||
| 15 | - // 共创合约编号 | ||
| 16 | - CooperationContractNumber string `json:"cooperationContractNumber"` | ||
| 17 | - // 共创项目编号, | ||
| 18 | - CooperationProjectNumber string `json:"cooperationProjectNumber"` | ||
| 19 | - // 共创合约发起部门id | ||
| 20 | - DepartmentId string `json:"departmentId"` | ||
| 21 | - // 共创合约承接对象,1员工,2共创用户,3公开 | ||
| 22 | - CooperationContractUndertakerType []int `json:"cooperationContractUndertakerType"` | ||
| 23 | - // 共创合约名称 | ||
| 24 | - CooperationContractName string `json:"cooperationContractName"` | ||
| 25 | - // 共创模式编码, | ||
| 26 | - CooperationModeNumber string `json:"cooperationModeNumber"` | ||
| 27 | - // 共创合约发起人uid | ||
| 28 | - SponsorUid string `json:"sponsorUid"` | 13 | + //合约 |
| 14 | + CooperationContract struct { | ||
| 15 | + // 共创合约描述 | ||
| 16 | + CooperationContractDescription string `json:"cooperationContractDescription"` | ||
| 17 | + // 共创项目编号, | ||
| 18 | + CooperationProjectNumber string `json:"cooperationProjectNumber"` | ||
| 19 | + // 共创合约发起部门id | ||
| 20 | + DepartmentId string `json:"departmentId"` | ||
| 21 | + // 共创合约承接对象,1员工,2共创用户,3公开 | ||
| 22 | + CooperationContractUndertakerType []int `json:"cooperationContractUndertakerType"` | ||
| 23 | + // 共创合约名称 | ||
| 24 | + CooperationContractName string `json:"cooperationContractName"` | ||
| 25 | + // 共创模式编码, | ||
| 26 | + CooperationModeNumber string `json:"cooperationModeNumber"` | ||
| 27 | + // 共创合约发起人uid | ||
| 28 | + SponsorUid string `json:"sponsorUserId"` | ||
| 29 | + } `json:"cooperationContract"` | ||
| 29 | // 业绩分红激励规则列表 | 30 | // 业绩分红激励规则列表 |
| 30 | DividendsIncentivesRules []struct { | 31 | DividendsIncentivesRules []struct { |
| 31 | // 关联的项目合约编号 | 32 | // 关联的项目合约编号 |
| @@ -37,7 +38,7 @@ type CreateCooperationContractCommand struct { | @@ -37,7 +38,7 @@ type CreateCooperationContractCommand struct { | ||
| 37 | // 分红规则激励百分点 | 38 | // 分红规则激励百分点 |
| 38 | DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"` | 39 | DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"` |
| 39 | // 分红规则激励阶段, | 40 | // 分红规则激励阶段, |
| 40 | - DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string"` | 41 | + DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string,"` |
| 41 | // 分红规则激励阶段结束 | 42 | // 分红规则激励阶段结束 |
| 42 | DividendsIncentivesStageEnd int `json:"dividendsIncentivesStageEnd"` | 43 | DividendsIncentivesStageEnd int `json:"dividendsIncentivesStageEnd"` |
| 43 | // 分红规则激励阶段开始 | 44 | // 分红规则激励阶段开始 |
| @@ -46,7 +47,7 @@ type CreateCooperationContractCommand struct { | @@ -46,7 +47,7 @@ type CreateCooperationContractCommand struct { | ||
| 46 | // 金额激励规则列表 | 47 | // 金额激励规则列表 |
| 47 | MoneyIncentivesRules []struct { | 48 | MoneyIncentivesRules []struct { |
| 48 | // 金额激励规则ID | 49 | // 金额激励规则ID |
| 49 | - MoneyIncentivesRuleId int64 `json:"moneyIncentivesRuleId,string"` | 50 | + MoneyIncentivesRuleId int64 `json:"moneyIncentivesRuleId,string,"` |
| 50 | // 关联的共创合约编号 | 51 | // 关联的共创合约编号 |
| 51 | CooperationContractNumber string `json:"cooperationContractNumber"` | 52 | CooperationContractNumber string `json:"cooperationContractNumber"` |
| 52 | // 激励金额 | 53 | // 激励金额 |
| @@ -9,24 +9,26 @@ import ( | @@ -9,24 +9,26 @@ import ( | ||
| 9 | 9 | ||
| 10 | type UpdateCooperationContractCommand struct { | 10 | type UpdateCooperationContractCommand struct { |
| 11 | //操作人 | 11 | //操作人 |
| 12 | - Operator domain.Operator `json:"-"` | ||
| 13 | - CooperationContractId int `json:"cooperationContractId"` | ||
| 14 | - // 共创合约描述 | ||
| 15 | - CooperationContractDescription string `json:"cooperationContractDescription"` | ||
| 16 | - // 共创合约编号 | ||
| 17 | - CooperationContractNumber string `json:"cooperationContractNumber"` | ||
| 18 | - // 共创项目编号, | ||
| 19 | - CooperationProjectNumber string `json:"cooperationProjectNumber"` | ||
| 20 | - // 共创合约发起部门id | ||
| 21 | - DepartmentId string `json:"departmentId"` | ||
| 22 | - // 共创合约承接对象,1员工,2共创用户,3公开 | ||
| 23 | - CooperationContractUndertakerType []int `json:"cooperationContractUndertakerType"` | ||
| 24 | - // 共创合约名称 | ||
| 25 | - CooperationContractName string `json:"cooperationContractName"` | ||
| 26 | - // 共创模式编码, | ||
| 27 | - CooperationModeNumber string `json:"cooperationModeNumber"` | ||
| 28 | - // 共创合约发起人uid | ||
| 29 | - SponsorUid string `json:"sponsorUid"` | 12 | + Operator domain.Operator `json:"-"` |
| 13 | + CooperationContract struct { | ||
| 14 | + CooperationContractId int `json:"cooperationContractId"` | ||
| 15 | + // 共创合约描述 | ||
| 16 | + CooperationContractDescription string `json:"cooperationContractDescription"` | ||
| 17 | + // 共创合约编号 | ||
| 18 | + CooperationContractNumber string `json:"cooperationContractNumber"` | ||
| 19 | + // 共创项目编号, | ||
| 20 | + CooperationProjectNumber string `json:"cooperationProjectNumber"` | ||
| 21 | + // 共创合约发起部门id | ||
| 22 | + DepartmentId string `json:"departmentId"` | ||
| 23 | + // 共创合约承接对象,1员工,2共创用户,3公开 | ||
| 24 | + CooperationContractUndertakerType []int `json:"cooperationContractUndertakerType"` | ||
| 25 | + // 共创合约名称 | ||
| 26 | + CooperationContractName string `json:"cooperationContractName"` | ||
| 27 | + // 共创模式编码, | ||
| 28 | + CooperationModeNumber string `json:"cooperationModeNumber"` | ||
| 29 | + // 共创合约发起人uid | ||
| 30 | + SponsorUid string `json:"sponsorUid"` | ||
| 31 | + } `json:"cooperationContract"` | ||
| 30 | // 业绩分红激励规则列表 | 32 | // 业绩分红激励规则列表 |
| 31 | DividendsIncentivesRules []struct { | 33 | DividendsIncentivesRules []struct { |
| 32 | // 关联的项目合约编号 | 34 | // 关联的项目合约编号 |
| @@ -38,7 +40,7 @@ type UpdateCooperationContractCommand struct { | @@ -38,7 +40,7 @@ type UpdateCooperationContractCommand struct { | ||
| 38 | // 分红规则激励百分点 | 40 | // 分红规则激励百分点 |
| 39 | DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"` | 41 | DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"` |
| 40 | // 分红规则激励阶段, | 42 | // 分红规则激励阶段, |
| 41 | - DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string"` | 43 | + DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string,"` |
| 42 | // 分红规则激励阶段结束 | 44 | // 分红规则激励阶段结束 |
| 43 | DividendsIncentivesStageEnd int `json:"dividendsIncentivesStageEnd"` | 45 | DividendsIncentivesStageEnd int `json:"dividendsIncentivesStageEnd"` |
| 44 | // 分红规则激励阶段开始 | 46 | // 分红规则激励阶段开始 |
| @@ -47,7 +49,7 @@ type UpdateCooperationContractCommand struct { | @@ -47,7 +49,7 @@ type UpdateCooperationContractCommand struct { | ||
| 47 | // 金额激励规则列表 | 49 | // 金额激励规则列表 |
| 48 | MoneyIncentivesRules []struct { | 50 | MoneyIncentivesRules []struct { |
| 49 | // 金额激励规则ID | 51 | // 金额激励规则ID |
| 50 | - MoneyIncentivesRuleId int64 `json:"moneyIncentivesRuleId,string"` | 52 | + MoneyIncentivesRuleId int64 `json:"moneyIncentivesRuleId,string,"` |
| 51 | // 关联的共创合约编号 | 53 | // 关联的共创合约编号 |
| 52 | CooperationContractNumber string `json:"cooperationContractNumber"` | 54 | CooperationContractNumber string `json:"cooperationContractNumber"` |
| 53 | // 激励金额 | 55 | // 激励金额 |
| @@ -61,14 +61,17 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC | @@ -61,14 +61,17 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC | ||
| 61 | DividendsIncentivesRules: rules1, | 61 | DividendsIncentivesRules: rules1, |
| 62 | Undertakers: underTakers, | 62 | Undertakers: underTakers, |
| 63 | RelevantIds: createCooperationContractCommand.RelevantIds, | 63 | RelevantIds: createCooperationContractCommand.RelevantIds, |
| 64 | - CooperationContractDescription: createCooperationContractCommand.CooperationContractDescription, | ||
| 65 | - CooperationContractNumber: createCooperationContractCommand.CooperationContractNumber, | ||
| 66 | - CooperationProjectNumber: createCooperationContractCommand.CooperationProjectNumber, | ||
| 67 | - DepartmentId: createCooperationContractCommand.DepartmentId, | ||
| 68 | - CooperationContractUndertakerType: createCooperationContractCommand.CooperationContractUndertakerType, | ||
| 69 | - CooperationContractName: createCooperationContractCommand.CooperationContractName, | ||
| 70 | - CooperationModeNumber: createCooperationContractCommand.CooperationModeNumber, | ||
| 71 | - SponsorUid: createCooperationContractCommand.SponsorUid, | 64 | + CooperationContractDescription: createCooperationContractCommand.CooperationContract.CooperationContractDescription, |
| 65 | + CooperationProjectNumber: createCooperationContractCommand.CooperationContract.CooperationProjectNumber, | ||
| 66 | + DepartmentId: createCooperationContractCommand.CooperationContract.DepartmentId, | ||
| 67 | + CooperationContractUndertakerType: createCooperationContractCommand.CooperationContract.CooperationContractUndertakerType, | ||
| 68 | + CooperationContractName: createCooperationContractCommand.CooperationContract.CooperationContractName, | ||
| 69 | + CooperationModeNumber: createCooperationContractCommand.CooperationContract.CooperationModeNumber, | ||
| 70 | + SponsorUid: createCooperationContractCommand.CooperationContract.SponsorUid, | ||
| 71 | + CompanyId: int(createCooperationContractCommand.Operator.CompanyId), | ||
| 72 | + UserId: int(createCooperationContractCommand.Operator.UserId), | ||
| 73 | + UserBaseId: int(createCooperationContractCommand.Operator.UserBaseId), | ||
| 74 | + OrgId: int(createCooperationContractCommand.Operator.OrgId), | ||
| 72 | }) | 75 | }) |
| 73 | if err != nil { | 76 | if err != nil { |
| 74 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 77 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
| @@ -167,19 +170,23 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC | @@ -167,19 +170,23 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC | ||
| 167 | underTakers = append(underTakers, u) | 170 | underTakers = append(underTakers, u) |
| 168 | } | 171 | } |
| 169 | _, err := creationCooperationGateway.CooperationContractUpdate(allied_creation_cooperation.ReqCooperationContractUpdate{ | 172 | _, err := creationCooperationGateway.CooperationContractUpdate(allied_creation_cooperation.ReqCooperationContractUpdate{ |
| 170 | - CooperationContractId: updateCooperationContractCommand.CooperationContractId, | 173 | + CooperationContractId: updateCooperationContractCommand.CooperationContract.CooperationContractId, |
| 171 | MoneyIncentivesRules: rules2, | 174 | MoneyIncentivesRules: rules2, |
| 172 | DividendsIncentivesRules: rules1, | 175 | DividendsIncentivesRules: rules1, |
| 173 | Undertakers: underTakers, | 176 | Undertakers: underTakers, |
| 174 | RelevantIds: updateCooperationContractCommand.RelevantIds, | 177 | RelevantIds: updateCooperationContractCommand.RelevantIds, |
| 175 | - CooperationContractDescription: updateCooperationContractCommand.CooperationContractDescription, | ||
| 176 | - CooperationContractNumber: updateCooperationContractCommand.CooperationContractNumber, | ||
| 177 | - CooperationProjectNumber: updateCooperationContractCommand.CooperationProjectNumber, | ||
| 178 | - DepartmentId: updateCooperationContractCommand.DepartmentId, | ||
| 179 | - CooperationContractUndertakerType: updateCooperationContractCommand.CooperationContractUndertakerType, | ||
| 180 | - CooperationContractName: updateCooperationContractCommand.CooperationContractName, | ||
| 181 | - CooperationModeNumber: updateCooperationContractCommand.CooperationModeNumber, | ||
| 182 | - SponsorUid: updateCooperationContractCommand.SponsorUid, | 178 | + CooperationContractDescription: updateCooperationContractCommand.CooperationContract.CooperationContractDescription, |
| 179 | + CooperationContractNumber: updateCooperationContractCommand.CooperationContract.CooperationContractNumber, | ||
| 180 | + CooperationProjectNumber: updateCooperationContractCommand.CooperationContract.CooperationProjectNumber, | ||
| 181 | + DepartmentId: updateCooperationContractCommand.CooperationContract.DepartmentId, | ||
| 182 | + CooperationContractUndertakerType: updateCooperationContractCommand.CooperationContract.CooperationContractUndertakerType, | ||
| 183 | + CooperationContractName: updateCooperationContractCommand.CooperationContract.CooperationContractName, | ||
| 184 | + CooperationModeNumber: updateCooperationContractCommand.CooperationContract.CooperationModeNumber, | ||
| 185 | + SponsorUid: updateCooperationContractCommand.CooperationContract.SponsorUid, | ||
| 186 | + CompanyId: int(updateCooperationContractCommand.Operator.CompanyId), | ||
| 187 | + UserId: int(updateCooperationContractCommand.Operator.UserId), | ||
| 188 | + UserBaseId: int(updateCooperationContractCommand.Operator.UserBaseId), | ||
| 189 | + OrgId: int(updateCooperationContractCommand.Operator.OrgId), | ||
| 183 | }) | 190 | }) |
| 184 | if err != nil { | 191 | if err != nil { |
| 185 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 192 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
| @@ -12,14 +12,14 @@ type CreateCooperationProjectCommand struct { | @@ -12,14 +12,14 @@ type CreateCooperationProjectCommand struct { | ||
| 12 | Operator domain.Operator `json:"-"` | 12 | Operator domain.Operator `json:"-"` |
| 13 | // 模式编码,唯一确定 | 13 | // 模式编码,唯一确定 |
| 14 | CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"` | 14 | CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"` |
| 15 | - // 发起组织ID | ||
| 16 | - OrgId int64 `json:"departmentId"` | 15 | + // 发起部门ID |
| 16 | + DepartmentId int64 `json:"departmentId,string"` | ||
| 17 | // 共创项目名称 | 17 | // 共创项目名称 |
| 18 | CooperationProjectName string `json:"cooperationProjectName" valid:"Required"` | 18 | CooperationProjectName string `json:"cooperationProjectName" valid:"Required"` |
| 19 | // 共创发起人id | 19 | // 共创发起人id |
| 20 | CooperationProjectSponsor int `json:"cooperationProjectSponsor,string,"` | 20 | CooperationProjectSponsor int `json:"cooperationProjectSponsor,string,"` |
| 21 | // 项目承接对象 | 21 | // 项目承接对象 |
| 22 | - CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerTypes"` | 22 | + CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` |
| 23 | // 共创项目描述 | 23 | // 共创项目描述 |
| 24 | CooperationProjectDescription string `json:"cooperationProjectDescription" valid:"Required"` | 24 | CooperationProjectDescription string `json:"cooperationProjectDescription" valid:"Required"` |
| 25 | //图片 | 25 | //图片 |
| @@ -14,8 +14,8 @@ type UpdateCooperationProjectCommand struct { | @@ -14,8 +14,8 @@ type UpdateCooperationProjectCommand struct { | ||
| 14 | CooperationProjectId string `json:"cooperationProjectId" valid:"Required"` | 14 | CooperationProjectId string `json:"cooperationProjectId" valid:"Required"` |
| 15 | // 模式编码,唯一确定 | 15 | // 模式编码,唯一确定 |
| 16 | CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"` | 16 | CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"` |
| 17 | - // 组织ID | ||
| 18 | - OrgId int64 `json:"departmentId,string" valid:"Required"` | 17 | + // 发起部门ID |
| 18 | + DepartmentId int `json:"departmentId,string" valid:"Required"` | ||
| 19 | // 共创项目名称 | 19 | // 共创项目名称 |
| 20 | CooperationProjectName string `json:"cooperationProjectName" valid:"Required"` | 20 | CooperationProjectName string `json:"cooperationProjectName" valid:"Required"` |
| 21 | // 共创发起人id | 21 | // 共创发起人id |
| @@ -34,6 +34,7 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro | @@ -34,6 +34,7 @@ func (cooperationProjectService *CooperationProjectService) CreateCooperationPro | ||
| 34 | CooperationModeNumber: createCooperationProjectCommand.CooperationModeNumber, | 34 | CooperationModeNumber: createCooperationProjectCommand.CooperationModeNumber, |
| 35 | PublisherUid: int(createCooperationProjectCommand.Operator.UserId), | 35 | PublisherUid: int(createCooperationProjectCommand.Operator.UserId), |
| 36 | SponsorUid: createCooperationProjectCommand.CooperationProjectSponsor, | 36 | SponsorUid: createCooperationProjectCommand.CooperationProjectSponsor, |
| 37 | + DepartmentId: int(createCooperationProjectCommand.DepartmentId), | ||
| 37 | CooperationProjectUndertakerType: createCooperationProjectCommand.CooperationProjectUndertakerType, | 38 | CooperationProjectUndertakerType: createCooperationProjectCommand.CooperationProjectUndertakerType, |
| 38 | Attachment: images, | 39 | Attachment: images, |
| 39 | }) | 40 | }) |
| @@ -149,9 +150,7 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro | @@ -149,9 +150,7 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro | ||
| 149 | PublisherUid: strconv.Itoa(int(updateCooperationProjectCommand.Operator.UserId)), | 150 | PublisherUid: strconv.Itoa(int(updateCooperationProjectCommand.Operator.UserId)), |
| 150 | CooperationProjectDescription: updateCooperationProjectCommand.CooperationProjectDescription, | 151 | CooperationProjectDescription: updateCooperationProjectCommand.CooperationProjectDescription, |
| 151 | Attachment: images, | 152 | Attachment: images, |
| 152 | - UserId: updateCooperationProjectCommand.Operator.UserId, | ||
| 153 | - UserBaseId: updateCooperationProjectCommand.Operator.UserBaseId, | ||
| 154 | - OrgId: updateCooperationProjectCommand.OrgId, | 153 | + DepartmentId: updateCooperationProjectCommand.DepartmentId, |
| 155 | }) | 154 | }) |
| 156 | if err != nil { | 155 | if err != nil { |
| 157 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 156 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
| @@ -15,10 +15,10 @@ var HTTP_PORT int = 8083 | @@ -15,10 +15,10 @@ var HTTP_PORT int = 8083 | ||
| 15 | var ALLIED_CREATION_BASIC_HOST = "http://allied-creation-basic-dev.fjmaimaimai.com" | 15 | var ALLIED_CREATION_BASIC_HOST = "http://allied-creation-basic-dev.fjmaimaimai.com" |
| 16 | 16 | ||
| 17 | //天联共创用户模块 | 17 | //天联共创用户模块 |
| 18 | -var ALLIED_CREATION_USER_HOST = "http://allied-creation-user-dev.fjmaimaimai.com" | 18 | +var ALLIED_CREATION_USER_HOST = "http://localhost:8081" //"http://allied-creation-user-dev.fjmaimaimai.com" |
| 19 | 19 | ||
| 20 | //天联共创业务模块 | 20 | //天联共创业务模块 |
| 21 | -var ALLIED_CREATION_COOPERATION_HOST = "http://allied-creation-cooperation-dev.fjmaimaimai.com" | 21 | +var ALLIED_CREATION_COOPERATION_HOST = "http://localhost:8082" // "http://allied-creation-cooperation-dev.fjmaimaimai.com" |
| 22 | 22 | ||
| 23 | //通用模块短信服务 | 23 | //通用模块短信服务 |
| 24 | var SMS_SERVE_HOST = "https://sms.fjmaimaimai.com:9897" | 24 | var SMS_SERVE_HOST = "https://sms.fjmaimaimai.com:9897" |
| @@ -149,18 +149,22 @@ type ( | @@ -149,18 +149,22 @@ type ( | ||
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | ReqCooperationContractAdd struct { | 151 | ReqCooperationContractAdd struct { |
| 152 | - CooperationContractDescription string `json:"cooperationContractDescription"` // 共创合约描述 | ||
| 153 | - CooperationContractNumber string `json:"cooperationContractNumber"` // 共创合约编号 | ||
| 154 | - CooperationProjectNumber string `json:"cooperationProjectNumber"` // 共创项目编号, | ||
| 155 | - DepartmentId string `json:"departmentId"` // 共创合约发起部门id | ||
| 156 | - CooperationContractUndertakerType []int `json:"cooperationContractUndertakerType"` // 共创合约承接对象,1员工,2共创用户,3公开 | ||
| 157 | - CooperationContractName string `json:"cooperationContractName"` // 共创合约名称 | ||
| 158 | - CooperationModeNumber string `json:"cooperationModeNumber"` // 共创模式编码, | ||
| 159 | - SponsorUid string `json:"sponsorUid"` // 共创合约发起人uid | ||
| 160 | - DividendsIncentivesRules []DividendsIncentivesRule `json:"dividendsIncentivesRules"` // 业绩分红激励规则列表 | ||
| 161 | - MoneyIncentivesRules []MoneyIncentivesRule `json:"moneyIncentivesRules"` // 金额激励规则列表 | ||
| 162 | - Undertakers []Undertaker `json:"undertakers"` // 承接方列表 | ||
| 163 | - RelevantIds []string `json:"relevantIds"` //关联业务员 | 152 | + CooperationContractDescription string `json:"cooperationContractDescription"` // 共创合约描述 |
| 153 | + CooperationContractNumber string `json:"cooperationContractNumber"` // 共创合约编号 | ||
| 154 | + CooperationProjectNumber string `json:"cooperationProjectNumber"` // 共创项目编号, | ||
| 155 | + DepartmentId string `json:"departmentId"` // 共创合约发起部门id | ||
| 156 | + CooperationContractUndertakerType []int `json:"cooperationContractUndertakerTypes"` // 共创合约承接对象,1员工,2共创用户,3公开 | ||
| 157 | + CooperationContractName string `json:"cooperationContractName"` // 共创合约名称 | ||
| 158 | + CooperationModeNumber string `json:"cooperationModeNumber"` // 共创模式编码, | ||
| 159 | + SponsorUid string `json:"sponsorUid"` // 共创合约发起人uid | ||
| 160 | + DividendsIncentivesRules []DividendsIncentivesRule `json:"dividendsIncentivesRules"` // 业绩分红激励规则列表 | ||
| 161 | + MoneyIncentivesRules []MoneyIncentivesRule `json:"moneyIncentivesRules"` // 金额激励规则列表 | ||
| 162 | + Undertakers []Undertaker `json:"undertakers"` // 承接方列表 | ||
| 163 | + RelevantIds []string `json:"relevantIds"` //关联业务员 | ||
| 164 | + CompanyId int `json:"companyId,string"` | ||
| 165 | + OrgId int `json:"orgId,string"` // 组织机构ID | ||
| 166 | + UserId int ` json:"userId,string"` // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 | ||
| 167 | + UserBaseId int `json:"userBaseId,string" ` // 用户基础数据id | ||
| 164 | } | 168 | } |
| 165 | 169 | ||
| 166 | DataCooperationContractAdd struct { | 170 | DataCooperationContractAdd struct { |
| @@ -182,10 +186,12 @@ type ( | @@ -182,10 +186,12 @@ type ( | ||
| 182 | SponsorUid string `json:"sponsorUid,omitempty,"` // 共创合约发起人uid | 186 | SponsorUid string `json:"sponsorUid,omitempty,"` // 共创合约发起人uid |
| 183 | DividendsIncentivesRules []DividendsIncentivesRule `json:"dividendsIncentivesRules"` // 金额激励规则列表 | 187 | DividendsIncentivesRules []DividendsIncentivesRule `json:"dividendsIncentivesRules"` // 金额激励规则列表 |
| 184 | MoneyIncentivesRules []MoneyIncentivesRule `json:"moneyIncentivesRules"` | 188 | MoneyIncentivesRules []MoneyIncentivesRule `json:"moneyIncentivesRules"` |
| 185 | - | ||
| 186 | - Undertakers []Undertaker `json:"undertakers"` // 承接方列表 // 业绩分红激励规则列表 | ||
| 187 | - //关联业务员 | ||
| 188 | - RelevantIds []string `json:"relevantIds"` | 189 | + Undertakers []Undertaker `json:"undertakers"` // 承接方列表 // 业绩分红激励规则列表 |
| 190 | + RelevantIds []string `json:"relevantIds"` //关联业务员 | ||
| 191 | + CompanyId int `json:"companyId,string"` | ||
| 192 | + OrgId int `json:"orgId,string"` // 组织机构ID | ||
| 193 | + UserId int ` json:"userId,string"` // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 | ||
| 194 | + UserBaseId int `json:"userBaseId,string" ` // 用户基础数据id | ||
| 189 | } | 195 | } |
| 190 | 196 | ||
| 191 | DataCooperationContractUpdate struct { | 197 | DataCooperationContractUpdate struct { |
| 1 | package allied_creation_cooperation | 1 | package allied_creation_cooperation |
| 2 | 2 | ||
| 3 | import ( | 3 | import ( |
| 4 | + "time" | ||
| 5 | + | ||
| 4 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" |
| 5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/util/jtime" | 7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/util/jtime" |
| 6 | - "time" | ||
| 7 | ) | 8 | ) |
| 8 | 9 | ||
| 9 | type ProjectAttachment struct { | 10 | type ProjectAttachment struct { |
| @@ -116,12 +117,13 @@ type ( | @@ -116,12 +117,13 @@ type ( | ||
| 116 | // 共创项目描述 | 117 | // 共创项目描述 |
| 117 | CooperationProjectDescription string `json:"cooperationProjectDescription"` | 118 | CooperationProjectDescription string `json:"cooperationProjectDescription"` |
| 118 | Attachment []domain.Attachment `json:"attachment"` | 119 | Attachment []domain.Attachment `json:"attachment"` |
| 120 | + DepartmentId int `json:"departmentId,string"` | ||
| 119 | // 组织机构ID | 121 | // 组织机构ID |
| 120 | - OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"` | 122 | + // OrgId int64 `cname:"组织机构ID" json:"orgId,string" valid:"Required"` |
| 121 | // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 | 123 | // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 |
| 122 | - UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"` | 124 | + //UserId int64 `cname:"用户ID" json:"userId,string" valid:"Required"` |
| 123 | // 用户基础数据id | 125 | // 用户基础数据id |
| 124 | - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"` | 126 | + //UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId,string" valid:"Required"` |
| 125 | } | 127 | } |
| 126 | 128 | ||
| 127 | DataCooperationProjectUpdate struct { | 129 | DataCooperationProjectUpdate struct { |
| @@ -268,7 +270,7 @@ type ( | @@ -268,7 +270,7 @@ type ( | ||
| 268 | // 批量结束项目 | 270 | // 批量结束项目 |
| 269 | type ( | 271 | type ( |
| 270 | ReqCooperationProjectBatchEnd struct { | 272 | ReqCooperationProjectBatchEnd struct { |
| 271 | - CooperationProjectIds []string `json:"cooperationProjectId"` | 273 | + CooperationProjectIds []string `json:"cooperationProjectIds"` |
| 272 | } | 274 | } |
| 273 | 275 | ||
| 274 | DataCooperationProjectBatchEnd struct { | 276 | DataCooperationProjectBatchEnd struct { |
| 1 | package web_client | 1 | package web_client |
| 2 | 2 | ||
| 3 | import ( | 3 | import ( |
| 4 | - "github.com/linmadan/egglib-go/web/beego" | ||
| 5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationContract/command" | 4 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationContract/command" |
| 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationContract/query" | 5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationContract/query" |
| 7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationContract/service" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/cooperationContract/service" |
| 7 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | ||
| 8 | ) | 8 | ) |
| 9 | 9 | ||
| 10 | type CooperationContractController struct { | 10 | type CooperationContractController struct { |
| 11 | - beego.BaseController | 11 | + baseController |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | func (controller *CooperationContractController) CreateCooperationContract() { | 14 | func (controller *CooperationContractController) CreateCooperationContract() { |
| 15 | cooperationContractService := service.NewCooperationContractService(nil) | 15 | cooperationContractService := service.NewCooperationContractService(nil) |
| 16 | createCooperationContractCommand := &command.CreateCooperationContractCommand{} | 16 | createCooperationContractCommand := &command.CreateCooperationContractCommand{} |
| 17 | - controller.Unmarshal(createCooperationContractCommand) | 17 | + err := controller.Unmarshal(createCooperationContractCommand) |
| 18 | + if err != nil { | ||
| 19 | + log.Logger.Debug("json err:" + err.Error()) | ||
| 20 | + } | ||
| 21 | + createCooperationContractCommand.Operator = controller.GetOperator() | ||
| 18 | data, err := cooperationContractService.CreateCooperationContract(createCooperationContractCommand) | 22 | data, err := cooperationContractService.CreateCooperationContract(createCooperationContractCommand) |
| 19 | controller.Response(data, err) | 23 | controller.Response(data, err) |
| 20 | } | 24 | } |
| @@ -22,9 +26,13 @@ func (controller *CooperationContractController) CreateCooperationContract() { | @@ -22,9 +26,13 @@ func (controller *CooperationContractController) CreateCooperationContract() { | ||
| 22 | func (controller *CooperationContractController) UpdateCooperationContract() { | 26 | func (controller *CooperationContractController) UpdateCooperationContract() { |
| 23 | cooperationContractService := service.NewCooperationContractService(nil) | 27 | cooperationContractService := service.NewCooperationContractService(nil) |
| 24 | updateCooperationContractCommand := &command.UpdateCooperationContractCommand{} | 28 | updateCooperationContractCommand := &command.UpdateCooperationContractCommand{} |
| 25 | - controller.Unmarshal(updateCooperationContractCommand) | 29 | + err := controller.Unmarshal(updateCooperationContractCommand) |
| 30 | + if err != nil { | ||
| 31 | + log.Logger.Debug("json err:" + err.Error()) | ||
| 32 | + } | ||
| 26 | contractId, _ := controller.GetInt(":contractId") | 33 | contractId, _ := controller.GetInt(":contractId") |
| 27 | - updateCooperationContractCommand.CooperationContractId = contractId | 34 | + updateCooperationContractCommand.Operator = controller.GetOperator() |
| 35 | + updateCooperationContractCommand.CooperationContract.CooperationContractId = contractId | ||
| 28 | data, err := cooperationContractService.UpdateCooperationContract(updateCooperationContractCommand) | 36 | data, err := cooperationContractService.UpdateCooperationContract(updateCooperationContractCommand) |
| 29 | controller.Response(data, err) | 37 | controller.Response(data, err) |
| 30 | } | 38 | } |
| @@ -33,6 +41,7 @@ func (controller *CooperationContractController) GetCooperationContract() { | @@ -33,6 +41,7 @@ func (controller *CooperationContractController) GetCooperationContract() { | ||
| 33 | cooperationContractService := service.NewCooperationContractService(nil) | 41 | cooperationContractService := service.NewCooperationContractService(nil) |
| 34 | getCooperationContractQuery := &query.GetCooperationContractQuery{} | 42 | getCooperationContractQuery := &query.GetCooperationContractQuery{} |
| 35 | contractId, _ := controller.GetInt(":contractId") | 43 | contractId, _ := controller.GetInt(":contractId") |
| 44 | + getCooperationContractQuery.Operator = controller.GetOperator() | ||
| 36 | getCooperationContractQuery.CooperationContractId = contractId | 45 | getCooperationContractQuery.CooperationContractId = contractId |
| 37 | data, err := cooperationContractService.GetCooperationContract(getCooperationContractQuery) | 46 | data, err := cooperationContractService.GetCooperationContract(getCooperationContractQuery) |
| 38 | controller.Response(data, err) | 47 | controller.Response(data, err) |
| @@ -41,14 +50,22 @@ func (controller *CooperationContractController) GetCooperationContract() { | @@ -41,14 +50,22 @@ func (controller *CooperationContractController) GetCooperationContract() { | ||
| 41 | func (controller *CooperationContractController) ListCooperationContract() { | 50 | func (controller *CooperationContractController) ListCooperationContract() { |
| 42 | cooperationContractService := service.NewCooperationContractService(nil) | 51 | cooperationContractService := service.NewCooperationContractService(nil) |
| 43 | listCooperationContractQuery := &query.ListCooperationContractQuery{} | 52 | listCooperationContractQuery := &query.ListCooperationContractQuery{} |
| 44 | - _, data, err := cooperationContractService.ListCooperationContract(listCooperationContractQuery) | ||
| 45 | - controller.Response(data, err) | 53 | + err := controller.Unmarshal(listCooperationContractQuery) |
| 54 | + if err != nil { | ||
| 55 | + log.Logger.Debug("json err:" + err.Error()) | ||
| 56 | + } | ||
| 57 | + listCooperationContractQuery.Operator = controller.GetOperator() | ||
| 58 | + cnt, data, err := cooperationContractService.ListCooperationContract(listCooperationContractQuery) | ||
| 59 | + controller.ReturnPageListData(int64(cnt), data, err, listCooperationContractQuery.PageNumber) | ||
| 46 | } | 60 | } |
| 47 | 61 | ||
| 48 | func (controller *CooperationContractController) EnableCooperationContract() { | 62 | func (controller *CooperationContractController) EnableCooperationContract() { |
| 49 | cooperationContractService := service.NewCooperationContractService(nil) | 63 | cooperationContractService := service.NewCooperationContractService(nil) |
| 50 | enableCooperationContractCommand := &command.EnableCooperationContractCommand{} | 64 | enableCooperationContractCommand := &command.EnableCooperationContractCommand{} |
| 51 | - controller.Unmarshal(enableCooperationContractCommand) | 65 | + err := controller.Unmarshal(enableCooperationContractCommand) |
| 66 | + if err != nil { | ||
| 67 | + log.Logger.Debug("json err:" + err.Error()) | ||
| 68 | + } | ||
| 52 | data, err := cooperationContractService.EnableCooperationContract(enableCooperationContractCommand) | 69 | data, err := cooperationContractService.EnableCooperationContract(enableCooperationContractCommand) |
| 53 | controller.Response(data, err) | 70 | controller.Response(data, err) |
| 54 | } | 71 | } |
-
请 注册 或 登录 后发表评论