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.

40 lines
859 B

  1. <?php
  2. namespace App\Controller;
  3. use Hyperf\Di\Annotation\Inject;
  4. use App\Constants\ErrorCode;
  5. use App\Exception\BusinessException;
  6. class DeviceController extends BaseController
  7. {
  8. public function bind()
  9. {
  10. $validator = $this->validationFactory->make(
  11. $request->all(),
  12. [
  13. 'store_id' => 'required|nonempty|integer',
  14. ],
  15. [
  16. 'store_id.required' => '参数不正确',
  17. 'store_id.nonempty' => '参数不正确',
  18. 'store_id.integer' => '参数不正确',
  19. ]
  20. );
  21. if ($validator->fails()){
  22. // Handle exception
  23. $errorMessage = $validator->errors()->first();
  24. $this->result(200,[],$errorMessage);
  25. }
  26. }
  27. public function list()
  28. {
  29. }
  30. }