正在显示
1 个修改的文件
包含
11 行增加
和
11 行删除
| @@ -518,7 +518,7 @@ func (c *OrderDividendController) ListOrderBonusForExcel() { | @@ -518,7 +518,7 @@ func (c *OrderDividendController) ListOrderBonusForExcel() { | ||
| 518 | //BatchPayOrderGoodBonus 批量支付订单中的分红 | 518 | //BatchPayOrderGoodBonus 批量支付订单中的分红 |
| 519 | func (c *OrderDividendController) BatchPayOrderGoodBonus() { | 519 | func (c *OrderDividendController) BatchPayOrderGoodBonus() { |
| 520 | type Parameter struct { | 520 | type Parameter struct { |
| 521 | - OrderIds []string `json:"orderIds"` | 521 | + OrderIds []int64 `json:"orderIds"` |
| 522 | } | 522 | } |
| 523 | var ( | 523 | var ( |
| 524 | param Parameter | 524 | param Parameter |
| @@ -529,18 +529,18 @@ func (c *OrderDividendController) BatchPayOrderGoodBonus() { | @@ -529,18 +529,18 @@ func (c *OrderDividendController) BatchPayOrderGoodBonus() { | ||
| 529 | c.ResponseError(errors.New("json数据解析失败")) | 529 | c.ResponseError(errors.New("json数据解析失败")) |
| 530 | return | 530 | return |
| 531 | } | 531 | } |
| 532 | - var orderids []int64 | ||
| 533 | - for _, v := range param.OrderIds { | ||
| 534 | - orderid, _ := strconv.ParseInt(v, 10, 64) | ||
| 535 | - if orderid == 0 { | ||
| 536 | - c.ResponseError(errors.New("参数错误")) | ||
| 537 | - return | ||
| 538 | - } | ||
| 539 | - orderids = append(orderids, orderid) | ||
| 540 | - } | 532 | + // var orderids []int64 |
| 533 | + // for _, v := range param.OrderIds { | ||
| 534 | + // orderid, _ := strconv.ParseInt(v, 10, 64) | ||
| 535 | + // if orderid == 0 { | ||
| 536 | + // c.ResponseError(errors.New("参数错误")) | ||
| 537 | + // return | ||
| 538 | + // } | ||
| 539 | + // orderids = append(orderids, orderid) | ||
| 540 | + // } | ||
| 541 | adminId := c.GetUserId() | 541 | adminId := c.GetUserId() |
| 542 | orderSrv := orderService.NewOrderInfoService(nil) | 542 | orderSrv := orderService.NewOrderInfoService(nil) |
| 543 | - err = orderSrv.BatchPayPartnerBonus(orderids, adminId) | 543 | + err = orderSrv.BatchPayPartnerBonus(param.OrderIds, adminId) |
| 544 | if err != nil { | 544 | if err != nil { |
| 545 | c.ResponseError(err) | 545 | c.ResponseError(err) |
| 546 | return | 546 | return |
-
请 注册 或 登录 后发表评论