作者 tangxvhui

Merge branch 'dev' of http://gitlab.fjmaimaimai.com/mmm-go/partnermg into dev

... ... @@ -176,7 +176,7 @@ func (OrderPaymentService *OrderPaymentService) ListDividendOrders(listOrderPaym
OrderId string `json:"id"` //订单编号
OrderNumber string `json:"orderNumber"` //订单号
OrderState int `json:"orderState"` //订单状态
StateOfPayment string `json:"stateOfPayment"` //支付状态
StateOfPayment int `json:"stateOfPayment"` //支付状态
CreateTime string `json:"createTime"` //订单创建时间
PartnerName string `json:"partnerName"` //合伙人姓名
DividendProportion float64 `json:"dividendProportion"` //分红比例
... ... @@ -192,7 +192,7 @@ func (OrderPaymentService *OrderPaymentService) ListDividendOrders(listOrderPaym
OrderId: fmt.Sprintf("%v", order.Id),
OrderNumber: order.OrderCode,
OrderState: order.OrderStatus,
StateOfPayment: "",
StateOfPayment: order.BonusStatus,
CreateTime: order.CreateAt.Local().Format("2006-01-02 15:04:05"),
PartnerName: order.PartnerInfo.PartnerName,
DividendProportion: order.PartnerBonusPercent,
... ... @@ -201,11 +201,11 @@ func (OrderPaymentService *OrderPaymentService) ListDividendOrders(listOrderPaym
ReceiveDividends: utils.Decimal(order.OrderPaymentAmount * (order.PartnerBonusPercent / 100.0)),
CommissionProportion: order.SalesmanBonusPercent,
}
if order.BonusStatus == domain.BonusPaid {
item.StateOfPayment = "已支付分红"
} else {
item.StateOfPayment = "等待支付分红"
}
//if order.BonusStatus == domain.BonusPaid {
// item.StateOfPayment = "已支付分红"
//} else {
// item.StateOfPayment = "等待支付分红"
//}
if order.OrderActualAmount < order.OrderAmount {
item.DividendSpending = utils.Decimal((order.OrderAmount - order.OrderActualAmount) * (order.PartnerBonusPercent / 100.0))
}
... ...
... ... @@ -76,7 +76,7 @@ func (repository *OrderPaymentRepository) Find(queryOptions domain.OrderPaymentQ
tx := repository.transactionContext.PgTx
var OrderPaymentModels []*models.OrderPayment
query := tx.Model(&OrderPaymentModels)
query.Where("order_payment.order_id = ?", queryOptions.OrderId)
query.Where("order_id=?", queryOptions.OrderId)
query.Order("id ASC")
var (
err error
... ...
... ... @@ -171,7 +171,7 @@ func (c *DividendsController) Detail() {
PaymentForGoods: item.PaymentAmount,
UpdateTime: item.UpdateAt.Local().Format("2006-01-02 15:04:05"),
StateOfPayment: item.BonusStatus,
Dividend: item.BonusAmount,
Dividend: utils.Decimal(item.PaymentAmount * (order.PartnerBonusPercent / 100.0)),
DividendProportion: order.PartnerBonusPercent,
Id: item.Id,
}
... ...