7 次代码提交 0b692ccc52 ... 15bfe2dd73

作者 SHA1 备注 提交日期
  family 15bfe2dd73 Merge branch 'master' into huangfamily 1 年之前
  hefei 4a96739469 更改商品分享导致仰养老金不正确问题 1 年之前
  hefei 59da6519f6 注释会员专区锁客奖励 1 年之前
  hefei a03c09a7b5 修改锁客奖励问题 1 年之前
  hefei 0f12fdc71e 更新 1 年之前
  hefei 7a08e6da82 修复订单数据 1 年之前
  hefei 0fdc0521aa 增加解绑支付宝微信 1 年之前

+ 35 - 0
app/command/repairPaySuccess.php

@@ -0,0 +1,35 @@
1
+<?php
2
+declare (strict_types=1);
3
+
4
+namespace app\command;
5
+
6
+use app\common\repositories\store\order\StoreGroupOrderRepository;
7
+use app\common\repositories\store\order\StoreOrderRepository;
8
+use think\console\Command;
9
+use think\console\Input;
10
+use think\console\Output;
11
+use think\facade\Db;
12
+
13
+class repairPaySuccess extends Command
14
+{
15
+    protected function configure()
16
+    {
17
+        // 指令配置
18
+        $this->setName('repairPaySuccess')
19
+            ->setDescription('修复支付成功后数据');
20
+    }
21
+
22
+    /**
23
+     * @param Input $input
24
+     * @param Output $output
25
+     * @return void
26
+     */
27
+    protected function execute(Input $input, Output $output)
28
+    {
29
+        $orderSn = 'wx1744285736344558050';
30
+        $groupOrder = app()->make(StoreGroupOrderRepository::class)->getWhere(['group_order_sn' => $orderSn]);
31
+        app()->make(StoreOrderRepository::class)->paySuccess($groupOrder,1);
32
+        $output->writeln('执行结束');
33
+    }
34
+
35
+}

+ 12 - 12
app/common/repositories/store/order/StoreOrderRepository.php

@@ -9775,18 +9775,18 @@ class StoreOrderRepository extends BaseRepository
9775 9775
                 }
9776 9776
             }
9777 9777
 
9778
-            //锁客收益
9779
-            if ($user_data['mer_id'] != 0) {
9780
-                $merchant_data = Db::name('merchant')->where('mer_id', $user_data['mer_id'])->find();
9781
-                $merchant_user_data = Db::name('user')->where('uid', $merchant_data['uid'])->find();
9782
-                if (!empty($merchant_data) && !empty($merchant_user_data)) {
9783
-                    $yj_amount_90 = bcmul($pv , 0.035, 2) * 0.9;
9784
-                    $fgj_amount_10 = bcmul($pv, 0.035, 2) * 0.1;//推广者的佣金抽10%到个人复购金
9785
-                    $this->fugou_user_log($merchant_data['uid'], $fgj_amount_10, $store_order_data['order_id'], 1, 1);
9786
-                    //推广佣金
9787
-                    $this->bill_user_log($merchant_data['uid'], bcmul($pv, 0.35, 2), $store_order_data['order_id'], 3, $store_order_data['order_sn'], '推广获得佣金', $store_order_data['mer_id']);
9788
-                }
9789
-            }
9778
+            //锁客收益 todo 会员专区不做锁客 20250415
9779
+//            if ($user_data['mer_id'] != 0) {
9780
+//                $merchant_data = Db::name('merchant')->where('mer_id', $user_data['mer_id'])->find();
9781
+//                $merchant_user_data = Db::name('user')->where('uid', $merchant_data['uid'])->find();
9782
+//                if (!empty($merchant_data) && !empty($merchant_user_data)) {
9783
+//                    $yj_amount_90 = bcmul($pv , 0.035, 2) * 0.9;
9784
+//                    $fgj_amount_10 = bcmul($pv, 0.035, 2) * 0.1;//推广者的佣金抽10%到个人复购金
9785
+//                    $this->fugou_user_log($merchant_data['uid'], $fgj_amount_10, $store_order_data['order_id'], 1, 1);
9786
+//                    //推广佣金
9787
+//                    $this->bill_user_log($merchant_data['uid'], $yj_amount_90, $store_order_data['order_id'], 3, $store_order_data['order_sn'], '推广获得佣金', $store_order_data['mer_id']);
9788
+//                }
9789
+//            }
9790 9790
 
9791 9791
             //会员专区,给用户升级判断
9792 9792
             $orderList = Db::name("store_order")->where("uid", $store_order_data['uid'])->where("mer_id", 496)->where("status", "in", [0, 1, 2, 3])->select();

+ 50 - 51
app/controller/api/Notify.php

@@ -520,31 +520,31 @@ class Notify
520 520
 
521 521
                                 }
522 522
 
