TestController.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. namespace App\Http\Controllers\Api;
  3. use App\Model\BoxDetail;
  4. use App\Service\Box\BoxHookService;
  5. use App\Service\MeasureService;
  6. use Illuminate\Http\Request;
  7. class TestController extends BaseController
  8. {
  9. public function boxInsert(){
  10. $data = [
  11. 'out_order_no' => 'test123',
  12. 'ext_1' => '1',
  13. 'ext_2' => '2',
  14. 'ext_3' => '3',
  15. 'ext_4' => '4',
  16. 'ext_5' => '5',
  17. 'detail' => [
  18. [
  19. 'top_id' => '1',
  20. 'code' => '001',
  21. 'title' => '产品名称',
  22. 'ext_1' => '1',
  23. 'ext_2' => '2',
  24. 'ext_3' => '3',
  25. 'ext_4' => '4',
  26. 'ext_5' => '5',
  27. ],[
  28. 'top_id' => '2',
  29. 'code' => '002',
  30. 'title' => '产品名称1',
  31. 'ext_1' => '11',
  32. 'ext_2' => '22',
  33. 'ext_3' => '33',
  34. 'ext_4' => '44',
  35. 'ext_5' => '55',
  36. ],
  37. ],
  38. ];
  39. $service = BoxHookService::getInstance();
  40. list($status,$msg) = $service->boxInsert($data);
  41. var_dump($status);
  42. var_dump($msg);
  43. }
  44. public function aa(){
  45. $service = BoxHookService::getInstance();
  46. list($status,$msg) = $service->boxDetail(['order_no'=>'202306130543108902']);
  47. var_dump($status);
  48. var_dump($msg);
  49. }
  50. }