...
|
...
|
@@ -125,6 +125,23 @@ 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']=action('Order/getPrice',[$order['user_id'],$order['start_time'],time()]);
|
|
|
// $data['price']= $Order->getPrice($order['users_id'],$order['start_time'],time());
|
|
|
dump($data);
|
|
|
|
|
|
// \db('order')->where($map)->update();
|
|
|
|
|
|
|
|
|
}
|
|
|
|
...
|
...
|
|