Explorar el Código

修改会员专区养老金和详情养老金和VR展示相关

橙汁先生 hace 1 año
padre
commit
5a0c495f2f

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

@@ -2085,6 +2085,10 @@ class StoreOrderRepository extends BaseRepository
2085
                 $num_yl = 9000;
2085
                 $num_yl = 9000;
2086
             }else if($orderpri == '11800'){
2086
             }else if($orderpri == '11800'){
2087
                 $num_yl = 10000;
2087
                 $num_yl = 10000;
2088
+            }else if($orderpri == '2360'){
2089
+                $num_yl = 2000;
2090
+            }else if($orderpri == '9440'){
2091
+                $num_yl = 8000;
2088
             }
2092
             }
2089
 
2093
 
2090
             if($store_product_datas['mer_id'] == 496){
2094
             if($store_product_datas['mer_id'] == 496){

+ 4 - 0
app/common/repositories/store/product/ProductRepository.php

@@ -1001,6 +1001,10 @@ class ProductRepository extends BaseRepository
1001
                 $s = 9000;
1001
                 $s = 9000;
1002
             }else if($res['price']==11800){
1002
             }else if($res['price']==11800){
1003
                 $s = 10000;
1003
                 $s = 10000;
1004
+            }else if($res['price'] == '2360'){
1005
+                $s= 2000;
1006
+            }else if($res['price'] == '9440'){
1007
+                $s = 8000;
1004
             }
1008
             }
1005
             
1009
             
1006
             $res['yanglao'] = round($s * 0.035,2);
1010
             $res['yanglao'] = round($s * 0.035,2);

+ 25 - 21
app/common/repositories/system/merchant/MerchantRepository.php

@@ -103,8 +103,8 @@ class MerchantRepository extends BaseRepository
103
         }
103
         }
104
         unset($item);
104
         unset($item);
105
         $merdata= [
105
         $merdata= [
106
-             ['className'=> 'el-icon-s-order', 'count'=>$count, 'field'=> '个', 'name'=> '商户总数']
107
-          ];
106
+            ['className'=> 'el-icon-s-order', 'count'=>$count, 'field'=> '个', 'name'=> '商户总数']
107
+        ];
108
         return compact('count', 'list','merdata');
108
         return compact('count', 'list','merdata');
109
     }
109
     }
110
 
110
 
@@ -318,14 +318,14 @@ class MerchantRepository extends BaseRepository
318
         }
318
         }
319
         $count = $query->count($this->dao->getPk());
319
         $count = $query->count($this->dao->getPk());
320
         $list = $query->page($page, $limit)->setOption('field', [])
320
         $list = $query->page($page, $limit)->setOption('field', [])
321
-                ->field('lat,lng,addr,mer_id,mer_banner,mer_name, mark,mer_avatar,product_score,service_score,postage_score,sales,status,create_time,category_id')
322
-                ->select()
323
-                ->each(function ($item) {
324
-                    $data = $item->showProduct->toArray();
325
-                    unset($item->showProduct);
326
-                    $recommend = array_slice($data, 0, 3);
327
-                    return $item['recommend'] = $recommend;
328
-                });
321
+            ->field('lat,lng,addr,mer_id,mer_banner,mer_name, mark,mer_avatar,product_score,service_score,postage_score,sales,status,create_time,category_id')
322
+            ->select()
323
+            ->each(function ($item) {
324
+                $data = $item->showProduct->toArray();
325
+                unset($item->showProduct);
326
+                $recommend = array_slice($data, 0, 3);
327
+                return $item['recommend'] = $recommend;
328
+            });
329
 
329
 
330
 
330
 
331
         return compact('count', 'list');
331
         return compact('count', 'list');
@@ -371,7 +371,7 @@ class MerchantRepository extends BaseRepository
371
             $merchant['like']=$like;
371
             $merchant['like']=$like;
372
             $merchant['topping']=$topping;
372
             $merchant['topping']=$topping;
373
         }
373
         }
374
-        
374
+
375
 //        Db::name("merchant")->where("mer_id",$cartInfo['mer_id'])->inc('renqizhi', 1)
375
 //        Db::name("merchant")->where("mer_id",$cartInfo['mer_id'])->inc('renqizhi', 1)
376
         $this->dao->addrenqi($id);
376
         $this->dao->addrenqi($id);
