|
@@ -185,6 +185,35 @@ class HotelCanteen extends Api
|
|
|
return $this->success('获取成功',$list);
|
|
|
}
|
|
|
|
|
|
+ // 订单详情
|
|
|
+ public function myApplyInfo()
|
|
|
+ {
|
|
|
+ $params = $this->request->param();
|
|
|
+ $user_id = $this->auth->id;
|
|
|
+
|
|
|
+ $query = HotelCanteenOrderModel::with([
|
|
|
+ 'canteen'=>function ($query) {
|
|
|
+ $query->field(['id','name','image']);
|
|
|
+ },
|
|
|
+ 'room'=>function ($query) {
|
|
|
+ $query->field(['id','name','image']);
|
|
|
+ }
|
|
|
+ ])->where('id',$params['id'])->where('user_id',$user_id);
|
|
|
+
|
|
|
+ $info = $query->find();
|
|
|
+ if ($info['status'] == 1){
|
|
|
+ if ($info['get_to_time'] > time()){
|
|
|
+ $info['status_txt'] = '待用餐';
|
|
|
+ }else{
|
|
|
+ $info['status_txt'] = '已完成';
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $info['status_txt'] = '已取消';
|
|
|
+ }
|
|
|
+ $info['get_to_time'] = date('Y-m-d H:i');
|
|
|
+ return $this->success('获取成功',$info);
|
|
|
+ }
|
|
|
+
|
|
|
// 订单取消
|
|
|
public function applyCancel()
|
|
|
{
|