...
|
...
|
@@ -138,6 +138,7 @@ class AdminEquipmentController extends AdminBaseController{ |
|
|
$data['state']=2;
|
|
|
$data['price']=$info['price'];
|
|
|
$data['time']=ceil((time()-$order['start_time'])/3600);
|
|
|
|
|
|
Db::startTrans();
|
|
|
try{
|
|
|
\db('equipment')->where('id',$id)->update(['use'=>0]);
|
...
|
...
|
@@ -147,11 +148,13 @@ class AdminEquipmentController extends AdminBaseController{ |
|
|
\db('users')->where('id',$order['users_id'])->update($user_updata);
|
|
|
//echo \db('order')->getLastSql();
|
|
|
//echo '<br />';
|
|
|
Db::commit();
|
|
|
} catch (\Exception $e){
|
|
|
Db::rollback();
|
|
|
$this->error('操作失败!');
|
|
|
exit;
|
|
|
}
|
|
|
|
|
|
$this->success('操作成功!');
|
|
|
}
|
|
|
|
...
|
...
|
|