收藏
回答

【微信物流服务】达达配送商同一个shop_order_id 前后两次不同地址 预下单,配送费一样?

配送商为达达;调用接口为 预下单:https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/immediate-delivery/deliver-by-business/preAddOrder.html

同一个shop_order_id ,两次调用 前后间隔 约30 秒

---------------------以下分别为两次调用的参数,和微信返回的 数据;

第一次调用:

httpUrl=https://api.weixin.qq.com/cgi-bin/express/local/business/order/pre_add?access_token=64_2GjAULPRl9CR2mN2OhIy3IWpWEHZSslCatXnmL_a98Qd6LqccM-i1guJBRYLeZjgVU7BvtWCoXkcjl2ooPls9vAAM4jaSbJxATDpJomyo8Ikmyr1ZvlavuCGKnihdRMgFw25qGwRLiaX7r5bRMVeAMDXSB;

postData={"shopid":"dada4d4dcf85f6db450","shop_order_id":"9877828-5-230110104135704893-270-","shop_no":"451593-5846799","delivery_id":"DADA","openid":"oywPK5JTHTyLFXSp8GmQS7Ye8dFw","sender":{"name":"tycho","city":"广州市","address":"海珠区","address_detail":"广州凡科互联网科技股份有限公司","phone":"12312312312","lng":113.257655,"lat":23.095473},"receiver":{"name":"tycho","city":"广东省广州市","address":"海珠区","address_detail":"工业大道北67号凤凰创意产业园5号楼首层广州凡科互联网科技股份有限公司","phone":"12312312312","lng":113.25762,"lat":23.09555},"cargo":{"goods_value":1.0,"goods_height":0.0,"goods_length":0.0,"goods_width":0.0,"goods_weight":2.0,"cargo_first_class":"美食夜宵","cargo_second_class":"香锅/烤鱼","goods_detail":{"goods":[{"good_count":1,"good_name":"测试单门店创建之后是否同步到停用门店","good_price":0.0}]}},"order_info":{"tips":0,"declared_value":0.0},"shop":{"wxa_path":"pages/order/orderDetail","img_url":"https://mmbiz.qpic.cn/mmbiz_png/xxxxxxxxx/0?wx_fmt=png","goods_name":"测试单门店创建之后是否同步到停用门店","goods_count":1},"delivery_sign":"def6fdbb0ca8170db2fb5cd7212ea2d3d7765a2b"};

第一次调用之后,微信返回值: 配送费是8.5元;

res={"resultcode":0,"resultmsg":"","fee":8.5,"deliverfee":8.5,"tips":0,"insurancefee":0,"distance":11,"delivery_token":"Dadacbf51e9dcb83471f95f6691e1185156d","dispatch_duration":120}}



第二次调用: 寄出地址发生变化, 从广州市 的地址变成 北京的地址; 位置变化很大

httpUrl=https://api.weixin.qq.com/cgi-bin/express/local/business/order/pre_add?access_token=64_2GjAULPRl9CR2mN2OhIy3IWpWEHZSslCatXnmL_a98Qd6LqccM-i1guJBRYLeZjgVU7BvtWCoXkcjl2ooPls9vAAM4jaSbJxATDpJomyo8Ikmyr1ZvlavuCGKnihdRMgFw25qGwRLiaX7r5bRMVeAMDXSB;

postData={"shopid":"dada4d4dcf85f6db450","shop_order_id":"9877828-5-230110104135704893-271-","shop_no":"451593-5846799","delivery_id":"DADA","openid":"oywPK5JTHTyLFXSp8GmQS7Ye8dFw","sender":{"name":"tycho","city":"北京市","address":"朝阳区","address_detail":"朝阳区崔各庄乡","phone":"12312312312","lng":116.51380565158411,"lat":40.02830680500291},"receiver":{"name":"tycho","city":"广东省广州市","address":"海珠区","address_detail":"工业大道北67号凤凰创意产业园5号楼首层广州凡科互联网科技股份有限公司","phone":"12312312312","lng":113.25762,"lat":23.09555},"cargo":{"goods_value":1.0,"goods_height":0.0,"goods_length":0.0,"goods_width":0.0,"goods_weight":2.0,"cargo_first_class":"美食夜宵","cargo_second_class":"香锅/烤鱼","goods_detail":{"goods":[{"good_count":1,"good_name":"测试单门店创建之后是否同步到停用门店","good_price":0.0}]}},"order_info":{"tips":0,"declared_value":0.0},"shop":{"wxa_path":"pages/order/orderDetail","img_url":"https://mmbiz.qpic.cn/mmbiz_png/xxxxxxxxx/0?wx_fmt=png","goods_name":"测试单门店创建之后是否同步到停用门店","goods_count":1},"delivery_sign":"0dd5e78263fd5b4f6f087234c05ff906217b6f7e"};

第二次调用返回结果:配送费还是8.5元;

res={"resultcode":0,"resultmsg":"","fee":8.5,"deliverfee":8.5,"tips":0,"insurancefee":0,"distance":11,"delivery_token":"Dada3d2c1b7efd2046b782fbb9e717705ec4","dispatch_duration":120}


两次 调用,寄出地址位置相隔很远,相差很大,收货地址不变,配送费居然都没有变化;

回答关注问题邀请回答
收藏

1 个回答

  • Constlu
    Constlu
    2023-01-16

    shop_order_id是唯一标识ID,每次下单请使用不同的shop_order_id。

    2023-01-16
    有用
    回复 3
    • 🍦
      🍦
      2023-01-16
      我问题描述 错了,我看了一下参数,两次下单,shop_order_id 是不一样的;  前后两次 分别为
      “shop_order_id”:”9877828-5-230110104135704893-270-“

      “shop_order_id”:”9877828-5-230110104135704893-271-“
      2023-01-16
      回复
    • Constlu
      Constlu
      2023-01-16回复🍦
      因为你2次请求的shop_no字段是一样的。
      2023-01-16
      回复
    • 🍦
      🍦
      2023-01-16回复Constlu
      我不太明白您的意思; 是不是可以这么理解;

      是不是 美团配送、达达 这两个配送商,在 preAddOrder预下单的时候,
      1、如果传了参数 shop_no 的话,寄出地址就不会  用sender 参数做为寄出地址,而是用配送商 后台 对应的 shop_no 所设置的地址 ; 对吧?

      2、如果不传参数 shop_no 的话,寄出地址 就使用 sender 参数做为寄出地址; 对吧?
      2023-01-16
      回复
登录 后发表内容