|
@@ -28,8 +28,9 @@ class Order extends Api
|
|
|
|
|
|
$o = 'order';
|
|
|
$st = 'servicetype';
|
|
|
- $field = $o.'.id,check_code,orderno,server_time,server_info,server_images,status,user_mobile,'.$o.'.user_car_number,'.
|
|
|
- $o.'.createtime,cancel_time,cancel_reason,pay_fee,appen_fee,finish_time,'.$st.'.title as `service_title`,paytype';
|
|
|
+ $p = 'package';
|
|
|
+ $field = $o.'.id,check_code,orderno,server_time,server_info,server_images,'.$o.'.status,user_mobile,'.$o.'.user_car_number,'.
|
|
|
+ $o.'.createtime,cancel_time,cancel_reason,pay_fee,appen_fee,finish_time,'.$st.'.title as `service_title`,paytype,'.$p.'.title as `service_title`';
|
|
|
$where[$o.'.user_id'] = $this->auth->id;
|
|
|
$where[$o.'.company_id'] = $this->auth->company_id;
|
|
|
if (!empty($status)) {
|
|
@@ -37,6 +38,7 @@ class Order extends Api
|
|
|
}
|
|
|
$result = $this->model->alias($o)->field($field)
|
|
|
->join($st,$st.'.id = '.$o.'.servicetype_id','LEFT')
|
|
|
+ ->join($p,$p.'.id = '.$o.'.package_id','LEFT')
|
|
|
->where($where)->order($o.'.createtime desc')->autopage()->select();
|
|
|
if (!empty($result)) {
|
|
|
$statusArr = [2=>'待处理',3=>'已完成',4=>'已取消'];
|
|
@@ -119,12 +121,14 @@ class Order extends Api
|
|
|
}
|
|
|
$o = 'order';
|
|
|
$st = 'servicetype';
|
|
|
+ $p = 'package';
|
|
|
$where[$o.'.user_id'] = $this->auth->id;
|
|
|
$where[$o.'.id'] = $id;
|
|
|
- $field = $o.'.id,check_code,orderno,server_time,server_info,server_images,status,user_mobile,'.$o.'.user_car_number,'.
|
|
|
- $o.'.createtime,cancel_time,cancel_reason,pay_fee,appen_fee,finish_time,'.$st.'.title as `service_title`,paytype';
|
|
|
+ $field = $o.'.id,check_code,orderno,server_time,server_info,server_images,'.$o.'.status,user_mobile,'.$o.'.user_car_number,'.
|
|
|
+ $o.'.createtime,cancel_time,cancel_reason,pay_fee,appen_fee,finish_time,'.$st.'.title as `service_title`,paytype,'.$p.'.title as `service_title`';
|
|
|
$result = $this->model->alias($o)->field($field)
|
|
|
->join($st,$st.'.id = '.$o.'.servicetype_id','LEFT')
|
|
|
+ ->join($p,$p.'.id = '.$o.'.package_id','LEFT')
|
|
|
->where($where)->find();
|
|
|
if (!empty($result)) {
|
|
|
$statusArr = [2=>'待处理',3=>'已完成',4=>'已取消'];
|