作者 tangxuhui

数据结构调整

@@ -29,37 +29,26 @@ type CreateCooperationContractCommand struct { @@ -29,37 +29,26 @@ type CreateCooperationContractCommand struct {
29 } `json:"cooperationContract"` 29 } `json:"cooperationContract"`
30 // 业绩分红激励规则列表 30 // 业绩分红激励规则列表
31 DividendsIncentivesRules []struct { 31 DividendsIncentivesRules []struct {
32 - // 关联的项目合约编号  
33 - CooperationContractNumber string `json:"cooperationContractNumber"`  
34 - // 推荐人抽成比例  
35 - ReferrerPercentage float64 `json:"referrerPercentage"`  
36 - // 业务员抽成比例  
37 - SalesmanPercentage float64 `json:"salesmanPercentage"`  
38 - // 分红规则激励百分点  
39 - DividendsPercentage float64 `json:"dividendsPercentage"`  
40 - // 分红规则激励阶段,  
41 - DividendsStage int `json:"dividendsStage"`  
42 - // 分红规则激励阶段结束  
43 - DividendsStageEnd int `json:"dividendsStageEnd"`  
44 - // 分红规则激励阶段开始  
45 - DividendsStageStart int `json:"dividendsStageStart"`  
46 - } `json:"dividendsIncentivesRules"`  
47 - // 金额激励规则列表 32 + CooperationContractNumber string `json:"cooperationContractNumber"` // 关联的项目合约编号
  33 + ReferrerPercentage float64 `json:"referrerPercentage"` // 推荐人抽成比例
  34 + SalesmanPercentage float64 `json:"salesmanPercentage"` // 业务员抽成比例
  35 + DividendsPercentage float64 `json:"dividendsPercentage"` // 分红规则激励百分点
  36 + DividendsStage int `json:"dividendsStage"` // 分红规则激励阶段,
  37 + DividendsStageEnd int `json:"dividendsStageEnd"` // 分红规则激励阶段结束
  38 + DividendsStageStart int `json:"dividendsStageStart"` // 分红规则激励阶段开始
  39 + Remarks string `json:"remarks"`
  40 + } `json:"dividendsIncentivesRules"` // 金额激励规则列表
  41 +
