1
This commit is contained in:
@@ -11,20 +11,23 @@ const (
|
||||
TokenURL = "https://openapi.uupt.com/v2_0/"
|
||||
//沙箱环境
|
||||
//TokenURL = "http://openapi.test.uupt.com/v2_0/"
|
||||
RequestPost = "POST"
|
||||
RequestPost = "POST"
|
||||
WaybillCallbackURL = "http://callback.jxc4.com/UuPt/UuWaybillCallback"
|
||||
)
|
||||
const (
|
||||
CancelReasonNormal = "其他"
|
||||
|
||||
//运单状态
|
||||
StateConfirmSuccess = 1 //下单成功
|
||||
StateRMGrabsOrder = 3 //跑男抢单
|
||||
StateArrivedStore = 4 //已到达
|
||||
StatePickUp = 5 //已取件
|
||||
StateArrivedDestination = 6 //到达目的地
|
||||
StateReceiverGetGoods = 10 //取件人已收货
|
||||
StateOrderCancel = -1 //订单取消
|
||||
StateConfirmSuccess = "1" //下单成功
|
||||
StateRMGrabsOrder = "3" //跑男抢单
|
||||
StateArrivedStore = "4" //已到达
|
||||
StatePickUp = "5" //已取件
|
||||
StateArrivedDestination = "6" //到达目的地
|
||||
StateReceiverGetGoods = "10" //取件人已收货
|
||||
StateOrderCancel = "-1" //订单取消
|
||||
|
||||
//订单小类
|
||||
SendTypeHelpMeDeliver = 0 //帮我送
|
||||
SendTypeHelpMeDeliver = 0 //帮我送(默认)
|
||||
SendTypeHelpMeBuy = 1 //帮我买
|
||||
//预约类型
|
||||
SubscribeTypeRealTime = 0 //实时订单
|
||||
@@ -51,7 +54,7 @@ const (
|
||||
|
||||
)
|
||||
|
||||
var StateUuWaybill = map[int]string{
|
||||
var StateUuWaybill = map[string]string{
|
||||
StateConfirmSuccess: "下单成功",
|
||||
StateRMGrabsOrder: "跑男抢单",
|
||||
StateArrivedStore: "已到达",
|
||||
@@ -106,8 +109,8 @@ type GetOrderPriceReq struct {
|
||||
FromLat string `json:"from_lat"` //发货地址坐标纬度(坐标系为百度地图坐标系)
|
||||
FromLng string `json:"from_lng"` //发货地址坐标经度(坐标系为百度地图坐标系)
|
||||
//非必填
|
||||
//FromUserNote string `json:"from_usernote"` //发货详细地址具体门牌号或门店名称
|
||||
//ToUserNote string `json:"to_usernote"` //收货人详细地址具体门牌号
|
||||
FromUserNote string `json:"from_usernote"` //发货详细地址具体门牌号或门店名称
|
||||
ToUserNote string `json:"to_usernote"` //收货人详细地址具体门牌号
|
||||
//CountyName string `json:"county_name"` //订单所在县级地名称(如金水区就填“金水区”)
|
||||
//SubscribeTime string `json:"subscribe_time"` //预约时间(如:2015-06-18 12:00:00)没有可以传空字符串
|
||||
//SubscribeType string `json:"subscribe_type"` //预约类型 0实时订单 1预约取件时间
|
||||
@@ -133,8 +136,10 @@ type GetOrderPriceResp struct {
|
||||
GoodsInsuranceMoney string `json:"goods_insurancemoney"` //商品保价金额
|
||||
ExpiresIn string `json:"expires_in"` //price_token的过期时间(单位:秒)
|
||||
//非必返回
|
||||
PriceToken string `json:"price_token"` //金额令牌,提交订单前必须先计算价格
|
||||
BaseRespInfo *BaseRespInfo
|
||||
PriceToken string `json:"price_token"` //金额令牌,提交订单前必须先计算价格
|
||||
FreightMoney string `json:"freight_money"` //跑腿费,此字段废弃可忽略
|
||||
CouponID string `json:"couponid"` //优惠券ID,此字段废弃可忽略
|
||||
BaseRespInfo
|
||||
}
|
||||
|
||||
//发布订单请求体
|
||||
@@ -160,22 +165,26 @@ type AddOrderReq struct {
|
||||
|
||||
//发布订单返回体
|
||||
type AddOrderResp struct {
|
||||
BaseRespInfo *BaseRespInfo
|
||||
OrderCode string `json:"ordercode"` //订单号
|
||||
OriginID string `json:"origin_id"` //第三方对接平台订单id
|
||||
BaseRespInfo
|
||||
OrderCode string `json:"ordercode"` //订单号
|
||||
OriginID string `json:"origin_id"` //第三方对接平台订单id
|
||||
}
|
||||
|
||||
//取消订单
|
||||
type CancelOrderReq struct {
|
||||
BaseRespInfo *BaseRespInfo
|
||||
OrderCode string `json:"ordercode"` //订单号
|
||||
OriginID string `json:"origin_id"` //第三方对接平台订单id
|
||||
//取消订单返回体
|
||||
type CancelOrderResp struct {
|
||||
BaseRespInfo
|
||||
OrderCode string `json:"ordercode"` //订单号
|
||||
OriginID string `json:"origin_id"` //第三方对接平台订单id
|
||||
}
|
||||
|
||||
//获取订单详情返回体
|
||||
type GetOrderDetailResp struct {
|
||||
BaseRespInfo *BaseRespInfo
|
||||
OriginID string `json:"origin_id"` //第三方对接平台id
|
||||
//必返
|
||||
OriginID string `json:"origin_id"` //第三方对接平台id
|
||||
SendType string `json:"send_type"` //订单小类 0帮我送 1帮我买
|
||||
DriverLastloc string `json:"driver_lastloc"` //跑男的坐标,百度地图坐标系经纬度(格式:113.71776,34.767501)
|
||||
//非返回
|
||||
BaseRespInfo
|
||||
OrderCode string `json:"order_code"` //uu跑腿订单编号
|
||||
FromAddress string `json:"from_address"` //发货地址详细地址具体门牌号或门店名称
|
||||
FromLat string `json:"from_lat"` //发货地址坐标纬度(坐标系为百度地图坐标系)
|
||||
@@ -197,11 +206,17 @@ type GetOrderDetailResp struct {
|
||||
DriverName string `json:"driver_name"` //跑男姓名(跑男接单后)
|
||||
DriverJobNum string `json:"driver_jobnum"` //跑男工号(跑男接单后)
|
||||
DriverMobile string `json:"driver_mobile"` //跑男电话(跑男接单后)
|
||||
SendType string `json:"send_type"` //订单小类 0帮我送 1帮我买
|
||||
ExpectedarriveTime string `json:"expectedarrive_time"` //跑男接单后预计到达时间(格式2015-07-01 15:23:56)取货前为到达取货地,取货后为到达收货地
|
||||
DriverLastloc string `json:"driver_lastloc"` //跑男的坐标,百度地图坐标系经纬度(格式:113.71776,34.767501)
|
||||
}
|
||||
|
||||
//运单提交后的回调
|
||||
type CallbackResp struct {
|
||||
type WaybillCallbackParam struct {
|
||||
OrderCode string `json:"order_code"` //订单号
|
||||
DriverName string `json:"driver_name"` //跑男姓名(跑男接单后)
|
||||
DriverJobNum string `json:"driver_jobnum"` //跑男工号(跑男接单后)
|
||||
DriverMobile string `json:"driver_mobile"` //跑男电话(跑男接单后)
|
||||
State string `json:"state"` //当前状态 1下单成功 3跑男抢单 4已到达 5已取件 6到达目的地 10收件人已收货 -1订单取消
|
||||
StateText string `json:"state_text"` //当前状态说明
|
||||
OriginID string `json:"origin_id"` //第三方订单号
|
||||
DriverPhoto string `json:"driver_photo"` //跑男头像(跑男接单后)
|
||||
BaseRespInfo
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user