[关闭]
@ruiqh 2016-05-13T02:50:40.000000Z 字数 4721 阅读 579

一号货车5月份需求服务端开发说明

一号货车

本文固定链接https://www.zybuluo.com/ruiqh/note/367327

version 1.0.4

1.0.0 定义反选入参出参
1.0.1 重新修改部分字段定义
1.0.2 新增调用规则
1.0.3 新增取消订单结果码说明, 附近模块接口说明
1.0.4 新增常用司机接口说明
1.0.5 附近司机新增接活状态及上次上传位置时间
1.0.6 常用司机新增订单数字段
1.0.7 常用司机新增FuckId字段
1.0.8 常用司机新增PhoneNumber字段

反选排序

排序 减少 获取

接口

Orders.svc/RushTrucksWithOrderStatus

调用规则

接收到服务端推送时,立即调用
未接收到服务端推送时,距离上一次调用x秒后调用

入参

字段名称 类型 说明
orderId string 订单编号
userId string 货主编号
userType int 用户类型
truckIds warning string 排除司机编号
  1. var truckIds = "id1|id2|id3|...";
  2. //truckIds = ["id1","id2","id3"];

返回字段说明 complete short on bottom

字段名称 类型 说明
Code int 状态码
ErrMsg string 状态信息
Data InvertInfo 数据
InvertInfo.CountDown double 倒计时
InvertInfo.OrderId string 订单编号
InvertInfo.OrderSelectInvertStaus int 订单反选状态
InvertInfo.ExcludeTrucks string[] 移除司机
InvertInfo.Indexs warning 暂定,可讨论 string[] 排序索引
InvertInfo.Trucks RushTruckInfoForClient[] 抢单司机信息
InvertInfo.RushTruckInfoForClient.TruckId string 司机编号
InvertInfo.RushTruckInfoForClient.CarNumber string 车牌号
InvertInfo.RushTruckInfoForClient.TruckPhoto string 头像地址
InvertInfo.RushTruckInfoForClient.IsVplusTruck bool 是否是V司机
InvertInfo.RushTruckInfoForClient.TruckUserName string 司机姓名
InvertInfo.RushTruckInfoForClient.TruckRateScore double 司机评分
InvertInfo.RushTruckInfoForClient.CarType string 司机车型
InvertInfo.RushTruckInfoForClient.OrderCount int 订单数量
InvertInfo.RushTruckInfoForClient.RushDistance double 与货物距离
InvertInfo.RushTruckInfoForClient.Price double 出价
InvertInfo.RushTruckInfoForClient.Lwh string 长宽高
InvertInfo.RushTruckInfoForClient.Remark string 说明
InvertInfo.RushTruckInfoForClient.Tags RushTruckTagForClient[] 标签信息
InvertInfo.RushTruckInfoForClient.RushTruckTagForClient.TagContents string[] 标签
InvertInfo.RushTruckInfoForClient.RushTruckTagForClient.TagType string 标签类型
  1. {
  2. Code: 0,
  3. ErrMsg: "获取成功",
  4. Data:{
  5. CountDown:18.33,
  6. OrderId:"od1",
  7. OrderSelectInvertStaus:"1"
  8. ExcludeTrucks:[
  9. "truckId1",
  10. "truckId2",
  11. "..."
  12. ],
  13. Indexs: [
  14. "truckId1|`时间`|`距离`|`服务`",
  15. "truckId2|`时间`|`距离`|`服务`3",
  16. "..."
  17. ],
  18. Trucks:[
  19. {
  20. TruckId:"truckId1",
  21. CarNumber:"浙AD***2",
  22. Tags: [
  23. {
  24. TagContents: ["高顶"] ,
  25. TagType: "我的车辆状况"
  26. },
  27. {
  28. TagContents: ["可进城"] ,
  29. TagType: "我提供的服务"
  30. }
  31. ],
  32. TruckPhoto:"http://www.yihaohuoche.com/smallimg.png",
  33. IsVplusTruck:true,
  34. TruckUserName:"张三",
  35. TruckRateScore:4.8,
  36. CarType:"小型厢货",
  37. OrderCount:10,
  38. RushDistance:10,
  39. Price:100,
  40. Lwh:2.8*1.6*1.5
  41. }
  42. ]
  43. }
  44. }

缩减字段名称 是否可用

