Pārlūkot izejas kodu

Merge branch 'dev' into dev-xpy

xupuyuan 9 mēneši atpakaļ
vecāks
revīzija
8efaa33af3

+ 14 - 1
app/common/dao/user/UserCertificationDao.php

@@ -85,5 +85,18 @@ class UserCertificationDao extends BaseDao
85 85
         return $entityList;
86 86
     }
87 87
 
88
-
88
+    /**
89
+     * @param $mobile
90
+     * @return array|\think\db\BaseQuery|\think\Model|null
91
+     * @throws DataNotFoundException
92
+     * @throws DbException
93
+     * @throws ModelNotFoundException
94
+     * @author 史晨
95
+     * @date 2025/10/20 17:21
96
+     * 获取用户实名信息
97
+     */
98
+    public function getUserCertification($mobile)
99
+    {
100
+        return $this->getModel()::getDB()->where('mobile', $mobile)->find();
101
+    }
89 102
 }

+ 1 - 0
app/common/enum/store/StoreOrderEnum.php

@@ -40,6 +40,7 @@ class StoreOrderEnum extends CommonEnum
40 40
         'B3-VR+Jingdou' => ['code' => 'b3', 'name' => 'VR+京豆'],
41 41
         'B4-Cash+Jingdou' => ['code' => 'b4', 'name' => '现金+京豆'],
42 42
         'B5-VR' => ['code' => 'b5', 'name' => 'VR'],
43
+        'B6-Cash' => ['code' => 'b6', 'name' => '现金'],
43 44
         'A1-VR' => ['code' => 'a1', 'name' => 'VR'],
44 45
         'A2-Cash' => ['code' => 'a2', 'name' => '现金'],
45 46
         'A3-Cash+VR' => ['code' => 'a3', 'name' => '现金+VR'],

+ 3 - 7
app/common/repositories/merchant/order/OrderGzcRepository.php

@@ -330,8 +330,7 @@ class OrderGzcRepository extends BaseRepository
330 330
         $curl = curl_init();
331 331
 
332 332
         curl_setopt_array($curl, [
333
-            // CURLOPT_URL            => "http://pcpc.bjtdba.com/api/third/register", // 生产环境
334
-            CURLOPT_URL            => "http://testpcpc.bjtdba.com/api/third/register", // 测试环境
333
+            CURLOPT_URL            => "http://pcpc.bjtdba.com/api/third/register",
335 334
             CURLOPT_RETURNTRANSFER => true,
336 335
             CURLOPT_ENCODING       => "",
337 336
             CURLOPT_MAXREDIRS      => 10,
@@ -394,7 +393,6 @@ class OrderGzcRepository extends BaseRepository
394 393
             ];
395 394
         }
396 395
 
397
-
398 396
         ksort($data);
399 397
         $params = '';
