...
|
...
|
@@ -53,6 +53,7 @@ func OrderDetail(header *protocol.RequestHeader, request *protocol.OrderDetailRe |
|
|
OrderQuantity: order.OrderActualCount,
|
|
|
OrderAmount: order.OrderActualAmount,
|
|
|
OrderAmountCancel: order.OrderAmountCancel(),
|
|
|
OrderUpdateReason: order.Reason,
|
|
|
OrderDistrict: map[string]interface{}{"id": order.OrderRegionInfo.RegionId, "name": order.OrderRegionInfo.RegionName},
|
|
|
Customer: protocol.Customer{Uname: order.Buyer.BuyerName, Phone: order.Buyer.ContactInfo},
|
|
|
MyDividend: order.OrderTotalBonus(),
|
...
|
...
|
@@ -149,8 +150,7 @@ func OrderList(header *protocol.RequestHeader, request *protocol.OrderListReques |
|
|
if request.PageIndex == 0 {
|
|
|
var (
|
|
|
partShipmentQuantity, allShipmentQuantity int
|
|
|
//cumulativeQuantity,
|
|
|
intentionQuantity int
|
|
|
cumulativeQuantity, intentionQuantity int
|
|
|
)
|
|
|
//部分发货的订单数量
|
|
|
partShipmentQuantity, _, err = OrderDao.OrderStatics(&domain.OrderStaticQuery{
|
...
|
...
|
@@ -169,24 +169,24 @@ func OrderList(header *protocol.RequestHeader, request *protocol.OrderListReques |
|
|
OrderStatus: domain.OrderStatusDeliverAll,
|
|
|
})
|
|
|
//累计实发订单
|
|
|
//cumulativeQuantity, _, err = OrderDao.OrderStatics(&domain.OrderStaticQuery{
|
|
|
// EndTime: request.EndTime,
|
|
|
// BeginTime: request.StartTime,
|
|
|
// OrderType: domain.OrderReal,
|
|
|
// PartnerId: header.UserId,
|
|
|
//})
|
|
|
cumulativeQuantity, _, err = OrderDao.OrderStatics(&domain.OrderStaticQuery{
|
|
|
EndTime: time.Now().Unix() * 1000,
|
|
|
//BeginTime: request.StartTime,
|
|
|
OrderType: domain.OrderReal,
|
|
|
PartnerId: header.UserId,
|
|
|
})
|
|
|
//累计意向订单
|
|
|
intentionQuantity, _, err = OrderDao.OrderStatics(&domain.OrderStaticQuery{
|
|
|
EndTime: request.EndTime,
|
|
|
BeginTime: request.StartTime,
|
|
|
EndTime: time.Now().Unix() * 1000,
|
|
|
//BeginTime: request.StartTime,
|
|
|
OrderType: domain.OrderIntention,
|
|
|
PartnerId: header.UserId,
|
|
|
})
|
|
|
//订单数量
|
|
|
rsp.Statistics["partShipmentQuantity"] = partShipmentQuantity
|
|
|
rsp.Statistics["allShipmentQuantity"] = allShipmentQuantity
|
|
|
rsp.Statistics["orderQuantity"] = partShipmentQuantity + allShipmentQuantity //所有订单 = 部分发货 + 已经发货
|
|
|
rsp.Statistics["cumulativeQuantity"] = partShipmentQuantity + allShipmentQuantity //实发订单 = 部分发货 + 全部发货
|
|
|
rsp.Statistics["orderQuantity"] = partShipmentQuantity + allShipmentQuantity //所有订单 = 部分发货 + 已经发货
|
|
|
rsp.Statistics["cumulativeQuantity"] = cumulativeQuantity //实发订单 = 部分发货 + 全部发货
|
|
|
rsp.Statistics["intentionQuantity"] = intentionQuantity
|
|
|
|
|
|
}
|
...
|
...
|
@@ -207,7 +207,7 @@ func DomainOrderToOrderListItem(order *domain.Order) *protocol.OrderListItem { |
|
|
OrderType: order.OrderType,
|
|
|
OrderNo: order.OrderCode,
|
|
|
OrderName: order.OrderName,
|
|
|
OrderAmount: order.OrderAmount,
|
|
|
OrderAmount: order.OrderActualAmount,
|
|
|
OrderActualCount: order.OrderActualCount,
|
|
|
OrderStatus: order.OrderStatus,
|
|
|
UpdateTime: order.UpdateAt.Unix() * 1000,
|
...
|
...
|
|