...
|
...
|
@@ -135,17 +135,17 @@ func (c *OrderDividendController) OrderDividendDetail() { |
|
|
return
|
|
|
}
|
|
|
|
|
|
type postOrderDividend struct {
|
|
|
Id int64 `json:"id"`
|
|
|
DividendPayments []postDividendPayment `json:"dividendPayment"`
|
|
|
}
|
|
|
// type postOrderDividend struct {
|
|
|
// Id int64 `json:"id"`
|
|
|
// DividendPayments []postDividendPayment `json:"dividendPayment"`
|
|
|
// }
|
|
|
|
|
|
type postDividendPayment struct {
|
|
|
QuantityControl string `json:"quantityControl"`
|
|
|
StateOfPayment int `json:"stateOfPayment"`
|
|
|
ProductId int64 `json:"productId"`
|
|
|
Remark string `json:"remark"`
|
|
|
}
|
|
|
// type postDividendPayment struct {
|
|
|
// QuantityControl string `json:"quantityControl"`
|
|
|
// StateOfPayment int `json:"stateOfPayment"`
|
|
|
// ProductId int64 `json:"productId"`
|
|
|
// Remark string `json:"remark"`
|
|
|
// }
|
|
|
|
|
|
//OrderDividendDetailForBestshop 海鲜干货的订单分红详情
|
|
|
func (c *OrderDividendController) OrderDividendDetailForBestshop() {
|
...
|
...
|
@@ -346,7 +346,7 @@ func (c *OrderDividendController) ListOrderBonusForExcel() { |
|
|
//BatchPayOrderGoodBonus 批量支付订单中的分红
|
|
|
func (c *OrderDividendController) BatchPayOrderGoodBonus() {
|
|
|
type Parameter struct {
|
|
|
OrderIds []int64 `json:"orderIds"`
|
|
|
OrderIds []string `json:"orderIds"`
|
|
|
}
|
|
|
var (
|
|
|
param Parameter
|
...
|
...
|
@@ -357,9 +357,15 @@ func (c *OrderDividendController) BatchPayOrderGoodBonus() { |
|
|
c.ResponseError(errors.New("json数据解析失败"))
|
|
|
return
|
|
|
}
|
|
|
orderIds := []int64{}
|
|
|
for _, v := range param.OrderIds {
|
|
|
id, _ := strconv.ParseInt(v, 10, 64)
|
|
|
orderIds = append(orderIds, id)
|
|
|
}
|
|
|
adminId := c.GetUserId()
|
|
|
orderSrv := orderService.NewOrderInfoService(nil)
|
|
|
err = orderSrv.BatchPayPartnerBonus(param.OrderIds, adminId)
|
|
|
|
|
|
err = orderSrv.BatchPayPartnerBonus(orderIds, adminId)
|
|
|
if err != nil {
|
|
|
c.ResponseError(err)
|
|
|
return
|
...
|
...
|
|