523
-                                //锁客收益
524
-                                if($user_data['mer_id'] != 0){
525
-
526
-                                    $merchant_data = Db::name('merchant')->where('mer_id',$user_data['mer_id'])->find();
527
-
528
-                                    $merchant_user_data = Db::name('user')->where('uid',$merchant_data['uid'])->find();
529
-
530
-                                    if(!empty($merchant_user_data)){
531
-
532
-
533
-                                        $yj_amount_90 = bcmul($pv * 0.9, 0.035,2);
534
-                                        $fgj_amount_10 = bcmul($pv * 0.1, 0.035,2);//推广者的佣金抽10%到个人复购金
535
-
536
-                                        $yj_amount = $merchant_data['brokerage_price'] + $yj_amount_90;
537
-                                        $fgj_amount = $merchant_data['fugou'] + $fgj_amount_10;
538
-                                        $this->fugou_user_log($merchant_data['uid'],$fgj_amount_10,$store_order_data['order_id'],1,1);
539
-
540
-
541
-
542
-                                        //Db::name('user')->where('uid',$merchant_data['uid'])->update(['brokerage_price'=>$yj_amount,'fugou'=>$fgj_amount]);
543
-                                        //推广佣金
544
-                                        $this->bill_user_log($merchant_data['uid'],round($pv * 0.35,2),$store_order_data['order_id'],3,$store_order_data['order_sn'],'推广获得佣金',$store_order_data['mer_id']);
545
-                                    }
546
-
547
-                                }
523
+                                //锁客收益  todo 会员专区不做锁客 20250415
524
+//                                if($user_data['mer_id'] != 0){
525
+//
526
+//                                    $merchant_data = Db::name('merchant')->where('mer_id',$user_data['mer_id'])->find();
527
+//
528
+//                                    $merchant_user_data = Db::name('user')->where('uid',$merchant_data['uid'])->find();
529
+//
530
+//                                    if(!empty($merchant_user_data)){
531
+//
532
+//
533
+//                                        $yj_amount_90 = bcmul($pv * 0.9, 0.035,2);
534
+//                                        $fgj_amount_10 = bcmul($pv * 0.1, 0.035,2);//推广者的佣金抽10%到个人复购金
535
+//
536
+//                                        $yj_amount = $merchant_data['brokerage_price'] + $yj_amount_90;
537
+//                                        $fgj_amount = $merchant_data['fugou'] + $fgj_amount_10;
538
+//                                        $this->fugou_user_log($merchant_data['uid'],$fgj_amount_10,$store_order_data['order_id'],1,1);
539
+//
540
+//
541
+//
542
+//                                        //Db::name('user')->where('uid',$merchant_data['uid'])->update(['brokerage_price'=>$yj_amount,'fugou'=>$fgj_amount]);
543
+//                                        //推广佣金
544
+//                                        $this->bill_user_log($merchant_data['uid'],$yj_amount_90,$store_order_data['order_id'],3,$store_order_data['order_sn'],'推广获得佣金',$store_order_data['mer_id']);
545
+//                                    }
546
+//
547
+//                                }
548 548
 
549 549
 
550 550
                                 $fzone_paytype = json_decode($store_order_data['fzone_paytype'],true);
@@ -587,30 +587,30 @@ class Notify
587 587
                                     
588 588
                                 }
589 589
 
590
-                                //会员专区,给用户升级判断
591
-                                $orderList = Db::name("store_order")->where("uid", $store_order_data['uid'])->where("mer_id", 496)->where("status", "in", [0, 1, 2, 3])->select();
592
-                                // 初始化总和变量
593
-                                $totalPayPrice = 0;
594
-
595
-                                // 遍历查询结果
596
-                                foreach ($orderList as $order) {
597
-                                    // 累加 pay_price
598
-                                    $totalPayPrice += $order['pay_price'];
599
-                                }
600
-
601
-                                $userdata = Db::name("user")->where("uid", $store_order_data['uid'])->find();
602
-
603
-                                if ($totalPayPrice >= 1180 && $totalPayPrice < 11800) {
604
-
605
-                                    if ($userdata['user_group'] <= 1) {
606
-                                        Db::name("user")->where("uid", $store_order_data['uid'])->update(["user_group" => 2]);
607
-                                    }
608
-
609
-                                } else if ($totalPayPrice >= 11800) {
610
-                                    if ($userdata['user_group'] <= 2) {
611
-                                        Db::name("user")->where("uid", $store_order_data['uid'])->update(["user_group" => 3]);
612
-                                    }
613
-                                }
590
+                                //会员专区,给用户升级判断 todo 疑似重复升级代码先做注释
591
+//                                $orderList = Db::name("store_order")->where("uid", $store_order_data['uid'])->where("mer_id", 496)->where("status", "in", [0, 1, 2, 3])->select();
592
+//                                // 初始化总和变量
593
+//                                $totalPayPrice = 0;
594
+//
595
+//                                // 遍历查询结果
596
+//                                foreach ($orderList as $order) {
597
+//                                    // 累加 pay_price
598
+//                                    $totalPayPrice += $order['pay_price'];
599
+//                                }
600
+//
601
+//                                $userdata = Db::name("user")->where("uid", $store_order_data['uid'])->find();
602
+//
603
+//                                if ($totalPayPrice >= 1180 && $totalPayPrice < 11800) {
604
+//
605
+//                                    if ($userdata['user_group'] <= 1) {
606
+//                                        Db::name("user")->where("uid", $store_order_data['uid'])->update(["user_group" => 2]);
607
+//                                    }
608
+//
609
+//                                } else if ($totalPayPrice >= 11800) {
610
+//                                    if ($userdata['user_group'] <= 2) {
611
+//                                        Db::name("user")->where("uid", $store_order_data['uid'])->update(["user_group" => 3]);
612
+//                                    }
613
+//                                }
614 614
 
