- fix mtps delivery fee bug.

This commit is contained in:
gazebo
2018-07-19 19:12:54 +08:00
parent a56cb64f8e
commit 61157174e6
2 changed files with 37 additions and 50 deletions

View File

@@ -92,7 +92,7 @@ func (c *WaybillController) calculateDeliveryFee(bill *model.Waybill) (retVal in
db := orm.NewOrm()
JxStoreID := jxutils.GetJxStoreIDFromOrder(order)
num, err := db.Raw(`
SELECT t2.price, t2.lng, t2.lat
SELECT t2.price, t1.lng, t1.lat
FROM jxstore t1
JOIN mtpsdeliveryprice t2 ON t2.citycode = t1.area
WHERE t1.storeid = ?
@@ -102,7 +102,7 @@ func (c *WaybillController) calculateDeliveryFee(bill *model.Waybill) (retVal in
if err == nil && num == 1 {
delieveryFee = utils.Str2Int64(lists[0][0].(string))
} else {
globals.SugarLogger.Warnf("calculateDeliveryFee can not cal delivery fee for orderid:%s", order.VendorOrderID)
globals.SugarLogger.Warnf("calculateDeliveryFee can not cal delivery fee for orderid:%s, num:%d, error:%v", order.VendorOrderID, num, err)
return 0
}