PairController.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <?php
  2. namespace App\Generated\Controllers\V1;
  3. use App\Generated\V1\Messages\Pair\GetActivityListMessage;
  4. use App\Generated\V1\Messages\Pair\RemoveKeepCpMessage;
  5. use App\Generated\V1\Messages\Pair\AddScoreByFlowerMessage;
  6. use App\Generated\V1\Messages\Pair\GetActivityConductStageIdMessage;
  7. use App\Generated\V1\Messages\Pair\RegretsMessage;
  8. use App\Generated\V1\Messages\Pair\EnrollProMessage;
  9. use App\Generated\V1\Messages\Pair\ConfirmBeAloneMessage;
  10. use App\Generated\V1\Messages\Pair\OperationalLogMessage;
  11. use App\Http\Controllers\Controller;
  12. use App\Http\Services\V1\PairService;
  13. use App\Generated\V1\Messages\Pair\RefundMessage;
  14. use App\Generated\V1\Messages\Pair\EnrollFreeMessage;
  15. use App\Generated\V1\Messages\Pair\ActivityLastMessage;
  16. use App\Generated\V1\Messages\Pair\EnrollNextMessage;
  17. use App\Generated\V1\Messages\Pair\GetKeepRoomMessage;
  18. use App\Generated\V1\Messages\Pair\GetAllTagsMessage;
  19. use App\Generated\V1\Messages\Pair\GetAloneGroupMessage;
  20. use App\Generated\V1\Messages\Pair\LastenrollMessage;
  21. use App\Generated\V1\Messages\Pair\ActivityInfoMessage;
  22. use App\Generated\V1\Messages\Pair\ActivityRecentMessage;
  23. use App\Generated\V1\Messages\Pair\ConfirmCpMessage;
  24. use DB;
  25. use App\Generated\V1\Messages\Pair\KeepCpMessage;
  26. class PairController extends Controller
  27. {
  28. public $handler;
  29. public function __construct(PairService $handler)
  30. {
  31. $this->handler = $handler;
  32. }
  33. public function getAloneGroup(GetAloneGroupMessage $message)
  34. {
  35. $message->validateInput();
  36. $this->handler->getAloneGroup($message);
  37. $message->validateOutput();
  38. return $message->getResponse();
  39. }
  40. public function removeKeepCp(RemoveKeepCpMessage $message)
  41. {
  42. $message->validateInput();
  43. $this->handler->removeKeepCp($message);
  44. $message->validateOutput();
  45. return $message->getResponse();
  46. }
  47. public function keepCp(KeepCpMessage $message)
  48. {
  49. $message->validateInput();
  50. $this->handler->keepCp($message);
  51. $message->validateOutput();
  52. return $message->getResponse();
  53. }
  54. public function getKeepRoom(GetKeepRoomMessage $message)
  55. {
  56. $message->validateInput();
  57. $this->handler->getKeepRoom($message);
  58. $message->validateOutput();
  59. return $message->getResponse();
  60. }
  61. public function confirmBeAlone(ConfirmBeAloneMessage $message)
  62. {
  63. $message->validateInput();
  64. $this->handler->confirmBeAlone($message);
  65. $message->validateOutput();
  66. return $message->getResponse();
  67. }
  68. public function operationalLog(OperationalLogMessage $message)
  69. {
  70. $message->validateInput();
  71. $this->handler->operationalLog($message);
  72. $message->validateOutput();
  73. return $message->getResponse();
  74. }
  75. public function regrets(RegretsMessage $message)
  76. {
  77. $message->validateInput();
  78. $this->handler->regrets($message);
  79. $message->validateOutput();
  80. return $message->getResponse();
  81. }
  82. public function confirmCp(ConfirmCpMessage $message)
  83. {
  84. $message->validateInput();
  85. $this->handler->confirmCp($message);
  86. $message->validateOutput();
  87. return $message->getResponse();
  88. }
  89. public function addScoreByFlower(AddScoreByFlowerMessage $message)
  90. {
  91. $message->validateInput();
  92. $this->handler->addScoreByFlower($message);
  93. $message->validateOutput();
  94. return $message->getResponse();
  95. }
  96. public function refund(RefundMessage $message)
  97. {
  98. $message->validateInput();
  99. $this->handler->refund($message);
  100. $message->validateOutput();
  101. return $message->getResponse();
  102. }
  103. public function enrollNext(EnrollNextMessage $message)
  104. {
  105. $message->validateInput();
  106. $this->handler->enrollNext($message);
  107. $message->validateOutput();
  108. return $message->getResponse();
  109. }
  110. public function enrollPro(EnrollProMessage $message)
  111. {
  112. $message->validateInput();
  113. $this->handler->enrollPro($message);
  114. $message->validateOutput();
  115. return $message->getResponse();
  116. }
  117. public function enrollFree(EnrollFreeMessage $message)
  118. {
  119. $message->validateInput();
  120. $this->handler->enrollFree($message);
  121. $message->validateOutput();
  122. return $message->getResponse();
  123. }
  124. public function getAllTags(GetAllTagsMessage $message)
  125. {
  126. $message->validateInput();
  127. $this->handler->getAllTags($message);
  128. $message->validateOutput();
  129. return $message->getResponse();
  130. }
  131. public function getActivityList(GetActivityListMessage $message)
  132. {
  133. $message->validateInput();
  134. $this->handler->getActivityList($message);
  135. $message->validateOutput();
  136. return $message->getResponse();
  137. }
  138. public function lastenroll(LastenrollMessage $message)
  139. {
  140. $message->validateInput();
  141. $this->handler->lastenroll($message);
  142. $message->validateOutput();
  143. return $message->getResponse();
  144. }
  145. public function getActivityConductStageId(GetActivityConductStageIdMessage $message)
  146. {
  147. $message->validateInput();
  148. $this->handler->getActivityConductStageId($message);
  149. $message->validateOutput();
  150. return $message->getResponse();
  151. }
  152. public function activityInfo(ActivityInfoMessage $message)
  153. {
  154. $message->validateInput();
  155. $this->handler->activityInfo($message);
  156. $message->validateOutput();
  157. return $message->getResponse();
  158. }
  159. public function activityRecent(ActivityRecentMessage $message)
  160. {
  161. $message->validateInput();
  162. $this->handler->activityRecent($message);
  163. $message->validateOutput();
  164. return $message->getResponse();
  165. }
  166. public function activityLast(ActivityLastMessage $message)
  167. {
  168. $message->validateInput();
  169. $this->handler->activityLast($message);
  170. $message->validateOutput();
  171. return $message->getResponse();
  172. }
  173. }