正在显示
1 个修改的文件
包含
7 行增加
和
2 行删除
| @@ -41,7 +41,7 @@ func (c *DividendsController) Edit() { | @@ -41,7 +41,7 @@ func (c *DividendsController) Edit() { | ||
| 41 | StateOfPayment string `json:"stateOfPayment"` | 41 | StateOfPayment string `json:"stateOfPayment"` |
| 42 | } | 42 | } |
| 43 | type Parameter struct { | 43 | type Parameter struct { |
| 44 | - Id int64 `json:"id"` //订单编号 | 44 | + Id string `json:"id"` //订单编号 |
| 45 | DividendPayment []DividendPaymentItem `json:"dividendPayment"` | 45 | DividendPayment []DividendPaymentItem `json:"dividendPayment"` |
| 46 | } | 46 | } |
| 47 | var ( | 47 | var ( |
| @@ -53,8 +53,13 @@ func (c *DividendsController) Edit() { | @@ -53,8 +53,13 @@ func (c *DividendsController) Edit() { | ||
| 53 | c.ResponseError(errors.New("json数据解析失败")) | 53 | c.ResponseError(errors.New("json数据解析失败")) |
| 54 | return | 54 | return |
| 55 | } | 55 | } |
| 56 | + if len(param.Id) == 0 { | ||
| 57 | + c.ResponseError(errors.New("id is empty")) | ||
| 58 | + return | ||
| 59 | + } | ||
| 60 | + orderId, _ := strconv.ParseInt(param.Id, 10, 64) | ||
| 56 | cmd := OrderPaymentCmd.CreateOrderPaymentCommand{ | 61 | cmd := OrderPaymentCmd.CreateOrderPaymentCommand{ |
| 57 | - OrderId: param.Id, | 62 | + OrderId: orderId, |
| 58 | DivdendPaymentItem: make([]OrderPaymentCmd.DivdendPyamentItem, 0), | 63 | DivdendPaymentItem: make([]OrderPaymentCmd.DivdendPyamentItem, 0), |
| 59 | } | 64 | } |
| 60 | 65 |
-
请 注册 或 登录 后发表评论