作者 tangxuhui

添加json解析错误输出

@@ -27,6 +27,8 @@ func (controller *CooperationApplicationController) ListCooperationApplication() @@ -27,6 +27,8 @@ func (controller *CooperationApplicationController) ListCooperationApplication()
27 err := controller.Unmarshal(listCooperationApplicationQuery) 27 err := controller.Unmarshal(listCooperationApplicationQuery)
28 if err != nil { 28 if err != nil {
29 log.Logger.Debug("json err:" + err.Error()) 29 log.Logger.Debug("json err:" + err.Error())
  30 + controller.Response(nil, err)
  31 + return
30 } 32 }
31 listCooperationApplicationQuery.Operator = controller.GetOperator() 33 listCooperationApplicationQuery.Operator = controller.GetOperator()
32 cnt, data, err := cooperationApplicationService.ListCooperationApplication(listCooperationApplicationQuery) 34 cnt, data, err := cooperationApplicationService.ListCooperationApplication(listCooperationApplicationQuery)
@@ -39,6 +41,8 @@ func (controller *CooperationApplicationController) AuditCooperationApplication( @@ -39,6 +41,8 @@ func (controller *CooperationApplicationController) AuditCooperationApplication(
39 err := controller.Unmarshal(auditCooperationApplicationCommand) 41 err := controller.Unmarshal(auditCooperationApplicationCommand)
40 if err != nil { 42 if err != nil {
41 log.Logger.Debug("json err:" + err.Error()) 43 log.Logger.Debug("json err:" + err.Error())
  44 + controller.Response(nil, err)
  45 + return
42 } 46 }
43 auditCooperationApplicationCommand.Operator = controller.GetOperator() 47 auditCooperationApplicationCommand.Operator = controller.GetOperator()
44 data, err := cooperationApplicationService.AuditCooperationApplication(auditCooperationApplicationCommand) 48 data, err := cooperationApplicationService.AuditCooperationApplication(auditCooperationApplicationCommand)
@@ -17,6 +17,8 @@ func (controller *CooperationContractController) CreateCooperationContract() { @@ -17,6 +17,8 @@ func (controller *CooperationContractController) CreateCooperationContract() {
17 err := controller.Unmarshal(createCooperationContractCommand) 17 err := controller.Unmarshal(createCooperationContractCommand)
18 if err != nil { 18 if err != nil {
19 log.Logger.Debug("json err:" + err.Error()) 19 log.Logger.Debug("json err:" + err.Error())
  20 + controller.Response(nil, err)
  21 + return
20 } 22 }
21 createCooperationContractCommand.Operator = controller.GetOperator() 23 createCooperationContractCommand.Operator = controller.GetOperator()
22 data, err := cooperationContractService.CreateCooperationContract(createCooperationContractCommand) 24 data, err := cooperationContractService.CreateCooperationContract(createCooperationContractCommand)
@@ -29,6 +31,8 @@ func (controller *CooperationContractController) UpdateCooperationContract() { @@ -29,6 +31,8 @@ func (controller *CooperationContractController) UpdateCooperationContract() {
29 err := controller.Unmarshal(updateCooperationContractCommand) 31 err := controller.Unmarshal(updateCooperationContractCommand)
30 if err != nil { 32 if err != nil {
31 log.Logger.Debug("json err:" + err.Error()) 33 log.Logger.Debug("json err:" + err.Error())
  34 + controller.Response(nil, err)
  35 + return
32 } 36 }
33 contractId, _ := controller.GetInt(":contractId") 37 contractId, _ := controller.GetInt(":contractId")
34 updateCooperationContractCommand.Operator = controller.GetOperator() 38 updateCooperationContractCommand.Operator = controller.GetOperator()
@@ -53,6 +57,8 @@ func (controller *CooperationContractController) ListCooperationContract() { @@ -53,6 +57,8 @@ func (controller *CooperationContractController) ListCooperationContract() {
53 err := controller.Unmarshal(listCooperationContractQuery) 57 err := controller.Unmarshal(listCooperationContractQuery)
54 if err != nil { 58 if err != nil {
55 log.Logger.Debug("json err:" + err.Error()) 59 log.Logger.Debug("json err:" + err.Error())
  60 + controller.Response(nil, err)
  61 + return
56 } 62 }
57 listCooperationContractQuery.Operator = controller.GetOperator() 63 listCooperationContractQuery.Operator = controller.GetOperator()
58 cnt, data, err := cooperationContractService.ListCooperationContract(listCooperationContractQuery) 64 cnt, data, err := cooperationContractService.ListCooperationContract(listCooperationContractQuery)
@@ -65,6 +71,8 @@ func (controller *CooperationContractController) EnableCooperationContract() { @@ -65,6 +71,8 @@ func (controller *CooperationContractController) EnableCooperationContract() {
65 err := controller.Unmarshal(enableCooperationContractCommand) 71 err := controller.Unmarshal(enableCooperationContractCommand)
66 if err != nil { 72 if err != nil {
67 log.Logger.Debug("json err:" + err.Error()) 73 log.Logger.Debug("json err:" + err.Error())
  74 + controller.Response(nil, err)
  75 + return
68 } 76 }
69 data, err := cooperationContractService.EnableCooperationContract(enableCooperationContractCommand) 77 data, err := cooperationContractService.EnableCooperationContract(enableCooperationContractCommand)
70 controller.Response(data, err) 78 controller.Response(data, err)
@@ -76,6 +84,8 @@ func (controller *CooperationContractController) SearchCooperationContractsByUnd @@ -76,6 +84,8 @@ func (controller *CooperationContractController) SearchCooperationContractsByUnd
76 err := controller.Unmarshal(listCooperationContractQuery) 84 err := controller.Unmarshal(listCooperationContractQuery)
77 if err != nil { 85 if err != nil {
78 log.Logger.Debug("json err:" + err.Error()) 86 log.Logger.Debug("json err:" + err.Error())
  87 + controller.Response(nil, err)
  88 + return
79 } 89 }
80 listCooperationContractQuery.Operator = controller.GetOperator() 90 listCooperationContractQuery.Operator = controller.GetOperator()
81 cnt, data, err := cooperationContractService.SearchCooperationContractsByUndertake(listCooperationContractQuery) 91 cnt, data, err := cooperationContractService.SearchCooperationContractsByUndertake(listCooperationContractQuery)
@@ -88,6 +98,8 @@ func (controller *CooperationContractController) RemoveCooperationContract() { @@ -88,6 +98,8 @@ func (controller *CooperationContractController) RemoveCooperationContract() {
88 err := controller.Unmarshal(removeCooperationContractCommand) 98 err := controller.Unmarshal(removeCooperationContractCommand)
89 if err != nil { 99 if err != nil {
90 log.Logger.Debug("json err:" + err.Error()) 100 log.Logger.Debug("json err:" + err.Error())
  101 + controller.Response(nil, err)
  102 + return
91 } 103 }
92 data, err := cooperationContractService.RemoveCooperationContract(removeCooperationContractCommand) 104 data, err := cooperationContractService.RemoveCooperationContract(removeCooperationContractCommand)
93 controller.Response(data, err) 105 controller.Response(data, err)
@@ -17,6 +17,8 @@ func (controller *CooperationModeController) CreateCooperationMode() { @@ -17,6 +17,8 @@ func (controller *CooperationModeController) CreateCooperationMode() {
17 err := controller.Unmarshal(createCooperationModeCommand) 17 err := controller.Unmarshal(createCooperationModeCommand)
18 if err != nil { 18 if err != nil {
19 log.Logger.Debug("json err:" + err.Error()) 19 log.Logger.Debug("json err:" + err.Error())
  20 + controller.Response(nil, err)
  21 + return
20 } 22 }
21 createCooperationModeCommand.Operator = controller.GetOperator() 23 createCooperationModeCommand.Operator = controller.GetOperator()
22 data, err := cooperationModeService.CreateCooperationMode(createCooperationModeCommand) 24 data, err := cooperationModeService.CreateCooperationMode(createCooperationModeCommand)
@@ -29,6 +31,8 @@ func (controller *CooperationModeController) UpdateCooperationMode() { @@ -29,6 +31,8 @@ func (controller *CooperationModeController) UpdateCooperationMode() {
29 err := controller.Unmarshal(updateCooperationModeCommand) 31 err := controller.Unmarshal(updateCooperationModeCommand)
30 if err != nil { 32 if err != nil {
31 log.Logger.Debug("json err:" + err.Error()) 33 log.Logger.Debug("json err:" + err.Error())
  34 + controller.Response(nil, err)
  35 + return
32 } 36 }
33 modeId, _ := controller.GetInt(":modeId") 37 modeId, _ := controller.GetInt(":modeId")
34 updateCooperationModeCommand.Operator = controller.GetOperator() 38 updateCooperationModeCommand.Operator = controller.GetOperator()
@@ -53,6 +57,8 @@ func (controller *CooperationModeController) RemoveCooperationMode() { @@ -53,6 +57,8 @@ func (controller *CooperationModeController) RemoveCooperationMode() {
53 err := controller.Unmarshal(removeCooperationModeCommand) 57 err := controller.Unmarshal(removeCooperationModeCommand)
54 if err != nil { 58 if err != nil {
55 log.Logger.Debug("json err:" + err.Error()) 59 log.Logger.Debug("json err:" + err.Error())
  60 + controller.Response(nil, err)
  61 + return
56 } 62 }
57 removeCooperationModeCommand.Operator = controller.GetOperator() 63 removeCooperationModeCommand.Operator = controller.GetOperator()
58 64
@@ -66,6 +72,8 @@ func (controller *CooperationModeController) SearchCooperationMode() { @@ -66,6 +72,8 @@ func (controller *CooperationModeController) SearchCooperationMode() {
66 err := controller.Unmarshal(listCooperationModeQuery) 72 err := controller.Unmarshal(listCooperationModeQuery)
67 if err != nil { 73 if err != nil {
68 log.Logger.Debug("json err:" + err.Error()) 74 log.Logger.Debug("json err:" + err.Error())
  75 + controller.Response(nil, err)
  76 + return
69 } 77 }
70 listCooperationModeQuery.Operator = controller.GetOperator() 78 listCooperationModeQuery.Operator = controller.GetOperator()
71 cnt, data, err := cooperationModeService.ListCooperationMode(listCooperationModeQuery) 79 cnt, data, err := cooperationModeService.ListCooperationMode(listCooperationModeQuery)
@@ -78,6 +86,8 @@ func (controller *CooperationModeController) ListCooperationMode() { @@ -78,6 +86,8 @@ func (controller *CooperationModeController) ListCooperationMode() {
78 err := controller.Unmarshal(listCooperationModeQuery) 86 err := controller.Unmarshal(listCooperationModeQuery)
79 if err != nil { 87 if err != nil {
80 log.Logger.Debug("json err:" + err.Error()) 88 log.Logger.Debug("json err:" + err.Error())
  89 + controller.Response(nil, err)
  90 + return
81 } 91 }
82 listCooperationModeQuery.Operator = controller.GetOperator() 92 listCooperationModeQuery.Operator = controller.GetOperator()
83 listCooperationModeQuery.PageNumber = 1 93 listCooperationModeQuery.PageNumber = 1
@@ -92,6 +102,8 @@ func (controller *CooperationModeController) EnableCooperationMode() { @@ -92,6 +102,8 @@ func (controller *CooperationModeController) EnableCooperationMode() {
92 err := controller.Unmarshal(removeCooperationModeCommand) 102 err := controller.Unmarshal(removeCooperationModeCommand)
93 if err != nil { 103 if err != nil {
94 log.Logger.Debug("json err:" + err.Error()) 104 log.Logger.Debug("json err:" + err.Error())
  105 + controller.Response(nil, err)
  106 + return
95 } 107 }
96 removeCooperationModeCommand.Operator = controller.GetOperator() 108 removeCooperationModeCommand.Operator = controller.GetOperator()
97 109
@@ -17,6 +17,8 @@ func (controller *CooperationProjectController) CreateCooperationProject() { @@ -17,6 +17,8 @@ func (controller *CooperationProjectController) CreateCooperationProject() {
17 err := controller.Unmarshal(createCooperationProjectCommand) 17 err := controller.Unmarshal(createCooperationProjectCommand)
18 if err != nil { 18 if err != nil {
19 log.Logger.Debug("json err:" + err.Error()) 19 log.Logger.Debug("json err:" + err.Error())
  20 + controller.Response(nil, err)
  21 + return
20 } 22 }
21 createCooperationProjectCommand.Operator = controller.GetOperator() 23 createCooperationProjectCommand.Operator = controller.GetOperator()
22 data, err := cooperationProjectService.CreateCooperationProject(createCooperationProjectCommand) 24 data, err := cooperationProjectService.CreateCooperationProject(createCooperationProjectCommand)
@@ -29,6 +31,8 @@ func (controller *CooperationProjectController) UpdateCooperationProject() { @@ -29,6 +31,8 @@ func (controller *CooperationProjectController) UpdateCooperationProject() {
29 err := controller.Unmarshal(updateCooperationProjectCommand) 31 err := controller.Unmarshal(updateCooperationProjectCommand)
30 if err != nil { 32 if err != nil {
31 log.Logger.Debug("json err:" + err.Error()) 33 log.Logger.Debug("json err:" + err.Error())
  34 + controller.Response(nil, err)
  35 + return
32 } 36 }
33 projectId := controller.GetString(":projectId") 37 projectId := controller.GetString(":projectId")
34 updateCooperationProjectCommand.CooperationProjectId = projectId 38 updateCooperationProjectCommand.CooperationProjectId = projectId
@@ -55,6 +59,8 @@ func (controller *CooperationProjectController) ListCooperationProject() { @@ -55,6 +59,8 @@ func (controller *CooperationProjectController) ListCooperationProject() {
55 err := controller.Unmarshal(listCooperationProjectQuery) 59 err := controller.Unmarshal(listCooperationProjectQuery)
56 if err != nil { 60 if err != nil {
57 log.Logger.Debug("json err:" + err.Error()) 61 log.Logger.Debug("json err:" + err.Error())
  62 + controller.Response(nil, err)
  63 + return
58 } 64 }
59 listCooperationProjectQuery.Operator = controller.GetOperator() 65 listCooperationProjectQuery.Operator = controller.GetOperator()
60 cnt, data, err := cooperationProjectService.ListCooperationProject(listCooperationProjectQuery) 66 cnt, data, err := cooperationProjectService.ListCooperationProject(listCooperationProjectQuery)
@@ -67,6 +73,8 @@ func (controller *CooperationProjectController) SelectorCooperationProject() { @@ -67,6 +73,8 @@ func (controller *CooperationProjectController) SelectorCooperationProject() {
67 err := controller.Unmarshal(listCooperationProjectQuery) 73 err := controller.Unmarshal(listCooperationProjectQuery)
68 if err != nil { 74 if err != nil {
69 log.Logger.Debug("json err:" + err.Error()) 75 log.Logger.Debug("json err:" + err.Error())
  76 + controller.Response(nil, err)
  77 + return
70 } 78 }
71 listCooperationProjectQuery.Operator = controller.GetOperator() 79 listCooperationProjectQuery.Operator = controller.GetOperator()
72 cnt, data, err := cooperationProjectService.ListCooperationProjectSelector(listCooperationProjectQuery) 80 cnt, data, err := cooperationProjectService.ListCooperationProjectSelector(listCooperationProjectQuery)
@@ -79,6 +87,8 @@ func (controller *CooperationProjectController) EndCooperationProject() { @@ -79,6 +87,8 @@ func (controller *CooperationProjectController) EndCooperationProject() {
79 err := controller.Unmarshal(endCooperationProjectCommand) 87 err := controller.Unmarshal(endCooperationProjectCommand)
80 if err != nil { 88 if err != nil {
81 log.Logger.Debug("json err:" + err.Error()) 89 log.Logger.Debug("json err:" + err.Error())
  90 + controller.Response(nil, err)
  91 + return
82 } 92 }
83 endCooperationProjectCommand.Operator = controller.GetOperator() 93 endCooperationProjectCommand.Operator = controller.GetOperator()
84 data, err := cooperationProjectService.EndCooperationProject(endCooperationProjectCommand) 94 data, err := cooperationProjectService.EndCooperationProject(endCooperationProjectCommand)
@@ -18,6 +18,8 @@ func (controller *CreditAccountController) ListCreditAccount() { @@ -18,6 +18,8 @@ func (controller *CreditAccountController) ListCreditAccount() {
18 err := controller.Unmarshal(listQuery) 18 err := controller.Unmarshal(listQuery)
19 if err != nil { 19 if err != nil {
20 log.Logger.Debug("json err:" + err.Error()) 20 log.Logger.Debug("json err:" + err.Error())
  21 + controller.Response(nil, err)
  22 + return
21 } 23 }
22 listQuery.Operator = controller.GetOperator() 24 listQuery.Operator = controller.GetOperator()
23 cnt, data, err := creditAccountService.ListCreditAccount(listQuery) 25 cnt, data, err := creditAccountService.ListCreditAccount(listQuery)
@@ -43,6 +45,8 @@ func (controller *CreditAccountController) PayCreditAccount() { @@ -43,6 +45,8 @@ func (controller *CreditAccountController) PayCreditAccount() {
43 err := controller.Unmarshal(payCreditAccountCommand) 45 err := controller.Unmarshal(payCreditAccountCommand)
44 if err != nil { 46 if err != nil {
45 log.Logger.Debug("json err:" + err.Error()) 47 log.Logger.Debug("json err:" + err.Error())
  48 + controller.Response(nil, err)
  49 + return
46 } 50 }
47 payCreditAccountCommand.Operator = controller.GetOperator() 51 payCreditAccountCommand.Operator = controller.GetOperator()
48 data, err := creditAccountService.PayCreditAccount(payCreditAccountCommand) 52 data, err := creditAccountService.PayCreditAccount(payCreditAccountCommand)
@@ -56,6 +60,8 @@ func (controller *CreditAccountController) RemoveCreditAccount() { @@ -56,6 +60,8 @@ func (controller *CreditAccountController) RemoveCreditAccount() {
56 err := controller.Unmarshal(removeCreditAccountCommand) 60 err := controller.Unmarshal(removeCreditAccountCommand)
57 if err != nil { 61 if err != nil {
58 log.Logger.Debug("json err:" + err.Error()) 62 log.Logger.Debug("json err:" + err.Error())
  63 + controller.Response(nil, err)
  64 + return
59 } 65 }
60 removeCreditAccountCommand.Operator = controller.GetOperator() 66 removeCreditAccountCommand.Operator = controller.GetOperator()
61 data, err := creditAccountService.RemoveCreditAccount(removeCreditAccountCommand) 67 data, err := creditAccountService.RemoveCreditAccount(removeCreditAccountCommand)
@@ -18,6 +18,8 @@ func (controller *DividendsEstimateController) CancelDividendsEstimate() { @@ -18,6 +18,8 @@ func (controller *DividendsEstimateController) CancelDividendsEstimate() {
18 err := controller.Unmarshal(cancelDividendsEstimateCommand) 18 err := controller.Unmarshal(cancelDividendsEstimateCommand)
19 if err != nil { 19 if err != nil {
20 log.Logger.Debug("json err:" + err.Error()) 20 log.Logger.Debug("json err:" + err.Error())
  21 + controller.Response(nil, err)
  22 + return
21 } 23 }
22 cancelDividendsEstimateCommand.Operator = controller.GetOperator() 24 cancelDividendsEstimateCommand.Operator = controller.GetOperator()
23 data, err := dividendsEstimateService.CancelDividendsEstimate(cancelDividendsEstimateCommand) 25 data, err := dividendsEstimateService.CancelDividendsEstimate(cancelDividendsEstimateCommand)
@@ -31,6 +33,8 @@ func (controller *DividendsEstimateController) SearchDividendsEstimate() { @@ -31,6 +33,8 @@ func (controller *DividendsEstimateController) SearchDividendsEstimate() {
31 err := controller.Unmarshal(searchDividendsEstimateQuery) 33 err := controller.Unmarshal(searchDividendsEstimateQuery)
32 if err != nil { 34 if err != nil {
33 log.Logger.Debug("json err:" + err.Error()) 35 log.Logger.Debug("json err:" + err.Error())
  36 + controller.Response(nil, err)
  37 + return
34 } 38 }
35 searchDividendsEstimateQuery.Operator = controller.GetOperator() 39 searchDividendsEstimateQuery.Operator = controller.GetOperator()
36 cnt, data, err := dividendsEstimateService.SearchDividendsEstimate(searchDividendsEstimateQuery) 40 cnt, data, err := dividendsEstimateService.SearchDividendsEstimate(searchDividendsEstimateQuery)
@@ -44,6 +48,8 @@ func (controller *DividendsEstimateController) SearchDividendsIncentives() { @@ -44,6 +48,8 @@ func (controller *DividendsEstimateController) SearchDividendsIncentives() {
44 err := controller.Unmarshal(searchDividendsIncentivesQuery) 48 err := controller.Unmarshal(searchDividendsIncentivesQuery)
45 if err != nil { 49 if err != nil {
46 log.Logger.Debug("json err:" + err.Error()) 50 log.Logger.Debug("json err:" + err.Error())
  51 + controller.Response(nil, err)
  52 + return
47 } 53 }
48 searchDividendsIncentivesQuery.Operator = controller.GetOperator() 54 searchDividendsIncentivesQuery.Operator = controller.GetOperator()
49 cnt, data, err := dividendsEstimateService.SearchDividendsIncentives(searchDividendsIncentivesQuery) 55 cnt, data, err := dividendsEstimateService.SearchDividendsIncentives(searchDividendsIncentivesQuery)
@@ -57,6 +63,8 @@ func (controller *DividendsEstimateController) SearchMoneyIncentives() { @@ -57,6 +63,8 @@ func (controller *DividendsEstimateController) SearchMoneyIncentives() {
57 err := controller.Unmarshal(searchMoneyIncentivesQuery) 63 err := controller.Unmarshal(searchMoneyIncentivesQuery)
58 if err != nil { 64 if err != nil {
59 log.Logger.Debug("json err:" + err.Error()) 65 log.Logger.Debug("json err:" + err.Error())
  66 + controller.Response(nil, err)
  67 + return
60 } 68 }
61 searchMoneyIncentivesQuery.Operator = controller.GetOperator() 69 searchMoneyIncentivesQuery.Operator = controller.GetOperator()
62 cnt, data, err := dividendsEstimateService.SearchMoneyIncentives(searchMoneyIncentivesQuery) 70 cnt, data, err := dividendsEstimateService.SearchMoneyIncentives(searchMoneyIncentivesQuery)
@@ -70,6 +78,8 @@ func (controller *DividendsEstimateController) EstimateMoneyIncentives() { @@ -70,6 +78,8 @@ func (controller *DividendsEstimateController) EstimateMoneyIncentives() {
70 err := controller.Unmarshal(estimateMoneyIncentivesCommand) 78 err := controller.Unmarshal(estimateMoneyIncentivesCommand)
71 if err != nil { 79 if err != nil {
72 log.Logger.Debug("json err:" + err.Error()) 80 log.Logger.Debug("json err:" + err.Error())
  81 + controller.Response(nil, err)
  82 + return
73 } 83 }
74 estimateMoneyIncentivesCommand.Operator = controller.GetOperator() 84 estimateMoneyIncentivesCommand.Operator = controller.GetOperator()
75 data, err := dividendsEstimateService.EstimateMoneyIncentives(estimateMoneyIncentivesCommand) 85 data, err := dividendsEstimateService.EstimateMoneyIncentives(estimateMoneyIncentivesCommand)
@@ -83,6 +93,8 @@ func (controller *DividendsEstimateController) EstimateDividendsIncentives() { @@ -83,6 +93,8 @@ func (controller *DividendsEstimateController) EstimateDividendsIncentives() {
83 err := controller.Unmarshal(estimateDividendsIncentivesCommand) 93 err := controller.Unmarshal(estimateDividendsIncentivesCommand)
84 if err != nil { 94 if err != nil {
85 log.Logger.Debug("json err:" + err.Error()) 95 log.Logger.Debug("json err:" + err.Error())
  96 + controller.Response(nil, err)
  97 + return
86 } 98 }
87 estimateDividendsIncentivesCommand.Operator = controller.GetOperator() 99 estimateDividendsIncentivesCommand.Operator = controller.GetOperator()
88 data, err := dividendsEstimateService.EstimateDividendsIncentives(estimateDividendsIncentivesCommand) 100 data, err := dividendsEstimateService.EstimateDividendsIncentives(estimateDividendsIncentivesCommand)
@@ -96,6 +108,8 @@ func (controller *DividendsEstimateController) MoneyIncentivesSelector() { @@ -96,6 +108,8 @@ func (controller *DividendsEstimateController) MoneyIncentivesSelector() {
96 err := controller.Unmarshal(moneyIncentivesSelectorQuery) 108 err := controller.Unmarshal(moneyIncentivesSelectorQuery)
97 if err != nil { 109 if err != nil {
98 log.Logger.Debug("json err:" + err.Error()) 110 log.Logger.Debug("json err:" + err.Error())
  111 + controller.Response(nil, err)
  112 + return
99 } 113 }
100 moneyIncentivesSelectorQuery.Operator = controller.GetOperator() 114 moneyIncentivesSelectorQuery.Operator = controller.GetOperator()
101 data, err := dividendsEstimateService.MoneyIncentivesSelector(moneyIncentivesSelectorQuery) 115 data, err := dividendsEstimateService.MoneyIncentivesSelector(moneyIncentivesSelectorQuery)
@@ -109,6 +123,8 @@ func (controller *DividendsEstimateController) ConfimDividendsEstimate() { @@ -109,6 +123,8 @@ func (controller *DividendsEstimateController) ConfimDividendsEstimate() {
109 err := controller.Unmarshal(confimDividendsEstimateCommand) 123 err := controller.Unmarshal(confimDividendsEstimateCommand)
110 if err != nil { 124 if err != nil {
111 log.Logger.Debug("json err:" + err.Error()) 125 log.Logger.Debug("json err:" + err.Error())
  126 + controller.Response(nil, err)
  127 + return
112 } 128 }
113 confimDividendsEstimateCommand.Operator = controller.GetOperator() 129 confimDividendsEstimateCommand.Operator = controller.GetOperator()
114 data, err := dividendsEstimateService.ConfimDividendsEstimate(confimDividendsEstimateCommand) 130 data, err := dividendsEstimateService.ConfimDividendsEstimate(confimDividendsEstimateCommand)
@@ -17,6 +17,8 @@ func (controller *DividendsOrderController) CreateDividendsOrder() { @@ -17,6 +17,8 @@ func (controller *DividendsOrderController) CreateDividendsOrder() {
17 err := controller.Unmarshal(createDividendsOrderCommand) 17 err := controller.Unmarshal(createDividendsOrderCommand)
18 if err != nil { 18 if err != nil {
19 log.Logger.Debug("json err:" + err.Error()) 19 log.Logger.Debug("json err:" + err.Error())
  20 + controller.Response(nil, err)
  21 + return
20 } 22 }
21 createDividendsOrderCommand.Operator = controller.GetOperator() 23 createDividendsOrderCommand.Operator = controller.GetOperator()
22 data, err := dividendsOrderService.CreateDividendsOrder(createDividendsOrderCommand) 24 data, err := dividendsOrderService.CreateDividendsOrder(createDividendsOrderCommand)
@@ -29,6 +31,8 @@ func (controller *DividendsOrderController) UpdateDividendsOrder() { @@ -29,6 +31,8 @@ func (controller *DividendsOrderController) UpdateDividendsOrder() {
29 err := controller.Unmarshal(updateDividendsOrderCommand) 31 err := controller.Unmarshal(updateDividendsOrderCommand)
30 if err != nil { 32 if err != nil {
31 log.Logger.Debug("json err:" + err.Error()) 33 log.Logger.Debug("json err:" + err.Error())
  34 + controller.Response(nil, err)
  35 + return
32 } 36 }
33 orderId, _ := controller.GetInt(":orderId") 37 orderId, _ := controller.GetInt(":orderId")
34 updateDividendsOrderCommand.Operator = controller.GetOperator() 38 updateDividendsOrderCommand.Operator = controller.GetOperator()
@@ -43,6 +47,8 @@ func (controller *DividendsOrderController) RemoveDividendsOrder() { @@ -43,6 +47,8 @@ func (controller *DividendsOrderController) RemoveDividendsOrder() {
43 err := controller.Unmarshal(removeDividendsOrderCommand) 47 err := controller.Unmarshal(removeDividendsOrderCommand)
44 if err != nil { 48 if err != nil {
45 log.Logger.Debug("json err:" + err.Error()) 49 log.Logger.Debug("json err:" + err.Error())
  50 + controller.Response(nil, err)
  51 + return
46 } 52 }
47 removeDividendsOrderCommand.Operator = controller.GetOperator() 53 removeDividendsOrderCommand.Operator = controller.GetOperator()
48 54
@@ -66,6 +72,8 @@ func (controller *DividendsOrderController) SearchDividendsOrder() { @@ -66,6 +72,8 @@ func (controller *DividendsOrderController) SearchDividendsOrder() {
66 err := controller.Unmarshal(searchDividendsOrderQuery) 72 err := controller.Unmarshal(searchDividendsOrderQuery)
67 if err != nil { 73 if err != nil {
68 log.Logger.Debug("json err:" + err.Error()) 74 log.Logger.Debug("json err:" + err.Error())
  75 + controller.Response(nil, err)
  76 + return
69 } 77 }
70 searchDividendsOrderQuery.Operator = controller.GetOperator() 78 searchDividendsOrderQuery.Operator = controller.GetOperator()
71 cnt, data, err := dividendsOrderService.SearchDividendsOrder(searchDividendsOrderQuery) 79 cnt, data, err := dividendsOrderService.SearchDividendsOrder(searchDividendsOrderQuery)
@@ -17,6 +17,8 @@ func (controller *DividendsReturnedOrderController) CreateDividendsReturnedOrder @@ -17,6 +17,8 @@ func (controller *DividendsReturnedOrderController) CreateDividendsReturnedOrder
17 err := controller.Unmarshal(createDividendsReturnedOrderCommand) 17 err := controller.Unmarshal(createDividendsReturnedOrderCommand)
18 if err != nil { 18 if err != nil {
19 log.Logger.Debug("json err:" + err.Error()) 19 log.Logger.Debug("json err:" + err.Error())
  20 + controller.Response(nil, err)
  21 + return
20 } 22 }
21 createDividendsReturnedOrderCommand.Operator = controller.GetOperator() 23 createDividendsReturnedOrderCommand.Operator = controller.GetOperator()
22 data, err := dividendsReturnedOrderService.CreateDividendsReturnedOrder(createDividendsReturnedOrderCommand) 24 data, err := dividendsReturnedOrderService.CreateDividendsReturnedOrder(createDividendsReturnedOrderCommand)
@@ -29,6 +31,8 @@ func (controller *DividendsReturnedOrderController) UpdateDividendsReturnedOrder @@ -29,6 +31,8 @@ func (controller *DividendsReturnedOrderController) UpdateDividendsReturnedOrder
29 err := controller.Unmarshal(updateDividendsReturnedOrderCommand) 31 err := controller.Unmarshal(updateDividendsReturnedOrderCommand)
30 if err != nil { 32 if err != nil {
31 log.Logger.Debug("json err:" + err.Error()) 33 log.Logger.Debug("json err:" + err.Error())
  34 + controller.Response(nil, err)
  35 + return
32 } 36 }
33 projectId, _ := controller.GetInt(":projectId") 37 projectId, _ := controller.GetInt(":projectId")
34 updateDividendsReturnedOrderCommand.DividendsReturnedOrderID = projectId 38 updateDividendsReturnedOrderCommand.DividendsReturnedOrderID = projectId
@@ -43,6 +47,8 @@ func (controller *DividendsReturnedOrderController) RemoveDividendsReturnedOrder @@ -43,6 +47,8 @@ func (controller *DividendsReturnedOrderController) RemoveDividendsReturnedOrder
43 err := controller.Unmarshal(removeDividendsReturnedOrderCommand) 47 err := controller.Unmarshal(removeDividendsReturnedOrderCommand)
44 if err != nil { 48 if err != nil {
45 log.Logger.Debug("json err:" + err.Error()) 49 log.Logger.Debug("json err:" + err.Error())
  50 + controller.Response(nil, err)
  51 + return
46 } 52 }
47 removeDividendsReturnedOrderCommand.Operator = controller.GetOperator() 53 removeDividendsReturnedOrderCommand.Operator = controller.GetOperator()
48 data, err := dividendsReturnedOrderService.RemoveDividendsReturnedOrder(removeDividendsReturnedOrderCommand) 54 data, err := dividendsReturnedOrderService.RemoveDividendsReturnedOrder(removeDividendsReturnedOrderCommand)
@@ -65,6 +71,8 @@ func (controller *DividendsReturnedOrderController) SearchDividendsReturnedOrder @@ -65,6 +71,8 @@ func (controller *DividendsReturnedOrderController) SearchDividendsReturnedOrder
65 err := controller.Unmarshal(searchDividendsReturnedOrderQuery) 71 err := controller.Unmarshal(searchDividendsReturnedOrderQuery)
66 if err != nil { 72 if err != nil {
67 log.Logger.Debug("json err:" + err.Error()) 73 log.Logger.Debug("json err:" + err.Error())
  74 + controller.Response(nil, err)
  75 + return
68 } 76 }
69 searchDividendsReturnedOrderQuery.Operator = controller.GetOperator() 77 searchDividendsReturnedOrderQuery.Operator = controller.GetOperator()
70 cnt, data, err := dividendsReturnedOrderService.SearchDividendsReturnedOrder(searchDividendsReturnedOrderQuery) 78 cnt, data, err := dividendsReturnedOrderService.SearchDividendsReturnedOrder(searchDividendsReturnedOrderQuery)
@@ -77,6 +85,8 @@ func (controller *DividendsReturnedOrderController) SelectorDividendsOrder() { @@ -77,6 +85,8 @@ func (controller *DividendsReturnedOrderController) SelectorDividendsOrder() {
77 err := controller.Unmarshal(selectorDividendsOrderQuery) 85 err := controller.Unmarshal(selectorDividendsOrderQuery)
78 if err != nil { 86 if err != nil {
79 log.Logger.Debug("json err:" + err.Error()) 87 log.Logger.Debug("json err:" + err.Error())
  88 + controller.Response(nil, err)
  89 + return
80 } 90 }
81 selectorDividendsOrderQuery.Operator = controller.GetOperator() 91 selectorDividendsOrderQuery.Operator = controller.GetOperator()
82 cnt, data, err := dividendsReturnedOrderService.SelectorDividendsOrder(selectorDividendsOrderQuery) 92 cnt, data, err := dividendsReturnedOrderService.SelectorDividendsOrder(selectorDividendsOrderQuery)