预下单
查看技术文档 重置为默认值
请求参数
请求数据
public void testBsamecityPrice() throws Exception { PrintReq printReq = new PrintReq(); BsamecityOrderReq bsamecityOrderReq = new BsamecityOrderReq(); bsamecityOrderReq.setKuaidicom("shunfengtongcheng"); bsamecityOrderReq.setLbsType(2); bsamecityOrderReq.setRecManName("张三"); bsamecityOrderReq.setRecManMobile("12345678910"); bsamecityOrderReq.setRecManProvince("北京市"); bsamecityOrderReq.setRecManCity("北京市"); bsamecityOrderReq.setRecManDistrict("海淀区"); bsamecityOrderReq.setRecManAddr("xxx楼xxx号"); bsamecityOrderReq.setRecManLat("40.014838"); bsamecityOrderReq.setRecManLng("116.352569"); bsamecityOrderReq.setSendManName("李四"); bsamecityOrderReq.setSendManMobile("12345678910"); bsamecityOrderReq.setSendManProvince("北京市"); bsamecityOrderReq.setSendManCity("北京市"); bsamecityOrderReq.setSendManDistrict("海淀区"); bsamecityOrderReq.setSendManAddr("xxx楼xxx号"); bsamecityOrderReq.setSendManLat("40.002436"); bsamecityOrderReq.setSendManLng("116.326582"); bsamecityOrderReq.setWeight("1"); bsamecityOrderReq.setRemark("测试下单"); bsamecityOrderReq.setVolume(""); bsamecityOrderReq.setOrderType(0); bsamecityOrderReq.setExpectPickupTime(""); bsamecityOrderReq.setExpectFinishTime(""); bsamecityOrderReq.setInsurance(""); bsamecityOrderReq.setPrice("0"); Goods goods = new Goods("外卖", "食品", 1); ArrayList<Goods> goods_list = new ArrayList<Goods>(); goods_list.add(goods); bsamecityOrderReq.setGoods(goods_list); String t = System.currentTimeMillis() + ""; String param = new Gson().toJson(bsamecityOrderReq); printReq.setKey(key); printReq.setMethod(ApiInfoConstant.BSAMECITY_PRICE); printReq.setT(t); printReq.setSign(SignUtils.printSign(param,t,key,secret)); printReq.setParam(param); IBaseClient bsamecityPrice = new BsameCityExpress(); System.out.println(bsamecityPrice.execute(printReq)); }