1
|
package service
|
1
|
package service
|
2
|
|
2
|
|
3
|
import (
|
3
|
import (
|
|
|
4
|
+ "strconv"
|
4
|
"time"
|
5
|
"time"
|
5
|
|
6
|
|
6
|
"github.com/linmadan/egglib-go/core/application"
|
7
|
"github.com/linmadan/egglib-go/core/application"
|
|
@@ -138,7 +139,9 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
@@ -138,7 +139,9 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
138
|
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationContractCommand.Operator)
|
139
|
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationContractCommand.Operator)
|
139
|
rules1 := []allied_creation_cooperation.DividendsIncentivesRule{}
|
140
|
rules1 := []allied_creation_cooperation.DividendsIncentivesRule{}
|
140
|
for _, v := range updateCooperationContractCommand.DividendsIncentivesRules {
|
141
|
for _, v := range updateCooperationContractCommand.DividendsIncentivesRules {
|
|
|
142
|
+ id, _ := strconv.Atoi(v.DividendsIncentivesRuleId)
|
141
|
r := allied_creation_cooperation.DividendsIncentivesRule{
|
143
|
r := allied_creation_cooperation.DividendsIncentivesRule{
|
|
|
144
|
+ DividendsIncentivesRuleId: id,
|
142
|
CooperationContractNumber: v.CooperationContractNumber,
|
145
|
CooperationContractNumber: v.CooperationContractNumber,
|
143
|
ReferrerPercentage: v.ReferrerPercentage,
|
146
|
ReferrerPercentage: v.ReferrerPercentage,
|
144
|
SalesmanPercentage: v.SalesmanPercentage,
|
147
|
SalesmanPercentage: v.SalesmanPercentage,
|
|
@@ -152,8 +155,9 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
@@ -152,8 +155,9 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
152
|
}
|
155
|
}
|
153
|
rules2 := []allied_creation_cooperation.MoneyIncentivesRule{}
|
156
|
rules2 := []allied_creation_cooperation.MoneyIncentivesRule{}
|
154
|
for _, v := range updateCooperationContractCommand.MoneyIncentivesRules {
|
157
|
for _, v := range updateCooperationContractCommand.MoneyIncentivesRules {
|
|
|
158
|
+ id, _ := strconv.Atoi(v.MoneyIncentivesRuleId)
|
155
|
r := allied_creation_cooperation.MoneyIncentivesRule{
|
159
|
r := allied_creation_cooperation.MoneyIncentivesRule{
|
156
|
- MoneyIncentivesRuleId: 0,
|
160
|
+ MoneyIncentivesRuleId: id,
|
157
|
CooperationContractNumber: v.CooperationContractNumber,
|
161
|
CooperationContractNumber: v.CooperationContractNumber,
|
158
|
MoneyIncentivesAmount: v.MoneyIncentivesAmount,
|
162
|
MoneyIncentivesAmount: v.MoneyIncentivesAmount,
|
159
|
MoneyIncentivesStage: v.MoneyIncentivesStage,
|
163
|
MoneyIncentivesStage: v.MoneyIncentivesStage,
|