wupengfei 2 yıl önce
ebeveyn
işleme
89388c9477
1 değiştirilmiş dosya ile 7 ekleme ve 1 silme
  1. 7 1
      application/api/controller/General.php

+ 7 - 1
application/api/controller/General.php

@@ -1,5 +1,6 @@
 <?php
 namespace app\api\controller;
+use library\tools\Data;
 use think\Db;
 /**
  * @title 其他接口(订单转换,许愿单等)
@@ -30,7 +31,12 @@ class General extends Base
         if(!$order_no) $this->error('请填写订单号');
         $ck =  Db::table('order_shift')->where('order_no',$order_no)->value('id');
         if($ck) $this->error('您已提交过相同的订单ID,请核实后重新提交,有疑问咨询专属客服哦~');
-        Db::table('order_shift')->insert(['uid'=>$this->uid,'create_at'=>date('Y-m-d H:i:s'),'order_no'=>$order_no]);
+        Data::save('order_shift', ['uid'=>$this->uid, 'create_at'=>date('Y-m-d H:i:s'), 'order_no'=>$order_no],'uid', ['uid'=>$this->uid, 'order_no'=>$order_no]);
+       /* Db::table('order_shift')->insert(
+            ['uid'=>$this->uid,
+                'create_at'=>date('Y-m-d H:i:s'),
+                'order_no'=>$order_no
+            ]);*/
         $this->success('订单提交成功,等待审核!');
     }