Explorar el Código

Merge branch 'master' of http://git.huxiukeji.com/lizhen/lanjingling

lizhen_gitee hace 1 año
padre
commit
7274e6046c
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      application/api/controller/Order.php

+ 3 - 1
application/api/controller/Order.php

@@ -218,6 +218,7 @@ class Order extends Api
             $carNumber = input('car_number','');
             $o = 'order';
             $st = 'servicetype';
+            $p = 'package';
             if (!empty($serviceTypeId)) {
                 $where[$o.'.servicetype_id'] = $serviceTypeId;
             }
@@ -231,9 +232,10 @@ class Order extends Api
             $where[$o.'.user_id'] = $this->auth->id;
             $where[$o.'.status'] = ['in',[2,3]];//状态:2=待处理,3=已完成,4=已取消
             $where[$st.'.is_upkeep'] = 1;//是否保养:1=是,0=否
-            $field = $o.'.id,servicetype_id,server_info,finish_time,next_date,next_carlicheng,pay_fee,appen_fee,'.$st.'.title as `service_title`';
+            $field = $o.'.id,'.$o.'.servicetype_id,server_info,finish_time,next_date,next_carlicheng,pay_fee,appen_fee,'.$st.'.title as `service_title`,'.$p.'.title as `package_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)->order($o.'.finish_time desc')->autopage()->select();
             if (!empty($result)) {
                 $timeArr = ['finish_time'];