615 615
 
616 616
                             } else {
@@ -1669,9 +1669,8 @@ class Notify
1669 1669
 
1670 1670
                     } 
1671 1671
                 }
1672
-                $ds = 1;
1673 1672
             }
1674
-           
1673
+            $ds = 1;
1675 1674
         }
1676 1675
 
1677 1676
 

+ 2 - 2
app/controller/api/store/product/StoreProduct.php

@@ -892,7 +892,7 @@ class StoreProduct extends BaseController
892 892
 //            $mmerchat_data = Db::name('merchant')->where('mer_id', $pdata['mer_id'])->find();
893 893
 //            $mer_name = $mmerchat_data['mer_name'];
894 894
             $price = $pdata['price'];
895
-            $yanglao=$ProductRepository->yanglaojin($pdata['product_id']);
895
+            $yanglao=$ProductRepository->pvParm($pdata['product_id']);
896 896
 //            if($pdata['type'] == 5){
897 897
 //                $mer_name = Db::name('big_warehouse') -> where('id',$pdata['dc_id']) -> value('warehouse_name');
898 898
 //            $price = $pdata['dc_price'];
@@ -914,7 +914,7 @@ class StoreProduct extends BaseController
914 914
 
915 915
                 'text' => array(
916 916
                     array(
917
-                        'text' => $yanglao,
917
+                        'text' => $yanglao['yanglao'],
918 918
                         'left' => 160,
919 919
                         'top' => 315,
920 920
                         'fontPath' => $filelink['Normal'],     //字体文件

+ 23 - 0
app/controller/api/user/User.php

@@ -6313,4 +6313,27 @@ class User extends BaseController
6313 6313
 
6314 6314
     }
6315 6315
 
6316
+    /**
6317
+     * 解绑微信或支付宝
6318
+     * @return void
6319
+     */
6320
+    public function unBindVxOrAli()
6321
+    {
6322
+        $uid = $this->request->uid();
6323
+        $type = request()->param('type','');
6324
+        if(!$type) return app('json')->fail('请选择解绑类型');
6325
+        if(!$uid) return app('json')->fail('请登录');
6326
+        // 1 = 微信  2 = 支付宝  3 = 全部
6327
+        if($type == 1){
6328
+            Db::name('user')->where('uid',$uid)->update(['wechat_user_id' => 0]);
6329
+        }else if ($type == 2){
6330
+            Db::name('user')->where('uid',$uid)->update(['ali_user_id' => 0]);
6331
+        }else{
6332
+            Db::name('user')->where('uid',$uid)->update(['wechat_user_id' => 0,'ali_user_id' => 0]);
6333
+
6334
+        }
6335
+        Db::name('log')->insert(['data' => '用户uid:' . $uid . '进行解绑操作type类型为' . $type]);
6336
+        return app('json')->success('解绑成功');
6337
+    }
6338
+
6316 6339
 }

+ 1 - 0
config/console.php

@@ -30,5 +30,6 @@ return [
30 30
         'repair_pv_log' => 'app\command\repairPvLog',
31 31
         'gzcAddByBill' => 'app\command\GzcAddByBillCommand',
32 32
         'movie_order' => 'app\command\MovieOrderCommand',
33
+        'repair_pay_success' => 'app\command\repairPaySuccess',
33 34
     ],
34 35
 ];

+ 1 - 0
route/api.php

@@ -324,6 +324,7 @@ Route::group('api/', function () {
324 324
             Route::get('vr_info','User/vr_info');//购物金
325 325
             Route::get('vr_list','User/vr_list');//购物金记录
326 326
             Route::get('vr_name','User/vr_name');//VR名称
327
+            Route::post('un_bind', 'User/unBindVxOrAli');//解绑微信或支付宝
327 328
 
328 329
         })->prefix('api.user.');
329 330