You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
777 B

  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Controller;
  4. use App\Constants\ErrorCode;
  5. use App\Request\StoreApplyEntryRequest;
  6. use App\Service\StoreServiceInterface;
  7. use Hyperf\Di\Annotation\Inject;
  8. class StoreController extends BaseController
  9. {
  10. /**
  11. * @Inject
  12. * @var StoreServiceInterface
  13. */
  14. protected $storeService;
  15. /**
  16. * 申请入驻
  17. * 商户信息入驻+市场经理拉新记录
  18. */
  19. public function applyEntry(StoreApplyEntryRequest $request)
  20. {
  21. $data = $request->validated();
  22. $res = $this->storeService->entry($data);
  23. if ($res !== true) {
  24. return $this->result(ErrorCode::SAVE_FAILURE, $res, '申请失败,请稍后重试');
  25. }
  26. return $this->success('');
  27. }
  28. }