作者 tangxuhui

数据结构更新

... ... @@ -36,13 +36,13 @@ type CreateCooperationContractCommand struct {
// 业务员抽成比例
SalesmanPercentage float64 `json:"salesmanPercentage"`
// 分红规则激励百分点
DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"`
DividendsPercentage float64 `json:"dividendsPercentage"`
// 分红规则激励阶段,
DividendsIncentivesStage int `json:"dividendsIncentivesStage,string,"`
DividendsStage int `json:"dividendsStage,string,"`
// 分红规则激励阶段结束
DividendsIncentivesStageEnd int `json:"dividendsIncentivesStageEnd"`
DividendsStageEnd int `json:"dividendsStageEnd"`
// 分红规则激励阶段开始
DividendsIncentivesStageStart int `json:"dividendsIncentivesStageStart"`
DividendsStageStart int `json:"dividendsStageStart"`
} `json:"dividendsIncentivesRules"`
// 金额激励规则列表
MoneyIncentivesRules []struct {
... ...
... ... @@ -31,6 +31,7 @@ type UpdateCooperationContractCommand struct {
} `json:"cooperationContract"`
// 业绩分红激励规则列表
DividendsIncentivesRules []struct {
DividendsIncentivesRuleId string `json:"dividendsIncentivesRuleId"`
// 关联的项目合约编号
CooperationContractNumber string `json:"cooperationContractNumber"`
// 推荐人抽成比例
... ...
... ... @@ -57,7 +57,7 @@ func ToCooperationContractItem(param *allied_creation_cooperation.CooperationCon
}
type MoneyIncentivesRule struct {
MoneyIncentivesRuleId int `json:"moneyIncentivesRuleId"`
MoneyIncentivesRuleId int `json:"moneyIncentivesRuleId,string"`
CooperationContractNumber string `json:"cooperationContractNumber"` // 关联的共创合约编号
MoneyIncentivesAmount float64 `json:"moneyIncentivesAmount"` // 激励金额
MoneyIncentivesStage int `json:"moneyIncentivesStage"` // 金额激励阶段
... ... @@ -67,14 +67,14 @@ type MoneyIncentivesRule struct {
}
type DividendsIncentivesRule struct {
DividendsIncentivesRuleId int `json:"dividendsIncentivesRuleId"`
DividendsIncentivesRuleId int `json:"dividendsIncentivesRuleId,string"`
CooperationContractNumber string `json:"cooperationContractNumber"` // 关联的项目合约编号
ReferrerPercentage float64 `json:"referrerPercentage"` // 推荐人抽成比例
SalesmanPercentage float64 `json:"salesmanPercentage"` // 业务员抽成比例
DividendsIncentivesPercentage float64 `json:"dividendsIncentivesPercentage"` // 分红规则激励百分点
DividendsIncentivesStage int `json:"dividendsIncentivesStage,string"` // 分红规则激励阶段,
DividendsIncentivesStageEnd int64 `json:"dividendsIncentivesStageEnd"` // 分红规则激励阶段结束
DividendsIncentivesStageStart int64 `json:"dividendsIncentivesStageStart"` // 分红规则激励阶段开始
DividendsPercentage float64 `json:"dividendsPercentage"` // 分红规则激励百分点
DividendsStage int `json:"dividendsStage,string"` // 分红规则激励阶段,
DividendsStageEnd int64 `json:"dividendsStageEnd"` // 分红规则激励阶段结束
DividendsStageStart int64 `json:"dividendsStageStart"` // 分红规则激励阶段开始
}
type Relevant struct {
... ... @@ -130,10 +130,10 @@ func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationCon
CooperationContractNumber: v.CooperationContractNumber,
ReferrerPercentage: v.ReferrerPercentage,
SalesmanPercentage: v.SalesmanPercentage,
DividendsIncentivesPercentage: v.DividendsIncentivesPercentage,
DividendsIncentivesStage: v.DividendsIncentivesStage,
DividendsIncentivesStageEnd: v.DividendsIncentivesStageEnd.UnixNano() / 1e6,
DividendsIncentivesStageStart: v.DividendsIncentivesStageStart.UnixNano() / 1e6,
DividendsPercentage: v.DividendsIncentivesPercentage,
DividendsStage: v.DividendsIncentivesStage,
DividendsStageEnd: v.DividendsIncentivesStageEnd.UnixNano() / 1e6,
DividendsStageStart: v.DividendsIncentivesStageStart.UnixNano() / 1e6,
}
dividendsIncentivesRules = append(dividendsIncentivesRules, r)
}
... ...
... ... @@ -26,10 +26,10 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC
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)
}
... ...