作者 唐旭辉

更新

... ... @@ -518,7 +518,7 @@ func (c *OrderDividendController) ListOrderBonusForExcel() {
//BatchPayOrderGoodBonus 批量支付订单中的分红
func (c *OrderDividendController) BatchPayOrderGoodBonus() {
type Parameter struct {
OrderIds []string `json:"orderIds"`
OrderIds []int64 `json:"orderIds"`
}
var (
param Parameter
... ... @@ -529,18 +529,18 @@ func (c *OrderDividendController) BatchPayOrderGoodBonus() {
c.ResponseError(errors.New("json数据解析失败"))
return
}
var orderids []int64
for _, v := range param.OrderIds {
orderid, _ := strconv.ParseInt(v, 10, 64)
if orderid == 0 {
c.ResponseError(errors.New("参数错误"))
return
}
orderids = append(orderids, orderid)
}
// var orderids []int64
// for _, v := range param.OrderIds {
// orderid, _ := strconv.ParseInt(v, 10, 64)
// if orderid == 0 {
// c.ResponseError(errors.New("参数错误"))
// return
// }
// orderids = append(orderids, orderid)
// }
adminId := c.GetUserId()
orderSrv := orderService.NewOrderInfoService(nil)
err = orderSrv.BatchPayPartnerBonus(orderids, adminId)
err = orderSrv.BatchPayPartnerBonus(param.OrderIds, adminId)
if err != nil {
c.ResponseError(err)
return
... ...