...
|
...
|
@@ -38,6 +38,7 @@ func Detail(header *protocol.RequestHeader, request *protocol.OrderDetailRequest |
|
|
OrderStatus: orderStatus(order),
|
|
|
CreateTime: order.CreateTime.Unix() * 1000,
|
|
|
UpdateTime: order.UpdateTime.Unix() * 1000,
|
|
|
SalesTime: order.SaleDate.Unix() * 1000,
|
|
|
OrderDistrict: map[string]interface{}{"id": order.RegionInfo.RegionId, "name": order.RegionInfo.RegionName},
|
|
|
Customer: protocol.Customer{Uname: order.Buyer.BuyerName, Phone: order.Buyer.ContactInfo},
|
|
|
Products: orderProducts(order),
|
...
|
...
|
@@ -195,8 +196,8 @@ func List(header *protocol.RequestHeader, request *protocol.OrderListRequest) (r |
|
|
|
|
|
// 查询订单列表
|
|
|
queryOption := &domain.OrderQueryOption{
|
|
|
Limit: request.PageSize,
|
|
|
Offset: request.PageSize * request.PageIndex,
|
|
|
Limit: request.PageSize,
|
|
|
Offset: request.PageSize * request.PageIndex,
|
|
|
//SortByUpdateTime: domain.DESC,
|
|
|
SortByCreateTime: domain.DESC,
|
|
|
PartnerId: request.PartnerId,
|
...
|
...
|
@@ -234,6 +235,7 @@ func List(header *protocol.RequestHeader, request *protocol.OrderListRequest) (r |
|
|
PartnerCategoryId: request.JoinWay,
|
|
|
})
|
|
|
rsp.Total = cumulativeQuantity
|
|
|
rsp.Timestamp = time.Now().Unix() * 1000
|
|
|
}
|
|
|
//【特殊处理2】 今天累计数量特殊处理 当前查询时间段内所有订单总数(复用rsp.Total字段)
|
|
|
if request.StartTime > 0 && request.EndTime > 0 {
|
...
|
...
|
@@ -249,17 +251,18 @@ func List(header *protocol.RequestHeader, request *protocol.OrderListRequest) (r |
|
|
func DomainOrderToOrderListItem(order *domain.OrderBase) *protocol.OrderListItem {
|
|
|
bonusStatic := order.OrderBonusStatic()
|
|
|
return &protocol.OrderListItem{
|
|
|
Id: order.Id,
|
|
|
OrderType: order.OrderType,
|
|
|
OrderNo: order.OrderCode,
|
|
|
DeliveryNo: order.DeliveryCode,
|
|
|
OrderDistrict: map[string]interface{}{
|
|
|
"id": order.RegionInfo.RegionId,
|
|
|
Id: order.Id,
|
|
|
OrderType: order.OrderType,
|
|
|
OrderNo: order.OrderCode,
|
|
|
DeliveryNo: order.DeliveryCode,
|
|
|
OrderDistrict: map[string]interface{}{
|
|
|
"id": order.RegionInfo.RegionId,
|
|
|
"name": order.RegionInfo.RegionName,
|
|
|
},
|
|
|
OrderAmount: order.PlanOrderAmount,
|
|
|
UpdateTime: order.UpdateTime.Unix() * 1000,
|
|
|
MyDividend: bonusStatic.OrderTotalReceivable(),
|
|
|
IsRead: order.IsRead(),
|
|
|
OrderAmount: order.PlanOrderAmount,
|
|
|
UpdateTime: order.UpdateTime.Unix() * 1000,
|
|
|
SalesTime: order.SaleDate.Unix() * 1000,
|
|
|
MyDividend: bonusStatic.OrderTotalReceivable(),
|
|
|
IsRead: order.IsRead(),
|
|
|
}
|
|
|
} |
...
|
...
|
|