- fix mtps delivery fee bug.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user