Kirin 5 napja
szülő
commit
7f4b3fe4e1
1 módosított fájl, 15 hozzáadás és 8 törlés
  1. 15 8
      app/controller/api/v1/PublicController.php

+ 15 - 8
app/controller/api/v1/PublicController.php

@@ -77,15 +77,22 @@ class PublicController extends BaseController
         /** @var AwardIntegralServices $awardIntegralService */
         $awardIntegralService = app()->make(AwardIntegralServices::class);
         /** @var UserServices $userService */
-        $userService = app()->make(UserServices::class);
-        $rate = sys_config('action_integral_rate', 3);
-        $award_order_limit = sys_config('award_order_limit');
-        $order = StoreOrder::where('award_price','>',0)->where('paid',1)->where('pid','in',[0,-1])->where('refund_status',0)
-        ->where('is_del',0)->where('is_system_del',0)->where('id','not in',AwardIntegral::column('order_id'))
-        ->where('add_time','>',strtotime('today'))->select();
-        foreach($order as $v) {
-            (new IntegralJob())->dealOrderIntegral($v);
+
+
+        $list = $awardIntegralService->search()->select();
+        foreach ($list as $v) {
+            $order = StoreOrder::where('id', $v['link_id'])->value('pay_type');
+            $awardIntegralService->update($v['id'], ['pay_type' => $order]);
         }
+//        $userService = app()->make(UserServices::class);
+//        $rate = sys_config('action_integral_rate', 3);
+//        $award_order_limit = sys_config('award_order_limit');
+//        $order = StoreOrder::where('award_price','>',0)->where('paid',1)->where('pid','in',[0,-1])->where('refund_status',0)
+//        ->where('is_del',0)->where('is_system_del',0)->where('id','not in',AwardIntegral::column('order_id'))
+//        ->where('add_time','>',strtotime('today'))->select();
+//        foreach($order as $v) {
+//            (new IntegralJob())->dealOrderIntegral($v);
+//        }
 //        $total_price = $order['award_price'];
 //        $user = $userService->getUserInfo($order['uid']);
 //        $spread = $userService->getUserInfo($user['spread_uid']);