|
|
package service
|
|
|
|
|
|
import (
|
|
|
"strconv"
|
|
|
"time"
|
|
|
|
|
|
"github.com/linmadan/egglib-go/core/application"
|
...
|
...
|
@@ -138,7 +139,9 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateCooperationContractCommand.Operator)
|
|
|
rules1 := []allied_creation_cooperation.DividendsIncentivesRule{}
|
|
|
for _, v := range updateCooperationContractCommand.DividendsIncentivesRules {
|
|
|
id, _ := strconv.Atoi(v.DividendsIncentivesRuleId)
|
|
|
r := allied_creation_cooperation.DividendsIncentivesRule{
|
|
|
DividendsIncentivesRuleId: id,
|
|
|
CooperationContractNumber: v.CooperationContractNumber,
|
|
|
ReferrerPercentage: v.ReferrerPercentage,
|
|
|
SalesmanPercentage: v.SalesmanPercentage,
|
...
|
...
|
@@ -152,8 +155,9 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC |
|
|
}
|
|
|
rules2 := []allied_creation_cooperation.MoneyIncentivesRule{}
|
|
|
for _, v := range updateCooperationContractCommand.MoneyIncentivesRules {
|
|
|
id, _ := strconv.Atoi(v.MoneyIncentivesRuleId)
|
|
|
r := allied_creation_cooperation.MoneyIncentivesRule{
|
|
|
MoneyIncentivesRuleId: 0,
|
|
|
MoneyIncentivesRuleId: id,
|
|
|
CooperationContractNumber: v.CooperationContractNumber,
|
|
|
MoneyIncentivesAmount: v.MoneyIncentivesAmount,
|
|
|
MoneyIncentivesStage: v.MoneyIncentivesStage,
|
...
|
...
|
|