ProductInventoryController.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. namespace App\Http\Controllers\Api;
  3. use App\Service\ProductInventoryService;
  4. use App\Service\ProductService;
  5. use Illuminate\Http\Request;
  6. class ProductInventoryController extends BaseController
  7. {
  8. public function productInventoryList(Request $request)
  9. {
  10. $service = new ProductInventoryService();
  11. $user = $request->userData->toArray();
  12. list($status,$data) = $service->productInventoryList($request->all(),$user);
  13. if($status){
  14. return $this->json_return(200,'',$data);
  15. }else{
  16. return $this->json_return(201,$data);
  17. }
  18. }
  19. public function productInventoryStockList(Request $request)
  20. {
  21. $service = new ProductInventoryService();
  22. $user = $request->userData->toArray();
  23. list($status,$data) = $service->productInventoryStockList($request->all(),$user);
  24. if($status){
  25. return $this->json_return(200,'',$data);
  26. }else{
  27. return $this->json_return(201,$data);
  28. }
  29. }
  30. public function productInventorySetList(Request $request)
  31. {
  32. $service = new ProductInventoryService();
  33. $user = $request->userData->toArray();
  34. list($status,$data) = $service->productInventorySetList($request->all(),$user);
  35. if($status){
  36. return $this->json_return(200,'',$data);
  37. }else{
  38. return $this->json_return(201,$data);
  39. }
  40. }
  41. public function productInventorySet(Request $request)
  42. {
  43. $service = new ProductInventoryService();
  44. $user = $request->userData->toArray();
  45. list($status,$data) = $service->productInventorySet($request->all(),$user);
  46. if($status){
  47. return $this->json_return(200,'',$data);
  48. }else{
  49. return $this->json_return(201,$data);
  50. }
  51. }
  52. public function getMySetting(Request $request)
  53. {
  54. $service = new ProductInventoryService();
  55. $user = $request->userData->toArray();
  56. list($status,$data) = $service->getMySetting($request->all(),$user);
  57. if($status){
  58. return $this->json_return(200,'',$data);
  59. }else{
  60. return $this->json_return(201,$data);
  61. }
  62. }
  63. }