hehaiqiang 1 год назад
Родитель
Сommit
895c737781

+ 1 - 1
app/common/repositories/user/UserRepository.php

@@ -1188,7 +1188,7 @@ class UserRepository extends BaseRepository
1188
             'account' => $phone,
1188
             'account' => $phone,
1189
             'pwd' => $pwd,
1189
             'pwd' => $pwd,
1190
             'nickname' =>$nickname?$nickname:'用户' . substr($phone, 7, 4),
1190
             'nickname' =>$nickname?$nickname:'用户' . substr($phone, 7, 4),
1191
-            'avatar' => 'https://cdn.bjtdba.com/chuxubao/static/assets/yhc_default_avatar.png',
1191
+            'avatar' => 'https://cdn.bjtdba.com/vod/image/2025-01-20/20250120125206881.png',
1192
             'phone' => $phone,
1192
             'phone' => $phone,
1193
             'last_ip' => app('request')->ip(),
1193
             'last_ip' => app('request')->ip(),
1194
             "identity"=>5,
1194
             "identity"=>5,

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

@@ -946,7 +946,7 @@ $data=$user->toArray();
946
     {
946
     {
947
         $data = $this->request->params(['phone', 'code', 'key',"type"]);
947
         $data = $this->request->params(['phone', 'code', 'key',"type"]);
948
         $validate->sceneVerify()->check($data);
948
         $validate->sceneVerify()->check($data);
949
-
949
+        log::info("发送短信方法");
950
         if ($data['type']=="register"){
950
         if ($data['type']=="register"){
951
             $count=Db::name("user")->where("phone", $data["phone"])->count();
951
             $count=Db::name("user")->where("phone", $data["phone"])->count();
952
             if ($count){
952
             if ($count){
@@ -956,6 +956,7 @@ $data=$user->toArray();
956
         $sms_num_key = 'api.auth.num.' . $data['phone'];
956
         $sms_num_key = 'api.auth.num.' . $data['phone'];
957
         $sms_key = 'api.auth.sms.' . $data['phone'];
957
         $sms_key = 'api.auth.sms.' . $data['phone'];
958
         $num = Cache::get($sms_num_key) ? Cache::get($sms_num_key) : 0;
958
         $num = Cache::get($sms_num_key) ? Cache::get($sms_num_key) : 0;
959
+        log::info("num{$num}" );
959
         if ($num > 9) {
960
         if ($num > 9) {
960
             if (!$data['code'])
961
             if (!$data['code'])
961
                 return app('json')->make(402, '操作过于频繁,请稍后重试~');
962
                 return app('json')->make(402, '操作过于频繁,请稍后重试~');
@@ -966,7 +967,7 @@ $data=$user->toArray();
966
         $sms_time = systemConfig('sms_time') ? systemConfig('sms_time') : 30 ;
967
         $sms_time = systemConfig('sms_time') ? systemConfig('sms_time') : 30 ;
967
         $res = app()->make(AliYunSmsService::class)->send($data['phone'],  $sms_code);
968
         $res = app()->make(AliYunSmsService::class)->send($data['phone'],  $sms_code);
968
         if($res['Code']!='OK'){
969
         if($res['Code']!='OK'){
969
-            Db::name('log')->insert(['data'=>'一壶茶短信发送失败:'.json_encode($res,256)]);
970
+            Db::name('log')->insert(['data'=>'幸福保短信发送失败:'.json_encode($res,256)]);
970
             return app('json')->fail('操作过于频繁,请稍后重试~');
971
             return app('json')->fail('操作过于频繁,请稍后重试~');
971
         }
972
         }
972
 
973
 

+ 7 - 6
app/controller/api/store/product/Jt.php

@@ -530,11 +530,12 @@ class Jt extends BaseController
530
             $finalPrice = $detail['priceInfo']['lowestCouponPrice'] ?? $detail['priceInfo']['goods_price'] - $discount_price;
530
             $finalPrice = $detail['priceInfo']['lowestCouponPrice'] ?? $detail['priceInfo']['goods_price'] - $discount_price;
531
             $finalPrice = sprintf('%.2f', $finalPrice);
531
             $finalPrice = sprintf('%.2f', $finalPrice);
532
             $commissionRate = $detail['commissionInfo']['commissionShare'];
532
             $commissionRate = $detail['commissionInfo']['commissionShare'];
533
-            //目前京东联盟等级只返回90%的收益,后续调整0.9即可
533
+//            //目前京东联盟等级只返回90%的收益,后续调整0.9即可
534
             $commissionMoney = sprintf('%.2f', ($finalPrice * $commissionRate / 100));
534
             $commissionMoney = sprintf('%.2f', ($finalPrice * $commissionRate / 100));
535
 
535
 
536
             $commission=$commissionMoney; //佣金(预估)
536
             $commission=$commissionMoney; //佣金(预估)
537
-            $pv=$commission* 0.5;  //PV
537
+//            $commission=$detail['commissionInfo']['commission'];
538
+            $pv=$commission * 0.5;  //PV
538
             $yanglaojin=$pv; //新的养老金
539
             $yanglaojin=$pv; //新的养老金
539
 
540
 
540
             $gongxian=$pv; //新的养老金
541
             $gongxian=$pv; //新的养老金
@@ -620,7 +621,7 @@ class Jt extends BaseController
620
         ]);
621
         ]);
621
 
622
 
622
         if (empty($time['startTime'])) {
623
         if (empty($time['startTime'])) {
623
-            $time['startTime'] = date('Y-m-d H:i:00', strtotime('-30minute'));
624
+            $time['startTime'] = date('Y-m-d H:i:00', strtotime('-50minute'));
624
             $time['endTime'] = date('Y-m-d H:i:00', strtotime('+1minute'));
625
             $time['endTime'] = date('Y-m-d H:i:00', strtotime('+1minute'));
625
         }
626
         }
626
 //        if (empty($time['startTime'])) {
627
 //        if (empty($time['startTime'])) {
@@ -819,9 +820,9 @@ class Jt extends BaseController
819
                 $yanglaojin = $yanglaojin_order['extension_one'] ?? 0;
820
                 $yanglaojin = $yanglaojin_order['extension_one'] ?? 0;
820
                 //预估积分
821
                 //预估积分
821
                 $orderThird->yuguJifen(
822
                 $orderThird->yuguJifen(
822
-                    $order['commission'],
823
-                    $order['uid'],
824
-                    $order['order_sn'],
823
+                    $localOrder['commission'],
824
+                    $localOrder['uid'],
825
+                    $localOrder['order_sn'],
825
                     6
826
                     6
826
                 );
827
                 );
827
                 //直推奖处理
828
                 //直推奖处理

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

@@ -221,8 +221,10 @@ class StoreProduct extends BaseController
221
 
221
 
222
     public function get_mp_access_token()
222
     public function get_mp_access_token()
223
     {
223
     {
224
-        $appid = 'wx82986c4471ce7efc';
225
-        $secret = '4ae3f790d8c5503a22579338504cdb61';
224
+//        $appid = 'wx82986c4471ce7efc';
225
+//        $secret = '4ae3f790d8c5503a22579338504cdb61';
226
+        $appid = 'wxfb755febdb800f23';
227
+        $secret = '55ed00200ef0ec6662ca8502dc534a69';
226
         $access_token = Cache::get($appid . '_mp_access_token');
228
         $access_token = Cache::get($appid . '_mp_access_token');
227
         if ($access_token)
229
         if ($access_token)
228
             return $access_token;
230
             return $access_token;

+ 14 - 14
app/controller/api/user/User.php

@@ -203,14 +203,14 @@ class User extends BaseController
203
 
203
 
204
         if ($pm==0){
204
         if ($pm==0){
205
 
205
 
206
-            $data = DB::name('user_sign_hongbao')->where($where)->where('pm', 1)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
206
+            $data = DB::name('user_sign_hongbao')->where($where)->where('type', 1)->field('id,mark,number,type,addtime,order_id')->page($page, $limit)->order("id desc")->select();
207
         }
207
         }
208
         if($pm==1){
208
         if($pm==1){
209
-            $data = DB::name('user_sign_hongbao')->where($where)->where('pm', 2)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
209
+            $data = DB::name('user_sign_hongbao')->where($where)->where('type', 2)->field('id,mark,number,type,addtime,order_id')->page($page, $limit)->order("id desc")->select();
210
 
210
 
211
         }
211
         }
212
         if($pm==2){
212
         if($pm==2){
213
-            $data = DB::name('user_sign_hongbao')->where($where)->where('status', -1)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
213
+            $data = DB::name('user_sign_hongbao')->where($where)->where('status', -1)->field('id,mark,number,type,addtime,order_id')->page($page, $limit)->order("id desc")->select();
214
 
214
 
215
         }
215
         }
216
         log::info("=======date==={$data}");
216
         log::info("=======date==={$data}");
@@ -284,14 +284,14 @@ class User extends BaseController
284
 
284
 
285
         if ($pm==0){
285
         if ($pm==0){
286
 
286
 
287
-            $data = DB::name('user_sign_jingdou')->where($where)->where('pm', 1)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
287
+            $data = DB::name('user_sign_jingdou')->where($where)->where('type', 1)->field('id,mark,number,type,addtime,order_id')->page($page, $limit)->order("id desc")->select();
288
         }
288
         }
289
         if($pm==1){
289
         if($pm==1){
290
-            $data = DB::name('user_sign_jingdou')->where($where)->where('pm', 2)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
290
+            $data = DB::name('user_sign_jingdou')->where($where)->where('type', 2)->field('id,mark,number,type,addtime,order_id')->page($page, $limit)->order("id desc")->select();
291
 
291
 
292
         }
292
         }
293
         if($pm==2){
293
         if($pm==2){
294
-            $data = DB::name('user_sign_jingdou')->where($where)->where('status', -1)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
294
+            $data = DB::name('user_sign_jingdou')->where($where)->where('status', -1)->field('id,mark,number,type,addtime,order_id')->page($page, $limit)->order("id desc")->select();
295
 
295
 
296
         }
296
         }
297
         log::info("=======date==={$data}");
297
         log::info("=======date==={$data}");
@@ -324,10 +324,10 @@ class User extends BaseController
324
 
324
 
325
         if ($pm==0){
325
         if ($pm==0){
326
 
326
 
327
-            $data = DB::name('user_sign_fugou')->where($where)->where('pm', 1)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
327
+            $data = DB::name('user_sign_fugou')->where($where)->where('type', 1)->field('id,mark,number,type,addtime,order_id')->page($page, $limit)->order("id desc")->select();
328
         }
328
         }
329
         if($pm==1){
329
         if($pm==1){
330
-            $data = DB::name('user_sign_fugou')->where($where)->where('pm', 2)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
330
+            $data = DB::name('user_sign_fugou')->where($where)->where('type', 2)->field('id,mark,number,type,addtime,order_id')->page($page, $limit)->order("id desc")->select();
331
 
331
 
332
         }
332
         }
333
         if($pm==2){
333
         if($pm==2){
@@ -365,16 +365,16 @@ class User extends BaseController
365
 
365
 
366
         if ($pm==0){
366
         if ($pm==0){
367
 
367
 
368
-            $data = DB::name('user_sign_vr')->where($where)->where('pm', 1)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
368
+            $data = DB::name('user_sign_vr')->where($where)->where('type', 1)->field('id,mark,number,type,addtime,order_id')->page($page, $limit)->order("id desc")->select();
369
         }
369
         }
370
         if($pm==1){
370
         if($pm==1){
371
-            $data = DB::name('user_sign_vr')->where($where)->where('pm', 2)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
372
-
373
-        }
374
-        if($pm==2){
375
-            $data = DB::name('user_sign_vr')->where($where)->where('status', -1)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
371
+            $data = DB::name('user_sign_vr')->where($where)->where('type', 2)->field('id,mark,number,type,addtime,order_id')->page($page, $limit)->order("id desc")->select();
376
 
372
 
377
         }
373
         }
374
+//        if($pm==2){
375
+//            $data = DB::name('user_sign_vr')->where($where)->where('status', -1)->field('id,mark,number,pm,addtime,order_id')->page($page, $limit)->order("id desc")->select();
376
+//
377
+//        }
378
         log::info("=======date==={$data}");
378
         log::info("=======date==={$data}");
379
         return app("json")->success($data);
379
         return app("json")->success($data);
380
     }
380
     }

+ 19 - 11
crmeb/services/AliYunSmsService.php

@@ -16,6 +16,7 @@ use Exception;
16
 use think\facade\Db;
16
 use think\facade\Db;
17
 use GuzzleHttp\Exception\ClientException;
17
 use GuzzleHttp\Exception\ClientException;
18
 use GuzzleHttp\Exception\ServerException;
18
 use GuzzleHttp\Exception\ServerException;
19
+use think\facade\Log;
19
 
20
 
20
 /**
21
 /**
21
  * Class YunxinSmsService
22
  * Class YunxinSmsService
@@ -28,31 +29,35 @@ class AliYunSmsService
28
     public function send($mobile, $code, $templateId = 'AUTHCODE')
29
     public function send($mobile, $code, $templateId = 'AUTHCODE')
29
     {
30
     {
30
         if($templateId=='') $templateId = 'AUTHCODE';
31
         if($templateId=='') $templateId = 'AUTHCODE';
31
-        AlibabaCloud::accessKeyClient('LTAI5tPv49zdudnbTGExNKd3', 'nS7eFuPfI92i5h0MSvcAkpbyGsmkeF')
32
+//        AlibabaCloud::accessKeyClient('LTAI5tPv49zdudnbTGExNKd3', 'nS7eFuPfI92i5h0MSvcAkpbyGsmkeF')
33
+//            ->regionId('cn-hangzhou')
34
+//            ->asDefaultClient();
35
+        AlibabaCloud::accessKeyClient('LTAI5tKivJSckMYz5BHev3u8', 'nvetSdLB1YP7OgvpJcVeyhdJDVs4Ik')
32
             ->regionId('cn-hangzhou')
36
             ->regionId('cn-hangzhou')
33
             ->asDefaultClient();
37
             ->asDefaultClient();
34
         $templateParam['code'] = $code;
38
         $templateParam['code'] = $code;
35
-
39
+        log::info("发送短信方法");
36
         switch ($templateId) {
40
         switch ($templateId) {
37
             case 'AUTHCODE':
41
             case 'AUTHCODE':
38
-                $SignName = '一壶茶电子商务';
39
-                $TemplateCode = 'SMS_294055127';
40
-                $content = '【一壶茶电子商务】您的验证码是:' . $code;
42
+                $SignName = '北京融合华夏数字文化科技';
43
+                $TemplateCode = 'SMS_311255692';
44
+
45
+                $content = '【华夏幸福保】您的验证码是:' . $code;
41
                 break;
46
                 break;
42
             case 'ONESELFCARRY':
47
             case 'ONESELFCARRY':
43
-                $SignName = '一壶茶电子商务';
48
+                $SignName = '华夏幸福保';
44
                 $TemplateCode = 'SMS_465430830';
49
                 $TemplateCode = 'SMS_465430830';
45
-                $content = '【一壶茶电子商务】您购买的商品动态码(自提码)为' . $code . ',提货时请出示自提码!';
50
+                $content = '【华夏幸福保】您购买的商品动态码(自提码)为' . $code . ',提货时请出示自提码!';
46
                 break;
51
                 break;
47
             case 'REDCHANGE':
52
             case 'REDCHANGE':
48
-                $SignName = '一壶茶电子商务';
53
+                $SignName = '华夏幸福保';
49
                 $TemplateCode = 'SMS_465371794';
54
                 $TemplateCode = 'SMS_465371794';
50
-                $content = '【一壶茶电子商务】您的短信验证码为' . $code . ',您正在人工调整红积分,如非本人操作,请忽略该短信。';
55
+                $content = '【华夏幸福保】您的短信验证码为' . $code . ',您正在人工调整红积分,如非本人操作,请忽略该短信。';
51
                 break;
56
                 break;
52
             case 'COMMISSIONCHANGE':
57
             case 'COMMISSIONCHANGE':
53
-                $SignName = '一壶茶电子商务';
58
+                $SignName = '华夏幸福保';
54
                 $TemplateCode = 'SMS_465392073';
59
                 $TemplateCode = 'SMS_465392073';
55
-                $content = '【一壶茶电子商务】您的短信验证码为' . $code . ',您正在人工调整用户佣金,如非本人操作,请忽略该短信。';
60
+                $content = '【华夏幸福保】您的短信验证码为' . $code . ',您正在人工调整用户佣金,如非本人操作,请忽略该短信。';
56
                 break;
61
                 break;
57
         }
62
         }
58
         try {
63
         try {
@@ -71,6 +76,9 @@ class AliYunSmsService
71
                     ],
76
                     ],
72
                 ])
77
                 ])
73
                 ->request();
78
                 ->request();
79
+
80
+            log::info("短信:返回参数");
81
+            log::info($result);
74
             Db::name('sms_record')->insert(['phone' => $mobile, 'content' => $content, 'template' => $TemplateCode]);
82
             Db::name('sms_record')->insert(['phone' => $mobile, 'content' => $content, 'template' => $TemplateCode]);
75
 
83
 
76
             return $result->toArray();
84
             return $result->toArray();

+ 4 - 4
route/api.php

@@ -298,15 +298,15 @@ Route::group('api/', function () {
298
             Route::get('get_brokerage_info', 'User/get_brokerage_info');
298
             Route::get('get_brokerage_info', 'User/get_brokerage_info');
299
             Route::post('get_token_by_phone', 'User/get_token_by_phone');
299
             Route::post('get_token_by_phone', 'User/get_token_by_phone');
300
 
300
 
301
-            Route::get('hongbao_info','User/hongbao_list');//红包
301
+            Route::get('hongbao_info','User/hongbao_info');//红包
302
             Route::get('hongbao_list','User/hongbao_list');//红包记录
302
             Route::get('hongbao_list','User/hongbao_list');//红包记录
303
             Route::get('gongxian_info','User/gongxian_info');//贡献
303
             Route::get('gongxian_info','User/gongxian_info');//贡献
304
             Route::get('gongxian_list','User/gongxian_list');//贡献记录
304
             Route::get('gongxian_list','User/gongxian_list');//贡献记录
305
-            Route::get('fugou_info','User/fugou_list');//复购金
305
+            Route::get('fugou_info','User/fugou_info');//复购金
306
             Route::get('fugou_list','User/fugou_list');//复购金记录
306
             Route::get('fugou_list','User/fugou_list');//复购金记录
307
-            Route::get('jingdou_info','User/jingdou_list');//京豆
307
+            Route::get('jingdou_info','User/jingdou_info');//京豆
308
             Route::get('jingdou_list','User/jingdou_list');//京豆记录
308
             Route::get('jingdou_list','User/jingdou_list');//京豆记录
309
-            Route::get('vr_info','User/jingdou_list');//购物金
309
+            Route::get('vr_info','User/jingdou_info');//购物金
310
             Route::get('vr_list','User/jingdou_list');//购物金记录
310
             Route::get('vr_list','User/jingdou_list');//购物金记录
311
 
311
 
312
         })->prefix('api.user.');
312
         })->prefix('api.user.');