uuid
This commit is contained in:
parent
b0b90e1f35
commit
0866ea7e9b
|
|
@ -21,6 +21,13 @@ class GaoDingController extends AbstractController
|
||||||
#[GetMapping("uuid/query")]
|
#[GetMapping("uuid/query")]
|
||||||
public function query()
|
public function query()
|
||||||
{
|
{
|
||||||
return $this->success(uModel::getByUuid($this->request->input("uuid","")));
|
$data = uModel::getByUuid($this->request->input("uuid",""));
|
||||||
|
if (empty($data)) {
|
||||||
|
return $this->error("系统异常");
|
||||||
|
}
|
||||||
|
if ($data['status'] != 1) {
|
||||||
|
return $this->error("不可用");
|
||||||
|
}
|
||||||
|
return $this->success($data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -35,7 +35,7 @@ class Uuid extends Model
|
||||||
$data = [
|
$data = [
|
||||||
'uuid' => self::uuid(),
|
'uuid' => self::uuid(),
|
||||||
'exp' => date("Y-m-d"),
|
'exp' => date("Y-m-d"),
|
||||||
'status' => 0,
|
'status' => 1,
|
||||||
'create_time' => date("Y-m-d H:i:s")
|
'create_time' => date("Y-m-d H:i:s")
|
||||||
];
|
];
|
||||||
// 判断uuid是否存在
|
// 判断uuid是否存在
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue