...
|
...
|
@@ -907,30 +907,9 @@ func (service OrderInfoService) buildOrderBestshopInfoData(orderBase *domain.Ord |
|
|
goodid := orderBestshop.Goods[i].Id
|
|
|
orderGoodBestshopMap[goodid] = &orderBestshop.Goods[i]
|
|
|
}
|
|
|
//订单描述
|
|
|
order := map[string]interface{}{
|
|
|
"orderId": orderBase.Id,
|
|
|
"orderState": orderBestshop.OrderState,
|
|
|
"customers": orderBestshop.BuyerName,
|
|
|
"address": orderBestshop.BuyerAddress,
|
|
|
"remarks": orderBestshop.BuyerRemark,
|
|
|
"partner": orderBase.PartnerInfo.PartnerName,
|
|
|
"phone": orderBestshop.BuyerPhone,
|
|
|
"orderTime": orderBestshop.OrderTime,
|
|
|
"shippingStatus": orderBestshop.DeliveryState,
|
|
|
"partnerDividends": orderBase.GetCurrentPartnerBonus(),
|
|
|
"receivedDividends": orderBase.OrderCompute.PartnerBonusHas,
|
|
|
"notReceivedDividend": orderBase.OrderCompute.PartnerBonusNot,
|
|
|
"dividendSpending": orderBase.OrderCompute.PartnerBonusExpense,
|
|
|
"orderNumber": orderBase.OrderCode,
|
|
|
}
|
|
|
//订单中的商品
|
|
|
product := map[string]interface{}{
|
|
|
"orderNumCount": orderBase.GetCurrentOrderCount(),
|
|
|
"partnerDividendsCount": orderBase.GetCurrentPartnerBonus(),
|
|
|
"orderAmountAdjustmentCount": orderBase.GetCurrentOrderAmount(),
|
|
|
}
|
|
|
productDetail := []map[string]interface{}{}
|
|
|
var hasPartnerBonusPercent bool
|
|
|
for i := range orderBase.Goods {
|
|
|
detail := map[string]interface{}{
|
|
|
"commodityName": orderBase.Goods[i].GoodName,
|
...
|
...
|
@@ -944,6 +923,10 @@ func (service OrderInfoService) buildOrderBestshopInfoData(orderBase *domain.Ord |
|
|
"paymentStatus": orderBase.Goods[i].BonusStatus,
|
|
|
"partnerRatio": orderBase.Goods[i].PartnerBonusPercent,
|
|
|
}
|
|
|
// if orderBase.Goods[i].PartnerBonusPercent >= 0 {
|
|
|
// hasPartnerBonusPercent = true
|
|
|
// detail["partnerRatio"] = fmt.Sprint(orderBase.Goods[i].PartnerBonusPercent)
|
|
|
// }
|
|
|
goodBestshopId := orderBase.Goods[i].DataFrom.DataId
|
|
|
if v, ok := orderGoodBestshopMap[goodBestshopId]; ok {
|
|
|
detail["productCodes"] = v.Sn
|
...
|
...
|
@@ -951,7 +934,35 @@ func (service OrderInfoService) buildOrderBestshopInfoData(orderBase *domain.Ord |
|
|
}
|
|
|
productDetail = append(productDetail, detail)
|
|
|
}
|
|
|
product["detail"] = productDetail
|
|
|
product := map[string]interface{}{
|
|
|
"orderNumCount": orderBase.GetCurrentOrderCount(),
|
|
|
"partnerDividendsCount": orderBase.GetCurrentPartnerBonus(),
|
|
|
"orderAmountAdjustmentCount": orderBase.GetCurrentOrderAmount(),
|
|
|
"detail": productDetail,
|
|
|
}
|
|
|
//订单描述
|
|
|
order := map[string]interface{}{
|
|
|
"orderId": orderBase.Id,
|
|
|
"orderState": orderBestshop.OrderState,
|
|
|
"customers": orderBestshop.BuyerName,
|
|
|
"address": orderBestshop.BuyerAddress,
|
|
|
"remarks": orderBestshop.BuyerRemark,
|
|
|
"partner": orderBase.PartnerInfo.PartnerName,
|
|
|
"phone": orderBestshop.BuyerPhone,
|
|
|
"orderTime": orderBestshop.OrderTime,
|
|
|
"shippingStatus": orderBestshop.DeliveryState,
|
|
|
"partnerDividends": "-",
|
|
|
"receivedDividends": "-",
|
|
|
"notReceivedDividend": "-",
|
|
|
"dividendSpending": "-",
|
|
|
"orderNumber": orderBase.OrderCode,
|
|
|
}
|
|
|
if hasPartnerBonusPercent {
|
|
|
order["partnerDividends"] = fmt.Sprint(orderBase.GetCurrentPartnerBonus())
|
|
|
order["receivedDividends"] = fmt.Sprint(orderBase.OrderCompute.PartnerBonusHas)
|
|
|
order["notReceivedDividend"] = fmt.Sprint(orderBase.OrderCompute.PartnerBonusNot)
|
|
|
order["dividendSpending"] = fmt.Sprint(orderBase.OrderCompute.PartnerBonusExpense)
|
|
|
}
|
|
|
modifyLog := []map[string]interface{}{}
|
|
|
for i := range orderLogs {
|
|
|
m := map[string]interface{}{
|
...
|
...
|
|