This commit is contained in:
苏尹岚
2020-09-29 10:58:01 +08:00
parent e33dd48728
commit 7f6681beb3
3 changed files with 7 additions and 2 deletions

View File

@@ -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 (