- limit dada cargoprice to 63.99
This commit is contained in:
@@ -15,6 +15,10 @@ import (
|
||||
"github.com/astaxie/beego/orm"
|
||||
)
|
||||
|
||||
const (
|
||||
maxCargoPrice = 63.99 // 单位为元,达达最大价格,超过这个价格配送费会增加
|
||||
)
|
||||
|
||||
var (
|
||||
ErrCanNotFindDadaCityCode = errors.New("不能找到美团配送站点配置")
|
||||
)
|
||||
@@ -81,6 +85,10 @@ func (c *WaybillController) CreateWaybill(order *model.GoodsOrder) (err error) {
|
||||
ReceiverAddress: order.ConsigneeAddress,
|
||||
ReceiverPhone: order.ConsigneeMobile,
|
||||
}
|
||||
if billParams.CargoPrice > maxCargoPrice {
|
||||
billParams.CargoPrice = maxCargoPrice
|
||||
}
|
||||
|
||||
if billParams.CityCode, err = c.getDataCityCodeFromOrder(order); err == nil {
|
||||
billParams.ReceiverLng, billParams.ReceiverLat, _ = jxutils.IntCoordinate2MarsStandard(order.ConsigneeLng, order.ConsigneeLat, order.CoordinateType)
|
||||
addParams := map[string]interface{}{
|
||||
|
||||
Reference in New Issue
Block a user