From 3e44f00a252fe2bd3101faee069e495a64d4c73e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 28 Oct 2020 15:56:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E5=8D=95=E9=AA=8C=E9=87=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/job.go | 4 ++++ business/model/order.go | 4 +++- controllers/job_controller.go | 5 +++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/business/jxstore/cms/job.go b/business/jxstore/cms/job.go index 3d9cb667e..ddb0ad2d0 100644 --- a/business/jxstore/cms/job.go +++ b/business/jxstore/cms/job.go @@ -677,6 +677,10 @@ func GetJdDelivery(ctx *jxcontext.Context, status int, fromTime, toTime string, return dao.GetDeliveryOrders(dao.GetDB(), []string{ctx.GetUserID()}, []int{status}, utils.Str2Time(fromTime), utils.Str2Time(toTime), pageSize, offset) } +func GetJdDeliveryDetail(ctx *jxcontext.Context, vendorWaybillID string) (queryDynamicTraceInfo []*jdeclpapi.QueryDynamicTraceInfoResult, err error) { + return api.JdEclpAPI.QueryDynamicTraceInfo(vendorWaybillID) +} + func ResetJobTimers() { var ( db = dao.GetDB() diff --git a/business/model/order.go b/business/model/order.go index ddf4a8979..bc81f96f4 100644 --- a/business/model/order.go +++ b/business/model/order.go @@ -88,7 +88,7 @@ type DeliveryOrder struct { VendorWaybillID string `orm:"column(vendor_waybill_id)" json:"vendorWaybillID"` //运单号 UserID string `orm:"column(user_id);size(48)" json:"userID"` //用户ID DeliverySendID int `orm:"column(delivery_send_id)" json:"deliverySendID"` //寄件人地址ID - DeliveryReceiveID int `orm:"cloumn(delivery_receive_id)" json:"deliveryReceiveID"` //取件人地址ID(收货人) + DeliveryReceiveID int `orm:"column(delivery_receive_id)" json:"deliveryReceiveID"` //取件人地址ID(收货人) Status int `json:"status"` //运单状态 PayPrice int `json:"payPrice"` //支付金额 OrderFinishedAt time.Time `json:"orderFinishedAt"` //订单完成时间 @@ -98,6 +98,8 @@ type DeliveryOrder struct { PickUpStartTime time.Time `json:"pickUpStartTime"` //预约取件开始时间 PickUpEndTime time.Time `json:"pickUpEndTime"` //预约取件结束时间 PackageCount int `json:"packageCount"` //包裹数 + ActualWeight float64 `json:"actualWeight"` //实际重量 + IsWeight int `json:"isWeight"` //0代表未验重,1代表验重通过,2代表不通过 Comment string `orm:"size(255)" json:"comment"` //备注 } diff --git a/controllers/job_controller.go b/controllers/job_controller.go index af55c3c3a..bc5881574 100644 --- a/controllers/job_controller.go +++ b/controllers/job_controller.go @@ -268,8 +268,8 @@ func (c *JobController) GetJdDelivery() { }) } -// @Title 查询京东快递 -// @Description 查询京东快递 +// @Title 查询京东快递物流信息 +// @Description 查询京东快递物流信息 // @Param token header string true "认证token" // @Param vendorWaybillID query string false "运单号" // @Success 200 {object} controllers.CallResult @@ -277,6 +277,7 @@ func (c *JobController) GetJdDelivery() { // @router /GetJdDeliveryDetail [get] func (c *JobController) GetJdDeliveryDetail() { c.callGetJdDeliveryDetail(func(params *tJobGetJdDeliveryDetailParams) (retVal interface{}, errCode string, err error) { + return retVal, "", err }) }