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.

31 lines
650 B

  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Controller;
  4. use Hyperf\Di\Annotation\Inject;
  5. use App\Service\UserServiceInterface;
  6. use App\Request\UserUnionidRequest;
  7. class UserController extends BaseController
  8. {
  9. /**
  10. * @Inject
  11. * @var UserServiceInterface
  12. */
  13. protected $userService;
  14. /**
  15. * 根据用户的openid更新unionid信息
  16. */
  17. public function saveUserUnionid(UserUnionidRequest $request)
  18. {
  19. $openid = $this->request->input('openid','');
  20. $unionid = $this->request->input('unionid','');
  21. return $this->success($this->userService->saveUserUnionid($openid,$unionid));
  22. }
  23. }