正在显示
4 个修改的文件
包含
23 行增加
和
21 行删除
@@ -29,7 +29,7 @@ func Detail(header *protocol.RequestHeader, request *protocol.OrderDetailRequest | @@ -29,7 +29,7 @@ func Detail(header *protocol.RequestHeader, request *protocol.OrderDetailRequest | ||
29 | log.Error(err) | 29 | log.Error(err) |
30 | return | 30 | return |
31 | } | 31 | } |
32 | - rsp.Order = protocol.OrderDetailVO{ | 32 | + rsp.Order = protocol.OrderDetail{ |
33 | Id: order.Id, | 33 | Id: order.Id, |
34 | OrderNo: order.OrderCode, | 34 | OrderNo: order.OrderCode, |
35 | DeliveryNo: order.DeliveryCode, | 35 | DeliveryNo: order.DeliveryCode, |
@@ -38,7 +38,7 @@ func Detail(header *protocol.RequestHeader, request *protocol.OrderDetailRequest | @@ -38,7 +38,7 @@ func Detail(header *protocol.RequestHeader, request *protocol.OrderDetailRequest | ||
38 | UpdateTime: order.UpdateTime.Unix() * 1000, | 38 | UpdateTime: order.UpdateTime.Unix() * 1000, |
39 | OrderDistrict: map[string]interface{}{"id": order.RegionInfo.RegionId, "name": order.RegionInfo.RegionName}, | 39 | OrderDistrict: map[string]interface{}{"id": order.RegionInfo.RegionId, "name": order.RegionInfo.RegionName}, |
40 | Customer: protocol.Customer{Uname: order.Buyer.BuyerName, Phone: order.Buyer.ContactInfo}, | 40 | Customer: protocol.Customer{Uname: order.Buyer.BuyerName, Phone: order.Buyer.ContactInfo}, |
41 | - Product: orderProducts(order), | 41 | + Products: orderProducts(order), |
42 | Total: orderTotalStatic(order), | 42 | Total: orderTotalStatic(order), |
43 | } | 43 | } |
44 | if header.UserId == order.PartnerId && order.UpdateTime.After(order.LastViewTime) { | 44 | if header.UserId == order.PartnerId && order.UpdateTime.After(order.LastViewTime) { |
@@ -4,8 +4,8 @@ import "os" | @@ -4,8 +4,8 @@ import "os" | ||
4 | 4 | ||
5 | var ( | 5 | var ( |
6 | IM_SERVICE_ADDRESS = "https://api.netease.im/nimserver" | 6 | IM_SERVICE_ADDRESS = "https://api.netease.im/nimserver" |
7 | - IM_APP_KEY = "ebf3ae278ee1b346773b99be5080f6a9" | ||
8 | - IM_APP_SECRET = "67ea92e1ea45" | 7 | + IM_APP_KEY = "be7c0639c10e6a69f86ce3b4fa8dc8ec" //"ebf3ae278ee1b346773b99be5080f6a9" |
8 | + IM_APP_SECRET = "9c5b60346613" //"67ea92e1ea45" | ||
9 | ) | 9 | ) |
10 | 10 | ||
11 | func init() { | 11 | func init() { |
@@ -55,6 +55,7 @@ func (repository *OrderBaseRepository) FindOne(queryOptions map[string]interface | @@ -55,6 +55,7 @@ func (repository *OrderBaseRepository) FindOne(queryOptions map[string]interface | ||
55 | query.ColumnExpr("order_base.*") | 55 | query.ColumnExpr("order_base.*") |
56 | query.Relation("OrderGood", func(q *orm.Query) (*orm.Query, error) { | 56 | query.Relation("OrderGood", func(q *orm.Query) (*orm.Query, error) { |
57 | q.ColumnExpr("order_good.*") | 57 | q.ColumnExpr("order_good.*") |
58 | + q.Order("id") | ||
58 | return q, nil | 59 | return q, nil |
59 | }) | 60 | }) |
60 | query.SetWhere(`"order_base".id = ?`, "id") | 61 | query.SetWhere(`"order_base".id = ?`, "id") |
@@ -7,24 +7,25 @@ type OrderDetailRequest struct { | @@ -7,24 +7,25 @@ type OrderDetailRequest struct { | ||
7 | type OrderDetailResponse struct { | 7 | type OrderDetailResponse struct { |
8 | Order interface{} `json:"order"` | 8 | Order interface{} `json:"order"` |
9 | } | 9 | } |
10 | + | ||
11 | +//type OrderDetail struct { | ||
12 | +// Id int64 `json:"id"` | ||
13 | +// OrderNo string `json:"orderNo"` | ||
14 | +// OrderName string `json:"orderName"` | ||
15 | +// OrderStatus int `json:"orderStatus"` | ||
16 | +// CreateTime int64 `json:"createTime"` | ||
17 | +// UpdateTime int64 `json:"updateTime"` | ||
18 | +// OrderQuantity int `json:"orderQuantity"` | ||
19 | +// OrderAmount float64 `json:"orderAmount"` | ||
20 | +// OrderAmountCancel float64 `json:"orderAmountCancel"` | ||
21 | +// OrderUpdateReason string `json:"orderUpdateReason"` | ||
22 | +// OrderDistrict interface{} `json:"orderDistrict"` | ||
23 | +// Customer Customer `json:"customer"` | ||
24 | +// MyDividend float64 `json:"myDividend"` | ||
25 | +// MyDividendPercent float64 `json:"myDividendPercent"` | ||
26 | +//} | ||
10 | type OrderDetail struct { | 27 | type OrderDetail struct { |
11 | Id int64 `json:"id"` | 28 | Id int64 `json:"id"` |
12 | - OrderNo string `json:"orderNo"` | ||
13 | - OrderName string `json:"orderName"` | ||
14 | - OrderStatus int `json:"orderStatus"` | ||
15 | - CreateTime int64 `json:"createTime"` | ||
16 | - UpdateTime int64 `json:"updateTime"` | ||
17 | - OrderQuantity int `json:"orderQuantity"` | ||
18 | - OrderAmount float64 `json:"orderAmount"` | ||
19 | - OrderAmountCancel float64 `json:"orderAmountCancel"` | ||
20 | - OrderUpdateReason string `json:"orderUpdateReason"` | ||
21 | - OrderDistrict interface{} `json:"orderDistrict"` | ||
22 | - Customer Customer `json:"customer"` | ||
23 | - MyDividend float64 `json:"myDividend"` | ||
24 | - MyDividendPercent float64 `json:"myDividendPercent"` | ||
25 | -} | ||
26 | -type OrderDetailVO struct { | ||
27 | - Id int64 `json:"id"` | ||
28 | OrderNo string `json:"orderNo"` //订单号 | 29 | OrderNo string `json:"orderNo"` //订单号 |
29 | DeliveryNo string `json:"deliveryNo"` //发货单号 | 30 | DeliveryNo string `json:"deliveryNo"` //发货单号 |
30 | OrderStatus int `json:"orderStatus"` //订单状态 1.待支付 2.已支付 3.已支付退货 4待支付退货 | 31 | OrderStatus int `json:"orderStatus"` //订单状态 1.待支付 2.已支付 3.已支付退货 4待支付退货 |
@@ -32,7 +33,7 @@ type OrderDetailVO struct { | @@ -32,7 +33,7 @@ type OrderDetailVO struct { | ||
32 | UpdateTime int64 `json:"updateTime"` | 33 | UpdateTime int64 `json:"updateTime"` |
33 | OrderDistrict interface{} `json:"orderDistrict"` | 34 | OrderDistrict interface{} `json:"orderDistrict"` |
34 | Customer Customer `json:"customer"` | 35 | Customer Customer `json:"customer"` |
35 | - Product interface{} `json:"product"` | 36 | + Products interface{} `json:"products"` |
36 | Total interface{} `json:"total"` | 37 | Total interface{} `json:"total"` |
37 | } | 38 | } |
38 | type Customer struct { | 39 | type Customer struct { |
-
请 注册 或 登录 后发表评论