48 MoneyIncentivesRules []struct { 42 MoneyIncentivesRules []struct {
49 // 金额激励规则ID 43 // 金额激励规则ID
50 // MoneyIncentivesRuleId int64 `json:"moneyIncentivesRuleId,string,"` 44 // MoneyIncentivesRuleId int64 `json:"moneyIncentivesRuleId,string,"`
51 - // 关联的共创合约编号  
52 - CooperationContractNumber string `json:"cooperationContractNumber"`  
53 - // 激励金额  
54 - MoneyIncentivesAmount float64 `json:"moneyIncentivesAmount"`  
55 - // 金额激励阶段  
56 - MoneyIncentivesStage int `json:"moneyIncentivesStage"`  
57 - // 金额激励规则时间  
58 - MoneyIncentivesTime int `json:"moneyIncentivesTime"`  
59 - // 推荐人抽成比例  
60 - ReferrerPercentage float64 `json:"referrerPercentage"`  
61 - // 业务员抽成比例  
62 - SalesmanPercentage float64 `json:"salesmanPercentage"` 45 + CooperationContractNumber string `json:"cooperationContractNumber"` // 关联的共创合约编号
  46 + MoneyIncentivesAmount float64 `json:"moneyIncentivesAmount"` // 激励金额
  47 + MoneyIncentivesStage int `json:"moneyIncentivesStage"` // 金额激励阶段
  48 + MoneyIncentivesTime int `json:"moneyIncentivesTime"` // 金额激励规则时间
  49 + ReferrerPercentage float64 `json:"referrerPercentage"` // 推荐人抽成比例
  50 + SalesmanPercentage float64 `json:"salesmanPercentage"` // 业务员抽成比例
  51 + Remarks string `json:"remarks"`
63 } `json:"moneyIncentivesRules"` 52 } `json:"moneyIncentivesRules"`
64 // 承接方列表 53 // 承接方列表
65 Undertakers []struct { 54 Undertakers []struct {
@@ -45,7 +45,8 @@ type UpdateCooperationContractCommand struct { @@ -45,7 +45,8 @@ type UpdateCooperationContractCommand struct {
45 // 分红规则激励阶段结束 45 // 分红规则激励阶段结束
46 DividendsStageEnd int `json:"dividendsStageEnd"` 46 DividendsStageEnd int `json:"dividendsStageEnd"`
47 // 分红规则激励阶段开始 47 // 分红规则激励阶段开始
48 - DividendsStageStart int `json:"dividendsStageStart"` 48 + DividendsStageStart int `json:"dividendsStageStart"`
  49 + Remarks string `json:"remarks"`
49 } `json:"dividendsIncentivesRules"` 50 } `json:"dividendsIncentivesRules"`
50 // 金额激励规则列表 51 // 金额激励规则列表
51 MoneyIncentivesRules []struct { 52 MoneyIncentivesRules []struct {
@@ -63,6 +64,7 @@ type UpdateCooperationContractCommand struct { @@ -63,6 +64,7 @@ type UpdateCooperationContractCommand struct {
63 ReferrerPercentage float64 `json:"referrerPercentage"` 64 ReferrerPercentage float64 `json:"referrerPercentage"`
64 // 业务员抽成比例 65 // 业务员抽成比例
65 SalesmanPercentage float64 `json:"salesmanPercentage"` 66 SalesmanPercentage float64 `json:"salesmanPercentage"`
  67 + Remarks string `json:"remarks"`
66 } `json:"moneyIncentivesRules"` 68 } `json:"moneyIncentivesRules"`
67 // 承接方列表 69 // 承接方列表
68 Undertakers []struct { 70 Undertakers []struct {
@@ -65,6 +65,7 @@ type MoneyIncentivesRule struct { @@ -65,6 +65,7 @@ type MoneyIncentivesRule struct {
65 MoneyIncentivesTime int64 `json:"moneyIncentivesTime"` // 金额激励规则时间 65 MoneyIncentivesTime int64 `json:"moneyIncentivesTime"` // 金额激励规则时间
66 ReferrerPercentage float64 `json:"referrerPercentage"` // 推荐人抽成比例 66 ReferrerPercentage float64 `json:"referrerPercentage"` // 推荐人抽成比例
67 SalesmanPercentage float64 `json:"salesmanPercentage"` // 业务员抽成比例 67 SalesmanPercentage float64 `json:"salesmanPercentage"` // 业务员抽成比例
  68 + Remarks string `json:"remarks"`
68 } 69 }
69 70
70 type DividendsIncentivesRule struct { 71 type DividendsIncentivesRule struct {
@@ -76,6 +77,7 @@ type DividendsIncentivesRule struct { @@ -76,6 +77,7 @@ type DividendsIncentivesRule struct {
76 DividendsStage int `json:"dividendsStage"` // 分红规则激励阶段, 77 DividendsStage int `json:"dividendsStage"` // 分红规则激励阶段,
77 DividendsStageEnd int64 `json:"dividendsStageEnd"` // 分红规则激励阶段结束 78 DividendsStageEnd int64 `json:"dividendsStageEnd"` // 分红规则激励阶段结束
78 DividendsStageStart int64 `json:"dividendsStageStart"` // 分红规则激励阶段开始 79 DividendsStageStart int64 `json:"dividendsStageStart"` // 分红规则激励阶段开始
  80 + Remarks string `json:"remarks"`
79 } 81 }
80 82
81 type Relevant struct { 83 type Relevant struct {
@@ -142,6 +144,7 @@ func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationCon @@ -142,6 +144,7 @@ func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationCon
142 DividendsStage: v.DividendsIncentivesStage, 144 DividendsStage: v.DividendsIncentivesStage,
143 DividendsStageEnd: v.DividendsIncentivesStageEnd.UnixNano() / 1e6, 145 DividendsStageEnd: v.DividendsIncentivesStageEnd.UnixNano() / 1e6,
144 DividendsStageStart: v.DividendsIncentivesStageStart.UnixNano() / 1e6, 146 DividendsStageStart: v.DividendsIncentivesStageStart.UnixNano() / 1e6,
  147 + Remarks: v.Remarks,
145 } 148 }
146 dividendsIncentivesRules = append(dividendsIncentivesRules, r) 149 dividendsIncentivesRules = append(dividendsIncentivesRules, r)
147 } 150 }
@@ -155,6 +158,7 @@ func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationCon @@ -155,6 +158,7 @@ func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationCon
155 MoneyIncentivesTime: v.MoneyIncentivesTime.UnixNano() / 1e6, 158 MoneyIncentivesTime: v.MoneyIncentivesTime.UnixNano() / 1e6,
156 ReferrerPercentage: v.ReferrerPercentage, 159 ReferrerPercentage: v.ReferrerPercentage,
157 SalesmanPercentage: v.SalesmanPercentage, 160 SalesmanPercentage: v.SalesmanPercentage,
  161 + Remarks: v.Remarks,
158 } 162 }
159 moneyIncentivesRules = append(moneyIncentivesRules, r) 163 moneyIncentivesRules = append(moneyIncentivesRules, r)
160 } 164 }
@@ -30,6 +30,7 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC @@ -30,6 +30,7 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC
30 DividendsIncentivesStage: v.DividendsStage, 30 DividendsIncentivesStage: v.DividendsStage,
31 DividendsIncentivesStageEnd: time.Unix(int64(v.DividendsStageEnd/1e3), 0), 31 DividendsIncentivesStageEnd: time.Unix(int64(v.DividendsStageEnd/1e3), 0),
32 DividendsIncentivesStageStart: time.Unix(int64(v.DividendsStageStart/1e3), 0), 32 DividendsIncentivesStageStart: time.Unix(int64(v.DividendsStageStart/1e3), 0),
  33 + Remarks: v.Remarks,
33 } 34 }
34 rules1 = append(rules1, r) 35 rules1 = append(rules1, r)
35 } 36 }
@@ -43,6 +44,7 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC @@ -43,6 +44,7 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC
43 MoneyIncentivesTime: time.Unix(int64(v.MoneyIncentivesTime/1e3), 0), 44 MoneyIncentivesTime: time.Unix(int64(v.MoneyIncentivesTime/1e3), 0),
44 ReferrerPercentage: v.ReferrerPercentage, 45 ReferrerPercentage: v.ReferrerPercentage,
45 SalesmanPercentage: v.SalesmanPercentage, 46 SalesmanPercentage: v.SalesmanPercentage,
  47 + Remarks: v.Remarks,
