ProductInventoryController.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. }