You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace app\controller\erp;
  3. use app\jobs\product\ProductSyncErp;
  4. use app\Request;
  5. use think\Response;
  6. use \think\facade\Log;
  7. class StockController
  8. {
  9. /**
  10. * 库存回调
  11. * @param Request $request
  12. * @return void
  13. */
  14. public function stockCallback(Request $request)
  15. {
  16. [$datas] = $request->postMore([
  17. ['datas', []]
  18. ], true);
  19. Log::info(['data' => json_encode($datas), 'type' => 'stockCallback']);
  20. if (sys_config('erp_open')) {
  21. ProductSyncErp::dispatchDo('updatePlatformStock', [$datas]);
  22. }
  23. return Response::create(['code' => "0", "msg" => "执行成功"], "json");
  24. }
  25. }