|
@@ -28,8 +28,9 @@ class Order extends Api
|
|
|
|
|
|
$o = 'order';
|
|
$o = 'order';
|
|
$st = 'servicetype';
|
|
$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.'.user_id'] = $this->auth->id;
|
|
$where[$o.'.company_id'] = $this->auth->company_id;
|
|
$where[$o.'.company_id'] = $this->auth->company_id;
|
|
if (!empty($status)) {
|
|
if (!empty($status)) {
|
|
@@ -37,6 +38,7 @@ class Order extends Api
|
|
}
|
|
}
|
|
$result = $this->model->alias($o)->field($field)
|
|
$result = $this->model->alias($o)->field($field)
|
|
->join($st,$st.'.id = '.$o.'.servicetype_id','LEFT')
|
|
->join($st,$st.'.id = '.$o.'.servicetype_id','LEFT')
|
|
|
|
+ ->join($p,$p.'.id = '.$o.'.package_id','LEFT')
|
|
->where($where)->order($o.'.createtime desc')->autopage()->select();
|
|
->where($where)->order($o.'.createtime desc')->autopage()->select();
|
|
if (!empty($result)) {
|
|
if (!empty($result)) {
|
|
$statusArr = [2=>'待处理',3=>'已完成',4=>'已取消'];
|
|
$statusArr = [2=>'待处理',3=>'已完成',4=>'已取消'];
|
|
@@ -119,12 +121,14 @@ class Order extends Api
|
|
}
|
|
}
|
|
$o = 'order';
|
|
$o = 'order';
|
|
$st = 'servicetype';
|
|
$st = 'servicetype';
|
|
|
|
+ $p = 'package';
|
|
$where[$o.'.user_id'] = $this->auth->id;
|
|
$where[$o.'.user_id'] = $this->auth->id;
|
|
$where[$o.'.id'] = $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)
|
|
$result = $this->model->alias($o)->field($field)
|
|
->join($st,$st.'.id = '.$o.'.servicetype_id','LEFT')
|
|
->join($st,$st.'.id = '.$o.'.servicetype_id','LEFT')
|
|
|
|
+ ->join($p,$p.'.id = '.$o.'.package_id','LEFT')
|
|
->where($where)->find();
|
|
->where($where)->find();
|
|
if (!empty($result)) {
|
|
if (!empty($result)) {
|
|
$statusArr = [2=>'待处理',3=>'已完成',4=>'已取消'];
|
|
$statusArr = [2=>'待处理',3=>'已完成',4=>'已取消'];
|