TestController.php 1.5 KB

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