正在显示
6 个修改的文件
包含
9 行增加
和
4 行删除
@@ -11,7 +11,7 @@ type GetCooperationContractQuery struct { | @@ -11,7 +11,7 @@ type GetCooperationContractQuery struct { | ||
11 | //操作人 | 11 | //操作人 |
12 | Operator domain.Operator `json:"-"` | 12 | Operator domain.Operator `json:"-"` |
13 | // 共创合约ID | 13 | // 共创合约ID |
14 | - CooperationContractId int `json:"cooperationContractId,string" valid:"Required"` | 14 | + CooperationContractId int `json:"cooperationContractId,string"` |
15 | } | 15 | } |
16 | 16 | ||
17 | func (getCooperationContractQuery *GetCooperationContractQuery) Valid(validation *validation.Validation) { | 17 | func (getCooperationContractQuery *GetCooperationContractQuery) Valid(validation *validation.Validation) { |
@@ -9,6 +9,7 @@ type GetDividendsOrderQuery struct { | @@ -9,6 +9,7 @@ type GetDividendsOrderQuery struct { | ||
9 | Operator domain.Operator `json:"-"` | 9 | Operator domain.Operator `json:"-"` |
10 | // 分红订单ID | 10 | // 分红订单ID |
11 | DividendsOrderId int `json:"dividendsOrderId,string" valid:"Required"` | 11 | DividendsOrderId int `json:"dividendsOrderId,string" valid:"Required"` |
12 | + DividendsOrderNumber string `json:"dividendsOrderNumber"` | ||
12 | } | 13 | } |
13 | 14 | ||
14 | // func (getDividendsOrderQuery *GetDividendsOrderQuery) Valid(validation *validation.Validation) { | 15 | // func (getDividendsOrderQuery *GetDividendsOrderQuery) Valid(validation *validation.Validation) { |
@@ -55,12 +55,10 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD | @@ -55,12 +55,10 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD | ||
55 | 55 | ||
56 | // 返回分红订单实体对象 | 56 | // 返回分红订单实体对象 |
57 | func (dividendsOrderService *DividendsOrderService) GetDividendsOrder(getDividendsOrderQuery *query.GetDividendsOrderQuery) (interface{}, error) { | 57 | func (dividendsOrderService *DividendsOrderService) GetDividendsOrder(getDividendsOrderQuery *query.GetDividendsOrderQuery) (interface{}, error) { |
58 | - // if err := getDividendsOrderQuery.ValidateQuery(); err != nil { | ||
59 | - // return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
60 | - // } | ||
61 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(getDividendsOrderQuery.Operator) | 58 | creationCooperationGateway := allied_creation_cooperation.NewHttplibAlliedCreationCooperation(getDividendsOrderQuery.Operator) |
62 | result, err := creationCooperationGateway.DividendsOrderGet(allied_creation_cooperation.ReqDividendsOrderGet{ | 59 | result, err := creationCooperationGateway.DividendsOrderGet(allied_creation_cooperation.ReqDividendsOrderGet{ |
63 | DividendsOrderId: getDividendsOrderQuery.DividendsOrderId, | 60 | DividendsOrderId: getDividendsOrderQuery.DividendsOrderId, |
61 | + DividendsOrderNumber: getDividendsOrderQuery.DividendsOrderNumber, | ||
64 | }) | 62 | }) |
65 | if err != nil { | 63 | if err != nil { |
66 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 64 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
@@ -203,6 +203,9 @@ func (gateway HttplibAlliedCreationCooperation) DividendsOrderGet(param ReqDivid | @@ -203,6 +203,9 @@ func (gateway HttplibAlliedCreationCooperation) DividendsOrderGet(param ReqDivid | ||
203 | url := gateway.baseUrL + "/dividends-orders/" + strconv.Itoa(param.DividendsOrderId) | 203 | url := gateway.baseUrL + "/dividends-orders/" + strconv.Itoa(param.DividendsOrderId) |
204 | method := "GET" | 204 | method := "GET" |
205 | req := gateway.CreateRequest(url, method) | 205 | req := gateway.CreateRequest(url, method) |
206 | + if len(param.DividendsOrderNumber) > 0 { | ||
207 | + req.Param("dividendsOrderNumber", param.DividendsOrderNumber) | ||
208 | + } | ||
206 | log.Logger.Debug("向业务模块请求数据:返回分红订单详情。", map[string]interface{}{ | 209 | log.Logger.Debug("向业务模块请求数据:返回分红订单详情。", map[string]interface{}{ |
207 | "api": method + ":" + url, | 210 | "api": method + ":" + url, |
208 | "param": param, | 211 | "param": param, |
@@ -173,6 +173,7 @@ type ( | @@ -173,6 +173,7 @@ type ( | ||
173 | type ( | 173 | type ( |
174 | ReqDividendsOrderGet struct { | 174 | ReqDividendsOrderGet struct { |
175 | DividendsOrderId int `json:"dividendsOrderId"` | 175 | DividendsOrderId int `json:"dividendsOrderId"` |
176 | + DividendsOrderNumber string `json:"dividendsOrderNumber"` | ||
176 | } | 177 | } |
177 | 178 | ||
178 | DataDividendsOrderGet struct { | 179 | DataDividendsOrderGet struct { |
@@ -60,7 +60,9 @@ func (controller *DividendsOrderController) GetDividendsOrder() { | @@ -60,7 +60,9 @@ func (controller *DividendsOrderController) GetDividendsOrder() { | ||
60 | dividendsOrderService := service.NewDividendsOrderService(nil) | 60 | dividendsOrderService := service.NewDividendsOrderService(nil) |
61 | getDividendsOrderQuery := &query.GetDividendsOrderQuery{} | 61 | getDividendsOrderQuery := &query.GetDividendsOrderQuery{} |
62 | orderId, _ := controller.GetInt(":orderId") | 62 | orderId, _ := controller.GetInt(":orderId") |
63 | + dividendsOrderNumber := controller.GetString("dividendsOrderNumber") | ||
63 | getDividendsOrderQuery.DividendsOrderId = orderId | 64 | getDividendsOrderQuery.DividendsOrderId = orderId |
65 | + getDividendsOrderQuery.DividendsOrderNumber = dividendsOrderNumber | ||
64 | getDividendsOrderQuery.Operator = controller.GetOperator() | 66 | getDividendsOrderQuery.Operator = controller.GetOperator() |
65 | data, err := dividendsOrderService.GetDividendsOrder(getDividendsOrderQuery) | 67 | data, err := dividendsOrderService.GetDividendsOrder(getDividendsOrderQuery) |
66 | controller.Response(data, err) | 68 | controller.Response(data, err) |
-
请 注册 或 登录 后发表评论