浏览代码

会员升级

Kirin 5 天之前
父节点
当前提交
6db4196894
共有 1 个文件被更改,包括 34 次插入33 次删除
  1. 34 33
      app/controller/api/v1/PublicController.php

+ 34 - 33
app/controller/api/v1/PublicController.php

@@ -78,41 +78,42 @@ class PublicController extends BaseController
         /** @var IntegralJob $awardIntegralService */
         $awardIntegralService = app()->make(IntegralJob::class);
         /** @var UserServices $userService */
-
-
         $order = StoreOrder::find(3442);
-        $total_price = $order['award_price'];
-
-        $user = User::find($order['uid']);
-
-        $rate = sys_config('static_integral_rate', 3);
-        $award_order_limit = sys_config('award_order_limit');
-
-        $award_order_limit_2 = sys_config('award_order_limit_2');
-
+        $awardIntegralService->dealOrderIntegral($order);
 
-        $rate = sys_config('action_integral_rate', 3);
-        $spread =User::find($user['spread_uid']);
-        var_dump($spread);
-        if ($spread && $spread['is_promoter']) {
-            if ($awardIntegralService->getPaySum($spread['uid']) >= $award_order_limit) {
-                var_dump(1212121);
-                $award_ratio = sys_config('recommend_integral', 0);
-                if ($order['pay_type'] == 'yue') {
-                    $award_ratio = sys_config('recommend_integral_yue', 0);
-                }
-                var_dump($award_ratio);
-                if (($integral_info['link_id'] ?? 0) > 0) {
-                    $award_ratio = sys_config('reorder_recommend_integral', 0);
-                    if ($order['pay_type'] == 'yue') {
-                        $award_ratio = sys_config('reorder_recommend_integral_yue', 0);
-                    }
-                }
-                var_dump($award_ratio);
-                $give_action_integral = bcdiv(bcmul($total_price, $award_ratio), 100, 2);
-                var_dump($give_action_integral);
-            }
-        }
+//
+//        $total_price = $order['award_price'];
+//
+//        $user = User::find($order['uid']);
+//
+//        $rate = sys_config('static_integral_rate', 3);
+//        $award_order_limit = sys_config('award_order_limit');
+//
+//        $award_order_limit_2 = sys_config('award_order_limit_2');
+//
+//
+//        $rate = sys_config('action_integral_rate', 3);
+//        $spread =User::find($user['spread_uid']);
+//        var_dump($spread);
+//        if ($spread && $spread['is_promoter']) {
+//            if ($awardIntegralService->getPaySum($spread['uid']) >= $award_order_limit) {
+//                var_dump(1212121);
+//                $award_ratio = sys_config('recommend_integral', 0);
+//                if ($order['pay_type'] == 'yue') {
+//                    $award_ratio = sys_config('recommend_integral_yue', 0);
+//                }
+//                var_dump($award_ratio);
+//                if (($integral_info['link_id'] ?? 0) > 0) {
+//                    $award_ratio = sys_config('reorder_recommend_integral', 0);
+//                    if ($order['pay_type'] == 'yue') {
+//                        $award_ratio = sys_config('reorder_recommend_integral_yue', 0);
+//                    }
+//                }
+//                var_dump($award_ratio);
+//                $give_action_integral = bcdiv(bcmul($total_price, $award_ratio), 100, 2);
+//                var_dump($give_action_integral);
+//            }
+//        }
 //        $userService = app()->make(UserServices::class);
 //        $rate = sys_config('action_integral_rate', 3);
 //        $award_order_limit = sys_config('award_order_limit');