ProfitShareReceiverController.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. declare(strict_types=1);
  3. namespace SixShop\Lakala\Controller\Admin;
  4. use SixShop\Core\Request;
  5. use SixShop\Lakala\Entity\ProfitShareReceiverEntity;
  6. use think\Response;
  7. use function SixShop\Core\page_response;
  8. use function SixShop\Core\success_response;
  9. class ProfitShareReceiverController
  10. {
  11. public function index(Request $request, ProfitShareReceiverEntity $entity): Response
  12. {
  13. $params = $request->get([
  14. 'status/d' => 0,
  15. 'order_no' => '',
  16. ]);
  17. return page_response(page: $entity->getReceiverList($params, $request->pageAndLimit()));
  18. }
  19. public function read(int $id, Request $request, ProfitShareReceiverEntity $entity): Response
  20. {
  21. return success_response($entity->getReceiver(['id' => $id]));
  22. }
  23. public function apply(int $id, ProfitShareReceiverEntity $entity): Response
  24. {
  25. return success_response($entity->apply($id));
  26. }
  27. public function bind(int $id, ProfitShareReceiverEntity $entity): Response
  28. {
  29. return success_response($entity->bind($id));
  30. }
  31. public function modify(int $id, ProfitShareReceiverEntity $entity): Response
  32. {
  33. return success_response($entity->modify($id));
  34. }
  35. }