ProductInventoryController.php 1.0 KB

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