作者 yangfu
@@ -63,10 +63,10 @@ type CreateCooperationContractCommand struct { @@ -63,10 +63,10 @@ type CreateCooperationContractCommand struct {
63 } `json:"moneyIncentivesRules"` 63 } `json:"moneyIncentivesRules"`
64 // 承接方列表 64 // 承接方列表
65 Undertakers []struct { 65 Undertakers []struct {
66 - UndertakerId string `json:"undertakerId"` //承接人用户id  
67 - RerferrerId string `json:"rerferrerId"` //推荐人用户id  
68 - SalesmanId string `json:"salesmanId"` //关联业务员id  
69 - Attachment domain.Attachment `json:"attachment"` 66 + UndertakerId string `json:"undertakerId"` //承接人用户id
  67 + RerferrerId string `json:"rerferrerId"` //推荐人用户id
  68 + SalesmanId string `json:"salesmanId"` //关联业务员id
  69 + Attachment []domain.Attachment `json:"attachment"`
70 } `json:"undertakers"` 70 } `json:"undertakers"`
71 //关联业务员 71 //关联业务员
72 RelevantIds []string `json:"relevantIds"` 72 RelevantIds []string `json:"relevantIds"`
@@ -65,10 +65,10 @@ type UpdateCooperationContractCommand struct { @@ -65,10 +65,10 @@ type UpdateCooperationContractCommand struct {
65 } `json:"moneyIncentivesRules"` 65 } `json:"moneyIncentivesRules"`
66 // 承接方列表 66 // 承接方列表
67 Undertakers []struct { 67 Undertakers []struct {
68 - UndertakerId string `json:"undertakerId"` //承接人用户id  
69 - RerferrerId string `json:"rerferrerId"` //推荐人用户id  
70 - SalesmanId string `json:"salesmanId"` //关联业务员id  
71 - Attachment domain.Attachment `json:"attachment"` 68 + UndertakerId string `json:"undertakerId"` //承接人用户id
  69 + RerferrerId string `json:"rerferrerId"` //推荐人用户id
  70 + SalesmanId string `json:"salesmanId"` //关联业务员id
  71 + Attachment []domain.Attachment `json:"attachment"`
72 } `json:"undertakers"` 72 } `json:"undertakers"`
73 //关联业务员 73 //关联业务员
74 RelevantIds []string `json:"relevantIds"` 74 RelevantIds []string `json:"relevantIds"`
@@ -28,8 +28,8 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC @@ -28,8 +28,8 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC
28 SalesmanPercentage: v.SalesmanPercentage, 28 SalesmanPercentage: v.SalesmanPercentage,
29 DividendsIncentivesPercentage: v.DividendsIncentivesPercentage, 29 DividendsIncentivesPercentage: v.DividendsIncentivesPercentage,
30 DividendsIncentivesStage: v.DividendsIncentivesStage, 30 DividendsIncentivesStage: v.DividendsIncentivesStage,
31 - DividendsIncentivesStageEnd: time.Unix(int64(v.DividendsIncentivesStageEnd), 0),  
32 - DividendsIncentivesStageStart: time.Unix(int64(v.DividendsIncentivesStageStart), 0), 31 + DividendsIncentivesStageEnd: time.Unix(int64(v.DividendsIncentivesStageEnd/1e3), 0),
  32 + DividendsIncentivesStageStart: time.Unix(int64(v.DividendsIncentivesStageStart/1e3), 0),
33 } 33 }
34 rules1 = append(rules1, r) 34 rules1 = append(rules1, r)
35 } 35 }
@@ -40,7 +40,7 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC @@ -40,7 +40,7 @@ func (cooperationContractService *CooperationContractService) CreateCooperationC
40 CooperationContractNumber: v.CooperationContractNumber, 40 CooperationContractNumber: v.CooperationContractNumber,
41 MoneyIncentivesAmount: v.MoneyIncentivesAmount, 41 MoneyIncentivesAmount: v.MoneyIncentivesAmount,
42 MoneyIncentivesStage: v.MoneyIncentivesStage, 42 MoneyIncentivesStage: v.MoneyIncentivesStage,
43 - MoneyIncentivesTime: time.Unix(int64(v.MoneyIncentivesTime), 0), 43 + MoneyIncentivesTime: time.Unix(int64(v.MoneyIncentivesTime/1e3), 0),
44 ReferrerPercentage: v.ReferrerPercentage, 44 ReferrerPercentage: v.ReferrerPercentage,
45 SalesmanPercentage: v.SalesmanPercentage, 45 SalesmanPercentage: v.SalesmanPercentage,
46 } 46 }
@@ -143,8 +143,8 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC @@ -143,8 +143,8 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC
143 SalesmanPercentage: v.SalesmanPercentage, 143 SalesmanPercentage: v.SalesmanPercentage,
144 DividendsIncentivesPercentage: v.DividendsIncentivesPercentage, 144 DividendsIncentivesPercentage: v.DividendsIncentivesPercentage,
145 DividendsIncentivesStage: v.DividendsIncentivesStage, 145 DividendsIncentivesStage: v.DividendsIncentivesStage,
146 - DividendsIncentivesStageEnd: time.Unix(int64(v.DividendsIncentivesStageEnd), 0),  
147 - DividendsIncentivesStageStart: time.Unix(int64(v.DividendsIncentivesStageStart), 0), 146 + DividendsIncentivesStageEnd: time.Unix(int64(v.DividendsIncentivesStageEnd/1e3), 0),
  147 + DividendsIncentivesStageStart: time.Unix(int64(v.DividendsIncentivesStageStart/1e3), 0),
