取消订单
This commit is contained in:
parent
cbf00c9d01
commit
6c71eb8c11
@ -169,4 +169,24 @@ class RetailOrderController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消订单
|
||||
*/
|
||||
public function cancel_order(){
|
||||
$order_id = (int)$this->request->post('order_id');
|
||||
$value = (int)$this->request->post('value');
|
||||
$where=[
|
||||
'id'=>$order_id,
|
||||
'uid'=>$this->userId,
|
||||
'paid'=>0,
|
||||
];
|
||||
$order=Cashierclass::where($where)->find();
|
||||
if($order){
|
||||
$data=['data'=>$value,'delete_time'=>time()];
|
||||
Cashierclass::where($where)->update($data);
|
||||
return $this->success('取消成功');
|
||||
}
|
||||
return $this->fail('取消失败');
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user