PartnerController.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. namespace App\Generated\Controllers\V1;
  3. use App\Generated\V1\Messages\Partner\SetPartnerSellMessage;
  4. use App\Generated\V1\Messages\Partner\ThumbPartnerMessage;
  5. use App\Http\Controllers\Controller;
  6. use App\Http\Services\V1\PartnerService;
  7. use App\Generated\V1\Messages\Partner\LockLikeMeMessage;
  8. use DB;
  9. use App\Generated\V1\Messages\Partner\GetPartnerUserMessage;
  10. class PartnerController extends Controller
  11. {
  12. public $handler;
  13. public function __construct(PartnerService $handler)
  14. {
  15. $this->handler = $handler;
  16. }
  17. public function lockLikeMe(LockLikeMeMessage $message)
  18. {
  19. $message->validateInput();
  20. $this->handler->lockLikeMe($message);
  21. $message->validateOutput();
  22. return $message->getResponse();
  23. }
  24. public function setPartnerSell(SetPartnerSellMessage $message)
  25. {
  26. $message->validateInput();
  27. $this->handler->setPartnerSell($message);
  28. $message->validateOutput();
  29. return $message->getResponse();
  30. }
  31. public function thumbPartner(ThumbPartnerMessage $message)
  32. {
  33. $message->validateInput();
  34. $this->handler->thumbPartner($message);
  35. $message->validateOutput();
  36. return $message->getResponse();
  37. }
  38. public function getPartnerUser(GetPartnerUserMessage $message)
  39. {
  40. $message->validateInput();
  41. $this->handler->getPartnerUser($message);
  42. $message->validateOutput();
  43. return $message->getResponse();
  44. }
  45. }