作者 tangxuhui

Merge branch 'dev' into test

@@ -20,6 +20,8 @@ func (srv ContractChangeLogService) ContractChangeLogSearch(queryParam *query.Li @@ -20,6 +20,8 @@ func (srv ContractChangeLogService) ContractChangeLogSearch(queryParam *query.Li
20 PageSize: queryParam.PageSize, 20 PageSize: queryParam.PageSize,
21 CooperationContractNumber: queryParam.CooperationContractNumber, 21 CooperationContractNumber: queryParam.CooperationContractNumber,
22 OperationType: queryParam.OperationType, 22 OperationType: queryParam.OperationType,
  23 + OrgIds: queryParam.Operator.OrgIds,
  24 + CompanyId: int(queryParam.Operator.CompanyId),
23 }) 25 })
24 listData := dto.ToContractChangeLogList(result) 26 listData := dto.ToContractChangeLogList(result)
25 return result.Grid.Total, listData, err 27 return result.Grid.Total, listData, err
@@ -48,7 +48,7 @@ type UpdateCooperationContractCommand struct { @@ -48,7 +48,7 @@ type UpdateCooperationContractCommand struct {
48 // 金额激励规则列表 48 // 金额激励规则列表
49 MoneyIncentivesRules []struct { 49 MoneyIncentivesRules []struct {
50 // 金额激励规则ID 50 // 金额激励规则ID
51 - MoneyIncentivesRuleId int64 `json:"moneyIncentivesRuleId,string,"` 51 + MoneyIncentivesRuleId string `json:"moneyIncentivesRuleId"`
52 // 关联的共创合约编号 52 // 关联的共创合约编号
53 CooperationContractNumber string `json:"cooperationContractNumber"` 53 CooperationContractNumber string `json:"cooperationContractNumber"`
54 // 激励金额 54 // 激励金额
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,