33 lines
740 B
PHP
33 lines
740 B
PHP
<?php
|
|
/**
|
|
* Author: cfn <cfn@leapy.cn>
|
|
*/
|
|
|
|
namespace App\Controller;
|
|
|
|
use Hyperf\HttpServer\Annotation\Controller;
|
|
use Hyperf\HttpServer\Annotation\GetMapping;
|
|
use App\Model\Uuid as uModel;
|
|
|
|
#[Controller("v1")]
|
|
class GaoDingController extends AbstractController
|
|
{
|
|
#[GetMapping("uuid/get")]
|
|
public function get()
|
|
{
|
|
return $this->success(uModel::add());
|
|
}
|
|
|
|
#[GetMapping("uuid/query")]
|
|
public function query()
|
|
{
|
|
$data = uModel::getByUuid($this->request->input("uuid",""));
|
|
if (empty($data)) {
|
|
return $this->error("系统异常");
|
|
}
|
|
if ($data['status'] != 1) {
|
|
return $this->error("不可用");
|
|
}
|
|
return $this->success($data);
|
|
}
|
|
} |