Sfoglia il codice sorgente

商城订单冗余bill

lizhen_gitee 1 settimana fa
parent
commit
e31100f8fb

+ 3 - 0
addons/shopro/listener/Order.php

@@ -410,6 +410,9 @@ class Order
 
         // 订单已全部确认收货
         if ($noConfirm <= 0) {
+
+            //在这里加一个已确认收货的时间
+
             $data = ['order' => $order];
 
             \think\Hook::listen('order_confirm_finish', $data);

+ 1 - 1
addons/shopro/service/order/OrderOper.php

@@ -157,7 +157,7 @@ class OrderOper
 
             // 订单确认收货后
             $data = ['order' => $order, 'item' => $item];
-            \think\Hook::listen('order_confirm_after', $data);
+            \think\Hook::listen('order_confirm_after', $data); //orderConfirmAfter
         }
 
         //商城,确认收货,冗余到bill表

+ 25 - 1
application/api/controller/Demo.php

@@ -48,6 +48,16 @@ class Demo extends Api
         $this->task_bill($total_amount,$back_rate,$user_id,$shop_id,'hotel_order');
     }
 
+    //商城订单,确认收货7天后,售后完成后
+    public function shopro_to_bill(){
+        //Db::name('shopro_order')->where('')
+    }
+
+    //高管用户,分红
+    public function commander(){
+
+    }
+
     /**
      * 40期限 数据模拟
      * @return void
@@ -166,7 +176,7 @@ class Demo extends Api
         $invite_count     = Db::name('offline_shop')->where('invite_id',$user_id)->count();
 
         //我上个月直推线下商家的总数量
-        $invite_count_mon = Db::name('offline_shop')->where('invite_id',$user_id)->whereTime('back_time','last month')->count();
+        $invite_count_mon = Db::name('offline_shop')->where('invite_id',$user_id)->whereTime('create_time','last month')->count();
 
         //我的个人业绩。我所有直推线下商家的3-20%的让利总额
         $invite_amount = Db::name('bill')->where('shop_invite_id',$user_id)->where('table_name','offline_shop_order')->where('back_status','neq',0)
@@ -458,4 +468,18 @@ class Demo extends Api
         Db::name('live_room_log')->where('id',23)->update($data);
     }
 
+    public function test4(){
+        $password = '123456';
+        $salt = 'xPpXeK';
+        dd(md5(md5($password) . $salt));
+
+        $a = ['first Day of last month 00:00:00', 'first Day of this month 00:00:00'];
+        echo date('Y-m-d H:i:s',strtotime($a[0]));
+        echo  '<br>';
+        echo date('Y-m-d H:i:s',strtotime($a[1]));
+
+        $last_month_arr = [strtotime('first Day of last month 00:00:00'),strtotime('first Day of this month 00:00:00')-1];
+        dump($last_month_arr);
+    }
+
 }