作者 yangfu
正在显示 23 个修改的文件 包含 275 行增加165 行删除
@@ -116,6 +116,7 @@ func (cooperationProjectService *CooperationProjectService) ListCooperationProje @@ -116,6 +116,7 @@ func (cooperationProjectService *CooperationProjectService) ListCooperationProje
116 DepartmentName: listCooperationProjectQuery.DepartmentName, 116 DepartmentName: listCooperationProjectQuery.DepartmentName,
117 //项目名 117 //项目名
118 CooperationProjectName: listCooperationProjectQuery.CooperationProjectName, 118 CooperationProjectName: listCooperationProjectQuery.CooperationProjectName,
  119 + CompanyId: listCooperationProjectQuery.Operator.CompanyId,
119 }) 120 })
120 if err != nil { 121 if err != nil {
121 return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 122 return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
1 package command 1 package command
2 2
3 import ( 3 import (
4 - "fmt"  
5 - "strconv"  
6 -  
7 - "github.com/beego/beego/v2/core/validation"  
8 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" 4 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
9 ) 5 )
10 6
@@ -12,13 +8,13 @@ type CreateDividendsOrderCommand struct { @@ -12,13 +8,13 @@ type CreateDividendsOrderCommand struct {
12 //操作人 8 //操作人
13 Operator domain.Operator `json:"-"` 9 Operator domain.Operator `json:"-"`
14 //客户名称 10 //客户名称
15 - CustomerName string `json:"customerName" valid:"Required"` 11 + CustomerName string `json:"customerName"`
16 //分红订单原单号 12 //分红订单原单号
17 - DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum" valid:"Required"` 13 + DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum"`
18 //订单产生时间 时间戳 毫秒 14 //订单产生时间 时间戳 毫秒
19 - OrderTime int64 `json:"orderTime" valid:"Required"` 15 + OrderTime int64 `json:"orderTime"`
20 //备注 16 //备注
21 - Remarks string `json:"remarks" valid:"Required"` 17 + Remarks string `json:"remarks"`
22 //订单操作人uid 18 //订单操作人uid
23 OperatorUid string `json:"operatorUid"` 19 OperatorUid string `json:"operatorUid"`
24 //区域名称 20 //区域名称
@@ -35,25 +31,25 @@ type CreateDividendsOrderCommand struct { @@ -35,25 +31,25 @@ type CreateDividendsOrderCommand struct {
35 } `json:"orderGoods"` 31 } `json:"orderGoods"`
36 } 32 }
37 33
38 -func (createDividendsOrderCommand *CreateDividendsOrderCommand) Valid(validation *validation.Validation) {  
39 - // 162 92522 89000  
40 - orderTimeStr := strconv.Itoa(int(createDividendsOrderCommand.OrderTime))  
41 - orderTimeStrRune := []rune(orderTimeStr)  
42 - if len(orderTimeStrRune) != 13 {  
43 - validation.AddError("订单产生时间", "格式错误")  
44 - }  
45 -} 34 +// func (createDividendsOrderCommand *CreateDividendsOrderCommand) Valid(validation *validation.Validation) {
  35 +// // 162 92522 89000
  36 +// orderTimeStr := strconv.Itoa(int(createDividendsOrderCommand.OrderTime))
  37 +// orderTimeStrRune := []rune(orderTimeStr)
  38 +// if len(orderTimeStrRune) != 13 {
  39 +// validation.AddError("订单产生时间", "格式错误")
  40 +// }
  41 +// }
46 42
47 -func (createDividendsOrderCommand *CreateDividendsOrderCommand) ValidateCommand() error {  
48 - valid := validation.Validation{}  
49 - b, err := valid.Valid(createDividendsOrderCommand)  
50 - if err != nil {  
51 - return err  
52 - }  
53 - if !b {  
54 - for _, validErr := range valid.Errors {  
55 - return fmt.Errorf("%s %s", validErr.Key, validErr.Message)  
56 - }  
57 - }  
58 - return nil  
59 -} 43 +// func (createDividendsOrderCommand *CreateDividendsOrderCommand) ValidateCommand() error {
  44 +// valid := validation.Validation{}
  45 +// b, err := valid.Valid(createDividendsOrderCommand)
  46 +// if err != nil {
  47 +// return err
  48 +// }
  49 +// if !b {
  50 +// for _, validErr := range valid.Errors {
  51 +// return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  52 +// }
  53 +// }
  54 +// return nil
  55 +// }
1 package command 1 package command
2 2
3 import ( 3 import (
4 - "fmt"  
5 -  
6 - "github.com/beego/beego/v2/core/validation"  
7 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" 4 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
8 ) 5 )
9 6
@@ -11,23 +8,23 @@ type RemoveDividendsOrderCommand struct { @@ -11,23 +8,23 @@ type RemoveDividendsOrderCommand struct {
11 //操作人 8 //操作人
12 Operator domain.Operator `json:"-"` 9 Operator domain.Operator `json:"-"`
13 // 分红订单ID 10 // 分红订单ID
14 - DividendsOrderId []string `json:"dividendsOrderId" valid:"Required"` 11 + DividendsOrderId []string `json:"dividendsOrderId"`
15 } 12 }
16 13
17 -func (removeDividendsOrderCommand *RemoveDividendsOrderCommand) Valid(validation *validation.Validation) { 14 +// func (removeDividendsOrderCommand *RemoveDividendsOrderCommand) Valid(validation *validation.Validation) {
18 15
19 -} 16 +// }
20 17
21 -func (removeDividendsOrderCommand *RemoveDividendsOrderCommand) ValidateCommand() error {  
22 - valid := validation.Validation{}  
23 - b, err := valid.Valid(removeDividendsOrderCommand)  
24 - if err != nil {  
25 - return err  
26 - }  
27 - if !b {  
28 - for _, validErr := range valid.Errors {  
29 - return fmt.Errorf("%s %s", validErr.Key, validErr.Message)  
30 - }  
31 - }  
32 - return nil  
33 -} 18 +// func (removeDividendsOrderCommand *RemoveDividendsOrderCommand) ValidateCommand() error {
  19 +// valid := validation.Validation{}
  20 +// b, err := valid.Valid(removeDividendsOrderCommand)
  21 +// if err != nil {
  22 +// return err
  23 +// }
  24 +// if !b {
  25 +// for _, validErr := range valid.Errors {
  26 +// return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  27 +// }
  28 +// }
  29 +// return nil
  30 +// }
1 package command 1 package command
2 2
3 import ( 3 import (
4 - "fmt"  
5 - "strconv"  
6 -  
7 - "github.com/beego/beego/v2/core/validation"  
8 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" 4 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
9 ) 5 )
10 6
@@ -14,15 +10,15 @@ type UpdateDividendsOrderCommand struct { @@ -14,15 +10,15 @@ type UpdateDividendsOrderCommand struct {
14 //分红订单 10 //分红订单
15 DividendsOrderID int `json:"dividendsOrderId"` 11 DividendsOrderID int `json:"dividendsOrderId"`
16 //客户名称 12 //客户名称
17 - CustomerName string `json:"customerName" valid:"Required"` 13 + CustomerName string `json:"customerName"`
18 //分红订单金额 14 //分红订单金额
19 - DividendsOrderAmount float64 `json:"dividendsOrderAmount" valid:"Required"` 15 + DividendsOrderAmount float64 `json:"dividendsOrderAmount"`
20 //分红订单原单号 16 //分红订单原单号
21 - DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum" valid:"Required"` 17 + DividendsOriginalOrderNum string `json:"dividendsOriginalOrderNum"`
22 //订单产生时间 时间戳 毫秒 18 //订单产生时间 时间戳 毫秒
23 - OrderTime int64 `json:"orderTime" valid:"Required"` 19 + OrderTime int64 `json:"orderTime" `
24 //备注 20 //备注
25 - Remarks string `json:"remarks" valid:"Required"` 21 + Remarks string `json:"remarks"`
26 //区域名称 22 //区域名称
27 RegionName string `json:"regionName"` 23 RegionName string `json:"regionName"`
28 //订单产品列表 24 //订单产品列表
@@ -37,25 +33,25 @@ type UpdateDividendsOrderCommand struct { @@ -37,25 +33,25 @@ type UpdateDividendsOrderCommand struct {
37 } `json:"orderGoods"` 33 } `json:"orderGoods"`
38 } 34 }
39 35
40 -func (updateDividendsOrderCommand *UpdateDividendsOrderCommand) Valid(validation *validation.Validation) {  
41 - // 162 92522 89000  
42 - orderTimeStr := strconv.Itoa(int(updateDividendsOrderCommand.OrderTime))  
43 - orderTimeStrRune := []rune(orderTimeStr)  
44 - if len(orderTimeStrRune) != 13 {  
45 - validation.AddError("订单产生时间", "格式错误")  
46 - }  
47 -} 36 +// func (updateDividendsOrderCommand *UpdateDividendsOrderCommand) Valid(validation *validation.Validation) {
  37 +// // 162 92522 89000
  38 +// orderTimeStr := strconv.Itoa(int(updateDividendsOrderCommand.OrderTime))
  39 +// orderTimeStrRune := []rune(orderTimeStr)
  40 +// if len(orderTimeStrRune) != 13 {
  41 +// validation.AddError("订单产生时间", "格式错误")
  42 +// }
  43 +// }
48 44
49 -func (updateDividendsOrderCommand *UpdateDividendsOrderCommand) ValidateCommand() error {  
50 - valid := validation.Validation{}  
51 - b, err := valid.Valid(updateDividendsOrderCommand)  
52 - if err != nil {  
53 - return err  
54 - }  
55 - if !b {  
56 - for _, validErr := range valid.Errors {  
57 - return fmt.Errorf("%s %s", validErr.Key, validErr.Message)  
58 - }  
59 - }  
60 - return nil  
61 -} 45 +// func (updateDividendsOrderCommand *UpdateDividendsOrderCommand) ValidateCommand() error {
  46 +// valid := validation.Validation{}
  47 +// b, err := valid.Valid(updateDividendsOrderCommand)
  48 +// if err != nil {
  49 +// return err
  50 +// }
  51 +// if !b {
  52 +// for _, validErr := range valid.Errors {
  53 +// return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  54 +// }
  55 +// }
  56 +// return nil
  57 +// }
1 package query 1 package query
2 2
3 import ( 3 import (
4 - "fmt"  
5 -  
6 - "github.com/beego/beego/v2/core/validation"  
7 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" 4 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
8 ) 5 )
9 6
@@ -14,20 +11,20 @@ type GetDividendsOrderQuery struct { @@ -14,20 +11,20 @@ type GetDividendsOrderQuery struct {
14 DividendsOrderId int `json:"dividendsOrderId,string" valid:"Required"` 11 DividendsOrderId int `json:"dividendsOrderId,string" valid:"Required"`
15 } 12 }
16 13
17 -func (getDividendsOrderQuery *GetDividendsOrderQuery) Valid(validation *validation.Validation) { 14 +// func (getDividendsOrderQuery *GetDividendsOrderQuery) Valid(validation *validation.Validation) {
18 15
19 -} 16 +// }
20 17
21 -func (getDividendsOrderQuery *GetDividendsOrderQuery) ValidateQuery() error {  
22 - valid := validation.Validation{}  
23 - b, err := valid.Valid(getDividendsOrderQuery)  
24 - if err != nil {  
25 - return err  
26 - }  
27 - if !b {  
28 - for _, validErr := range valid.Errors {  
29 - return fmt.Errorf("%s %s", validErr.Key, validErr.Message)  
30 - }  
31 - }  
32 - return nil  
33 -} 18 +// func (getDividendsOrderQuery *GetDividendsOrderQuery) ValidateQuery() error {
  19 +// valid := validation.Validation{}
  20 +// b, err := valid.Valid(getDividendsOrderQuery)
  21 +// if err != nil {
  22 +// return err
  23 +// }
  24 +// if !b {
  25 +// for _, validErr := range valid.Errors {
  26 +// return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  27 +// }
  28 +// }
  29 +// return nil
  30 +// }
1 package query 1 package query
2 2
3 -import (  
4 - "fmt"  
5 -  
6 - "github.com/beego/beego/v2/core/validation"  
7 -)  
8 -  
9 type ListDividendsOrdersQuery struct { 3 type ListDividendsOrdersQuery struct {
10 // 页码 4 // 页码
11 PageNumber int `json:"pageNumber"` 5 PageNumber int `json:"pageNumber"`
@@ -13,20 +7,20 @@ type ListDividendsOrdersQuery struct { @@ -13,20 +7,20 @@ type ListDividendsOrdersQuery struct {
13 PageSize int `json:"pageSize"` 7 PageSize int `json:"pageSize"`
14 } 8 }
15 9
16 -func (listDividendsOrdersQuery *ListDividendsOrdersQuery) Valid(validation *validation.Validation) { 10 +// func (listDividendsOrdersQuery *ListDividendsOrdersQuery) Valid(validation *validation.Validation) {
17 11
18 -} 12 +// }
19 13
20 -func (listDividendsOrdersQuery *ListDividendsOrdersQuery) ValidateQuery() error {  
21 - valid := validation.Validation{}  
22 - b, err := valid.Valid(listDividendsOrdersQuery)  
23 - if err != nil {  
24 - return err  
25 - }  
26 - if !b {  
27 - for _, validErr := range valid.Errors {  
28 - return fmt.Errorf("%s %s", validErr.Key, validErr.Message)  
29 - }  
30 - }  
31 - return nil  
32 -} 14 +// func (listDividendsOrdersQuery *ListDividendsOrdersQuery) ValidateQuery() error {
  15 +// valid := validation.Validation{}
  16 +// b, err := valid.Valid(listDividendsOrdersQuery)
  17 +// if err != nil {
  18 +// return err
  19 +// }
  20 +// if !b {
  21 +// for _, validErr := range valid.Errors {
  22 +// return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  23 +// }
  24 +// }
  25 +// return nil
  26 +// }
1 package query 1 package query
2 2
3 import ( 3 import (
4 - "fmt"  
5 -  
6 - "github.com/beego/beego/v2/core/validation"  
7 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" 4 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
8 ) 5 )
9 6
@@ -20,20 +17,20 @@ type SearchDividendsOrderQuery struct { @@ -20,20 +17,20 @@ type SearchDividendsOrderQuery struct {
20 PageSize int `json:"pageSize"` 17 PageSize int `json:"pageSize"`
21 } 18 }
22 19
23 -func (searchDividendsOrderQuery *SearchDividendsOrderQuery) Valid(validation *validation.Validation) { 20 +// func (searchDividendsOrderQuery *SearchDividendsOrderQuery) Valid(validation *validation.Validation) {
24 21
25 -} 22 +// }
26 23
27 -func (searchDividendsOrderQuery *SearchDividendsOrderQuery) ValidateQuery() error {  
28 - valid := validation.Validation{}  
29 - b, err := valid.Valid(searchDividendsOrderQuery)  
30 - if err != nil {  
31 - return err  
32 - }  
33 - if !b {  
34 - for _, validErr := range valid.Errors {  
35 - return fmt.Errorf("%s %s", validErr.Key, validErr.Message)  
36 - }  
37 - }  
38 - return nil  
39 -} 24 +// func (searchDividendsOrderQuery *SearchDividendsOrderQuery) ValidateQuery() error {
  25 +// valid := validation.Validation{}
  26 +// b, err := valid.Valid(searchDividendsOrderQuery)
  27 +// if err != nil {
  28 +// return err
  29 +// }
  30 +// if !b {
  31 +// for _, validErr := range valid.Errors {
  32 +// return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
  33 +// }
  34 +// }
  35 +// return nil
  36 +// }
@@ -16,9 +16,9 @@ type DividendsOrderService struct { @@ -16,9 +16,9 @@ type DividendsOrderService struct {
16 16
17 // 创建分红订单实体对象 17 // 创建分红订单实体对象
18 func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createDividendsOrderCommand *command.CreateDividendsOrderCommand) (interface{}, error) { 18 func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createDividendsOrderCommand *command.CreateDividendsOrderCommand) (interface{}, error) {
19 - if err := createDividendsOrderCommand.ValidateCommand(); err != nil {  
20 - return nil, application.ThrowError(application.ARG_ERROR, err.Error())  
21 - } 19 + // if err := createDividendsOrderCommand.ValidateCommand(); err != nil {
  20 + // return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  21 + // }
22 orderGoods := []allied_creation_cooperation.DividendsOrderGoodAdd{} 22 orderGoods := []allied_creation_cooperation.DividendsOrderGoodAdd{}
23 for _, v := range createDividendsOrderCommand.OrderGoods { 23 for _, v := range createDividendsOrderCommand.OrderGoods {
24 good := allied_creation_cooperation.DividendsOrderGoodAdd{ 24 good := allied_creation_cooperation.DividendsOrderGoodAdd{
@@ -53,9 +53,9 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD @@ -53,9 +53,9 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD
53 53
54 // 返回分红订单实体对象 54 // 返回分红订单实体对象
55 func (dividendsOrderService *DividendsOrderService) GetDividendsOrder(getDividendsOrderQuery *query.GetDividendsOrderQuery) (interface{}, error) { 55 func (dividendsOrderService *DividendsOrderService) GetDividendsOrder(getDividendsOrderQuery *query.GetDividendsOrderQuery) (interface{}, error) {
56 - if err := getDividendsOrderQuery.ValidateQuery(); err != nil {  
57 - return nil, application.ThrowError(application.ARG_ERROR, err.Error())  
58 - } 56 + // if err := getDividendsOrderQuery.ValidateQuery(); err != nil {
  57 + // return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  58 + // }
59 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(getDividendsOrderQuery.Operator) 59 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(getDividendsOrderQuery.Operator)
60 result, err := creationCooperationGateway.DividendsOrderGet(allied_creation_cooperation.ReqDividendsOrderGet{ 60 result, err := creationCooperationGateway.DividendsOrderGet(allied_creation_cooperation.ReqDividendsOrderGet{
61 DividendsOrderId: getDividendsOrderQuery.DividendsOrderId, 61 DividendsOrderId: getDividendsOrderQuery.DividendsOrderId,
@@ -68,9 +68,9 @@ func (dividendsOrderService *DividendsOrderService) GetDividendsOrder(getDividen @@ -68,9 +68,9 @@ func (dividendsOrderService *DividendsOrderService) GetDividendsOrder(getDividen
68 68
69 // 移除分红订单实体对象 69 // 移除分红订单实体对象
70 func (dividendsOrderService *DividendsOrderService) RemoveDividendsOrder(removeDividendsOrderCommand *command.RemoveDividendsOrderCommand) (interface{}, error) { 70 func (dividendsOrderService *DividendsOrderService) RemoveDividendsOrder(removeDividendsOrderCommand *command.RemoveDividendsOrderCommand) (interface{}, error) {
71 - if err := removeDividendsOrderCommand.ValidateCommand(); err != nil {  
72 - return nil, application.ThrowError(application.ARG_ERROR, err.Error())  
73 - } 71 + // if err := removeDividendsOrderCommand.ValidateCommand(); err != nil {
  72 + // return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  73 + // }
74 74
75 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(removeDividendsOrderCommand.Operator) 75 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(removeDividendsOrderCommand.Operator)
76 _, err := creationCooperationGateway.DividendsOrderBatchRemove(allied_creation_cooperation.ReqDividendsOrderBatchRemove{ 76 _, err := creationCooperationGateway.DividendsOrderBatchRemove(allied_creation_cooperation.ReqDividendsOrderBatchRemove{
@@ -84,9 +84,9 @@ func (dividendsOrderService *DividendsOrderService) RemoveDividendsOrder(removeD @@ -84,9 +84,9 @@ func (dividendsOrderService *DividendsOrderService) RemoveDividendsOrder(removeD
84 84
85 // 查询分红订单方法 85 // 查询分红订单方法
86 func (dividendsOrderService *DividendsOrderService) SearchDividendsOrder(searchDividendsOrderQuery *query.SearchDividendsOrderQuery) (int, interface{}, error) { 86 func (dividendsOrderService *DividendsOrderService) SearchDividendsOrder(searchDividendsOrderQuery *query.SearchDividendsOrderQuery) (int, interface{}, error) {
87 - if err := searchDividendsOrderQuery.ValidateQuery(); err != nil {  
88 - return 0, nil, application.ThrowError(application.ARG_ERROR, err.Error())  
89 - } 87 + // if err := searchDividendsOrderQuery.ValidateQuery(); err != nil {
  88 + // return 0, nil, application.ThrowError(application.ARG_ERROR, err.Error())
  89 + // }
90 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(searchDividendsOrderQuery.Operator) 90 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(searchDividendsOrderQuery.Operator)
91 result, err := creationCooperationGateway.DividendsOrderSearch(allied_creation_cooperation.ReqDividendsOrderSearch{ 91 result, err := creationCooperationGateway.DividendsOrderSearch(allied_creation_cooperation.ReqDividendsOrderSearch{
92 PageNumber: searchDividendsOrderQuery.PageNumber, 92 PageNumber: searchDividendsOrderQuery.PageNumber,
@@ -107,9 +107,9 @@ func (dividendsOrderService *DividendsOrderService) SearchDividendsOrder(searchD @@ -107,9 +107,9 @@ func (dividendsOrderService *DividendsOrderService) SearchDividendsOrder(searchD
107 107
108 // 更新分红订单实体对象 108 // 更新分红订单实体对象
109 func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateDividendsOrderCommand *command.UpdateDividendsOrderCommand) (interface{}, error) { 109 func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateDividendsOrderCommand *command.UpdateDividendsOrderCommand) (interface{}, error) {
110 - if err := updateDividendsOrderCommand.ValidateCommand(); err != nil {  
111 - return nil, application.ThrowError(application.ARG_ERROR, err.Error())  
112 - } 110 + // if err := updateDividendsOrderCommand.ValidateCommand(); err != nil {
  111 + // return nil, application.ThrowError(application.ARG_ERROR, err.Error())
  112 + // }
113 orderGoods := []allied_creation_cooperation.DividendsOrderGoods{} 113 orderGoods := []allied_creation_cooperation.DividendsOrderGoods{}
114 for _, v := range updateDividendsOrderCommand.OrderGoods { 114 for _, v := range updateDividendsOrderCommand.OrderGoods {
115 good := allied_creation_cooperation.DividendsOrderGoods{ 115 good := allied_creation_cooperation.DividendsOrderGoods{
@@ -2,7 +2,6 @@ package command @@ -2,7 +2,6 @@ package command
2 2
3 import ( 3 import (
4 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" 4 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
5 - "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"  
6 ) 5 )
7 6
8 type CreateDividendsReturnedOrderCommand struct { 7 type CreateDividendsReturnedOrderCommand struct {
@@ -11,9 +10,14 @@ type CreateDividendsReturnedOrderCommand struct { @@ -11,9 +10,14 @@ type CreateDividendsReturnedOrderCommand struct {
11 DividendsReturnedCustomerName string `json:"dividendsReturnedCustomerName"` //退货客户 10 DividendsReturnedCustomerName string `json:"dividendsReturnedCustomerName"` //退货客户
12 DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号 11 DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号
13 OriginalOrderNum string `json:"originalOrderNum"` //源单号 12 OriginalOrderNum string `json:"originalOrderNum"` //源单号
14 - //货品  
15 - OrderGoods []allied_creation_cooperation.DividendsReturnedOrderGoods `json:"orderGoods"`  
16 - 13 + OrderGoods []struct {
  14 + OrderGoodId int64 `json:"orderGoodId,string"` // 订单产品id
  15 + CooperationContractNumber string `json:"cooperationContractNumber"` //关联的共创合约编号
  16 + // OrderGoodAmount float64 `json:"orderGoodAmount"` //订单产品金额
  17 + OrderGoodName string `json:"orderGoodName"` //订单产品名称
  18 + OrderGoodPrice float64 `json:"orderGoodPrice"` //订单产品单价
  19 + OrderGoodQuantity int `json:"orderGoodQuantity"` //订单产品数量
  20 + } `json:"orderGoods"` //货品
17 DividendsReturnedDate int64 `json:"dividendsReturnedDate"` //退货日期 21 DividendsReturnedDate int64 `json:"dividendsReturnedDate"` //退货日期
18 OrderDate int64 `json:"orderDate"` //订单日期 22 OrderDate int64 `json:"orderDate"` //订单日期
19 Remarks string `json:"remarks"` // 23 Remarks string `json:"remarks"` //
@@ -2,7 +2,6 @@ package command @@ -2,7 +2,6 @@ package command
2 2
3 import ( 3 import (
4 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain" 4 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
5 - "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_cooperation"  
6 ) 5 )
7 6
8 type UpdateDividendsReturnedOrderCommand struct { 7 type UpdateDividendsReturnedOrderCommand struct {
@@ -12,9 +11,14 @@ type UpdateDividendsReturnedOrderCommand struct { @@ -12,9 +11,14 @@ type UpdateDividendsReturnedOrderCommand struct {
12 DividendsReturnedCustomerName string `json:"dividendsReturnedCustomerName"` //退货客户 11 DividendsReturnedCustomerName string `json:"dividendsReturnedCustomerName"` //退货客户
13 DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号 12 DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号
14 OriginalOrderNum string `json:"originalOrderNum"` //源单号 13 OriginalOrderNum string `json:"originalOrderNum"` //源单号
15 - //货品  
16 - OrderGoods []allied_creation_cooperation.DividendsReturnedOrderGoods `json:"orderGoods"`  
17 - 14 + OrderGoods []struct {
  15 + OrderGoodId int64 `json:"orderGoodId,string"` // 订单产品id
  16 + CooperationContractNumber string `json:"cooperationContractNumber"` //关联的共创合约编号
  17 + // OrderGoodAmount float64 `json:"orderGoodAmount"` //订单产品金额
  18 + OrderGoodName string `json:"orderGoodName"` //订单产品名称
  19 + OrderGoodPrice float64 `json:"orderGoodPrice"` //订单产品单价
  20 + OrderGoodQuantity int `json:"orderGoodQuantity"` //订单产品数量
  21 + } `json:"orderGoods"` //货品
18 DividendsReturnedDate int64 `json:"dividendsReturnedDate"` //退货日期 22 DividendsReturnedDate int64 `json:"dividendsReturnedDate"` //退货日期
19 OrderDate int64 `json:"orderDate"` //订单日期 23 OrderDate int64 `json:"orderDate"` //订单日期
20 24
@@ -20,11 +20,23 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDivide @@ -20,11 +20,23 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) CreateDivide
20 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createDividendsReturnedOrderCommand.Operator) 20 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(createDividendsReturnedOrderCommand.Operator)
21 dividendsReturnedDate := time.Unix(createDividendsReturnedOrderCommand.DividendsReturnedDate/1e3, 0) 21 dividendsReturnedDate := time.Unix(createDividendsReturnedOrderCommand.DividendsReturnedDate/1e3, 0)
22 orderDate := time.Unix(createDividendsReturnedOrderCommand.OrderDate/1e3, 0) 22 orderDate := time.Unix(createDividendsReturnedOrderCommand.OrderDate/1e3, 0)
  23 + var orderGooods []allied_creation_cooperation.ReqDividendsReturnedOrderGood
  24 + for _, v := range createDividendsReturnedOrderCommand.OrderGoods {
  25 + good := allied_creation_cooperation.ReqDividendsReturnedOrderGood{
  26 + CooperationContractNumber: v.CooperationContractNumber,
  27 + OrderGoodAmount: 0,
  28 + OrderGoodName: v.OrderGoodName,
  29 + OrderGoodPrice: v.OrderGoodPrice,
  30 + OrderGoodQuantity: v.OrderGoodQuantity,
  31 + }
  32 + good.OrderGoodPrice = good.OrderGoodPrice * float64(good.OrderGoodQuantity)
  33 + orderGooods = append(orderGooods, good)
  34 + }
23 result, err := creationCooperationGateway.DividendsReturnedOrderAdd(allied_creation_cooperation.ReqDividendsReturnedOrderAdd{ 35 result, err := creationCooperationGateway.DividendsReturnedOrderAdd(allied_creation_cooperation.ReqDividendsReturnedOrderAdd{
24 DividendsReturnedCustomerName: createDividendsReturnedOrderCommand.DividendsReturnedCustomerName, 36 DividendsReturnedCustomerName: createDividendsReturnedOrderCommand.DividendsReturnedCustomerName,
25 DividendsOrderNumber: createDividendsReturnedOrderCommand.DividendsOrderNumber, 37 DividendsOrderNumber: createDividendsReturnedOrderCommand.DividendsOrderNumber,
26 OriginalOrderNum: createDividendsReturnedOrderCommand.OriginalOrderNum, 38 OriginalOrderNum: createDividendsReturnedOrderCommand.OriginalOrderNum,
27 - OrderGoods: createDividendsReturnedOrderCommand.OrderGoods, 39 + OrderGoods: orderGooods,
28 DividendsReturnedDate: dividendsReturnedDate, 40 DividendsReturnedDate: dividendsReturnedDate,
29 OrderData: orderDate, 41 OrderData: orderDate,
30 OrgId: int(createDividendsReturnedOrderCommand.Operator.OrgId), 42 OrgId: int(createDividendsReturnedOrderCommand.Operator.OrgId),
@@ -86,12 +98,24 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) UpdateDivide @@ -86,12 +98,24 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) UpdateDivide
86 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateDividendsReturnedOrderCommand.Operator) 98 creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(updateDividendsReturnedOrderCommand.Operator)
87 dividendsReturnedDate := time.Unix(updateDividendsReturnedOrderCommand.DividendsReturnedDate/1e3, 0) 99 dividendsReturnedDate := time.Unix(updateDividendsReturnedOrderCommand.DividendsReturnedDate/1e3, 0)
88 orderDate := time.Unix(updateDividendsReturnedOrderCommand.OrderDate/1e3, 0) 100 orderDate := time.Unix(updateDividendsReturnedOrderCommand.OrderDate/1e3, 0)
  101 + var orderGooods []allied_creation_cooperation.ReqDividendsReturnedOrderGood
  102 + for _, v := range updateDividendsReturnedOrderCommand.OrderGoods {
  103 + good := allied_creation_cooperation.ReqDividendsReturnedOrderGood{
  104 + CooperationContractNumber: v.CooperationContractNumber,
  105 + OrderGoodAmount: 0,
  106 + OrderGoodName: v.OrderGoodName,
  107 + OrderGoodPrice: v.OrderGoodPrice,
  108 + OrderGoodQuantity: v.OrderGoodQuantity,
  109 + }
  110 + good.OrderGoodPrice = good.OrderGoodPrice * float64(good.OrderGoodQuantity)
  111 + orderGooods = append(orderGooods, good)
  112 + }
89 _, err := creationCooperationGateway.DividendsReturnedOrderUpdate(allied_creation_cooperation.ReqDividendsReturnedOrderUpdate{ 113 _, err := creationCooperationGateway.DividendsReturnedOrderUpdate(allied_creation_cooperation.ReqDividendsReturnedOrderUpdate{
90 DividendsReturnedOrderID: updateDividendsReturnedOrderCommand.DividendsReturnedOrderID, 114 DividendsReturnedOrderID: updateDividendsReturnedOrderCommand.DividendsReturnedOrderID,
91 DividendsReturnedCustomerName: updateDividendsReturnedOrderCommand.DividendsReturnedCustomerName, 115 DividendsReturnedCustomerName: updateDividendsReturnedOrderCommand.DividendsReturnedCustomerName,
92 DividendsOrderNumber: updateDividendsReturnedOrderCommand.DividendsOrderNumber, 116 DividendsOrderNumber: updateDividendsReturnedOrderCommand.DividendsOrderNumber,
93 OriginalOrderNum: updateDividendsReturnedOrderCommand.OriginalOrderNum, 117 OriginalOrderNum: updateDividendsReturnedOrderCommand.OriginalOrderNum,
94 - OrderGoods: updateDividendsReturnedOrderCommand.OrderGoods, 118 + OrderGoods: orderGooods,
95 DividendsReturnedDate: dividendsReturnedDate, 119 DividendsReturnedDate: dividendsReturnedDate,
96 OrderData: orderDate, 120 OrderData: orderDate,
97 OrgId: int(updateDividendsReturnedOrderCommand.Operator.OrgId), 121 OrgId: int(updateDividendsReturnedOrderCommand.Operator.OrgId),
  1 +package domain
  2 +
  3 +import "testing"
  4 +
  5 +func TestTokenParse(t *testing.T) {
  6 + tk := LoginToken{}
  7 + str := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2Mjk4NzY3OTcsImlhdCI6MTYyOTg2OTU5NywiaXNzIjoiYWxsaWVkX2NyZWF0aW9uX2dhdGV3YXkiLCJuYmYiOjE2Mjk4Njk1OTcsInVzZXJJZCI6MSwidXNlckJhc2VJZCI6MSwiYWNjb3VudCI6IjE4ODYwMTgzMDUwIiwicGxhdGZvcm0iOiJhcHAiLCJjb21wYW55SWQiOjEsIm9yZ0lkIjoxLCJvcmdJZHMiOlsxLDU2XSwic2Vzc2lvbk1vZGUiOjF9.aDxfLwOpZCYWRhKa4GeKRh8sXsy2WOyt4X92uEEEXKg"
  8 + err := tk.ParseToken(str)
  9 + if err != nil {
  10 + t.Error(err)
  11 + }
  12 + t.Log("tk.Account=", tk.Account, " tk.CompanyId=", tk.CompanyId, " tk.OrgId=", tk.OrgId)
  13 +}
@@ -70,7 +70,7 @@ type ( @@ -70,7 +70,7 @@ type (
70 CooperationModeNumber string `json:"cooperationModeNumber"` 70 CooperationModeNumber string `json:"cooperationModeNumber"`
71 PublisherUid int `json:"publisherUid,string"` 71 PublisherUid int `json:"publisherUid,string"`
72 SponsorUid int `json:"sponsorUid,string"` 72 SponsorUid int `json:"sponsorUid,string"`
73 - DepartmentId int `json:"departmentId,string"` 73 + DepartmentId int `json:"departmentId"`
74 CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerTypes"` 74 CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerTypes"`
75 Attachment []*domain.Attachment `json:"attachment"` 75 Attachment []*domain.Attachment `json:"attachment"`
76 } 76 }
@@ -118,7 +118,7 @@ type ( @@ -118,7 +118,7 @@ type (
118 // 共创项目描述 118 // 共创项目描述
119 CooperationProjectDescription string `json:"cooperationProjectDescription"` 119 CooperationProjectDescription string `json:"cooperationProjectDescription"`
120 Attachment []domain.Attachment `json:"attachment"` 120 Attachment []domain.Attachment `json:"attachment"`
121 - DepartmentId int `json:"departmentId,string"` 121 + DepartmentId int `json:"departmentId"`
122 } 122 }
123 123
124 DataCooperationProjectUpdate struct { 124 DataCooperationProjectUpdate struct {
@@ -159,6 +159,7 @@ type ( @@ -159,6 +159,7 @@ type (
159 // 组织机构ID 159 // 组织机构ID
160 OrgId int64 `cname:"组织机构ID" json:"orgId"` 160 OrgId int64 `cname:"组织机构ID" json:"orgId"`
161 OrgIds []string `json:"orgIds"` 161 OrgIds []string `json:"orgIds"`
  162 + CompanyId int64 `json:"companyId"`
162 CooperationProjectNumberLike string `json:"cooperationProjectNumberLike"` 163 CooperationProjectNumberLike string `json:"cooperationProjectNumberLike"`
163 //OffsetLimitFlag bool `json:"offsetLimitFlag"` 164 //OffsetLimitFlag bool `json:"offsetLimitFlag"`
164 // 用户基础数据id 165 // 用户基础数据id
@@ -129,7 +129,7 @@ type ( @@ -129,7 +129,7 @@ type (
129 //创建账期结算 129 //创建账期结算
130 type ( 130 type (
131 ReqCreditAccountsAdd struct { 131 ReqCreditAccountsAdd struct {
132 - DividendsEstimateIds []string `json:"dividendsEstimateIdss"` 132 + DividendsEstimateIds []string `json:"dividendsEstimateIds"`
133 } 133 }
134 134
135 DataCreditAccountsAdd []struct { 135 DataCreditAccountsAdd []struct {
@@ -46,11 +46,19 @@ type ( @@ -46,11 +46,19 @@ type (
46 Goods []DividendsReturnedOrderGoods `json:"goods"` //货品 46 Goods []DividendsReturnedOrderGoods `json:"goods"` //货品
47 } 47 }
48 48
  49 + //
  50 + ReqDividendsReturnedOrderGood struct {
  51 + CooperationContractNumber string `json:"cooperationContractNumber"` //关联的共创合约编号
  52 + OrderGoodAmount float64 `json:"orderGoodAmount"` //订单产品金额
  53 + OrderGoodName string `json:"orderGoodName"` //订单产品名称
  54 + OrderGoodPrice float64 `json:"orderGoodPrice"` //订单产品单价
  55 + OrderGoodQuantity int `json:"orderGoodQuantity"` //订单产品数量
  56 + }
49 ReqDividendsReturnedOrderAdd struct { 57 ReqDividendsReturnedOrderAdd struct {
50 DividendsReturnedCustomerName string `json:"dividendsReturnedCustomerName"` 58 DividendsReturnedCustomerName string `json:"dividendsReturnedCustomerName"`
51 DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号 59 DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号
52 OriginalOrderNum string `json:"originalOrderNum"` 60 OriginalOrderNum string `json:"originalOrderNum"`
53 - OrderGoods []DividendsReturnedOrderGoods `json:"orderGoods"` 61 + OrderGoods []ReqDividendsReturnedOrderGood `json:"orderGoods"`
54 DividendsReturnedDate time.Time `json:"dividendsReturnedDate"` 62 DividendsReturnedDate time.Time `json:"dividendsReturnedDate"`
55 OrderData time.Time `json:"orderData"` 63 OrderData time.Time `json:"orderData"`
56 OrgId int `json:"orgId"` 64 OrgId int `json:"orgId"`
@@ -70,7 +78,7 @@ type ( @@ -70,7 +78,7 @@ type (
70 DividendsReturnedCustomerName string `json:"dividendsReturnedCustomerName"` 78 DividendsReturnedCustomerName string `json:"dividendsReturnedCustomerName"`
71 DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号 79 DividendsOrderNumber string `json:"dividendsOrderNumber"` //分红单号
72 OriginalOrderNum string `json:"originalOrderNum"` 80 OriginalOrderNum string `json:"originalOrderNum"`
73 - OrderGoods []DividendsReturnedOrderGoods `json:"orderGoods"` 81 + OrderGoods []ReqDividendsReturnedOrderGood `json:"orderGoods"`
74 DividendsReturnedDate time.Time `json:"dividendsReturnedDate"` 82 DividendsReturnedDate time.Time `json:"dividendsReturnedDate"`
75 OrderData time.Time `json:"orderData"` 83 OrderData time.Time `json:"orderData"`
76 OrgId int `json:"orgId"` 84 OrgId int `json:"orgId"`
@@ -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)