FriendController.php 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <?php
  2. namespace App\Generated\Controllers\V1_1;
  3. use App\Generated\V1_1\Messages\Friend\AgreeFriendApplyMessage;
  4. use App\Http\Services\V1_1\FriendService;
  5. use App\Generated\V1_1\Messages\Friend\GetEachLikeContactsMessage;
  6. use App\Generated\V1_1\Messages\Friend\StarContactMessage;
  7. use App\Http\Controllers\Controller;
  8. use App\Generated\V1_1\Messages\Friend\RefusePairFriendApplyMessage;
  9. use App\Generated\V1_1\Messages\Friend\UnStarContactMessage;
  10. use App\Generated\V1_1\Messages\Friend\FriendApplyMsgOverviewMessage;
  11. use App\Generated\V1_1\Messages\Friend\GetReceiveFriendApplyListMessage;
  12. use App\Generated\V1_1\Messages\Friend\ChangeContactNoteMessage;
  13. use App\Generated\V1_1\Messages\Friend\GetStarContactListMessage;
  14. use App\Generated\V1_1\Messages\Friend\UnBlacklistContactMessage;
  15. use App\Generated\V1_1\Messages\Friend\RefuseFriendApplyMessage;
  16. use App\Generated\V1_1\Messages\Friend\AgreePairFriendApplyMessage;
  17. use App\Generated\V1_1\Messages\Friend\GetContactListMessage;
  18. use App\Generated\V1_1\Messages\Friend\SendPairFriendApplyMessage;
  19. use App\Generated\V1_1\Messages\Friend\GetUnReadSayHelloContactListMessage;
  20. use App\Generated\V1_1\Messages\Friend\SendFriendApplyMessage;
  21. use App\Generated\V1_1\Messages\Friend\BlacklistContactMessage;
  22. use App\Generated\V1_1\Messages\Friend\GetReadSayHelloContactListMessage;
  23. use App\Generated\V1_1\Messages\Friend\GetSendFriendApplyListMessage;
  24. use App\Generated\V1_1\Messages\Friend\DeleteContactMessage;
  25. use App\Generated\V1_1\Messages\Friend\GetContactMessage;
  26. use App\Generated\V1_1\Messages\Friend\GetAllFriendAppliesMessage;
  27. use App\Generated\V1_1\Messages\Friend\GetFriendListMessage;
  28. use DB;
  29. class FriendController extends Controller
  30. {
  31. public $handler;
  32. public function __construct(FriendService $handler)
  33. {
  34. $this->handler = $handler;
  35. }
  36. public function getReadSayHelloContactList(GetReadSayHelloContactListMessage $message)
  37. {
  38. $message->validateInput();
  39. $this->handler->getReadSayHelloContactList($message);
  40. $message->validateOutput();
  41. return $message->getResponse();
  42. }
  43. public function getUnReadSayHelloContactList(GetUnReadSayHelloContactListMessage $message)
  44. {
  45. $message->validateInput();
  46. $this->handler->getUnReadSayHelloContactList($message);
  47. $message->validateOutput();
  48. return $message->getResponse();
  49. }
  50. public function getFriendList(GetFriendListMessage $message)
  51. {
  52. $message->validateInput();
  53. $this->handler->getFriendList($message);
  54. $message->validateOutput();
  55. return $message->getResponse();
  56. }
  57. public function getEachLikeContacts(GetEachLikeContactsMessage $message)
  58. {
  59. $message->validateInput();
  60. $this->handler->getEachLikeContacts($message);
  61. $message->validateOutput();
  62. return $message->getResponse();
  63. }
  64. public function getStarContactList(GetStarContactListMessage $message)
  65. {
  66. $message->validateInput();
  67. $this->handler->getStarContactList($message);
  68. $message->validateOutput();
  69. return $message->getResponse();
  70. }
  71. public function getContactList(GetContactListMessage $message)
  72. {
  73. $message->validateInput();
  74. $this->handler->getContactList($message);
  75. $message->validateOutput();
  76. return $message->getResponse();
  77. }
  78. public function getSendFriendApplyList(GetSendFriendApplyListMessage $message)
  79. {
  80. $message->validateInput();
  81. $this->handler->getSendFriendApplyList($message);
  82. $message->validateOutput();
  83. return $message->getResponse();
  84. }
  85. public function getReceiveFriendApplyList(GetReceiveFriendApplyListMessage $message)
  86. {
  87. $message->validateInput();
  88. $this->handler->getReceiveFriendApplyList($message);
  89. $message->validateOutput();
  90. return $message->getResponse();
  91. }
  92. public function getAllFriendApplies(GetAllFriendAppliesMessage $message)
  93. {
  94. $message->validateInput();
  95. $this->handler->getAllFriendApplies($message);
  96. $message->validateOutput();
  97. return $message->getResponse();
  98. }
  99. public function friendApplyMsgOverview(FriendApplyMsgOverviewMessage $message)
  100. {
  101. $message->validateInput();
  102. $this->handler->friendApplyMsgOverview($message);
  103. $message->validateOutput();
  104. return $message->getResponse();
  105. }
  106. public function unStarContact(UnStarContactMessage $message)
  107. {
  108. $message->validateInput();
  109. $this->handler->unStarContact($message);
  110. $message->validateOutput();
  111. return $message->getResponse();
  112. }
  113. public function starContact(StarContactMessage $message)
  114. {
  115. $message->validateInput();
  116. $this->handler->starContact($message);
  117. $message->validateOutput();
  118. return $message->getResponse();
  119. }
  120. public function deleteContact(DeleteContactMessage $message)
  121. {
  122. $message->validateInput();
  123. $this->handler->deleteContact($message);
  124. $message->validateOutput();
  125. return $message->getResponse();
  126. }
  127. public function unBlacklistContact(UnBlacklistContactMessage $message)
  128. {
  129. $message->validateInput();
  130. $this->handler->unBlacklistContact($message);
  131. $message->validateOutput();
  132. return $message->getResponse();
  133. }
  134. public function blacklistContact(BlacklistContactMessage $message)
  135. {
  136. $message->validateInput();
  137. $this->handler->blacklistContact($message);
  138. $message->validateOutput();
  139. return $message->getResponse();
  140. }
  141. public function changeContactNote(ChangeContactNoteMessage $message)
  142. {
  143. $message->validateInput();
  144. $this->handler->changeContactNote($message);
  145. $message->validateOutput();
  146. return $message->getResponse();
  147. }
  148. public function refuseFriendApply(RefuseFriendApplyMessage $message)
  149. {
  150. $message->validateInput();
  151. $this->handler->refuseFriendApply($message);
  152. $message->validateOutput();
  153. return $message->getResponse();
  154. }
  155. public function agreeFriendApply(AgreeFriendApplyMessage $message)
  156. {
  157. $message->validateInput();
  158. $this->handler->agreeFriendApply($message);
  159. $message->validateOutput();
  160. return $message->getResponse();
  161. }
  162. public function sendFriendApply(SendFriendApplyMessage $message)
  163. {
  164. $message->validateInput();
  165. $this->handler->sendFriendApply($message);
  166. $message->validateOutput();
  167. return $message->getResponse();
  168. }
  169. public function refusePairFriendApply(RefusePairFriendApplyMessage $message)
  170. {
  171. $message->validateInput();
  172. $this->handler->refusePairFriendApply($message);
  173. $message->validateOutput();
  174. return $message->getResponse();
  175. }
  176. public function agreePairFriendApply(AgreePairFriendApplyMessage $message)
  177. {
  178. $message->validateInput();
  179. $this->handler->agreePairFriendApply($message);
  180. $message->validateOutput();
  181. return $message->getResponse();
  182. }
  183. public function sendPairFriendApply(SendPairFriendApplyMessage $message)
  184. {
  185. $message->validateInput();
  186. $this->handler->sendPairFriendApply($message);
  187. $message->validateOutput();
  188. return $message->getResponse();
  189. }
  190. public function getContact(GetContactMessage $message)
  191. {
  192. $message->validateInput();
  193. $this->handler->getContact($message);
  194. $message->validateOutput();
  195. return $message->getResponse();
  196. }
  197. }