package model // VendorIDJD, VendorIDMTWM与VendorIDELM的定义和老系统是兼容的 const ( VendorIDUnknown = -1 VendorIDPurchaseBegin = 0 VendorIDJD = 0 VendorIDMTWM = 1 VendorIDELM = 2 VendorIDPurchaseEnd = 2 VendorIDDeliveryBegin = 101 VendorIDDada = 101 VendorIDMTPS = 102 VendorIDFengNiao = 103 VendorIDDeliveryEnd = VendorIDFengNiao ) var ( VendorNames = map[int]string{ VendorIDJD: "JD", VendorIDMTWM: "MT", VendorIDELM: "ELEME", VendorIDDada: "Dada", VendorIDMTPS: "MTPS", } VendorChineseNames = map[int]string{ VendorIDJD: "京东到家", VendorIDMTWM: "美团外卖", VendorIDELM: "饿了么", VendorIDDada: "达达众包", VendorIDMTPS: "美团配送", } OrderStatusName = map[int]string{ OrderStatusNew: "OrderStatusNew", OrderStatusAdjust: "OrderStatusAdjust", OrderStatusAccepted: "OrderStatusAccepted", OrderStatusFinishedPickup: "OrderStatusFinishedPickup", OrderStatusDelivering: "OrderStatusDelivering", OrderStatusDelivered: "OrderStatusDelivered", OrderStatusFinished: "OrderStatusFinished", OrderStatusCanceled: "OrderStatusCanceled", OrderStatusFailed: "OrderStatusFailed", } WaybillStatusName = map[int]string{ WaybillStatusNew: "WaybillStatusNew", WaybillStatusAcceptCanceled: "WaybillStatusAcceptCanceled", WaybillStatusAccepted: "WaybillStatusAccepted", WaybillStatusCourierArrived: "WaybillStatusCourierArrived", WaybillStatusDelivering: "WaybillStatusDelivering", WaybillStatusDelivered: "WaybillStatusDelivered", WaybillStatusCanceled: "WaybillStatusCanceled", WaybillStatusFailed: "WaybillStatusFailed", } ) const ( OrderTypeOrder = 1 OrderTypeWaybill = 2 ) // https://blog.csdn.net/a13570320979/article/details/51366355 // 美团配送: // 坐标类型,0:火星坐标(高德,腾讯地图均采用火星坐标) 1:百度坐标 (默认值为0) // 京东: // 收货人地址定位类型(buyerCoordType值为空或为1时,定位类型为gps,如为其他值时,定位类型为非gps类型。) // 饿了么: // 只支持高德坐标 // 达达: // 只支持高德坐标 // 如下定义与美团配送兼容 const ( CoordinateTypeMars = 0 // 火星坐标,高德坐标,GCJ-02坐标系 CoordinateTypeBaiDu = 1 // 百度坐标,bd-09,在GCJ-02坐标系上再次偏移加密的坐标 CoordinateTypeMapbar = 2 CoordinateTypeGPS = 84 // 真实坐标,WGS-84原始坐标系 ) const ( OrderStatusUnlocked = -25 OrderStatusLocked = -20 OrderStatusApplyUrgeOrder = -15 OrderStatusApplyRefund = -10 OrderStatusApplyCancel = -5 OrderStatusUnknown = 0 OrderStatusNew = 5 // 新订单 OrderStatusAdjust = 8 // 订单调整 OrderStatusAccepted = 10 // 已经接单,也即待出库,待拣货 OrderStatusFinishedPickup = 15 // 拣货完成 OrderStatusDelivering = 20 // 开始配送,配送员已取货,从这里开始就是运单消息了 OrderStatusEndBegin = 100 // 以下的状态就是结束状态 OrderStatusDelivered = 105 // 妥投 OrderStatusFinished = 110 // 订单已完成 OrderStatusCanceled = 115 // 订单已取消 OrderStatusFailed = 120 // 订单已失败 ) const ( LockStatusUnlocked = 0 LockStatusLocked = 1 ) const ( WaybillStatusUnknown = 0 WaybillStatusNew = 5 WaybillStatusAcceptCanceled = 8 WaybillStatusAccepted = 10 WaybillStatusCourierArrived = 15 // 此状态是可选的,明确写出来是因为还是较重要的状态,但业务逻辑不应依赖此状态 WaybillStatusDelivering = 20 WaybillStatusEndBegin = 100 // 以下的状态就是结束状态 WaybillStatusDelivered = 105 WaybillStatusCanceled = 115 WaybillStatusFailed = 120 ) const ( BusinessTypeImmediate = 1 BusinessTypeDingshida = 2 ) var ( ElmSkuPromotion = map[int]int{ 11: 1, 200: 1, } ) const ( JdPlatformFeeRate = 10 MtPlatformFeeRate = 10 ) const ( OrderDeliveryFlagMaskScheduleDisabled = 1 // 禁止三方配送调度 OrderDeliveryFlagMaskPurcahseDisabled = 2 // 购物平台已不配送(一般为门店配送类型本身为自配送,或已经转自配送) )