mark 2 years ago
parent
commit
b372226770
1 changed files with 2 additions and 1 deletions
  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{
                         //开启事务