mark 2 vuotta sitten
vanhempi
commit
b372226770
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      app/Http/Logic/Cron/CronLogic.php

+ 2 - 1
app/Http/Logic/Cron/CronLogic.php

@@ -455,13 +455,14 @@ class CronLogic extends BaseLogic
         $startTime = date("Y-m-d",strtotime("-1 month"))." 00:00:00";
         $endTime = date("Y-m-")."01 00:00:00";
         //获取上个月未结算的订单且未退款
+        //这里有个bug,chunk里面自己改自己会导致有的数据娶不到
         UserOrderCommissionModel::query()
             ->where("commission_status",0)
             ->where("order_commission",">",0)
             ->where("user_id","<>",0)
             ->where("order_complete_notify_status",0)
             ->where("created_at","<",$endTime)
-            ->chunk(100,function ($orderCommissions){
+            ->chunk(300,function ($orderCommissions){
                 foreach ($orderCommissions as $orderCommission){
                     try{
                         //开启事务