...
|
...
|
@@ -125,23 +125,6 @@ class AdminEquipmentController extends AdminBaseController{ |
|
|
|
|
|
public function unUse(){
|
|
|
/*解除设备占用*/
|
|
|
$id=$this->request->param('id');
|
|
|
|
|
|
$eq=Db::name('equipment')->where('id',$id)->find();
|
|
|
|
|
|
dump($eq);
|
|
|
/*查找对应订单*/
|
|
|
$map['eq_name']=$eq['name'];
|
|
|
$order=\db('order')->where($map)->find();
|
|
|
//Db::name('equipment')->where('id',$id)->update(['use'=>0]);
|
|
|
/*结束订单*/
|
|
|
$data['end_time']=time();
|
|
|
|
|
|
// $data['price']= $Order->getPrice($order['users_id'],$order['start_time'],time());
|
|
|
dump($data);
|
|
|
|
|
|
// \db('order')->where($map)->update();
|
|
|
|
|
|
|
|
|
}
|
|
|
|
...
|
...
|
|