作者 tangxuhui

更新

... ... @@ -25,7 +25,7 @@ type CreateCooperationContractCommand struct {
// 共创模式编码,
CooperationModeNumber string `json:"cooperationModeNumber"`
// 共创合约发起人uid
SponsorUid string `json:"sponsorUid"`
SponsorUserId string `json:"sponsorUserId"`
} `json:"cooperationContract"`
// 业绩分红激励规则列表
DividendsIncentivesRules []struct {
... ...
... ... @@ -27,7 +27,7 @@ type UpdateCooperationContractCommand struct {
// 共创模式编码,
CooperationModeNumber string `json:"cooperationModeNumber"`
// 共创合约发起人uid
SponsorUid string `json:"sponsorUid"`
SponsorUserId string `json:"sponsorUserId"`
} `json:"cooperationContract"`
// 业绩分红激励规则列表
DividendsIncentivesRules []struct {
... ... @@ -38,13 +38,13 @@ type UpdateCooperationContractCommand struct {
// 业务员抽成比例
SalesmanPercentage float64 `json:"salesmanPercentage"`
// 分红规则激励百分点
DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"`
DividendsPercentage float64 `json:"dividendsPercentage"`
// 分红规则激励阶段,
DividendsIncentivesStage int `json:"dividendsIncentivesStage,string,"`
DividendsStage int `json:"dividendsStage"`
// 分红规则激励阶段结束
DividendsIncentivesStageEnd int `json:"dividendsIncentivesStageEnd"`
DividendsStageEnd int `json:"dividendsStageEnd"`
// 分红规则激励阶段开始
DividendsIncentivesStageStart int `json:"dividendsIncentivesStageStart"`
DividendsStageStart int `json:"dividendsStageStart"`
} `json:"dividendsIncentivesRules"`
// 金额激励规则列表
MoneyIncentivesRules []struct {
... ...
... ... @@ -67,7 +67,7 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC
CooperationContractUndertakerType: createCooperationContractCommand.CooperationContract.CooperationContractUndertakerType,
CooperationContractName: createCooperationContractCommand.CooperationContract.CooperationContractName,
CooperationModeNumber: createCooperationContractCommand.CooperationContract.CooperationModeNumber,
SponsorUid: createCooperationContractCommand.CooperationContract.SponsorUid,
SponsorUid: createCooperationContractCommand.CooperationContract.SponsorUserId,
CompanyId: int(createCooperationContractCommand.Operator.CompanyId),
UserId: int(createCooperationContractCommand.Operator.UserId),
UserBaseId: int(createCooperationContractCommand.Operator.UserBaseId),
... ... @@ -141,10 +141,10 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC
CooperationContractNumber: v.CooperationContractNumber,
ReferrerPercentage: v.ReferrerPercentage,
SalesmanPercentage: v.SalesmanPercentage,
DividendsIncentivesPercentage: v.DividendsIncentivesPercentage,
DividendsIncentivesStage: v.DividendsIncentivesStage,
DividendsIncentivesStageEnd: time.Unix(int64(v.DividendsIncentivesStageEnd/1e3), 0),
DividendsIncentivesStageStart: time.Unix(int64(v.DividendsIncentivesStageStart/1e3), 0),
DividendsIncentivesPercentage: v.DividendsPercentage,
DividendsIncentivesStage: v.DividendsStage,
DividendsIncentivesStageEnd: time.Unix(int64(v.DividendsStageEnd/1e3), 0),
DividendsIncentivesStageStart: time.Unix(int64(v.DividendsStageStart/1e3), 0),
}
rules1 = append(rules1, r)
}
... ... @@ -184,7 +184,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC
CooperationContractUndertakerType: updateCooperationContractCommand.CooperationContract.CooperationContractUndertakerType,
CooperationContractName: updateCooperationContractCommand.CooperationContract.CooperationContractName,
CooperationModeNumber: updateCooperationContractCommand.CooperationContract.CooperationModeNumber,
SponsorUid: updateCooperationContractCommand.CooperationContract.SponsorUid,
SponsorUid: updateCooperationContractCommand.CooperationContract.SponsorUserId,
CompanyId: int(updateCooperationContractCommand.Operator.CompanyId),
UserId: int(updateCooperationContractCommand.Operator.UserId),
UserBaseId: int(updateCooperationContractCommand.Operator.UserBaseId),
... ...