正在显示
3 个修改的文件
包含
18 行增加
和
10 行删除
@@ -248,13 +248,17 @@ func List(header *protocol.RequestHeader, request *protocol.OrderListRequest) (r | @@ -248,13 +248,17 @@ func List(header *protocol.RequestHeader, request *protocol.OrderListRequest) (r | ||
248 | func DomainOrderToOrderListItem(order *domain.OrderBase) *protocol.OrderListItem { | 248 | func DomainOrderToOrderListItem(order *domain.OrderBase) *protocol.OrderListItem { |
249 | bonusStatic := order.OrderBonusStatic() | 249 | bonusStatic := order.OrderBonusStatic() |
250 | return &protocol.OrderListItem{ | 250 | return &protocol.OrderListItem{ |
251 | - Id: order.Id, | ||
252 | - OrderType: order.OrderType, | ||
253 | - OrderNo: order.OrderCode, | ||
254 | - DeliveryNo: order.DeliveryCode, | ||
255 | - OrderAmount: order.PlanOrderAmount, | ||
256 | - UpdateTime: order.UpdateTime.Unix() * 1000, | ||
257 | - MyDividend: bonusStatic.OrderTotalReceivable(), | ||
258 | - IsRead: order.IsRead(), | 251 | + Id: order.Id, |
252 | + OrderType: order.OrderType, | ||
253 | + OrderNo: order.OrderCode, | ||
254 | + DeliveryNo: order.DeliveryCode, | ||
255 | + OrderDistrict: map[string]interface{}{ | ||
256 | + "id": order.RegionInfo.RegionId, | ||
257 | + "name": order.RegionInfo.RegionName, | ||
258 | + }, | ||
259 | + OrderAmount: order.PlanOrderAmount, | ||
260 | + UpdateTime: order.UpdateTime.Unix() * 1000, | ||
261 | + MyDividend: bonusStatic.OrderTotalReceivable(), | ||
262 | + IsRead: order.IsRead(), | ||
259 | } | 263 | } |
260 | } | 264 | } |
@@ -77,8 +77,7 @@ func (repository *OrderBaseRepository) Find(queryOptions map[string]interface{}) | @@ -77,8 +77,7 @@ func (repository *OrderBaseRepository) Find(queryOptions map[string]interface{}) | ||
77 | var OrderBaseModels []*models.OrderBase | 77 | var OrderBaseModels []*models.OrderBase |
78 | OrderBases := make([]*domain.OrderBase, 0) | 78 | OrderBases := make([]*domain.OrderBase, 0) |
79 | query := NewQuery(tx.Model(&OrderBaseModels), queryOptions) | 79 | query := NewQuery(tx.Model(&OrderBaseModels), queryOptions) |
80 | - query. | ||
81 | - SetWhere(`"order_base".partner_id= ?`, "partnerId"). | 80 | + query.SetWhere(`"order_base".partner_id= ?`, "partnerId"). |
82 | SetWhere(`"order_base".order_type= ?`, "orderType"). | 81 | SetWhere(`"order_base".order_type= ?`, "orderType"). |
83 | SetWhere(`"order_base".create_time >= ?`, "beginTime"). | 82 | SetWhere(`"order_base".create_time >= ?`, "beginTime"). |
84 | SetWhere(`"order_base".create_time < ?`, "endTime"). | 83 | SetWhere(`"order_base".create_time < ?`, "endTime"). |
@@ -24,6 +24,7 @@ type OrderDetailResponse struct { | @@ -24,6 +24,7 @@ type OrderDetailResponse struct { | ||
24 | // MyDividend float64 `json:"myDividend"` | 24 | // MyDividend float64 `json:"myDividend"` |
25 | // MyDividendPercent float64 `json:"myDividendPercent"` | 25 | // MyDividendPercent float64 `json:"myDividendPercent"` |
26 | //} | 26 | //} |
27 | + | ||
27 | type OrderDetail struct { | 28 | type OrderDetail struct { |
28 | Id int64 `json:"id"` | 29 | Id int64 `json:"id"` |
29 | OrderNo string `json:"orderNo"` //订单号 | 30 | OrderNo string `json:"orderNo"` //订单号 |
@@ -36,6 +37,7 @@ type OrderDetail struct { | @@ -36,6 +37,7 @@ type OrderDetail struct { | ||
36 | Products interface{} `json:"products"` | 37 | Products interface{} `json:"products"` |
37 | Total interface{} `json:"total"` | 38 | Total interface{} `json:"total"` |
38 | } | 39 | } |
40 | + | ||
39 | type Customer struct { | 41 | type Customer struct { |
40 | Uname string `json:"uname"` | 42 | Uname string `json:"uname"` |
41 | Phone string `json:"phone"` | 43 | Phone string `json:"phone"` |
@@ -110,8 +112,11 @@ type OrderListItem struct { | @@ -110,8 +112,11 @@ type OrderListItem struct { | ||
110 | OrderStatus int `json:"-"` | 112 | OrderStatus int `json:"-"` |
111 | //实际订单数量 | 113 | //实际订单数量 |
112 | OrderActualCount int `json:"-"` | 114 | OrderActualCount int `json:"-"` |
115 | + // 订单区域 | ||
116 | + OrderDistrict map[string]interface{} `json:"orderDistrict"` | ||
113 | //订单金额 | 117 | //订单金额 |
114 | OrderAmount float64 `json:"orderAmount"` | 118 | OrderAmount float64 `json:"orderAmount"` |
119 | + // 订单更新时间 | ||
115 | UpdateTime int64 `json:"updateTime"` | 120 | UpdateTime int64 `json:"updateTime"` |
116 | //我的分红 | 121 | //我的分红 |
117 | MyDividend float64 `json:"dividendReceivable"` | 122 | MyDividend float64 `json:"dividendReceivable"` |
-
请 注册 或 登录 后发表评论