作者 yangfu

分红详情修改

@@ -207,7 +207,7 @@ func (OrderPaymentService *OrderPaymentService) ListDividendOrders(listOrderPaym @@ -207,7 +207,7 @@ func (OrderPaymentService *OrderPaymentService) ListDividendOrders(listOrderPaym
207 item.StateOfPayment = "等待支付分红" 207 item.StateOfPayment = "等待支付分红"
208 } 208 }
209 if order.OrderActualAmount < order.OrderAmount { 209 if order.OrderActualAmount < order.OrderAmount {
210 - item.DividendSpending = utils.Decimal(order.OrderAmount - order.OrderActualAmount) 210 + item.DividendSpending = utils.Decimal((order.OrderAmount - order.OrderActualAmount) * (order.PartnerBonusPercent / 100.0))
211 } 211 }
212 list = append(list, item) 212 list = append(list, item)
213 } 213 }
@@ -76,6 +76,7 @@ func (dao *OrderDao) GetDividendOrders(options map[string]interface{}) (count in @@ -76,6 +76,7 @@ func (dao *OrderDao) GetDividendOrders(options map[string]interface{}) (count in
76 if v, ok := options["limit"]; ok { 76 if v, ok := options["limit"]; ok {
77 q.Limit(v.(int)) 77 q.Limit(v.(int))
78 } 78 }
  79 + q.Order(`order.id DESC`)
79 count, err = q.SelectAndCount() 80 count, err = q.SelectAndCount()
80 return 81 return
81 } 82 }