正在显示
1 个修改的文件
包含
86 行增加
和
41 行删除
| 1 | -第e仓代售商API | ||
| 2 | -=== | ||
| 3 | - | ||
| 4 | -### install | ||
| 5 | -``` | ||
| 6 | -composer require lackoxygen/top-warehouse | ||
| 7 | -``` | ||
| 8 | - | ||
| 9 | -### git | ||
| 10 | -``` | ||
| 11 | -http://47.107.73.162:8099/lackoxygen/top-warehouse.git | ||
| 12 | -``` | ||
| 13 | - | ||
| 14 | -### 配置仓库 | ||
| 15 | -``` | ||
| 16 | -{ | ||
| 17 | - "type": "git", | ||
| 18 | - "url": "http://47.107.73.162:8099/lackoxygen/top-warehouse.git" | ||
| 19 | -} | ||
| 20 | -``` | ||
| 21 | - | ||
| 22 | -### 配置文件 | ||
| 23 | -``` | ||
| 24 | -发布暂时无法生成,手动copy到config | ||
| 25 | -``` | ||
| 26 | - | ||
| 27 | -### 用法 | ||
| 28 | -``` | ||
| 29 | - $request = new GetStockInventoryRequest(); | ||
| 30 | - | ||
| 31 | - $request->type = 2; | ||
| 32 | - $request->deliveryItemId = 1; | ||
| 33 | - $request->goods_id = 1; | ||
| 34 | - $request->warehouse_id = 1; | ||
| 35 | - $obj = new TopWarehouse(); | ||
| 36 | - $response = $obj->getStockInventor($request); | ||
| 37 | - var_dump($response->getContents()); | ||
| 38 | -``` | ||
| 39 | - | ||
| 40 | - | ||
| 41 | - | 1 | +第e仓代售商API |
| 2 | +=== | ||
| 3 | + | ||
| 4 | +### install | ||
| 5 | +``` | ||
| 6 | +composer require lackoxygen/top-warehouse | ||
| 7 | +``` | ||
| 8 | + | ||
| 9 | +### git | ||
| 10 | +``` | ||
| 11 | +http://47.107.73.162:8099/lackoxygen/top-warehouse.git | ||
| 12 | +``` | ||
| 13 | + | ||
| 14 | +### 配置仓库 | ||
| 15 | +``` | ||
| 16 | +{ | ||
| 17 | + "type": "git", | ||
| 18 | + "url": "http://47.107.73.162:8099/lackoxygen/top-warehouse.git" | ||
| 19 | +} | ||
| 20 | +``` | ||
| 21 | + | ||
| 22 | +### 配置文件 | ||
| 23 | +``` | ||
| 24 | +发布暂时无法生成,手动copy到config | ||
| 25 | +``` | ||
| 26 | + | ||
| 27 | +### 用法 | ||
| 28 | +``` | ||
| 29 | + /** | ||
| 30 | + * 订单推送 | ||
| 31 | + */ | ||
| 32 | + $response = TopWarehouseFacade::ordersB2cAdd(function (OrdersB2cAddRequest $request){ | ||
| 33 | + $request->warehouse_id = 1; | ||
| 34 | + }); | ||
| 35 | + | ||
| 36 | + /** | ||
| 37 | + * 状态回退 | ||
| 38 | + */ | ||
| 39 | + $response = TopWarehouseFacade::orderEntryStatus(function (OrderEntryStatusRequest $request){ | ||
| 40 | + | ||
| 41 | + }); | ||
| 42 | + | ||
| 43 | + /** | ||
| 44 | + * 货运装载 | ||
| 45 | + */ | ||
| 46 | + $response = TopWarehouseFacade::loadDelivery(function (OrderLoadingDeliveryRequest $request){ | ||
| 47 | + | ||
| 48 | + }); | ||
| 49 | + | ||
| 50 | + /** | ||
| 51 | + * 查询库存 | ||
| 52 | + */ | ||
| 53 | + $response = TopWarehouseFacade::getStockInventory(function (GetStockInventoryRequest $request){ | ||
| 54 | + | ||
| 55 | + }); | ||
| 56 | + | ||
| 57 | + /** | ||
| 58 | + * 验签 | ||
| 59 | + */ | ||
| 60 | + TopWarehouseFacade::verify(request()->post()); | ||
| 61 | + | ||
| 62 | + /** | ||
| 63 | + * 判断数据是否有效 | ||
| 64 | + */ | ||
| 65 | + if ($response->isSuccess()){ | ||
| 66 | + | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + /** | ||
| 70 | + * 异常 | ||
| 71 | + */ | ||
| 72 | + \Lackoxygen\TopWarehouse\Exception\Exception\Exception::class; | ||
| 73 | + | ||
| 74 | + /** | ||
| 75 | + * 获取返回内容 string | ||
| 76 | + */ | ||
| 77 | + $response->getContents(); | ||
| 78 | + | ||
| 79 | + /** | ||
| 80 | + * 获取返回内容 array | ||
| 81 | + */ | ||
| 82 | + $response->toArray(); | ||
| 83 | +``` | ||
| 84 | + | ||
| 85 | + | ||
| 86 | + |
-
请 注册 或 登录 后发表评论