Просмотр исходного кода

Merge branch 'master' into dev

# Conflicts:
#	app/common/repositories/merchant/order/OrderGzcRepository.php
#	app/common/repositories/store/order/StoreOrderRepository.php
#	app/controller/admin/system/merchant/GzcLogs.php
sunxiaobiao месяцев назад: 9
Родитель
Сommit
d4c9da4a03

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

@@ -330,8 +330,7 @@ class OrderGzcRepository extends BaseRepository
330
         $curl = curl_init();
330
         $curl = curl_init();
331
 
331
 
332
         curl_setopt_array($curl, [
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
             CURLOPT_RETURNTRANSFER => true,
334
             CURLOPT_RETURNTRANSFER => true,
336
             CURLOPT_ENCODING       => "",
335
             CURLOPT_ENCODING       => "",
337
             CURLOPT_MAXREDIRS      => 10,
336
             CURLOPT_MAXREDIRS      => 10,
@@ -394,7 +393,6 @@ class OrderGzcRepository extends BaseRepository
394
             ];
393
             ];
395
         }
394
         }
396
 
395
 
397
-
398
         ksort($data);
396
         ksort($data);
399
         $params = '';
397
         $params = '';
400
         foreach ($data as $key => $value) {
398
         foreach ($data as $key => $value) {
@@ -405,8 +403,7 @@ class OrderGzcRepository extends BaseRepository
405
         $curl = curl_init();
403
         $curl = curl_init();
406
 
404
 
407
         curl_setopt_array($curl, [
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
             CURLOPT_RETURNTRANSFER => true,
407
             CURLOPT_RETURNTRANSFER => true,
411
             CURLOPT_ENCODING       => "",
408
             CURLOPT_ENCODING       => "",
412
             CURLOPT_MAXREDIRS      => 10,
409
             CURLOPT_MAXREDIRS      => 10,
@@ -453,8 +450,7 @@ class OrderGzcRepository extends BaseRepository
453
         $curl = curl_init();
450
         $curl = curl_init();
454
 
451
 
455
         curl_setopt_array($curl, [
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
             CURLOPT_RETURNTRANSFER => true,
454
             CURLOPT_RETURNTRANSFER => true,
459
             CURLOPT_ENCODING       => "",
455
             CURLOPT_ENCODING       => "",
460
             CURLOPT_MAXREDIRS      => 10,
456
             CURLOPT_MAXREDIRS      => 10,

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

@@ -71,7 +71,7 @@ class GzcLogs extends BaseController
71
      * created: 2021/3/24 13:56
71
      * created: 2021/3/24 13:56
72
      */
72
      */
73
     public function inGzc()
73
     public function inGzc()
74
-    { 
74
+    {
75
         $id = intval($this->request->param('id'));
75
         $id = intval($this->request->param('id'));
76
         $log = Db::table('rrx_gzc_logs')
76
         $log = Db::table('rrx_gzc_logs')
77
             ->where('id', $id)
77
             ->where('id', $id)
@@ -79,11 +79,11 @@ class GzcLogs extends BaseController
79
             ->where('success', 0)
79
             ->where('success', 0)
80
             ->where('pension', '>', 0)
80
             ->where('pension', '>', 0)
81
             ->find();
81
             ->find();
82
-        
82
+
83
         if(!$log){
83
         if(!$log){
84
-            return app('json')->fail('请选择未入账的记录', );
84
+            return app('json')->fail('请选择未入账的记录');
85
         }
85
         }
86
-            
86
+
87
         $mobile= $log['mobile'];
87
         $mobile= $log['mobile'];
88
         $user_name =  Db::name('user_certification')->where('uid',$log['uid'])->value('user_name');
88
         $user_name =  Db::name('user_certification')->where('uid',$log['uid'])->value('user_name');
89
         $user_card =  Db::name('user_certification')->where('uid',$log['uid'])->value('user_card');
89
         $user_card =  Db::name('user_certification')->where('uid',$log['uid'])->value('user_card');
@@ -116,18 +116,18 @@ class GzcLogs extends BaseController
116
         $OrderMerchantRepository = app()->make(OrderMerchantRepository::class);
116
         $OrderMerchantRepository = app()->make(OrderMerchantRepository::class);
117
         $orderId = $OrderMerchantRepository->getNewOrderId('IN10');
117
         $orderId = $OrderMerchantRepository->getNewOrderId('IN10');
118
         Db::table('rrx_gzc_logs')
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
         $order_id = Db::name('store_order')->where('order_sn', $log['out_trade_no'])->value('order_id');
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
             $bill = Db::name('user_bill')->where('link_id', $order_id)->where('commission_type', 5)->where('is_gzc', 'in', [0, 1])->find();
135
             $bill = Db::name('user_bill')->where('link_id', $order_id)->where('commission_type', 5)->where('is_gzc', 'in', [0, 1])->find();
136
             if($bill){
136
             if($bill){
137
                 Db::name('user_bill')
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
         return app('json')->success('发起成功', $log);
145
         return app('json')->success('发起成功', $log);
146
     }
146
     }
147
 
147
 
@@ -195,7 +195,6 @@ class GzcLogs extends BaseController
195
                 DateTime::createFromFormat('Ymd', strval($birthday))
195
                 DateTime::createFromFormat('Ymd', strval($birthday))
196
             )->y;
196
             )->y;
197
             $certification = $OrderGzcRepository->certification($uid, $mobile, $user_name, $user_card, $card_positive, $card_reverse,$cardType,$birthday,$gender,$age);
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
             if($certification['status'] != 200) return app('json')->fail('实名认证失败:'.$certification['message']);
198
             if($certification['status'] != 200) return app('json')->fail('实名认证失败:'.$certification['message']);
200
             $gzc = $OrderGzcRepository->gzc($uid,$log['pension']);
199
             $gzc = $OrderGzcRepository->gzc($uid,$log['pension']);
201
             if($gzc['status'] != 200) return app('json')->fail('入账失败:'.$gzc['message']);
200
             if($gzc['status'] != 200) return app('json')->fail('入账失败:'.$gzc['message']);

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

@@ -1425,7 +1425,7 @@ class Auth extends BaseController
1425
         }
1425
         }
1426
 
1426
 
1427
         if ($data['type']=="register"){
1427
         if ($data['type']=="register"){
1428
-            $count=Db::name("user")->where("phone", $data["phone"])->count();
1428
+            $count=Db::name("user")->where("phone", $data["phone"])->where('is_del','=',0)->count();
1429
             if ($count){
1429
             if ($count){
1430
                 return app('json')->make(405, '该手机号已注册,请直接登录');
1430
                 return app('json')->make(405, '该手机号已注册,请直接登录');
1431
             }
1431
             }
@@ -1441,6 +1441,8 @@ class Auth extends BaseController
1441
         $sms_key = 'api.auth.sms.' . $data['phone'];
1441
         $sms_key = 'api.auth.sms.' . $data['phone'];
1442
         $sms_code = str_pad(random_int(1, 9999), 4, 0, STR_PAD_LEFT);
1442
         $sms_code = str_pad(random_int(1, 9999), 4, 0, STR_PAD_LEFT);
1443
         $sms_time = systemConfig('sms_time') ? systemConfig('sms_time') : 30 ;
1443
         $sms_time = systemConfig('sms_time') ? systemConfig('sms_time') : 30 ;
1444
+        // 兼容香港手机号
1445
+        if (strlen($data['phone']) != 11) $data['phone'] = '+852' . $data['phone'];
1444
         $res = app()->make(AliYunSmsService::class)->send($data['phone'],  $sms_code);
1446
         $res = app()->make(AliYunSmsService::class)->send($data['phone'],  $sms_code);
1445
         if($res['Code']!='OK'){
1447
         if($res['Code']!='OK'){
1446
             Db::name('log')->insert(['data'=>'幸福保短信发送失败:'.json_encode($res,256)]);
1448
             Db::name('log')->insert(['data'=>'幸福保短信发送失败:'.json_encode($res,256)]);
@@ -2094,12 +2096,13 @@ class Auth extends BaseController
2094
                 return app('json')->fail('没有获取到手机号1');
2096
                 return app('json')->fail('没有获取到手机号1');
2095
             }
2097
             }
2096
 //            dump($data);
2098
 //            dump($data);
2099
+            Db::name('log')->insert(['data'=>'一键登录获取的数据:' .$data]);
2097
             $data=json_decode($data,true);
2100
             $data=json_decode($data,true);
2098
             $phone=$data['purePhoneNumber']??'';
2101
             $phone=$data['purePhoneNumber']??'';
2099
             if($phone==''){
2102
             if($phone==''){
2100
                 return app('json')->fail('没有获取到手机号2');
2103
                 return app('json')->fail('没有获取到手机号2');
2101
             }
2104
             }
2102
-            if (!preg_match("/^1[3456789]{1}\d{9}$/", $phone)){
2105
+            if (!preg_match("/^1[3456789]{1}\d{9}$/", $phone) && !preg_match("/^[569]\d{7}$/",$phone)){
2103
                 return app('json')->fail('手机号格式错误');
2106
                 return app('json')->fail('手机号格式错误');
2104
             }
2107
             }
2105
             $user_res=Db::name('user')->where('account',$phone)->find();
2108
             $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
         $data = [
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
         $result = Db::name("user")
67
         $result = Db::name("user")