正在显示
3 个修改的文件
包含
43 行增加
和
61 行删除
@@ -84,14 +84,21 @@ type Relevant struct { | @@ -84,14 +84,21 @@ type Relevant struct { | ||
84 | } | 84 | } |
85 | 85 | ||
86 | type ContractUndertaker struct { | 86 | type ContractUndertaker struct { |
87 | - UndertakerId int `json:"undertakerId,string"` | 87 | + UndertakerId int `json:"undertakerId,string,"` |
88 | Attachment []domain.Attachment `json:"attachment"` | 88 | Attachment []domain.Attachment `json:"attachment"` |
89 | Department domain.Department `json:"department"` | 89 | Department domain.Department `json:"department"` |
90 | HasReferrer bool `json:"hasReferrer"` | 90 | HasReferrer bool `json:"hasReferrer"` |
91 | HasSalesman bool `json:"hasSalesman"` | 91 | HasSalesman bool `json:"hasSalesman"` |
92 | - ReferrerUser domain.UserInfo `json:"referrerUser"` | ||
93 | - SalesmanUser domain.UserInfo `json:"salesmanUser"` | ||
94 | - UserInfo domain.UserInfo `json:"userInfo"` | 92 | + ReferrerUser struct { |
93 | + UserId int `json:"userId,string"` | ||
94 | + UserInfo domain.UserInfo `json:"userInfo"` | ||
95 | + } `json:"referrerUser"` | ||
96 | + SalesmanUser struct { | ||
97 | + UserId int `json:"userId,string"` | ||
98 | + UserInfo domain.UserInfo `json:"userInfo"` | ||
99 | + } | ||
100 | + UserId int `json:"userId,string"` | ||
101 | + UserInfo domain.UserInfo `json:"userInfo"` | ||
95 | } | 102 | } |
96 | type CooperationContractInfo struct { | 103 | type CooperationContractInfo struct { |
97 | CooperationContract CooperationContractItem `json:"cooperationContract"` | 104 | CooperationContract CooperationContractItem `json:"cooperationContract"` |
@@ -159,26 +166,24 @@ func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationCon | @@ -159,26 +166,24 @@ func ToCooperationContractInfo(param *allied_creation_cooperation.CooperationCon | ||
159 | DepartmentId: int(v.Department.DepartmentId), | 166 | DepartmentId: int(v.Department.DepartmentId), |
160 | DepartmentName: v.Department.DepartmentName, | 167 | DepartmentName: v.Department.DepartmentName, |
161 | }, | 168 | }, |
162 | - HasReferrer: v.Referrer.UserId > 0, | ||
163 | - HasSalesman: v.Salesman.UserId > 0, | ||
164 | - ReferrerUser: domain.UserInfo{ | ||
165 | - UsersName: v.Referrer.UserInfo.UserName, | ||
166 | - Phone: v.Referrer.UserInfo.UserPhone, | ||
167 | - UsersId: v.Referrer.UserId, | ||
168 | - // UserCode :v. | ||
169 | - }, | ||
170 | - SalesmanUser: domain.UserInfo{ | ||
171 | - UsersName: v.Salesman.UserInfo.UserName, | ||
172 | - UsersId: v.Salesman.UserId, | ||
173 | - Phone: v.Salesman.UserInfo.UserPhone, | ||
174 | - }, | 169 | + HasReferrer: v.Referrer.UserId > 0, |
170 | + HasSalesman: v.Salesman.UserId > 0, | ||
175 | UndertakerId: v.UndertakerId, | 171 | UndertakerId: v.UndertakerId, |
172 | + UserId: v.UserId, | ||
176 | UserInfo: domain.UserInfo{ | 173 | UserInfo: domain.UserInfo{ |
177 | UsersName: v.UserInfo.UserName, | 174 | UsersName: v.UserInfo.UserName, |
178 | UsersId: v.UserId, | 175 | UsersId: v.UserId, |
179 | Phone: v.UserInfo.UserPhone, | 176 | Phone: v.UserInfo.UserPhone, |
180 | }, | 177 | }, |
181 | } | 178 | } |
179 | + u.SalesmanUser.UserId = v.Salesman.UserId | ||
180 | + u.SalesmanUser.UserInfo.UsersId = v.Salesman.UserId | ||
181 | + u.SalesmanUser.UserInfo.UsersName = v.Salesman.UserInfo.UserName | ||
182 | + u.SalesmanUser.UserInfo.Phone = v.Salesman.UserInfo.UserPhone | ||
183 | + u.ReferrerUser.UserId = v.Referrer.UserId | ||
184 | + u.ReferrerUser.UserInfo.UsersId = v.Referrer.UserId | ||
185 | + u.ReferrerUser.UserInfo.UsersName = v.Referrer.UserInfo.UserName | ||
186 | + u.ReferrerUser.UserInfo.Phone = v.Referrer.UserInfo.UserPhone | ||
182 | contractUndertaker = append(contractUndertaker, u) | 187 | contractUndertaker = append(contractUndertaker, u) |
183 | } | 188 | } |
184 | undertakerTypesUncheckedAvailable := param.UndertakerTypesUncheckedAvailable | 189 | undertakerTypesUncheckedAvailable := param.UndertakerTypesUncheckedAvailable |
@@ -39,42 +39,31 @@ func ToDividendsEstimateDividendItem(param *allied_creation_cooperation.DataDivi | @@ -39,42 +39,31 @@ func ToDividendsEstimateDividendItem(param *allied_creation_cooperation.DataDivi | ||
39 | 39 | ||
40 | //金额激励列表 | 40 | //金额激励列表 |
41 | type DividendsEstimateMoneyItem struct { | 41 | type DividendsEstimateMoneyItem struct { |
42 | - CooperationContractName string `json:"cooperationContractName"` //合约名称 | ||
43 | - CooperationContractNumber string `json:"cooperationContractNumber"` //合约编码 | ||
44 | - CooperationMode struct { | ||
45 | - CooperationModeId int `json:"cooperationModeId"` | ||
46 | - CooperationModeName string `json:"cooperationModeName"` | ||
47 | - CooperationModeNumber string `json:"cooperationModeNumber"` | ||
48 | - } `json:"cooperationMode"` //共创模式 | ||
49 | - CreatedAt int64 `json:"createdAt"` //合约建立时间 | ||
50 | - Department struct { | ||
51 | - DepartmentId int `json:"departmentId"` | 42 | + CooperationContractId int `json:"cooperationContractId,string"` // 共创合约ID |
43 | + CooperationContractName string `json:"cooperationContractName"` //合约名称 | ||
44 | + CooperationContractNumber string `json:"cooperationContractNumber"` //合约编码 | ||
45 | + CooperationModeName string `json:"cooperationModeName"` | ||
46 | + CreatedAt int64 `json:"createdAt"` //合约建立时间 | ||
47 | + Department struct { | ||
48 | + DepartmentId int `json:"departmentId,string"` | ||
52 | DepartmentName string `json:"departmentName"` | 49 | DepartmentName string `json:"departmentName"` |
53 | } `json:"department"` //发起部门 | 50 | } `json:"department"` //发起部门 |
54 | - CooperationContractSponsor struct { | ||
55 | - UserId int `json:"userId"` | ||
56 | - UserBaseId int `json:"userBaseId"` | ||
57 | - UsersName string `json:"userName"` | ||
58 | - Phone string `json:"phone"` | ||
59 | - } `json:"cooperationContractSponsor"` //合约发起人 | 51 | + CooperationContractSponsorName string `json:"cooperationContractSponsorName"` |
60 | } | 52 | } |
61 | 53 | ||
62 | func ToDividendsEstimateMoneyItem(param *allied_creation_cooperation.DataDividendsEstimateSearchMoney) []DividendsEstimateMoneyItem { | 54 | func ToDividendsEstimateMoneyItem(param *allied_creation_cooperation.DataDividendsEstimateSearchMoney) []DividendsEstimateMoneyItem { |
63 | var listdata []DividendsEstimateMoneyItem | 55 | var listdata []DividendsEstimateMoneyItem |
64 | for _, v := range param.Grid.List { | 56 | for _, v := range param.Grid.List { |
65 | item := DividendsEstimateMoneyItem{ | 57 | item := DividendsEstimateMoneyItem{ |
58 | + CooperationContractId: v.CooperationContractId, | ||
66 | CooperationContractName: v.CooperationContractName, | 59 | CooperationContractName: v.CooperationContractName, |
67 | CooperationContractNumber: v.CooperationContractNumber, | 60 | CooperationContractNumber: v.CooperationContractNumber, |
68 | - CreatedAt: v.CreatedAt.Unix(), | 61 | + CreatedAt: v.CreatedAt.UnixNano() / 1e6, |
62 | + CooperationModeName: v.CooperationContractName, | ||
69 | } | 63 | } |
70 | - item.CooperationMode.CooperationModeId = v.CooperationMode.CooperationModeId | ||
71 | - item.CooperationMode.CooperationModeName = v.CooperationMode.CooperationModeName | ||
72 | - item.CooperationMode.CooperationModeNumber = v.CooperationMode.CooperationModeNumber | ||
73 | item.Department.DepartmentId = v.Department.DepartmentId | 64 | item.Department.DepartmentId = v.Department.DepartmentId |
74 | item.Department.DepartmentName = v.Department.DepartmentName | 65 | item.Department.DepartmentName = v.Department.DepartmentName |
75 | - item.CooperationContractSponsor.UserId = v.CooperationContractSponsor.UserId | ||
76 | - item.CooperationContractSponsor.Phone = v.CooperationContractSponsor.UserInfo.Phone | ||
77 | - item.CooperationContractSponsor.UsersName = v.CooperationContractSponsor.UserInfo.UsersName | 66 | + item.CooperationContractSponsorName = v.CooperationContractName |
78 | listdata = append(listdata, item) | 67 | listdata = append(listdata, item) |
79 | } | 68 | } |
80 | return listdata | 69 | return listdata |
@@ -96,29 +96,17 @@ type ( | @@ -96,29 +96,17 @@ type ( | ||
96 | Grid struct { | 96 | Grid struct { |
97 | Total int `json:"total"` | 97 | Total int `json:"total"` |
98 | List []struct { | 98 | List []struct { |
99 | - CooperationContractName string `json:"cooperationContractName"` //合约名称 | ||
100 | - CooperationContractNumber string `json:"cooperationContractNumber"` //合约编码 | ||
101 | - DividendsEstimateOrderNumber string `json:"dividendsEstimateOrderNumber"` //订单编号 | ||
102 | - CooperationMode struct { | ||
103 | - CooperationModeId int `json:"cooperationModeId"` | ||
104 | - CooperationModeName string `json:"cooperationModeName"` | ||
105 | - CooperationModeNumber string `json:"cooperationModeNumber"` | ||
106 | - } `json:"cooperationMode"` //共创模式 | ||
107 | - CreatedAt time.Time `json:"createdAt"` //合约建立时间 | ||
108 | - Department struct { | ||
109 | - DepartmentId int `json:"departmentId"` | 99 | + CooperationContractId int `json:"cooperationContractId,string"` // 共创合约ID |
100 | + CooperationContractName string `json:"cooperationContractName"` //合约名称 | ||
101 | + CooperationContractNumber string `json:"cooperationContractNumber"` //合约编码 | ||
102 | + CooperationModeName string `json:"cooperationMode"` | ||
103 | + CreatedAt time.Time `json:"createdAt"` //合约建立时间 | ||
104 | + Department struct { | ||
105 | + DepartmentId int `json:"departmentId,string"` | ||
110 | DepartmentName string `json:"departmentName"` | 106 | DepartmentName string `json:"departmentName"` |
111 | } `json:"department"` //发起部门 | 107 | } `json:"department"` //发起部门 |
112 | - CooperationContractSponsor struct { | ||
113 | - UserId int `json:"userId"` | ||
114 | - UserBaseId int `json:"userBaseId"` | ||
115 | - UserInfo struct { | ||
116 | - UsersName string `json:"userName"` | ||
117 | - Phone string `json:"phone"` | ||
118 | - UsersId int `json:"userId,string,"` | ||
119 | - UserCode string `json:"userCode"` | ||
120 | - } `json:"userInfo"` | ||
121 | - } `json:"cooperationContractSponsor"` //合约发起人 | 108 | + // 共创合约发起人 |
109 | + CooperationContractSponsorName string `json:"cooperationContractSponsor"` | ||
122 | } `json:"list"` | 110 | } `json:"list"` |
123 | } `json:"grid"` | 111 | } `json:"grid"` |
124 | } | 112 | } |
-
请 注册 或 登录 后发表评论