...
|
...
|
@@ -218,9 +218,7 @@ class UsersController extends HomeBaseController{ |
|
|
* @author 董瑞恩
|
|
|
* @url /portal/users/getOrderById1
|
|
|
* @method GET
|
|
|
*
|
|
|
* @param name:users_id type:String require:1 default:无 other: desc:用户id
|
|
|
*
|
|
|
* @return order_no:订单号
|
|
|
* @return users_id:用户id
|
|
|
* @return start_time:开始使用时间
|
...
|
...
|
@@ -233,7 +231,12 @@ class UsersController extends HomeBaseController{ |
|
|
|
|
|
public function getOrderById1(){
|
|
|
$users_id=$this->request->param('users_id');
|
|
|
$order= Db::name('order')->field('order_no,users_id,start_time')->where(['users_id'=>$users_id,'state'=>1,'type'=>1])->find();
|
|
|
$order= Db::name('order')
|
|
|
->alias('o')
|
|
|
->join('equipment e','o.eq_name=e.name')
|
|
|
->field('o.order_no,o.users_id,o.start_time,e.serial_number')
|
|
|
->where(['o.users_id'=>$users_id,'o.state'=>1,'o.type'=>1,'e.is_delete'=>0])
|
|
|
->find();
|
|
|
if (empty($order)){
|
|
|
$this->apiResponse(200,'没有未完成订单');
|
|
|
}
|
...
|
...
|
@@ -270,7 +273,12 @@ class UsersController extends HomeBaseController{ |
|
|
|
|
|
public function getOrderById2(){
|
|
|
$users_id=$this->request->param('users_id');
|
|
|
$order= Db::name('order')->where(['users_id'=>$users_id,'state'=>2,'type'=>'1'])->find();
|
|
|
$order= Db::name('order')
|
|
|
->alias('o')
|
|
|
->join('equipment e','o.eq_name=e.name')
|
|
|
->where(['o.users_id'=>$users_id,'o.state'=>2,'o.type'=>'1','e.is_delete'=>0])
|
|
|
->field('o.*,e.serial_number')
|
|
|
->find();
|
|
|
if (empty($order)){
|
|
|
$this->apiResponse(200,'没有未支付订单');
|
|
|
}
|
...
|
...
|
|