正在显示
3 个修改的文件
包含
60 行增加
和
55 行删除
| @@ -10,22 +10,25 @@ import ( | @@ -10,22 +10,25 @@ 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 | + 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"` | ||
| 29 | // 业绩分红激励规则列表 | 32 | // 业绩分红激励规则列表 |
| 30 | DividendsIncentivesRules []struct { | 33 | DividendsIncentivesRules []struct { |
| 31 | // 关联的项目合约编号 | 34 | // 关联的项目合约编号 |
| @@ -37,7 +40,7 @@ type CreateCooperationContractCommand struct { | @@ -37,7 +40,7 @@ type CreateCooperationContractCommand struct { | ||
| 37 | // 分红规则激励百分点 | 40 | // 分红规则激励百分点 |
| 38 | DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"` | 41 | DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"` |
| 39 | // 分红规则激励阶段, | 42 | // 分红规则激励阶段, |
| 40 | - DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string"` | 43 | + DividendsIncentivesStage int64 `json:"dividendsIncentivesStage,string,"` |
| 41 | // 分红规则激励阶段结束 | 44 | // 分红规则激励阶段结束 |
| 42 | DividendsIncentivesStageEnd int `json:"dividendsIncentivesStageEnd"` | 45 | DividendsIncentivesStageEnd int `json:"dividendsIncentivesStageEnd"` |
| 43 | // 分红规则激励阶段开始 | 46 | // 分红规则激励阶段开始 |
| @@ -46,7 +49,7 @@ type CreateCooperationContractCommand struct { | @@ -46,7 +49,7 @@ type CreateCooperationContractCommand struct { | ||
| 46 | // 金额激励规则列表 | 49 | // 金额激励规则列表 |
| 47 | MoneyIncentivesRules []struct { | 50 | MoneyIncentivesRules []struct { |
| 48 | // 金额激励规则ID | 51 | // 金额激励规则ID |
| 49 | - MoneyIncentivesRuleId int64 `json:"moneyIncentivesRuleId,string"` | 52 | + MoneyIncentivesRuleId int64 `json:"moneyIncentivesRuleId,string,"` |
| 50 | // 关联的共创合约编号 | 53 | // 关联的共创合约编号 |
| 51 | CooperationContractNumber string `json:"cooperationContractNumber"` | 54 | CooperationContractNumber string `json:"cooperationContractNumber"` |
| 52 | // 激励金额 | 55 | // 激励金额 |
| @@ -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,14 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC | @@ -61,14 +61,14 @@ 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 | + CooperationContractNumber: createCooperationContractCommand.CooperationContract.CooperationContractNumber, | ||
| 66 | + CooperationProjectNumber: createCooperationContractCommand.CooperationContract.CooperationProjectNumber, | ||
| 67 | + DepartmentId: createCooperationContractCommand.CooperationContract.DepartmentId, | ||
| 68 | + CooperationContractUndertakerType: createCooperationContractCommand.CooperationContract.CooperationContractUndertakerType, | ||
| 69 | + CooperationContractName: createCooperationContractCommand.CooperationContract.CooperationContractName, | ||
| 70 | + CooperationModeNumber: createCooperationContractCommand.CooperationContract.CooperationModeNumber, | ||
| 71 | + SponsorUid: createCooperationContractCommand.CooperationContract.SponsorUid, | ||
| 72 | }) | 72 | }) |
| 73 | if err != nil { | 73 | if err != nil { |
| 74 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 74 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
| @@ -167,19 +167,19 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC | @@ -167,19 +167,19 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC | ||
| 167 | underTakers = append(underTakers, u) | 167 | underTakers = append(underTakers, u) |
| 168 | } | 168 | } |
| 169 | _, err := creationCooperationGateway.CooperationContractUpdate(allied_creation_cooperation.ReqCooperationContractUpdate{ | 169 | _, err := creationCooperationGateway.CooperationContractUpdate(allied_creation_cooperation.ReqCooperationContractUpdate{ |
| 170 | - CooperationContractId: updateCooperationContractCommand.CooperationContractId, | 170 | + CooperationContractId: updateCooperationContractCommand.CooperationContract.CooperationContractId, |
| 171 | MoneyIncentivesRules: rules2, | 171 | MoneyIncentivesRules: rules2, |
| 172 | DividendsIncentivesRules: rules1, | 172 | DividendsIncentivesRules: rules1, |
| 173 | Undertakers: underTakers, | 173 | Undertakers: underTakers, |
| 174 | RelevantIds: updateCooperationContractCommand.RelevantIds, | 174 | 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, | 175 | + CooperationContractDescription: updateCooperationContractCommand.CooperationContract.CooperationContractDescription, |
| 176 | + CooperationContractNumber: updateCooperationContractCommand.CooperationContract.CooperationContractNumber, | ||
| 177 | + CooperationProjectNumber: updateCooperationContractCommand.CooperationContract.CooperationProjectNumber, | ||
| 178 | + DepartmentId: updateCooperationContractCommand.CooperationContract.DepartmentId, | ||
| 179 | + CooperationContractUndertakerType: updateCooperationContractCommand.CooperationContract.CooperationContractUndertakerType, | ||
| 180 | + CooperationContractName: updateCooperationContractCommand.CooperationContract.CooperationContractName, | ||
| 181 | + CooperationModeNumber: updateCooperationContractCommand.CooperationContract.CooperationModeNumber, | ||
| 182 | + SponsorUid: updateCooperationContractCommand.CooperationContract.SponsorUid, | ||
| 183 | }) | 183 | }) |
| 184 | if err != nil { | 184 | if err != nil { |
| 185 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 185 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
-
请 注册 或 登录 后发表评论