正在显示
18 个修改的文件
包含
165 行增加
和
166 行删除
@@ -10,6 +10,12 @@ import ( | @@ -10,6 +10,12 @@ import ( | ||
10 | type CreditAccountSearchCommand struct { | 10 | type CreditAccountSearchCommand struct { |
11 | //操作人 | 11 | //操作人 |
12 | Operator domain.Operator `json:"-"` | 12 | Operator domain.Operator `json:"-"` |
13 | + // 查询偏离量 | ||
14 | + PageNumber int `json:"pageNumber"` | ||
15 | + // 查询限制 | ||
16 | + PageSize int `json:"pageSize" valid:"Required"` | ||
17 | + // 账期结算支付状态,1待支付,2已支付 0全部 | ||
18 | + PaymentStatus int32 `json:"paymentStatus"` | ||
13 | } | 19 | } |
14 | 20 | ||
15 | func (cmd *CreditAccountSearchCommand) Valid(validation *validation.Validation) { | 21 | func (cmd *CreditAccountSearchCommand) Valid(validation *validation.Validation) { |
@@ -11,15 +11,15 @@ type UpdateCooperationProjectCommand struct { | @@ -11,15 +11,15 @@ type UpdateCooperationProjectCommand struct { | ||
11 | //操作人 | 11 | //操作人 |
12 | Operator domain.Operator `json:"-"` | 12 | Operator domain.Operator `json:"-"` |
13 | // 共创项目ID | 13 | // 共创项目ID |
14 | - CooperationProjectId string `json:"cooperationProjectId,string" valid:"Required"` | 14 | + CooperationProjectId string `json:"cooperationProjectId" valid:"Required"` |
15 | // 模式编码,唯一确定 | 15 | // 模式编码,唯一确定 |
16 | - //CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"` | 16 | + CooperationModeNumber string `json:"cooperationModeNumber" valid:"Required"` |
17 | // 组织ID | 17 | // 组织ID |
18 | OrgId int64 `json:"departmentId,string" valid:"Required"` | 18 | OrgId int64 `json:"departmentId,string" valid:"Required"` |
19 | // 共创项目名称 | 19 | // 共创项目名称 |
20 | CooperationProjectName string `json:"cooperationProjectName" valid:"Required"` | 20 | CooperationProjectName string `json:"cooperationProjectName" valid:"Required"` |
21 | // 共创发起人id | 21 | // 共创发起人id |
22 | - CooperationProjectSponsor string `json:"cooperationProjectSponsor,omitempty"` | 22 | + CooperationProjectSponsor int64 `json:"cooperationProjectSponsor,omitempty"` |
23 | // 项目承接对象 | 23 | // 项目承接对象 |
24 | CooperationProjectUndertakerType []int32 `json:"cooperationProjectUndertakerType,omitempty"` | 24 | CooperationProjectUndertakerType []int32 `json:"cooperationProjectUndertakerType,omitempty"` |
25 | // 共创项目描述 | 25 | // 共创项目描述 |
@@ -73,11 +73,11 @@ func (srv CooperationProjectService) UpdateCooperationProject(updateCooperationP | @@ -73,11 +73,11 @@ func (srv CooperationProjectService) UpdateCooperationProject(updateCooperationP | ||
73 | }) | 73 | }) |
74 | } | 74 | } |
75 | _, err := creationCooperationGateway.CooperationProjectUpdate(allied_creation_cooperation.ReqCooperationProjectUpdate{ | 75 | _, err := creationCooperationGateway.CooperationProjectUpdate(allied_creation_cooperation.ReqCooperationProjectUpdate{ |
76 | - CooperationProjectId: updateCooperationProjectCommand.CooperationProjectId, | ||
77 | - CooperationProjectName: updateCooperationProjectCommand.CooperationProjectName, | ||
78 | - //CooperationModeNumber: updateCooperationProjectCommand.CooperationModeNumber, | 76 | + CooperationProjectId: updateCooperationProjectCommand.CooperationProjectId, |
77 | + CooperationProjectName: updateCooperationProjectCommand.CooperationProjectName, | ||
78 | + CooperationModeNumber: updateCooperationProjectCommand.CooperationModeNumber, | ||
79 | CooperationProjectUndertakerType: updateCooperationProjectCommand.CooperationProjectUndertakerType, | 79 | CooperationProjectUndertakerType: updateCooperationProjectCommand.CooperationProjectUndertakerType, |
80 | - SponsorUid: updateCooperationProjectCommand.CooperationProjectSponsor, | 80 | + SponsorUid: strconv.Itoa(int(updateCooperationProjectCommand.CooperationProjectSponsor)), |
81 | PublisherUid: strconv.Itoa(int(updateCooperationProjectCommand.Operator.UserId)), | 81 | PublisherUid: strconv.Itoa(int(updateCooperationProjectCommand.Operator.UserId)), |
82 | CooperationProjectDescription: updateCooperationProjectCommand.CooperationProjectDescription, | 82 | CooperationProjectDescription: updateCooperationProjectCommand.CooperationProjectDescription, |
83 | Attachment: images, | 83 | Attachment: images, |
@@ -7,11 +7,11 @@ import ( | @@ -7,11 +7,11 @@ import ( | ||
7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | 7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" |
8 | ) | 8 | ) |
9 | 9 | ||
10 | -type baseController struct { | 10 | +type BaseController struct { |
11 | beego.BaseController | 11 | beego.BaseController |
12 | } | 12 | } |
13 | 13 | ||
14 | -func (controller *baseController) returnPageListData(count int64, data interface{}, err error, pageNumber int) { | 14 | +func (controller *BaseController) ReturnPageListData(count int64, data interface{}, err error, pageNumber int) { |
15 | dataMap := map[string]interface{}{ | 15 | dataMap := map[string]interface{}{ |
16 | "grid": map[string]interface{}{ | 16 | "grid": map[string]interface{}{ |
17 | "total": count, | 17 | "total": count, |
@@ -22,7 +22,7 @@ func (controller *baseController) returnPageListData(count int64, data interface | @@ -22,7 +22,7 @@ func (controller *baseController) returnPageListData(count int64, data interface | ||
22 | controller.Response(dataMap, err) | 22 | controller.Response(dataMap, err) |
23 | } | 23 | } |
24 | 24 | ||
25 | -func (controller *baseController) returnListData(count int64, data interface{}, err error) { | 25 | +func (controller *BaseController) ReturnListData(count int64, data interface{}, err error) { |
26 | dataMap := map[string]interface{}{ | 26 | dataMap := map[string]interface{}{ |
27 | "total": count, | 27 | "total": count, |
28 | //"pageNumber": pageNumber, | 28 | //"pageNumber": pageNumber, |
@@ -31,23 +31,23 @@ func (controller *baseController) returnListData(count int64, data interface{}, | @@ -31,23 +31,23 @@ func (controller *baseController) returnListData(count int64, data interface{}, | ||
31 | controller.Response(dataMap, err) | 31 | controller.Response(dataMap, err) |
32 | } | 32 | } |
33 | 33 | ||
34 | -func (controller *baseController) GetUserId() int64 { | 34 | +func (controller *BaseController) GetUserId() int64 { |
35 | return 1 | 35 | return 1 |
36 | } | 36 | } |
37 | 37 | ||
38 | -func (controller *baseController) GetCompanyId() int64 { | 38 | +func (controller *BaseController) GetCompanyId() int64 { |
39 | return 1 | 39 | return 1 |
40 | } | 40 | } |
41 | 41 | ||
42 | -func (controller *baseController) GetUserBaseId() int64 { | 42 | +func (controller *BaseController) GetUserBaseId() int64 { |
43 | return 1 | 43 | return 1 |
44 | } | 44 | } |
45 | 45 | ||
46 | -func (controller *baseController) GetOrgId() int64 { | 46 | +func (controller *BaseController) GetOrgId() int64 { |
47 | return 1 | 47 | return 1 |
48 | } | 48 | } |
49 | 49 | ||
50 | -func (controller *baseController) GetOperator() domain.Operator { | 50 | +func (controller *BaseController) GetOperator() domain.Operator { |
51 | token := controller.Ctx.Input.Header("X-Mmm-Accesstoken") | 51 | token := controller.Ctx.Input.Header("X-Mmm-Accesstoken") |
52 | loginToken := &domain.LoginToken{} | 52 | loginToken := &domain.LoginToken{} |
53 | err := loginToken.ParseToken(token) | 53 | err := loginToken.ParseToken(token) |
1 | -package mobile_client | ||
2 | - | ||
3 | -import ( | ||
4 | - "github.com/linmadan/egglib-go/utils/json" | ||
5 | - "github.com/linmadan/egglib-go/web/beego" | ||
6 | - "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | ||
7 | - "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | ||
8 | -) | ||
9 | - | ||
10 | -type baseController struct { | ||
11 | - beego.BaseController | ||
12 | -} | ||
13 | - | ||
14 | -func (controller *baseController) returnPageListData(count int64, data interface{}, err error, pageNumber int) { | ||
15 | - dataMap := map[string]interface{}{ | ||
16 | - "grid": map[string]interface{}{ | ||
17 | - "total": count, | ||
18 | - //"pageNumber": pageNumber, | ||
19 | - "list": data, | ||
20 | - }, | ||
21 | - } | ||
22 | - controller.Response(dataMap, err) | ||
23 | -} | ||
24 | - | ||
25 | -func (controller *baseController) returnListData(count int64, data interface{}, err error) { | ||
26 | - dataMap := map[string]interface{}{ | ||
27 | - "total": count, | ||
28 | - //"pageNumber": pageNumber, | ||
29 | - "list": data, | ||
30 | - } | ||
31 | - controller.Response(dataMap, err) | ||
32 | -} | ||
33 | - | ||
34 | -func (controller *baseController) GetUserId() int64 { | ||
35 | - return 1 | ||
36 | -} | ||
37 | - | ||
38 | -func (controller *baseController) GetCompanyId() int64 { | ||
39 | - return 1 | ||
40 | -} | ||
41 | - | ||
42 | -func (controller *baseController) GetUserBaseId() int64 { | ||
43 | - return 1 | ||
44 | -} | ||
45 | - | ||
46 | -func (controller *baseController) GetOrgId() int64 { | ||
47 | - return 1 | ||
48 | -} | ||
49 | - | ||
50 | -func (controller *baseController) GetOperator() domain.Operator { | ||
51 | - token := controller.Ctx.Input.Header("X-Mmm-Accesstoken") | ||
52 | - loginToken := &domain.LoginToken{} | ||
53 | - err := loginToken.ParseToken(token) | ||
54 | - if err != nil { | ||
55 | - log.Logger.Error(err.Error()) | ||
56 | - } | ||
57 | - op := domain.Operator{ | ||
58 | - UserId: loginToken.UserId, | ||
59 | - CompanyId: loginToken.CompanyId, | ||
60 | - OrgId: loginToken.OrgId, | ||
61 | - UserBaseId: loginToken.UserBaseId, | ||
62 | - Phone: loginToken.Account, | ||
63 | - Token: token, | ||
64 | - } | ||
65 | - // TODO:测试数据后期删除 | ||
66 | - if op.UserId == 0 { | ||
67 | - op.UserId = 9 | ||
68 | - op.CompanyId = 23 | ||
69 | - op.OrgId = 45 | ||
70 | - op.UserBaseId = 5 | ||
71 | - } | ||
72 | - // TODO:打印测试日志 | ||
73 | - log.Logger.Debug("operator " + json.MarshalToString(op)) | ||
74 | - return op | ||
75 | -} |
1 | +package mobile_client | ||
2 | + | ||
3 | +import ( | ||
4 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/controllers" | ||
5 | +) | ||
6 | + | ||
7 | +type baseController struct { | ||
8 | + controllers.BaseController | ||
9 | +} | ||
10 | + | ||
11 | +//func (controller *baseController) ReturnPageListData(count int64, data interface{}, err error, pageNumber int) { | ||
12 | +// dataMap := map[string]interface{}{ | ||
13 | +// "grid": map[string]interface{}{ | ||
14 | +// "total": count, | ||
15 | +// //"pageNumber": pageNumber, | ||
16 | +// "list": data, | ||
17 | +// }, | ||
18 | +// } | ||
19 | +// controller.Response(dataMap, err) | ||
20 | +//} | ||
21 | +// | ||
22 | +//func (controller *baseController) ReturnListData(count int64, data interface{}, err error) { | ||
23 | +// dataMap := map[string]interface{}{ | ||
24 | +// "total": count, | ||
25 | +// //"pageNumber": pageNumber, | ||
26 | +// "list": data, | ||
27 | +// } | ||
28 | +// controller.Response(dataMap, err) | ||
29 | +//} | ||
30 | +// | ||
31 | +//func (controller *baseController) GetUserId() int64 { | ||
32 | +// return 1 | ||
33 | +//} | ||
34 | +// | ||
35 | +//func (controller *baseController) GetCompanyId() int64 { | ||
36 | +// return 1 | ||
37 | +//} | ||
38 | +// | ||
39 | +//func (controller *baseController) GetUserBaseId() int64 { | ||
40 | +// return 1 | ||
41 | +//} | ||
42 | +// | ||
43 | +//func (controller *baseController) GetOrgId() int64 { | ||
44 | +// return 1 | ||
45 | +//} | ||
46 | +// | ||
47 | +//func (controller *baseController) GetOperator() domain.Operator { | ||
48 | +// token := controller.Ctx.Input.Header("X-Mmm-Accesstoken") | ||
49 | +// loginToken := &domain.LoginToken{} | ||
50 | +// err := loginToken.ParseToken(token) | ||
51 | +// if err != nil { | ||
52 | +// log.Logger.Error(err.Error()) | ||
53 | +// } | ||
54 | +// op := domain.Operator{ | ||
55 | +// UserId: loginToken.UserId, | ||
56 | +// CompanyId: loginToken.CompanyId, | ||
57 | +// OrgId: loginToken.OrgId, | ||
58 | +// UserBaseId: loginToken.UserBaseId, | ||
59 | +// Phone: loginToken.Account, | ||
60 | +// Token: token, | ||
61 | +// } | ||
62 | +// // TODO:测试数据后期删除 | ||
63 | +// if op.UserId == 0 { | ||
64 | +// op.UserId = 9 | ||
65 | +// op.CompanyId = 23 | ||
66 | +// op.OrgId = 45 | ||
67 | +// op.UserBaseId = 5 | ||
68 | +// } | ||
69 | +// // TODO:打印测试日志 | ||
70 | +// log.Logger.Debug("operator " + json.MarshalToString(op)) | ||
71 | +// return op | ||
72 | +//} |
@@ -3,6 +3,7 @@ package mobile_client | @@ -3,6 +3,7 @@ package mobile_client | ||
3 | import ( | 3 | import ( |
4 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command" | 4 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/command" |
5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/service" | 5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/mobile/cooperation/service" |
6 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | ||
6 | ) | 7 | ) |
7 | 8 | ||
8 | // Controller | 9 | // Controller |
@@ -180,6 +181,7 @@ func (controller *CooperationController) UpdateCooperationProject() { | @@ -180,6 +181,7 @@ func (controller *CooperationController) UpdateCooperationProject() { | ||
180 | controller.Response(nil, err) | 181 | controller.Response(nil, err) |
181 | return | 182 | return |
182 | } | 183 | } |
184 | + cmd.CooperationProjectId = controller.GetString(":projectId") | ||
183 | cmd.Operator = controller.GetOperator() | 185 | cmd.Operator = controller.GetOperator() |
184 | data, err := svr.UpdateCooperationProject(cmd) | 186 | data, err := svr.UpdateCooperationProject(cmd) |
185 | controller.Response(data, err) | 187 | controller.Response(data, err) |
@@ -208,7 +210,7 @@ func (controller *CooperationController) SearchCooperationProject() { | @@ -208,7 +210,7 @@ func (controller *CooperationController) SearchCooperationProject() { | ||
208 | } | 210 | } |
209 | cmd.Operator = controller.GetOperator() | 211 | cmd.Operator = controller.GetOperator() |
210 | total, data, err := svr.SearchCooperationProject(cmd) | 212 | total, data, err := svr.SearchCooperationProject(cmd) |
211 | - controller.returnPageListData(int64(total), data, err, cmd.PageNumber) | 213 | + controller.ReturnPageListData(int64(total), data, err, cmd.PageNumber) |
212 | } | 214 | } |
213 | 215 | ||
214 | func (controller *CooperationController) PersonSearchCooperationProject() { | 216 | func (controller *CooperationController) PersonSearchCooperationProject() { |
@@ -230,8 +232,7 @@ func (controller *CooperationController) CreditAccountSearch() { | @@ -230,8 +232,7 @@ func (controller *CooperationController) CreditAccountSearch() { | ||
230 | cmd := &command.CreditAccountSearchCommand{} | 232 | cmd := &command.CreditAccountSearchCommand{} |
231 | err := controller.Unmarshal(cmd) | 233 | err := controller.Unmarshal(cmd) |
232 | if err != nil { | 234 | if err != nil { |
233 | - controller.Response(nil, err) | ||
234 | - return | 235 | + log.Logger.Error(err.Error()) |
235 | } | 236 | } |
236 | cmd.Operator = controller.GetOperator() | 237 | cmd.Operator = controller.GetOperator() |
237 | data, err := svr.CreditAccountSearch(cmd) | 238 | data, err := svr.CreditAccountSearch(cmd) |
@@ -243,8 +244,7 @@ func (controller *CooperationController) CreditAccountGet() { | @@ -243,8 +244,7 @@ func (controller *CooperationController) CreditAccountGet() { | ||
243 | cmd := &command.CreditAccountGetCommand{} | 244 | cmd := &command.CreditAccountGetCommand{} |
244 | err := controller.Unmarshal(cmd) | 245 | err := controller.Unmarshal(cmd) |
245 | if err != nil { | 246 | if err != nil { |
246 | - controller.Response(nil, err) | ||
247 | - return | 247 | + log.Logger.Error(err.Error()) |
248 | } | 248 | } |
249 | cmd.Operator = controller.GetOperator() | 249 | cmd.Operator = controller.GetOperator() |
250 | data, err := svr.CreditAccountGet(cmd) | 250 | data, err := svr.CreditAccountGet(cmd) |
@@ -256,8 +256,7 @@ func (controller *CooperationController) CreditAccountPay() { | @@ -256,8 +256,7 @@ func (controller *CooperationController) CreditAccountPay() { | ||
256 | cmd := &command.CreditAccountPayCommand{} | 256 | cmd := &command.CreditAccountPayCommand{} |
257 | err := controller.Unmarshal(cmd) | 257 | err := controller.Unmarshal(cmd) |
258 | if err != nil { | 258 | if err != nil { |
259 | - controller.Response(nil, err) | ||
260 | - return | 259 | + log.Logger.Error(err.Error()) |
261 | } | 260 | } |
262 | cmd.Operator = controller.GetOperator() | 261 | cmd.Operator = controller.GetOperator() |
263 | data, err := svr.CreditAccountPay(cmd) | 262 | data, err := svr.CreditAccountPay(cmd) |
@@ -269,8 +268,7 @@ func (controller *CooperationController) CreditAccountPaySearch() { | @@ -269,8 +268,7 @@ func (controller *CooperationController) CreditAccountPaySearch() { | ||
269 | cmd := &command.CreditAccountPaySearchCommand{} | 268 | cmd := &command.CreditAccountPaySearchCommand{} |
270 | err := controller.Unmarshal(cmd) | 269 | err := controller.Unmarshal(cmd) |
271 | if err != nil { | 270 | if err != nil { |
272 | - controller.Response(nil, err) | ||
273 | - return | 271 | + log.Logger.Error(err.Error()) |
274 | } | 272 | } |
275 | cmd.Operator = controller.GetOperator() | 273 | cmd.Operator = controller.GetOperator() |
276 | data, err := svr.CreditAccountPaySearch(cmd) | 274 | data, err := svr.CreditAccountPaySearch(cmd) |
1 | -package web_client | ||
2 | - | ||
3 | -import ( | ||
4 | - "github.com/linmadan/egglib-go/web/beego" | ||
5 | - "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" | ||
6 | - "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | ||
7 | -) | ||
8 | - | ||
9 | -type baseController struct { | ||
10 | - beego.BaseController | ||
11 | -} | ||
12 | - | ||
13 | -func (controller *baseController) returnPageListData(count int64, data interface{}, err error, pageNumber int) { | ||
14 | - dataMap := map[string]interface{}{ | ||
15 | - "grid": map[string]interface{}{ | ||
16 | - "total": count, | ||
17 | - "list": data, | ||
18 | - }, | ||
19 | - } | ||
20 | - controller.Response(dataMap, err) | ||
21 | -} | ||
22 | - | ||
23 | -func (controller *baseController) returnListData(count int64, data interface{}, err error) { | ||
24 | - dataMap := map[string]interface{}{ | ||
25 | - "total": count, | ||
26 | - "list": data, | ||
27 | - } | ||
28 | - controller.Response(dataMap, err) | ||
29 | -} | ||
30 | - | ||
31 | -func (controller *baseController) GetOperator() domain.Operator { | ||
32 | - token := controller.Ctx.Input.Header("X-Mmm-Accesstoken") | ||
33 | - loginToken := &domain.LoginToken{} | ||
34 | - err := loginToken.ParseToken(token) | ||
35 | - if err != nil { | ||
36 | - log.Logger.Error(err.Error()) | ||
37 | - } | ||
38 | - op := domain.Operator{ | ||
39 | - UserId: loginToken.UserId, | ||
40 | - CompanyId: loginToken.CompanyId, | ||
41 | - OrgId: loginToken.OrgId, | ||
42 | - UserBaseId: loginToken.UserBaseId, | ||
43 | - Phone: loginToken.Account, | ||
44 | - Token: token, | ||
45 | - } | ||
46 | - // TODO:测试数据后期删除 | ||
47 | - if op.UserId == 0 { | ||
48 | - op.UserId = 9 | ||
49 | - op.CompanyId = 23 | ||
50 | - op.OrgId = 45 | ||
51 | - op.UserBaseId = 5 | ||
52 | - } | ||
53 | - return op | ||
54 | -} |
1 | +package web_client | ||
2 | + | ||
3 | +import ( | ||
4 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/controllers" | ||
5 | +) | ||
6 | + | ||
7 | +type baseController struct { | ||
8 | + controllers.BaseController | ||
9 | +} | ||
10 | + | ||
11 | +//func (controller *baseController) ReturnPageListData(count int64, data interface{}, err error, pageNumber int) { | ||
12 | +// dataMap := map[string]interface{}{ | ||
13 | +// "grid": map[string]interface{}{ | ||
14 | +// "total": count, | ||
15 | +// "list": data, | ||
16 | +// }, | ||
17 | +// } | ||
18 | +// controller.Response(dataMap, err) | ||
19 | +//} | ||
20 | +// | ||
21 | +//func (controller *baseController) ReturnListData(count int64, data interface{}, err error) { | ||
22 | +// dataMap := map[string]interface{}{ | ||
23 | +// "total": count, | ||
24 | +// "list": data, | ||
25 | +// } | ||
26 | +// controller.Response(dataMap, err) | ||
27 | +//} | ||
28 | +// | ||
29 | +//func (controller *baseController) GetOperator() domain.Operator { | ||
30 | +// token := controller.Ctx.Input.Header("X-Mmm-Accesstoken") | ||
31 | +// loginToken := &domain.LoginToken{} | ||
32 | +// err := loginToken.ParseToken(token) | ||
33 | +// if err != nil { | ||
34 | +// log.Logger.Error(err.Error()) | ||
35 | +// } | ||
36 | +// op := domain.Operator{ | ||
37 | +// UserId: loginToken.UserId, | ||
38 | +// CompanyId: loginToken.CompanyId, | ||
39 | +// OrgId: loginToken.OrgId, | ||
40 | +// UserBaseId: loginToken.UserBaseId, | ||
41 | +// Phone: loginToken.Account, | ||
42 | +// Token: token, | ||
43 | +// } | ||
44 | +// // TODO:测试数据后期删除 | ||
45 | +// if op.UserId == 0 { | ||
46 | +// op.UserId = 9 | ||
47 | +// op.CompanyId = 23 | ||
48 | +// op.OrgId = 45 | ||
49 | +// op.UserBaseId = 5 | ||
50 | +// } | ||
51 | +// return op | ||
52 | +//} |
@@ -29,7 +29,7 @@ func (controller *CooperationApplicationController) ListCooperationApplication() | @@ -29,7 +29,7 @@ func (controller *CooperationApplicationController) ListCooperationApplication() | ||
29 | } | 29 | } |
30 | listCooperationApplicationQuery.Operator = controller.GetOperator() | 30 | listCooperationApplicationQuery.Operator = controller.GetOperator() |
31 | cnt, data, err := cooperationApplicationService.ListCooperationApplication(listCooperationApplicationQuery) | 31 | cnt, data, err := cooperationApplicationService.ListCooperationApplication(listCooperationApplicationQuery) |
32 | - controller.returnPageListData(cnt, data, err, listCooperationApplicationQuery.PageNumber) | 32 | + controller.ReturnPageListData(cnt, data, err, listCooperationApplicationQuery.PageNumber) |
33 | } | 33 | } |
34 | 34 | ||
35 | func (controller *CooperationApplicationController) AuditCooperationApplication() { | 35 | func (controller *CooperationApplicationController) AuditCooperationApplication() { |
@@ -69,7 +69,7 @@ func (controller *CooperationModeController) SearchCooperationMode() { | @@ -69,7 +69,7 @@ func (controller *CooperationModeController) SearchCooperationMode() { | ||
69 | } | 69 | } |
70 | listCooperationModeQuery.Operator = controller.GetOperator() | 70 | listCooperationModeQuery.Operator = controller.GetOperator() |
71 | cnt, data, err := cooperationModeService.ListCooperationMode(listCooperationModeQuery) | 71 | cnt, data, err := cooperationModeService.ListCooperationMode(listCooperationModeQuery) |
72 | - controller.returnPageListData(cnt, data, err, listCooperationModeQuery.PageNumber) | 72 | + controller.ReturnPageListData(cnt, data, err, listCooperationModeQuery.PageNumber) |
73 | } | 73 | } |
74 | 74 | ||
75 | func (controller *CooperationModeController) ListCooperationMode() { | 75 | func (controller *CooperationModeController) ListCooperationMode() { |
@@ -83,7 +83,7 @@ func (controller *CooperationModeController) ListCooperationMode() { | @@ -83,7 +83,7 @@ func (controller *CooperationModeController) ListCooperationMode() { | ||
83 | listCooperationModeQuery.PageNumber = 1 | 83 | listCooperationModeQuery.PageNumber = 1 |
84 | listCooperationModeQuery.PageSize = 999 | 84 | listCooperationModeQuery.PageSize = 999 |
85 | cnt, data, err := cooperationModeService.ListCooperationMode(listCooperationModeQuery) | 85 | cnt, data, err := cooperationModeService.ListCooperationMode(listCooperationModeQuery) |
86 | - controller.returnListData(cnt, data, err) | 86 | + controller.ReturnListData(cnt, data, err) |
87 | } | 87 | } |
88 | 88 | ||
89 | func (controller *CooperationModeController) EnableCooperationMode() { | 89 | func (controller *CooperationModeController) EnableCooperationMode() { |
@@ -56,7 +56,7 @@ func (controller *CooperationProjectController) ListCooperationProject() { | @@ -56,7 +56,7 @@ func (controller *CooperationProjectController) ListCooperationProject() { | ||
56 | } | 56 | } |
57 | listCooperationProjectQuery.Operator = controller.GetOperator() | 57 | listCooperationProjectQuery.Operator = controller.GetOperator() |
58 | cnt, data, err := cooperationProjectService.ListCooperationProject(listCooperationProjectQuery) | 58 | cnt, data, err := cooperationProjectService.ListCooperationProject(listCooperationProjectQuery) |
59 | - controller.returnPageListData(cnt, data, err, listCooperationProjectQuery.PageNumber) | 59 | + controller.ReturnPageListData(cnt, data, err, listCooperationProjectQuery.PageNumber) |
60 | } | 60 | } |
61 | 61 | ||
62 | func (controller *CooperationProjectController) EndCooperationProject() { | 62 | func (controller *CooperationProjectController) EndCooperationProject() { |
@@ -66,5 +66,5 @@ func (controller *DividendsOrderController) SearchDividendsOrder() { | @@ -66,5 +66,5 @@ func (controller *DividendsOrderController) SearchDividendsOrder() { | ||
66 | } | 66 | } |
67 | searchDividendsOrderQuery.Operator = controller.GetOperator() | 67 | searchDividendsOrderQuery.Operator = controller.GetOperator() |
68 | cnt, data, err := dividendsOrderService.SearchDividendsOrder(searchDividendsOrderQuery) | 68 | cnt, data, err := dividendsOrderService.SearchDividendsOrder(searchDividendsOrderQuery) |
69 | - controller.returnPageListData(int64(cnt), data, err, searchDividendsOrderQuery.PageNumber) | 69 | + controller.ReturnPageListData(int64(cnt), data, err, searchDividendsOrderQuery.PageNumber) |
70 | } | 70 | } |
@@ -68,5 +68,5 @@ func (controller *DividendsReturnedOrderController) SearchDividendsReturnedOrder | @@ -68,5 +68,5 @@ func (controller *DividendsReturnedOrderController) SearchDividendsReturnedOrder | ||
68 | } | 68 | } |
69 | searchDividendsReturnedOrderQuery.Operator = controller.GetOperator() | 69 | searchDividendsReturnedOrderQuery.Operator = controller.GetOperator() |
70 | cnt, data, err := dividendsReturnedOrderService.SearchDividendsReturnedOrder(searchDividendsReturnedOrderQuery) | 70 | cnt, data, err := dividendsReturnedOrderService.SearchDividendsReturnedOrder(searchDividendsReturnedOrderQuery) |
71 | - controller.returnPageListData(int64(cnt), data, err, searchDividendsReturnedOrderQuery.PageNumber) | 71 | + controller.ReturnPageListData(int64(cnt), data, err, searchDividendsReturnedOrderQuery.PageNumber) |
72 | } | 72 | } |
@@ -20,7 +20,7 @@ func (controller *NoticeSettingController) NoticeSettingList() { | @@ -20,7 +20,7 @@ func (controller *NoticeSettingController) NoticeSettingList() { | ||
20 | } | 20 | } |
21 | noticeSettingListQuery.Operator = controller.GetOperator() | 21 | noticeSettingListQuery.Operator = controller.GetOperator() |
22 | cnt, data, err := noticeSettingService.NoticeSettingList(noticeSettingListQuery) | 22 | cnt, data, err := noticeSettingService.NoticeSettingList(noticeSettingListQuery) |
23 | - controller.returnPageListData(cnt, data, err, noticeSettingListQuery.PageNumber) | 23 | + controller.ReturnPageListData(cnt, data, err, noticeSettingListQuery.PageNumber) |
24 | } | 24 | } |
25 | 25 | ||
26 | func (controller *NoticeSettingController) NoticeSettingUpdate() { | 26 | func (controller *NoticeSettingController) NoticeSettingUpdate() { |
@@ -46,7 +46,7 @@ func (controller *RolesController) RoleList() { | @@ -46,7 +46,7 @@ func (controller *RolesController) RoleList() { | ||
46 | } | 46 | } |
47 | roleListQuery.Operator = controller.GetOperator() | 47 | roleListQuery.Operator = controller.GetOperator() |
48 | cnt, data, err := rolesService.RoleList(roleListQuery) | 48 | cnt, data, err := rolesService.RoleList(roleListQuery) |
49 | - controller.returnPageListData(cnt, data, err, roleListQuery.PageNumber) | 49 | + controller.ReturnPageListData(cnt, data, err, roleListQuery.PageNumber) |
50 | } | 50 | } |
51 | 51 | ||
52 | func (controller *RolesController) RoleGet() { | 52 | func (controller *RolesController) RoleGet() { |
@@ -36,7 +36,7 @@ func (controller *UsersController) CompanyUserList() { | @@ -36,7 +36,7 @@ func (controller *UsersController) CompanyUserList() { | ||
36 | controller.Unmarshal(companyUserListQuery) | 36 | controller.Unmarshal(companyUserListQuery) |
37 | companyUserListQuery.Operator = controller.GetOperator() | 37 | companyUserListQuery.Operator = controller.GetOperator() |
38 | cnt, data, err := usersService.CompanyUserList(companyUserListQuery) | 38 | cnt, data, err := usersService.CompanyUserList(companyUserListQuery) |
39 | - controller.returnPageListData(cnt, data, err, companyUserListQuery.PageNumber) | 39 | + controller.ReturnPageListData(cnt, data, err, companyUserListQuery.PageNumber) |
40 | } | 40 | } |
41 | 41 | ||
42 | func (controller *UsersController) CompanyUserGet() { | 42 | func (controller *UsersController) CompanyUserGet() { |
@@ -93,7 +93,7 @@ func (controller *UsersController) CooperationUserList() { | @@ -93,7 +93,7 @@ func (controller *UsersController) CooperationUserList() { | ||
93 | controller.Unmarshal(cooperationUserListQuery) | 93 | controller.Unmarshal(cooperationUserListQuery) |
94 | cooperationUserListQuery.Operator = controller.GetOperator() | 94 | cooperationUserListQuery.Operator = controller.GetOperator() |
95 | cnt, data, err := usersService.CooperationUserList(cooperationUserListQuery) | 95 | cnt, data, err := usersService.CooperationUserList(cooperationUserListQuery) |
96 | - controller.returnPageListData(cnt, data, err, cooperationUserListQuery.PageNumber) | 96 | + controller.ReturnPageListData(cnt, data, err, cooperationUserListQuery.PageNumber) |
97 | } | 97 | } |
98 | 98 | ||
99 | func (controller *UsersController) CooperationUserGet() { | 99 | func (controller *UsersController) CooperationUserGet() { |
@@ -131,7 +131,7 @@ func (controller *UsersController) SelectorCompanyOrg() { | @@ -131,7 +131,7 @@ func (controller *UsersController) SelectorCompanyOrg() { | ||
131 | controller.Unmarshal(selectorQuery) | 131 | controller.Unmarshal(selectorQuery) |
132 | selectorQuery.Operator = controller.GetOperator() | 132 | selectorQuery.Operator = controller.GetOperator() |
133 | cnt, data, err := usersService.SelectorCompanyOrg(selectorQuery) | 133 | cnt, data, err := usersService.SelectorCompanyOrg(selectorQuery) |
134 | - controller.returnPageListData(cnt, data, err, selectorQuery.PageNumber) | 134 | + controller.ReturnPageListData(cnt, data, err, selectorQuery.PageNumber) |
135 | } | 135 | } |
136 | 136 | ||
137 | //SelectorCompanyRole 角色选择表 | 137 | //SelectorCompanyRole 角色选择表 |
@@ -141,7 +141,7 @@ func (controller *UsersController) SelectorCompanyRole() { | @@ -141,7 +141,7 @@ func (controller *UsersController) SelectorCompanyRole() { | ||
141 | controller.Unmarshal(selectorQuery) | 141 | controller.Unmarshal(selectorQuery) |
142 | selectorQuery.Operator = controller.GetOperator() | 142 | selectorQuery.Operator = controller.GetOperator() |
143 | cnt, data, err := usersService.SelectorCompanyRole(selectorQuery) | 143 | cnt, data, err := usersService.SelectorCompanyRole(selectorQuery) |
144 | - controller.returnPageListData(cnt, data, err, selectorQuery.PageNumber) | 144 | + controller.ReturnPageListData(cnt, data, err, selectorQuery.PageNumber) |
145 | } | 145 | } |
146 | 146 | ||
147 | //CompanyOrgSelector 全组织部门选择表 | 147 | //CompanyOrgSelector 全组织部门选择表 |
-
请 注册 或 登录 后发表评论