377
         if($merchant['content_pic']){
377
         if($merchant['content_pic']){
@@ -421,14 +421,14 @@ class MerchantRepository extends BaseRepository
421
         log::info($userInfo);
421
         log::info($userInfo);
422
         log::info($type439);
422
         log::info($type439);
423
         $list=app()->make(ProductRepository::class)->getApiSearch($merId, $where, $page, $limit, $userInfo,$type439);
423
         $list=app()->make(ProductRepository::class)->getApiSearch($merId, $where, $page, $limit, $userInfo,$type439);
424
-     
424
+
425
         $arr=[];
425
         $arr=[];
426
         foreach ($list["list"] as $v){
426
         foreach ($list["list"] as $v){
427
             $k= app()->make(ProductRepository::class)->pvParm($v['product_id']);
427
             $k= app()->make(ProductRepository::class)->pvParm($v['product_id']);
428
 //            $v['special_merchant']= merchantConfig($v['mer_id'], 'special_merchant');
428
 //            $v['special_merchant']= merchantConfig($v['mer_id'], 'special_merchant');
429
-           
429
+
430
             log::info("==========yang= {$k['yanglao']} ");
430
             log::info("==========yang= {$k['yanglao']} ");
431
-          
431
+
432
             $v['yanglao']='';
432
             $v['yanglao']='';
433
             $v['pv']='';
433
             $v['pv']='';
434
             $v['jifen']='';
434
             $v['jifen']='';
@@ -436,17 +436,21 @@ class MerchantRepository extends BaseRepository
436
             $v['jfduihuan']='';
436
             $v['jfduihuan']='';
437
             $v['jdduihuan']='';
437
             $v['jdduihuan']='';
438
             //会员专区中VR或者现金和VR+现金形式
438
             //会员专区中VR或者现金和VR+现金形式
439
-          //支付组合
439
+            //支付组合
440
             $v['fzone_paytype'] = '';
440
             $v['fzone_paytype'] = '';
441
             //$v['vr'] = 0;
441
             //$v['vr'] = 0;
442
             $num_yl = 0;
442
             $num_yl = 0;
443
-            
443
+
444
             if($v['price'] == '1180'){
444
             if($v['price'] == '1180'){
445
                 $num_yl = 1000;
445
                 $num_yl = 1000;
446
             }else if($v['price'] == '10620'){
446
             }else if($v['price'] == '10620'){
447
                 $num_yl = 9000;
447
                 $num_yl = 9000;
448
             }else if($v['price'] == '11800'){
448
             }else if($v['price'] == '11800'){
449
                 $num_yl = 10000;
449
                 $num_yl = 10000;
450
+            }else if($v['price'] == '2360'){
451
+                $num_yl = 2000;
452
+            }else if($v['price'] == '9440'){
453
+                $num_yl = 8000;
450
             }
454
             }
451
 
455
 
452
             if($merId == 496){
456
             if($merId == 496){
@@ -455,14 +459,14 @@ class MerchantRepository extends BaseRepository
455
                 $v['pv']=$num_yl;
459
                 $v['pv']=$num_yl;
456
                 //$v['vr']=$v['price'];
460
                 //$v['vr']=$v['price'];
457
                 //1:为会员专区,
461
                 //1:为会员专区,
458
-               
462
+
459
                 $v['fzone_paytype']= [
463
                 $v['fzone_paytype']= [
460
                     1=>[
464
                     1=>[
461
                         1=>$v['price'],//VR
465
                         1=>$v['price'],//VR
462
                         2=>$v['price']//现金
466
                         2=>$v['price']//现金
463
                     ]
467
                     ]
464
-                ];   
465
-             
468
+                ];
469
+
466
             }else if($merId == 439){
470
             }else if($merId == 439){
467
                 //精彩生活和商贸区
471
                 //精彩生活和商贸区
468
                 $jf = $v['price'] - round($v['concession_pri']*0.3, 2) . ' + ' . round($v['concession_pri']*0.3, 2);
472
                 $jf = $v['price'] - round($v['concession_pri']*0.3, 2) . ' + ' . round($v['concession_pri']*0.3, 2);
@@ -476,7 +480,7 @@ class MerchantRepository extends BaseRepository
476
                     $v['gongxian'] = round($v['concession_pri'] * 0.35, 2);
480
                     $v['gongxian'] = round($v['concession_pri'] * 0.35, 2);
477
                 }
481
                 }
478
             }
482
             }
479
-            
483
+
480
 //            $v=($v,$k);
484
 //            $v=($v,$k);
481
 //            array_push($v,$k);
485
 //            array_push($v,$k);
482
             $arr[]=$v;
486
             $arr[]=$v;
@@ -523,7 +527,7 @@ class MerchantRepository extends BaseRepository
523
         $query->with(['merchant'])->with(['issetCoupon']);
527
         $query->with(['merchant'])->with(['issetCoupon']);
524
         $count = $query->count();
528
         $count = $query->count();
525
 //        echo DB::getlastsql();die;
529
 //        echo DB::getlastsql();die;
526
-         $filed = 'product_id,mer_id,brand_id,unit_name,rate,reply_count,store_info,cate_id,ficti,image,slider_image,store_name,keyword,sort,is_show,sales,price,refusal,cost,ot_price,stock,is_gift_bag,care_count,status,is_used,create_time,seckill,plate_mer_profit,type';
530
+        $filed = 'product_id,mer_id,brand_id,unit_name,rate,reply_count,store_info,cate_id,ficti,image,slider_image,store_name,keyword,sort,is_show,sales,price,refusal,cost,ot_price,stock,is_gift_bag,care_count,status,is_used,create_time,seckill,plate_mer_profit,type';
527
         $list = $query->page($page, $limit)->setOption('field', [])->field($filed)->select();
531
         $list = $query->page($page, $limit)->setOption('field', [])->field($filed)->select();
528
         $ProductRepository=app()->make(ProductRepository::class);
532
         $ProductRepository=app()->make(ProductRepository::class);
529
 
533
 

+ 46 - 14
app/controller/api/store/merchant/Taskordervr.php

@@ -70,6 +70,14 @@ class Taskordervr extends BaseController
70
         }
70
         }
