作者 董瑞恩
1 个管道 的构建 通过 耗费 1 秒

interface

... ... @@ -198,7 +198,8 @@ class AesController extends HomeBaseController{
}else{
$data=[
'state'=>0,
'message'=>'返回指令错误'
'message'=>'返回指令错误',
'error' =>''
];
$this->apiResponse(200,'success',$data);
}
... ... @@ -209,7 +210,8 @@ class AesController extends HomeBaseController{
}else{
$data=[
'state'=>0,
'message'=>'返回指令错误'
'message'=>'返回指令错误',
'error' =>''
];
$this->apiResponse(200,'success',$data);
}
... ... @@ -257,7 +259,8 @@ class AesController extends HomeBaseController{
}else if($key[3]=='0x00'){
$data=[
'state'=>0,
'message'=>'开锁失败'
'message'=>'开锁失败',
'error' =>''
];
$this->apiResponse(200,'success',$data);
}
... ... @@ -269,7 +272,8 @@ class AesController extends HomeBaseController{
if ($use==0){
$data=[
'state'=>0,
'message'=>'该设备为关闭状态,不能还锁'
'message'=>'该设备为关闭状态,不能还锁',
'error' =>''
];
$this->apiResponse(200,'success',$data);
}
... ... @@ -281,7 +285,8 @@ class AesController extends HomeBaseController{
//修改数据库设备状态
$data=[
'state'=>0,
'message'=>'未还床'
'message'=>'未还床',
'error' =>''
];
$this->apiResponse(200,'success',$data);
}else if($key[6]=='0x00'){
... ...
... ... @@ -90,7 +90,8 @@ class OrderController extends HomeBaseController{
Db::rollback();
$data=[
'state'=>false,
'message'=>$exception->getMessage()
'message'=>'数据库操作失败',
'error' =>$exception->getMessage()
];
$this->apiResponse(200,'success',$data);
}
... ...
... ... @@ -81,6 +81,22 @@ class UsersController extends HomeBaseController{
}
}
/**
* @title 用户交纳押金
* @description 交纳押金
* @author 董瑞恩
* @url /portal/users/getOrder
* @method GET
*
* @param name:users_id type:String require:1 default:无 other: desc:用户id
*
* @return data:下单返回值
*/
public function getOrder(){
$users_id=$this->request->param('users_id');
$order=Db::name('order')->where(['users_id'=>$users_id])->select();
$this->apiResponse(200,'success',$order);
}
/**
... ...