148 } 148 }
149 rules1 = append(rules1, r) 149 rules1 = append(rules1, r)
150 } 150 }
@@ -155,7 +155,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC @@ -155,7 +155,7 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC
155 CooperationContractNumber: v.CooperationContractNumber, 155 CooperationContractNumber: v.CooperationContractNumber,
156 MoneyIncentivesAmount: v.MoneyIncentivesAmount, 156 MoneyIncentivesAmount: v.MoneyIncentivesAmount,
157 MoneyIncentivesStage: v.MoneyIncentivesStage, 157 MoneyIncentivesStage: v.MoneyIncentivesStage,
158 - MoneyIncentivesTime: time.Unix(int64(v.MoneyIncentivesTime), 0), 158 + MoneyIncentivesTime: time.Unix(int64(v.MoneyIncentivesTime/1e3), 0),
159 ReferrerPercentage: v.ReferrerPercentage, 159 ReferrerPercentage: v.ReferrerPercentage,
160 SalesmanPercentage: v.SalesmanPercentage, 160 SalesmanPercentage: v.SalesmanPercentage,
161 } 161 }
@@ -26,8 +26,8 @@ type DividendsOrder struct { @@ -26,8 +26,8 @@ type DividendsOrder struct {
26 RegionName string `json:"regionName"` 26 RegionName string `json:"regionName"`
27 RegionNumber string `json:"regionNumber"` 27 RegionNumber string `json:"regionNumber"`
28 } `json:"region"` 28 } `json:"region"`
29 - Remarks string `json:"remarks"`  
30 - Goods []allied_creation_cooperation.DividendsOrderGoods 29 + Remarks string `json:"remarks"`
  30 + Goods []allied_creation_cooperation.DividendsOrderGoods `json:"goods"`
31 } 31 }
32 32
33 func ToDividendsOrder(param *allied_creation_cooperation.DividendsOrder) *DividendsOrder { 33 func ToDividendsOrder(param *allied_creation_cooperation.DividendsOrder) *DividendsOrder {
@@ -142,10 +142,10 @@ type ( @@ -142,10 +142,10 @@ type (
142 142
143 //合约承接方 143 //合约承接方
144 Undertaker struct { 144 Undertaker struct {
145 - UndertakerId string `json:"undertakerId"` //承接人用户id  
146 - RerferrerId string `json:"rerferrerId"` //推荐人用户id  
147 - SalesmanId string `json:"salesmanId"` //关联业务员id  
148 - Attachment domain.Attachment `json:"attachment"` 145 + UndertakerId string `json:"undertakerId"` //承接人用户id
  146 + RerferrerId string `json:"rerferrerId"` //推荐人用户id
  147 + SalesmanId string `json:"salesmanId"` //关联业务员id
  148 + Attachment []domain.Attachment `json:"attachment"`
149 } 149 }
150 150
151 ReqCooperationContractAdd struct { 151 ReqCooperationContractAdd struct {
@@ -8,7 +8,7 @@ import ( @@ -8,7 +8,7 @@ import (
8 func init() { 8 func init() {
9 web.Router("/v1/web/dividends-returned-order/", &web_client.DividendsReturnedOrderController{}, "Post:CreateDividendsReturnedOrder") 9 web.Router("/v1/web/dividends-returned-order/", &web_client.DividendsReturnedOrderController{}, "Post:CreateDividendsReturnedOrder")
10 web.Router("/v1/web/dividends-returned-order/:projectId", &web_client.DividendsReturnedOrderController{}, "Put:UpdateDividendsReturnedOrder") 10 web.Router("/v1/web/dividends-returned-order/:projectId", &web_client.DividendsReturnedOrderController{}, "Put:UpdateDividendsReturnedOrder")
11 - web.Router("/v1/web/dividends-returned-order/:projectId", &web_client.DividendsReturnedOrderController{}, "Delete:RemoveDividendsReturnedOrder") 11 + web.Router("/v1/web/dividends-returned-order/remove", &web_client.DividendsReturnedOrderController{}, "Post:RemoveDividendsReturnedOrder")
12 web.Router("/v1/web/dividends-returned-order/:projectId", &web_client.DividendsReturnedOrderController{}, "Get:GetDividendsReturnedOrder") 12 web.Router("/v1/web/dividends-returned-order/:projectId", &web_client.DividendsReturnedOrderController{}, "Get:GetDividendsReturnedOrder")
13 web.Router("/v1/web/dividends-returned-order/search", &web_client.DividendsReturnedOrderController{}, "Post:SearchDividendsReturnedOrder") 13 web.Router("/v1/web/dividends-returned-order/search", &web_client.DividendsReturnedOrderController{}, "Post:SearchDividendsReturnedOrder")
14 web.Router("/v1/web/dividends-returned-order/selector/dividends-order", &web_client.DividendsReturnedOrderController{}, "Post:SelectorDividendsOrder") 14 web.Router("/v1/web/dividends-returned-order/selector/dividends-order", &web_client.DividendsReturnedOrderController{}, "Post:SelectorDividendsOrder")