71
 
71
 
72
 
72
 
73
+
74
+        if($user_data['uid'] == $udatas['uid']){
75
+            return json(['code'=>400,'msg'=>'禁止付款账号和收款账号为同一人!','data'=>'']);
76
+        }
77
+
78
+
79
+
80
+
73
         $yue_vr =  $udatas['vr'] - $vr;
81
         $yue_vr =  $udatas['vr'] - $vr;
74
 
82
 
75
         if($yue_vr < 0){
83
         if($yue_vr < 0){
@@ -79,22 +87,46 @@ class Taskordervr extends BaseController
79
         //return json(['code'=>400,'msg'=>$user_data['vr'] + $vr]);
87
         //return json(['code'=>400,'msg'=>$user_data['vr'] + $vr]);
80
         //支付s账号
88
         //支付s账号
81
         $user_res = Db::name("user")->where("uid",$uid)->update(['vr'=>$yue_vr]);
89
         $user_res = Db::name("user")->where("uid",$uid)->update(['vr'=>$yue_vr]);
82
-        //收款账号
83
-        $jieshouuser_res = Db::name("user")->where("account",$phone)->update(['vr'=>$user_data['vr'] + $vr]);
84
-
85
-        if( $user_res){
86
-            return json(['code'=>200,'msg'=>'操作成功!','data'=>$user_res]);
90
+        if($user_res){
91
+            //支出账号存到log日志
92
+            $log_data = [
93
+                'uid'=>$uid,
94
+                'number'=>$vr,
95
+                'mark'=>"消耗VR:" . $vr,
96
+                'desc'=>"VR",
97
+                'order_id'=>0,
98
+                'surplus'=>$yue_vr,
99
+                'order_type'=>0,
100
+                'type'=>2,
101
+                'addtime'=>time()
102
+            ];
103
+            $user_res_log = Db::name("user_sign_vr")->insert( $log_data);
104
+
105
+            //收款账号
106
+            $jieshouuser_res = Db::name("user")->where("account",$phone)->update(['vr'=>$user_data['vr'] + $vr]);
107
+
108
+            if( $jieshouuser_res){
109
+
110
+                //收款账号存到log日志
111
+                $log_data1 = [
112
+                    'uid'=>$user_data['uid'],
113
+                    'number'=>$vr,
114
+                    'mark'=>"到账VR:" . $vr,
115
+                    'desc'=>"VR",
116
+                    'order_id'=>0,
117
+                    'surplus'=>$user_data['vr'] + $vr,
118
+                    'order_type'=>0,
119
+                    'type'=>1,
120
+                    'addtime'=>time()
121
+                ];
122
+                Db::name("user_sign_vr")->insert( $log_data1);
123
+
124
+                return json(['code'=>200,'msg'=>'操作成功!','data'=>$user_res]);
125
+            }
126
+        }else{
127
+            return json(['code'=>400,'msg'=>'转账失败,请稍后再试!']);
87
         }
128
         }
88
 
129
 
89
 
130
 
90
-
91
-        // 正常处理请求
92
-        $data = input("post.");
93
-        //   $data = [
94
-        //       'name' => '张三',
95
-        //       'age' => 25
96
-        //   ];
97
-
98
-        return json($data);
99
     }
131
     }
100
 }
132
 }