uuid
This commit is contained in:
parent
47ae1d9982
commit
b02ea7dd79
|
|
@ -21,8 +21,7 @@ class GaoDingController extends AbstractController
|
|||
#[GetMapping("uuid/query")]
|
||||
public function query()
|
||||
{
|
||||
$data = uModel::getByUuid($this->request->input("uuid",""));
|
||||
var_dump($data['uuid']);
|
||||
$data = uModel::getByUuid($this->request->input("uuid", ""));
|
||||
if (empty($data)) {
|
||||
return $this->error("系统异常");
|
||||
}
|
||||
|
|
@ -31,4 +30,19 @@ class GaoDingController extends AbstractController
|
|||
}
|
||||
return $this->success($data);
|
||||
}
|
||||
|
||||
#[GetMapping("uuid/exp")]
|
||||
public function setExp()
|
||||
{
|
||||
$uuid = $this->request->input("uuid", "");
|
||||
$date = $this->request->input("date", date("Y-m-d"));
|
||||
if (!$uuid || !$date) {
|
||||
return $this->error("系统错误");
|
||||
}
|
||||
$res = uModel::where("uuid", $uuid)->where("del_flag", 0)->update([
|
||||
'exp' => $date,
|
||||
'update_time' => date("Y-m-d H:i:s")
|
||||
]);
|
||||
return $res ? $this->success("设置成功") : $this->error("设置失败");
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue