<?php
declare(strict_types=1);

namespace App\Controller;

use Hyperf\HttpServer\Contract\RequestInterface; // 接收请求
use App\Service\QueueService;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\RequestMapping;
use App\Service\ALiSmsService;

/**
 * @Controller()
 */
class UserController
{
    /**
     * @Inject
     * @var QueueService
     */
    protected $service;

    /**
     * @Inject
     * @var ALiSmsService
     */
    protected $smsphone;

    /**
     * @RequestMapping(path="Power_supply", methods="get")
     * 设备供电方式
     */
    public function Power_supply()
    {
        return "测试git";
//        $this->service->push([
//            'group@hyperf.io',
//            'https://doc.hyperf.io',
//            'https://www.hyperf.io',
//        ]);
//        $template_param = ['cphone'=>'18830115570','position'=>'','alarm'=>'离线'];
//        $params = array (
//            'SignName' => '泽宏云',
//            'AccessKeyId' => 'LTAI2xiZNF3iV2aV',
//            'TemplateCode' => 'SMS_169897307',
//            'PhoneNumbers' => '18830115570',
//            'TemplateParam' => json_encode($template_param,JSON_UNESCAPED_UNICODE),
//            'RegionId' => 'cn-beijing',
//        );
//        $accessKeySecret='bprEWwn1M0xgglRQCQEMYSPiYctDk4';
//        return $this->smsphone->sendSms($accessKeySecret,$params);
    }
}