erp.php 1.2 KB

12345678910111213141516171819202122232425262728
  1. <?php
  2. use app\http\middleware\AllowOriginMiddleware;
  3. use app\http\middleware\StationOpenMiddleware;
  4. use think\facade\Route;
  5. /**
  6. * erp 接口
  7. */
  8. Route::group('erpapi', function () {
  9. // 授权相关
  10. Route::get('auth', 'AuthController/auth')->name('auth'); //获取授权地址
  11. Route::get('auth/call_back', 'AuthController/authCallBack')->name('authCallBack'); //授权回调
  12. Route::get('auth/access_token', 'AuthController/accessToken')->name('accessToken'); //获取token
  13. // 商品相关
  14. Route::get('product/syncProduct', 'ProductController/syncProduct')->name('syncProduct'); //获取商品
  15. // 库存相关
  16. Route::post('stock/callback','StockController/stockCallback')->name('stockCallback'); //库存回调
  17. // 订单相关
  18. Route::post('order/deliver_callback', 'OrderController/deliverCallback')->name('deliverCallback'); //订单发货回调
  19. Route::post('order/cancel_callback', 'OrderController/cancelCallback')->name('cancelCallback'); //订单取消回调
  20. Route::post('refund/receive_callback', 'OrderController/receiveCallback')->name('receiveCallback'); //售后收货回调
  21. })->prefix('erp.')->middleware(AllowOriginMiddleware::class)->middleware(StationOpenMiddleware::class);