- jxorder, only waybill status related left, other info saved.

This commit is contained in:
gazebo
2018-07-16 17:14:17 +08:00
parent ea3aec81a4
commit b75739d6c2
8 changed files with 118 additions and 21 deletions

View File

@@ -80,11 +80,11 @@ func ComposeUniversalOrderID(orderID string, vendorID int) string {
}
func StandardCoordinate2Int(value float64) int {
return int(value * 1000000)
return int(math.Round(value * 1000000))
}
func IntCoordinate2Standard(value int) float64 {
return float64(value / 1000000)
return float64(value) / 1000000
}
func IntCoordinate2MarsStandard(gpsLng, gpsLat int, coordinateType int) (marsLng, marsLat float64, err error) {
@@ -111,7 +111,7 @@ func IntPrice2Standard(value int64) float64 {
}
func StandardPrice2Int(value float64) int64 {
return int64(math.Round(value) * 100)
return int64(math.Round(value * 100))
}
func addOrderOrWaybillStatus(status *model.OrderStatus, db orm.Ormer) (isDuplicated bool, err error) {
@@ -170,3 +170,10 @@ func GetDataCityCodeFromOrder(order *model.GoodsOrder) (retVal string, err error
}
return retVal, err
}
func GetJxStoreIDFromOrder(order *model.GoodsOrder) (retVal int) {
if order.JxStoreID != 0 {
return order.JxStoreID
}
return order.StoreID
}