400 398
         foreach ($data as $key => $value) {
@@ -405,8 +403,7 @@ class OrderGzcRepository extends BaseRepository
405 403
         $curl = curl_init();
406 404
 
407 405
         curl_setopt_array($curl, [
408
-            // CURLOPT_URL            => "http://pcpc.bjtdba.com/api/third/certification", // 生产
409
-            CURLOPT_URL            => "https://testpcpc.bjtdba.com/api/third/certification", // 测试
406
+            CURLOPT_URL            => "http://pcpc.bjtdba.com/api/third/certification",
410 407
             CURLOPT_RETURNTRANSFER => true,
411 408
             CURLOPT_ENCODING       => "",
412 409
             CURLOPT_MAXREDIRS      => 10,
@@ -453,8 +450,7 @@ class OrderGzcRepository extends BaseRepository
453 450
         $curl = curl_init();
454 451
 
455 452
         curl_setopt_array($curl, [
456
-            // CURLOPT_URL            => "http://pcpc.bjtdba.com/api/third/gzc", // 生产
457
-            CURLOPT_URL            => "http://testpcpc.bjtdba.com/api/third/gzc", // 测试
453
+            CURLOPT_URL            => "http://pcpc.bjtdba.com/api/third/gzc",
458 454
             CURLOPT_RETURNTRANSFER => true,
459 455
             CURLOPT_ENCODING       => "",
460 456
             CURLOPT_MAXREDIRS      => 10,

+ 2 - 0
app/common/repositories/store/order/StoreOrderRepository.php

@@ -10878,6 +10878,8 @@ class StoreOrderRepository extends BaseRepository
10878 10878
             // 执行 Vr 增减 操作
10879 10879
             $userSignVrRepository->execute($userSignVrEntity->getId());
10880 10880
             $paySuccess = true;
10881
+        } else if ($fzonePayTypeEntity->getType() == StoreOrderEnum::FZONE_PAY_TYPE['B6-Cash']['code']) {
10882
+
10881 10883
         } else if ($fzonePayTypeEntity->getType() == StoreOrderEnum::FZONE_PAY_TYPE['A1-VR']['code']) {
10882 10884
             if ($fzonePayTypeEntity->getPrice() > $userEntity->getVr()) {
10883 10885
                 throw new ValidateException('支付失败,VR不足!');

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 9137
app/common/repositories/store/order/StoreOrderRepositoryCopy.php


+ 21 - 22
app/controller/admin/system/merchant/GzcLogs.php

@@ -71,7 +71,7 @@ class GzcLogs extends BaseController
71 71
      * created: 2021/3/24 13:56
72 72
      */
73 73
     public function inGzc()
74
-    { 
74
+    {
75 75
         $id = intval($this->request->param('id'));
76 76
         $log = Db::table('rrx_gzc_logs')
77 77
             ->where('id', $id)
@@ -79,11 +79,11 @@ class GzcLogs extends BaseController
79 79
             ->where('success', 0)
80 80
             ->where('pension', '>', 0)
81 81
             ->find();
82
-        
82
+
83 83
         if(!$log){
84
-            return app('json')->fail('请选择未入账的记录', );
84
+            return app('json')->fail('请选择未入账的记录');
85 85
         }
86
-            
86
+
87 87
         $mobile= $log['mobile'];
88 88
         $user_name =  Db::name('user_certification')->where('uid',$log['uid'])->value('user_name');
89 89
         $user_card =  Db::name('user_certification')->where('uid',$log['uid'])->value('user_card');
@@ -116,18 +116,18 @@ class GzcLogs extends BaseController
116 116
         $OrderMerchantRepository = app()->make(OrderMerchantRepository::class);
117 117
         $orderId = $OrderMerchantRepository->getNewOrderId('IN10');
118 118
         Db::table('rrx_gzc_logs')
119
-        ->where('id', $id)
120
-        ->where('gzc', 0)
121
-        ->where('success', 0)
122
-        ->where('pension', '>', 0)
123
-        ->update([
124
-            'gzc' => 1,
125
-            'platform_no' => $orderId,
126
-            'gzc_deposit_no' => $gzc_deposit_no,
127
-            'gzc_confirm_result' => $gzc_confirm_result,
128
-            'success' => 1,
129
-            'update_time' => date('Y-m-d H:i:s')
130
-        ]);
119
+            ->where('id', $id)
120
+            ->where('gzc', 0)
121
+            ->where('success', 0)
122
+            ->where('pension', '>', 0)
123
+            ->update([
124
+                'gzc' => 1,
125
+                'platform_no' => $orderId,
126
+                'gzc_deposit_no' => $gzc_deposit_no,
127
+                'gzc_confirm_result' => $gzc_confirm_result,
128
+                'success' => 1,
129
+                'update_time' => date('Y-m-d H:i:s')
130
+            ]);
131 131
 
132 132
         //发起成功更新记录值
133 133
         $order_id = Db::name('store_order')->where('order_sn', $log['out_trade_no'])->value('order_id');
@@ -135,13 +135,13 @@ class GzcLogs extends BaseController
135 135
             $bill = Db::name('user_bill')->where('link_id', $order_id)->where('commission_type', 5)->where('is_gzc', 'in', [0, 1])->find();
136 136
             if($bill){
137 137
                 Db::name('user_bill')
138
-                ->where('bill_id', $bill['bill_id'])
139
-                ->update([
140
-                    'is_gzc' => 2
141
-                ]);
138
+                    ->where('bill_id', $bill['bill_id'])
139
+                    ->update([
140
+                        'is_gzc' => 2
141
+                    ]);
142 142
             }
143 143
         }
144
-        
144
+
145 145
         return app('json')->success('发起成功', $log);
146 146
     }
147 147
 
@@ -195,7 +195,6 @@ class GzcLogs extends BaseController
195 195
                 DateTime::createFromFormat('Ymd', strval($birthday))
196 196
             )->y;
197 197
             $certification = $OrderGzcRepository->certification($uid, $mobile, $user_name, $user_card, $card_positive, $card_reverse,$cardType,$birthday,$gender,$age);
198
-            Log::info('pcpc认证结果' . json_encode($certification));
199 198
             if($certification['status'] != 200) return app('json')->fail('实名认证失败:'.$certification['message']);
200 199
             $gzc = $OrderGzcRepository->gzc($uid,$log['pension']);
201 200
             if($gzc['status'] != 200) return app('json')->fail('入账失败:'.$gzc['message']);

+ 14 - 2
app/controller/api/Auth.php

@@ -12,7 +12,9 @@ namespace app\controller\api;
12 12
 
13 13
 use AlibabaCloud\Client\AlibabaCloud;
14 14
 use app\common\dao\store\order\StoreOrderDao;
15
+use app\common\dao\user\UserCertificationDao;
15 16
 use app\common\model\user\User;
17
+use app\common\model\user\UserCertification;
16 18
 use app\common\repositories\merchant\order\OrderGzcRepository;
17 19
 use app\common\repositories\merchant\order\OrderMerchantRepository;
18 20
 use app\common\repositories\store\order\StoreGroupOrderRepository;
@@ -476,6 +478,13 @@ class Auth extends BaseController
476 478
         if (!$useragree){
477 479
             $repository->createUserOperatingRecord($user->uid, 1, 1, '用户同意用户协议记录');
478 480
         }
481
+        // 登录增加是否实名字段
482
+        $userCertificationDao = new UserCertificationDao();
483
+        $isCertification = $userCertificationDao->getUserCertification($account);
484
+        $user['is_ertification'] = 0;
485
+        if (!empty($isCertification)) {
486
+            $user['is_ertification'] = 1;
487
+        }
479 488
         return app('json')->success($repository->returnToken($user, $tokenInfo));
480 489
     }
481 490
 
@@ -1425,7 +1434,7 @@ class Auth extends BaseController
1425 1434
         }
1426 1435
 
1427 1436
         if ($data['type']=="register"){
1428
-            $count=Db::name("user")->where("phone", $data["phone"])->count();
1437
+            $count=Db::name("user")->where("phone", $data["phone"])->where('is_del','=',0)->count();
1429 1438
             if ($count){
1430 1439
                 return app('json')->make(405, '该手机号已注册,请直接登录');
1431 1440
             }
@@ -1441,6 +1450,8 @@ class Auth extends BaseController
1441 1450
         $sms_key = 'api.auth.sms.' . $data['phone'];
1442 1451
         $sms_code = str_pad(random_int(1, 9999), 4, 0, STR_PAD_LEFT);
1443 1452
         $sms_time = systemConfig('sms_time') ? systemConfig('sms_time') : 30 ;
1453
+        // 兼容香港手机号
1454
+        if (strlen($data['phone']) != 11) $data['phone'] = '+852' . $data['phone'];
1444 1455
         $res = app()->make(AliYunSmsService::class)->send($data['phone'],  $sms_code);
1445 1456
         if($res['Code']!='OK'){
1446 1457
             Db::name('log')->insert(['data'=>'幸福保短信发送失败:'.json_encode($res,256)]);
@@ -2094,12 +2105,13 @@ class Auth extends BaseController
2094 2105
                 return app('json')->fail('没有获取到手机号1');
2095 2106
             }
2096 2107
 //            dump($data);
2108
+            Db::name('log')->insert(['data'=>'一键登录获取的数据:' .$data]);
2097 2109
             $data=json_decode($data,true);
2098 2110
             $phone=$data['purePhoneNumber']??'';
2099 2111
             if($phone==''){
2100 2112
                 return app('json')->fail('没有获取到手机号2');
2101 2113
             }
2102
-            if (!preg_match("/^1[3456789]{1}\d{9}$/", $phone)){
2114
+            if (!preg_match("/^1[3456789]{1}\d{9}$/", $phone) && !preg_match("/^[569]\d{7}$/",$phone)){
2103 2115
                 return app('json')->fail('手机号格式错误');
2104 2116
             }
2105 2117
             $user_res=Db::name('user')->where('account',$phone)->find();

+ 42 - 62
app/controller/api/store/merchant/Taskorderguquan.php

@@ -19,69 +19,49 @@ class Taskorderguquan
19 19
 
20 20
         /**
21 21
         补贴下面人员
22
-        13231658486周行体600
23
-        13333069689魏   新600
24
-        13959100621周金花300
25
-        13701061395李素红300
26
-        17501006833邢艳丽300
27
-        15631982690魏震洪200
28
-        18603401312黄金花200
29
-        13521438652徐立苹300
30
-        15832971815孟晓玮300
31
-        18600200909陈冠霖300
32
-        15810064711 王   玲 300
33
-        13932925303会强200
34
-        13901074090陈玉刚300
35
-        13381085923王建军50
36
-        13601071082隋彩云200
37
-        18001316701闫旭200
38
-        13601179856陈瑞元50
39
-        13161909228刘银霞50
40
-        18760167163刘春梅50
41
-        13215917919李小秋50
42
-        13801358713金波50
43
-        15321221558李伟 200
44
-        15332507711张传莲50
45
-        15960349667吕丽娣50
46
-        13231658486周军市场补贴600
47
-        18513005403王培50
48
-        18612051372李金俭 50
49
-        15803242611王志敏50
50
-        13701059062王金权50
51
-        13331043787张吉良115
52
-        18715313601大饼300
53
-        */
22
+        13231658486周行体200
23
+        13333069689魏   新200
24
+        13959100621周金花100
25
+        13701061395李素红50
26
+        17501006833邢艳丽100
27
+        15631982690魏震洪50
28
+        18603401312黄金花50
29
+        13521438652徐立苹50
30
+        15832971815孟晓玮50
31
+        18600200909陈冠霖100
32
+        15810064711 王   玲 100
33
+        13932925303会强50
34
+        13601071082隋彩云100
35
+        18001316701闫旭100
36
+        13601179856陈瑞元20
37
+        13161909228刘银霞20
38
+        18760167163刘春梅20
39
+        13215917919李小秋20
40
+        13231658486周军市场补贴200
41
+        13331043787张吉良55
42
+        18715313601大饼100
43
+         */
54 44
         $data = [
55
-            '13231658486' => 1200,
56
-            '13333069689' => 600,
57
-            '13959100621' => 300,
58
-            '13701061395' => 300,
59
-            '17501006833' => 300,
60
-            '15631982690' => 200,
61
-            '18603401312' => 200,
62
-            '13521438652' => 300,
63
-            '15832971815' => 300,
64
-            '18600200909' => 300,
65
-            '15810064711' => 300,
66
-            '13932925303' => 200,
67
-            '13901074090' => 300,
68
-            '13381085923' => 50,
69
-            '13601071082' => 200,
70
-            '18001316701' => 200,
71
-            '13601179856' => 50,
72
-            '13161909228' => 50,
73
-            '18760167163' => 50,
74
-            '13215917919' => 50,
75
-            '13801358713' => 50,
76
-            '15321221558' => 200,
77
-            '15332507711' => 50,
78
-            '15960349667' => 50,
79
-            '18513005403' => 50,
80
-            '18612051372' => 50,
81
-            '15803242611' => 50,
82
-            '13701059062' => 50,
83
-            '13331043787' => 115,
84
-            '18715313601' => 300
45
+            '13231658486' => 400,
46
+            '13333069689' => 200,
47
+            '13959100621' => 100,
48
+            '13701061395' => 50,
49
+            '17501006833' => 100,
50
+            '15631982690' => 50,
51
+            '18603401312' => 50,
52
+            '13521438652' => 50,
53
+            '15832971815' => 50,
54
+            '18600200909' => 100,
55
+            '15810064711' => 100,
56
+            '13932925303' => 50,
57
+            '13601071082' => 100,
58
+            '18001316701' => 100,
59
+            '13601179856' => 20,
60
+            '13161909228' => 20,
61
+            '18760167163' => 20,
62
+            '13215917919' => 20,
63
+            '13331043787' => 55,
64
+            '18715313601' => 100
85 65
         ];
86 66
 
87 67
         $result = Db::name("user")

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 2298
app/controller/api/store/order/StoreOrderCopy.php