46 } 48 }
47 rules2 = append(rules2, r) 49 rules2 = append(rules2, r)
48 } 50 }
@@ -19,7 +19,7 @@ type CreateDividendsReturnedOrderCommand struct { @@ -19,7 +19,7 @@ type CreateDividendsReturnedOrderCommand struct {
19 OrderGoodQuantity int `json:"orderGoodQuantity"` //订单产品数量 19 OrderGoodQuantity int `json:"orderGoodQuantity"` //订单产品数量
20 } `json:"orderGoods"` //货品 20 } `json:"orderGoods"` //货品
21 DividendsReturnedDate int64 `json:"dividendsReturnedDate"` //退货日期 21 DividendsReturnedDate int64 `json:"dividendsReturnedDate"` //退货日期
22 - OrderDate int64 `json:"orderDate"` //订单日期 22 + OrderTime int64 `json:"orderTime"` //订单日期
23 Remarks string `json:"remarks"` // 23 Remarks string `json:"remarks"` //
24 RegionName string `json:"regionName"` 24 RegionName string `json:"regionName"`
25 } 25 }
@@ -20,7 +20,7 @@ type UpdateDividendsReturnedOrderCommand struct { @@ -20,7 +20,7 @@ type UpdateDividendsReturnedOrderCommand struct {
20 OrderGoodQuantity int `json:"orderGoodQuantity"` //订单产品数量 20 OrderGoodQuantity int `json:"orderGoodQuantity"` //订单产品数量
21 } `json:"orderGoods"` //货品 21 } `json:"orderGoods"` //货品
22 DividendsReturnedDate int64 `json:"dividendsReturnedDate"` //退货日期 22 DividendsReturnedDate int64 `json:"dividendsReturnedDate"` //退货日期
23 - OrderDate int64 `json:"orderDate"` //订单日期 23 + OrderTime int64 `json:"orderTime"` //订单日期
24 24
25 Remarks string `json:"remarks"` // 25 Remarks string `json:"remarks"` //
26 RegionName string `json:"regionName"` 26 RegionName string `json:"regionName"`
@@ -19,7 +19,7 @@ type DividendsReturnedOrderService struct { @@ -19,7 +19,7 @@ type DividendsReturnedOrderService struct {
19 func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDividendsReturnedOrder(createDividendsReturnedOrderCommand *command.CreateDividendsReturnedOrderCommand) (interface{}, error) { 19 func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDividendsReturnedOrder(createDividendsReturnedOrderCommand *command.CreateDividendsReturnedOrderCommand) (interface{}, error) {
20 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createDividendsReturnedOrderCommand.Operator) 20 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createDividendsReturnedOrderCommand.Operator)
21 dividendsReturnedDate := time.Unix(createDividendsReturnedOrderCommand.DividendsReturnedDate/1e3, 0) 21 dividendsReturnedDate := time.Unix(createDividendsReturnedOrderCommand.DividendsReturnedDate/1e3, 0)
22 - orderDate := time.Unix(createDividendsReturnedOrderCommand.OrderDate/1e3, 0) 22 + orderDate := time.Unix(createDividendsReturnedOrderCommand.OrderTime/1e3, 0)
23 var orderGooods []allied_creation_cooperation.ReqDividendsReturnedOrderGood 23 var orderGooods []allied_creation_cooperation.ReqDividendsReturnedOrderGood
24 for _, v := range createDividendsReturnedOrderCommand.OrderGoods { 24 for _, v := range createDividendsReturnedOrderCommand.OrderGoods {
25 good := allied_creation_cooperation.ReqDividendsReturnedOrderGood{ 25 good := allied_creation_cooperation.ReqDividendsReturnedOrderGood{
@@ -38,7 +38,7 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDivide @@ -38,7 +38,7 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDivide
38 OriginalOrderNum: createDividendsReturnedOrderCommand.OriginalOrderNum, 38 OriginalOrderNum: createDividendsReturnedOrderCommand.OriginalOrderNum,
39 OrderGoods: orderGooods, 39 OrderGoods: orderGooods,
40 DividendsReturnedDate: dividendsReturnedDate, 40 DividendsReturnedDate: dividendsReturnedDate,
41 - OrderData: orderDate, 41 + OrderTime: orderDate,
42 OrgId: int(createDividendsReturnedOrderCommand.Operator.OrgId), 42 OrgId: int(createDividendsReturnedOrderCommand.Operator.OrgId),
43 Remarks: createDividendsReturnedOrderCommand.Remarks, 43 Remarks: createDividendsReturnedOrderCommand.Remarks,
44 RegionName: createDividendsReturnedOrderCommand.RegionName, 44 RegionName: createDividendsReturnedOrderCommand.RegionName,
@@ -97,7 +97,7 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) SearchDivide @@ -97,7 +97,7 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) SearchDivide
97 func (dividendsReturnedOrderService *DividendsReturnedOrderService) UpdateDividendsReturnedOrder(updateDividendsReturnedOrderCommand *command.UpdateDividendsReturnedOrderCommand) (interface{}, error) { 97 func (dividendsReturnedOrderService *DividendsReturnedOrderService) UpdateDividendsReturnedOrder(updateDividendsReturnedOrderCommand *command.UpdateDividendsReturnedOrderCommand) (interface{}, error) {
98 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateDividendsReturnedOrderCommand.Operator) 98 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateDividendsReturnedOrderCommand.Operator)
99 dividendsReturnedDate := time.Unix(updateDividendsReturnedOrderCommand.DividendsReturnedDate/1e3, 0) 99 dividendsReturnedDate := time.Unix(updateDividendsReturnedOrderCommand.DividendsReturnedDate/1e3, 0)
100 - orderDate := time.Unix(updateDividendsReturnedOrderCommand.OrderDate/1e3, 0) 100 + orderDate := time.Unix(updateDividendsReturnedOrderCommand.OrderTime/1e3, 0)
101 var orderGooods []allied_creation_cooperation.ReqDividendsReturnedOrderGood 101 var orderGooods []allied_creation_cooperation.ReqDividendsReturnedOrderGood
102 for _, v := range updateDividendsReturnedOrderCommand.OrderGoods { 102 for _, v := range updateDividendsReturnedOrderCommand.OrderGoods {
103 good := allied_creation_cooperation.ReqDividendsReturnedOrderGood{ 103 good := allied_creation_cooperation.ReqDividendsReturnedOrderGood{
@@ -117,7 +117,7 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) UpdateDivide @@ -117,7 +117,7 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) UpdateDivide
117 OriginalOrderNum: updateDividendsReturnedOrderCommand.OriginalOrderNum, 117 OriginalOrderNum: updateDividendsReturnedOrderCommand.OriginalOrderNum,
118 OrderGoods: orderGooods, 118 OrderGoods: orderGooods,
119 DividendsReturnedDate: dividendsReturnedDate, 119 DividendsReturnedDate: dividendsReturnedDate,
120 - OrderData: orderDate, 120 + OrderTime: orderDate,
121 OrgId: int(updateDividendsReturnedOrderCommand.Operator.OrgId), 121 OrgId: int(updateDividendsReturnedOrderCommand.Operator.OrgId),
122 Remarks: updateDividendsReturnedOrderCommand.Remarks, 122 Remarks: updateDividendsReturnedOrderCommand.Remarks,
123 RegionName: updateDividendsReturnedOrderCommand.RegionName, 123 RegionName: updateDividendsReturnedOrderCommand.RegionName,
@@ -138,6 +138,7 @@ type ( @@ -138,6 +138,7 @@ type (
138 DividendsIncentivesStage int `json:"dividendsIncentivesStage"` // 分红规则激励阶段, 138 DividendsIncentivesStage int `json:"dividendsIncentivesStage"` // 分红规则激励阶段,
139 DividendsIncentivesStageEnd time.Time `json:"dividendsIncentivesStageEnd"` // 分红规则激励阶段结束 139 DividendsIncentivesStageEnd time.Time `json:"dividendsIncentivesStageEnd"` // 分红规则激励阶段结束
140 DividendsIncentivesStageStart time.Time `json:"dividendsIncentivesStageStart"` // 分红规则激励阶段开始 140 DividendsIncentivesStageStart time.Time `json:"dividendsIncentivesStageStart"` // 分红规则激励阶段开始
  141 + Remarks string `json:"remarks"`
141 } 142 }
142 //金额激励规则 143 //金额激励规则
143 MoneyIncentivesRule struct { 144 MoneyIncentivesRule struct {
@@ -148,6 +149,7 @@ type ( @@ -148,6 +149,7 @@ type (
148 MoneyIncentivesTime time.Time `json:"moneyIncentivesTime"` // 金额激励规则时间 149 MoneyIncentivesTime time.Time `json:"moneyIncentivesTime"` // 金额激励规则时间
149 ReferrerPercentage float64 `json:"referrerPercentage"` // 推荐人抽成比例 150 ReferrerPercentage float64 `json:"referrerPercentage"` // 推荐人抽成比例
150 SalesmanPercentage float64 `json:"salesmanPercentage"` // 业务员抽成比例 151 SalesmanPercentage float64 `json:"salesmanPercentage"` // 业务员抽成比例
  152 + Remarks string `json:"remarks"`
151 } 153 }
152 154
153 //合约承接方 155 //合约承接方
@@ -62,7 +62,7 @@ type ( @@ -62,7 +62,7 @@ type (
62 OriginalOrderNum string `json:"originalOrderNum"` 62 OriginalOrderNum string `json:"originalOrderNum"`
63 OrderGoods []ReqDividendsReturnedOrderGood `json:"orderGoods"` 63 OrderGoods []ReqDividendsReturnedOrderGood `json:"orderGoods"`
64 DividendsReturnedDate time.Time `json:"dividendsReturnedDate"` 64 DividendsReturnedDate time.Time `json:"dividendsReturnedDate"`
65 - OrderData time.Time `json:"orderData"` 65 + OrderTime time.Time `json:"orderTime"`
66 OrgId int `json:"orgId"` 66 OrgId int `json:"orgId"`
67 Remarks string `json:"remarks"` 67 Remarks string `json:"remarks"`
68 RegionName string `json:"regionName"` 68 RegionName string `json:"regionName"`
@@ -82,7 +82,7 @@ type ( @@ -82,7 +82,7 @@ type (
82 OriginalOrderNum string `json:"originalOrderNum"` 82 OriginalOrderNum string `json:"originalOrderNum"`
83 OrderGoods []ReqDividendsReturnedOrderGood `json:"orderGoods"` 83 OrderGoods []ReqDividendsReturnedOrderGood `json:"orderGoods"`
84 DividendsReturnedDate time.Time `json:"dividendsReturnedDate"` 84 DividendsReturnedDate time.Time `json:"dividendsReturnedDate"`
85 - OrderData time.Time `json:"orderData"` 85 + OrderTime time.Time `json:"orderTime"`
86 OrgId int `json:"orgId"` 86 OrgId int `json:"orgId"`
87 Remarks string `json:"remarks"` 87 Remarks string `json:"remarks"`
88 RegionName string `json:"regionName"` 88 RegionName string `json:"regionName"`