作者 yangfu

登录修改

@@ -56,14 +56,12 @@ func (srv CompanyStatisticsService) DividendsStatistics(userMenusCommand *comman @@ -56,14 +56,12 @@ func (srv CompanyStatisticsService) DividendsStatistics(userMenusCommand *comman
56 } 56 }
57 57
58 // SearchDividendsEstimates 企业的合约明细列表(分红预算信息) 58 // SearchDividendsEstimates 企业的合约明细列表(分红预算信息)
59 -func (srv CompanyStatisticsService) SearchDividendsEstimates(userMenusCommand *command.SearchDividendsEstimatesCommand) (interface{}, error) { 59 +func (srv CompanyStatisticsService) SearchDividendsEstimates(userMenusCommand *command.SearchDividendsEstimatesCommand) (int64, interface{}, error) {
60 var items []*dto.DividendsEstimatesDto 60 var items []*dto.DividendsEstimatesDto
61 for i := 0; i < 2; i++ { 61 for i := 0; i < 2; i++ {
62 item := dto.NewDividendsEstimatesDto() 62 item := dto.NewDividendsEstimatesDto()
63 item.LoadDto() 63 item.LoadDto()
64 items = append(items, item) 64 items = append(items, item)
65 } 65 }
66 - return map[string]interface{}{  
67 - "list": items,  
68 - }, nil 66 + return 2, items, nil
69 } 67 }
@@ -56,14 +56,12 @@ func (srv PersonDividendsService) DividendsStatistics(userMenusCommand *command. @@ -56,14 +56,12 @@ func (srv PersonDividendsService) DividendsStatistics(userMenusCommand *command.
56 } 56 }
57 57
58 // SearchDividendsEstimates 企业的合约明细列表(分红预算信息) 58 // SearchDividendsEstimates 企业的合约明细列表(分红预算信息)
59 -func (srv PersonDividendsService) SearchDividendsEstimates(userMenusCommand *command.SearchDividendsEstimatesCommand) (interface{}, error) { 59 +func (srv PersonDividendsService) SearchDividendsEstimates(userMenusCommand *command.SearchDividendsEstimatesCommand) (int64, interface{}, error) {
60 var items []*dto.DividendsEstimatesDto 60 var items []*dto.DividendsEstimatesDto
61 for i := 0; i < 2; i++ { 61 for i := 0; i < 2; i++ {
62 item := dto.NewDividendsEstimatesDto() 62 item := dto.NewDividendsEstimatesDto()
63 item.LoadDto() 63 item.LoadDto()
64 items = append(items, item) 64 items = append(items, item)
65 } 65 }
66 - return map[string]interface{}{  
67 - "list": items,  
68 - }, nil 66 + return 2, items, nil
69 } 67 }
@@ -34,10 +34,33 @@ func (srv PersonStatisticsService) IndexStatistics(userMenusCommand *command.Ind @@ -34,10 +34,33 @@ func (srv PersonStatisticsService) IndexStatistics(userMenusCommand *command.Ind
34 34
35 // CompanyStatistics 共创用户-共创企业统计 35 // CompanyStatistics 共创用户-共创企业统计
36 func (srv PersonStatisticsService) CompanyStatistics(userMenusCommand *command.CooperationPersonStatisticsCommand) (interface{}, error) { 36 func (srv PersonStatisticsService) CompanyStatistics(userMenusCommand *command.CooperationPersonStatisticsCommand) (interface{}, error) {
37 - return map[string]interface{}{}, nil 37 + var values []interface{}
  38 + values = append(values, map[string]interface{}{
  39 + "company": map[string]interface{}{
  40 + "companyId": 5,
  41 + "companyName": "机会平台",
  42 + },
  43 + "cooperationProjectCount": 10,
  44 + "cooperationContractCount": 5,
  45 + "dividendsRatio": 50,
  46 + "dividendsIncome": 10009965,
  47 + })
  48 + values = append(values, map[string]interface{}{
  49 + "company": map[string]interface{}{
  50 + "companyId": 6,
  51 + "companyName": "机会平台2",
  52 + },
  53 + "cooperationProjectCount": 10,
  54 + "cooperationContractCount": 5,
  55 + "dividendsRatio": 50,
  56 + "dividendsIncome": 10009965,
  57 + })
  58 + return map[string]interface{}{
  59 + "list": values,
  60 + }, nil
38 } 61 }
39 62
40 -// CompanyDividendStatistics 共创用户-共创企业分红统计 63 +// CompanyDividendStatistics (废弃)共创用户-共创企业分红统计
41 func (srv PersonStatisticsService) CompanyDividendStatistics(userMenusCommand *command.CooperationPersonStatisticsCommand) (interface{}, error) { 64 func (srv PersonStatisticsService) CompanyDividendStatistics(userMenusCommand *command.CooperationPersonStatisticsCommand) (interface{}, error) {
42 return map[string]interface{}{}, nil 65 return map[string]interface{}{}, nil
43 } 66 }
1 package dto 1 package dto
2 2
3 type CompanyItem struct { 3 type CompanyItem struct {
4 - CompanyId int `json:"companyId,string"` 4 + CompanyId int `json:"companyId"`
5 CompanyName string `json:"companyName"` 5 CompanyName string `json:"companyName"`
6 } 6 }
7 7
8 type OrgItem struct { 8 type OrgItem struct {
9 - OrganizationId int `json:"organizationId,string"` 9 + OrganizationId int `json:"organizationId"`
10 OrganizationName string `json:"organizationName"` 10 OrganizationName string `json:"organizationName"`
11 CompanyId int `json:"companyId"` 11 CompanyId int `json:"companyId"`
12 } 12 }
@@ -400,8 +400,8 @@ func (controller *CooperationController) SearchDividendsEstimates() { @@ -400,8 +400,8 @@ func (controller *CooperationController) SearchDividendsEstimates() {
400 return 400 return
401 } 401 }
402 cmd.Operator = controller.GetOperator() 402 cmd.Operator = controller.GetOperator()
403 - data, err := svr.SearchDividendsEstimates(cmd)  
404 - controller.Response(data, err) 403 + total, data, err := svr.SearchDividendsEstimates(cmd)
  404 + controller.ReturnPageListData(total, data, err, cmd.PageNumber)
405 } 405 }
406 406
407 /***** PersonDividends 个人端分红 *****/ 407 /***** PersonDividends 个人端分红 *****/
@@ -454,8 +454,8 @@ func (controller *CooperationController) SearchDividendsEstimatesPerson() { @@ -454,8 +454,8 @@ func (controller *CooperationController) SearchDividendsEstimatesPerson() {
454 return 454 return
455 } 455 }
456 cmd.Operator = controller.GetOperator() 456 cmd.Operator = controller.GetOperator()
457 - data, err := svr.SearchDividendsEstimates(cmd)  
458 - controller.Response(data, err) 457 + total, data, err := svr.SearchDividendsEstimates(cmd)
  458 + controller.ReturnPageListData(total, data, err, cmd.PageNumber)
459 } 459 }
460 460
461 /***** CompanyStatistics 企业端统计 *****/ 461 /***** CompanyStatistics 企业端统计 *****/