浏览代码

设置下次保养

lizhen_gitee 1 年之前
父节点
当前提交
dd8258fbc3
共有 1 个文件被更改,包括 22 次插入0 次删除
  1. 22 0
      application/api/controller/company/Order.php

+ 22 - 0
application/api/controller/company/Order.php

@@ -130,6 +130,28 @@ class Order extends Apic
         $this->success('操作成功',$baoyang_switch);
     }
 
+    //设置保养时间提醒
+    public function baoyang(){
+        $id = input('id',0);
+
+        $info = Db::name('order')->where('id',$id)->where('company_id',$this->auth->company_id)->find();
+        if(!$info){
+            $this->error('不存在的订单');
+        }
+
+        //更新
+        $next_date       = input('next_date','');
+        $next_carlicheng = input('next_carlicheng','');
+        $data = [
+            'next_date'       => $next_date,
+            'next_carlicheng' => $next_carlicheng,
+        ];
+
+        Db::name('order')->where('id',$id)->update($data);
+        $this->success('操作成功');
+
+    }
+
     //追加列表
     public function appen_lists(){
         $id = input('id',0);