- add more fields in GetOrders result
This commit is contained in:
@@ -43,7 +43,9 @@ func (c *OrderManager) GetStoreOrderInfo(ctx *jxcontext.Context, storeID string,
|
||||
|
||||
db := orm.NewOrm()
|
||||
_, err = db.Raw(`
|
||||
SELECT t1.*, t2.status waybill_status, t2.courier_name, t2.courier_mobile
|
||||
SELECT t1.*,
|
||||
t2.status waybill_status, t2.courier_name, t2.courier_mobile,
|
||||
t2.actual_fee, t2.desired_fee, t2.waybill_created_at, t2.waybill_finished_at
|
||||
FROM goods_order t1
|
||||
LEFT JOIN waybill t2 ON t1.vendor_waybill_id = t2.vendor_waybill_id AND t1.waybill_vendor_id = t2.waybill_vendor_id
|
||||
WHERE IF(t1.jx_store_id != 0, t1.jx_store_id, t1.store_id) = ?
|
||||
@@ -274,7 +276,9 @@ func (c *OrderManager) GetOrders(ctx *jxcontext.Context, fromDateStr, toDateStr
|
||||
}
|
||||
|
||||
sql := `
|
||||
SELECT SQL_CALC_FOUND_ROWS t1.*, t2.status waybill_status, t2.courier_name, t2.courier_mobile
|
||||
SELECT SQL_CALC_FOUND_ROWS t1.*,
|
||||
t2.status waybill_status, t2.courier_name, t2.courier_mobile,
|
||||
t2.actual_fee, t2.desired_fee, t2.waybill_created_at, t2.waybill_finished_at
|
||||
FROM goods_order t1
|
||||
LEFT JOIN waybill t2 ON t1.vendor_waybill_id = t2.vendor_waybill_id AND t1.waybill_vendor_id = t2.waybill_vendor_id
|
||||
`
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
const (
|
||||
DefPageSize = 50
|
||||
UnlimitedPageSize = 999999999
|
||||
@@ -11,6 +13,11 @@ type GoodsOrderExt struct {
|
||||
CourierName string `orm:"size(32)" json:"courierName"`
|
||||
CourierMobile string `orm:"size(32)" json:"courierMobile"`
|
||||
CurrentConsigneeMobile string `orm:"-" json:"currentConsigneeMobile"`
|
||||
|
||||
ActualFee int64 `json:"actualFee"` // 实际要支付给快递公司的费用
|
||||
DesiredFee int64 `json:"desiredFee"` // 运单总费用
|
||||
WaybillCreatedAt time.Time `orm:"type(datetime);index" json:"waybillCreatedAt"`
|
||||
WaybillFinishedAt time.Time `orm:"type(datetime)" json:"waybillFinishedAt"`
|
||||
}
|
||||
|
||||
type OrderSkuExt struct {
|
||||
|
||||
Reference in New Issue
Block a user