字段名称 类型 说明
code int 状态码
msg string 状态信息
data InvertInfo 数据
InvertInfo.cd double 倒计时
InvertInfo.od string 订单编号
InvertInfo.oss int 订单反选状态
InvertInfo.ets string[] 移除司机
InvertInfo.ins warning 暂定,可讨论 string[] 排序索引
InvertInfo.ts TruckInfo[] 抢单司机信息
InvertInfo.TruckInfo.td string 司机编号
InvertInfo.TruckInfo.co string 车牌号
InvertInfo.TruckInfo.pu string 头像地址
InvertInfo.TruckInfo.isV bool 是否是V司机
InvertInfo.TruckInfo.n string 司机姓名
InvertInfo.TruckInfo.r double 司机评分
InvertInfo.TruckInfo.tt string 司机车型
InvertInfo.TruckInfo.oc int 订单数量
InvertInfo.TruckInfo.rd double 与货物距离
InvertInfo.TruckInfo.pi double 出价
InvertInfo.TruckInfo.lwh string 长宽高
InvertInfo.TruckInfo.rm string 说明
InvertInfo.TruckInfo.tas TagInfo[] 标签信息
InvertInfo.TruckInfo.TagInfo.tc string[] 标签
InvertInfo.TruckInfo.TagInfo.tat string 标签类型
  1. {
  2. code: 0,
  3. msg: "获取成功",
  4. data:{
  5. cd:18.33,
  6. od:"od1",
  7. oss:"1"
  8. ets:[
  9. "truckId1",
  10. "truckId2",
  11. "..."
  12. ],
  13. ins: [
  14. "truckId1|`时间`|`距离`|`服务`",
  15. "truckId2|`时间`|`距离`|`服务`",
  16. "..."
  17. ],
  18. ts:[
  19. {
  20. td:"truckId1",
  21. co:"浙AD***2",
  22. tas: [
  23. {
  24. tc: ["高顶"] ,
  25. tat: "我的车辆状况"
  26. },
  27. {
  28. tc: ["可进城"] ,
  29. tat: "我提供的服务"
  30. }
  31. ],
  32. pt:"http://www.yihaohuoche.com/smallimg.png",
  33. isV:true,
  34. n:"张三",
  35. r:4.8,
  36. tt:"小型厢货",
  37. oc:10,
  38. rd:10,
  39. pi:100,
  40. lwh:2.8*1.6*1.5
  41. }
  42. ]
  43. }
  44. }

取消订单返回结果优化

场景 ErrCode值
已取消 0 success
已成交 304 dealed

附近司机接口

接口

  1. 查看司机手机号码 Truck.svc/LookTruckPhoneNumber
  2. 分页附近司机信息 Truck.svc/LookNearbyTrucks

查看附近司机接口返回结果说明

字段 类型 说明
code int 0 1 103 104
msg string 成功 失败 去充值 查看过于频繁
data string 手机号码

分页附近司机信息接口说明

入参

字段 类型 说明
location LocationInfoEx 位置
userId string 用户编号
index int 页码号
userType int 用户类别
truckTypes string 车型 t1|t2|t3
isV bool 是否V司机

出参

字段 类型 说明
td string 司机编号
n string 司机姓名
pt string 司机头像
isV bool 是否是V司机
tt string 车型
co string 车牌号码
lwh string 长宽高
tas RushTruckTagForClient 司机标签
la long 上次上传位置时间
io bool 是否接活
  1. {
  2. "la": 1433496553050,
  3. "io": true,
  4. "td": "3076c75e-8417-4b88-9b4f-2b0c25aa7b05",
  5. "n": "测试94",
  6. "pt": "",
  7. "isV": false,
  8. "tt": "小型厢货",
  9. "co": "沪M45548",
  10. "lwh": "2.8*1.6*1.5",
  11. "tas": [
  12. {
  13. "tat": "我的车辆状况",
  14. "tc": [
  15. "拆座",
  16. "尾板",
  17. "封闭车厢"
  18. ]
  19. },
  20. {
  21. "tat": "我提供的服务",
  22. "tc": [
  23. "小推车",
  24. "可进城",
  25. "可安装",
  26. "代收货款"
  27. ]
  28. }
  29. ]
  30. }

常用司机

接口

Truck.svc/LookFreqTrucks

入参

字段 类型 说明
location LocationInfoEx 货主当前位置
userId string 用户编号
userType int 用户类型
index int 页码
city string 城市

出参

字段 类型 说明
cs string[] 常用司机所在城市列表
td string 司机编号
n string 司机姓名
pt string 司机头像
isV bool 是否是V司机
tt string 车型
co string 车牌号码
lwh string 长宽高
tas RushTruckTagForClient 司机标签
r double 评价得分
tus int 司机状态 1|在线 2|忙碌 3|离线
oc int 订单数
fi string fakeId
pn string 手机号码

出参

  1. {
  2. "cs": [
  3. "上海市",
  4. "西安市"
  5. ],
  6. "recordCount": 2,
  7. "pageSize": 10,
  8. "pageCount": 1,
  9. "data": [
  10. {
  11. "r": 4.75,
  12. "tus": 1,
  13. "lst": 1462850656337,
  14. "l": {
  15. "c": "上海市",
  16. "x": 31.206264,
  17. "y": 121.270117
  18. },
  19. "td": "2534b377-108f-43ba-8b7f-c4e2c390729c",
  20. "n": "芮庆华",
  21. "pt": "36/phone-18858107536-Portrait-small.jpg",
  22. "isV": false,
  23. "pn":"18858107536",
  24. "tt": "小型厢货",
  25. "co": "破A123456",
  26. "lwh": "2.8*1.6*1.5",
  27. "oc":1
  28. "fi":"4c1a9152-dd9a-436b-b915-a6f8ade4b404"
  29. "tas": [
  30. {
  31. "tat": "我的车辆状况",
  32. "tc": [
  33. "高顶"
  34. ]
  35. },
  36. {
  37. "tat": "我提供的服务",
  38. "tc": [
  39. "可进城"
  40. ]
  41. }
  42. ]
  43. }],
  44. "code": 0,
  45. "msg": null
  46. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注