From 7f6681beb3f6a6be6428fbfaa497af82b9532428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Tue, 29 Sep 2020 10:58:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=AC=E4=B8=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/orderman_ext.go | 4 +++- business/jxstore/tempop/tempop.go | 2 +- business/model/api.go | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index d9aee3a87..b2954410f 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -159,7 +159,9 @@ func (c *OrderManager) GetOrderInfo(ctx *jxcontext.Context, vendorOrderID string // 这里用QueryRows而不用QueryRow的原因是用QueryRow在这种情况下不能将数据读出,很奇怪。大概的原因是QueryRow对于GoodsOrderExt这种有嵌入的struct处理有问题 num, err := db.Raw(` - SELECT t3.*,ROUND(t3.shop_sum_price/t3.count) avg_price, t1.*, t2.status waybill_status, t2.courier_name, t2.courier_mobile, t2.desired_fee + SELECT t3.*,ROUND(t3.shop_sum_price/t3.count) avg_price, t1.*, t2.status waybill_status, t2.courier_name, t2.courier_mobile, t2.desired_fee, + CAST(t1.consignee_lng AS DECIMAL(15,6))/1000000 float_lng, + CAST(t1.consignee_lat AS DECIMAL(15,6))/1000000 float_lat 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 JOIN ( diff --git a/business/jxstore/tempop/tempop.go b/business/jxstore/tempop/tempop.go index 181cbded6..9a3c134c6 100644 --- a/business/jxstore/tempop/tempop.go +++ b/business/jxstore/tempop/tempop.go @@ -1594,7 +1594,7 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) { dao.GetRows(db, &goods, sql, nil) for _, order2 := range goods { results, err := api.JdAPI.GetJdShopOrders(order2.OrderCreatedAt.AddDate(0, 0, -1).Format("20060102"), order2.OrderCreatedAt.Format("20060102"), globals.JdOrgCode, globals.JdLoginName) - if err != nil { + if err != nil || results == nil { return err } for _, v := range results.BillList.Result { diff --git a/business/model/api.go b/business/model/api.go index ebf5aeead..da13576cb 100644 --- a/business/model/api.go +++ b/business/model/api.go @@ -48,6 +48,9 @@ type GoodsOrderExt struct { ShopSumPrice int64 `json:"shopSumPrice"` AvgPrice int64 `json:"avgPrice"` BadCommentCount int `json:"badCommentCount"` + + FloatLng float64 `json:"floatLng"` + FloatLat float64 `json:"floatLat"` } type OrderSkuExt struct {