Explorar el Código

复购区养老金计算

xialei hace 1 año
padre
commit
4d3debc423

+ 9 - 1
app/common/repositories/store/order/StoreOrderRepository.php

@@ -2263,8 +2263,16 @@ class StoreOrderRepository extends BaseRepository
2263
 
2263
 
2264
 
2264
 
2265
                 }
2265
                 }
2266
-            }else if($product['mer_id'] == 476){
2266
+            }else if($store_product_datas['mer_id'] == 491){
2267
                 //复购区
2267
                 //复购区
2268
+                $pv= round($orderpri * 0.3, 2);
2269
+                $yanglao = round($pv * 0.5, 2);//给预下订单中的商品展示 养老金 显示作用
2270
+                $cartInfo['list'][$_k]['pv'] =  $pv;
2271
+                $cartInfo['list'][$_k]['yanglao'] =  $yanglao;
2272
+
2273
+                $cartInfo['list'][$_k]['fzone_paytype']= [
2274
+                    ['type'=>'c1','price'=>$orderpri,'other'=>0,'note'=>"复购金"],
2275
+                ];
2268
 
2276
 
2269
             }
2277
             }
2270
 
2278
 

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

@@ -1743,15 +1743,16 @@ class ProductRepository extends BaseRepository
1743
                 }
1743
                 }
1744
             }else if($product['mer_id'] == 491){
1744
             }else if($product['mer_id'] == 491){
1745
                 $num_yl = $product['price'];
1745
                 $num_yl = $product['price'];
1746
-                $yanglao = round($num_yl * 0.035, 2);
1747
-                $pv=$num_yl *0.7;
1746
+                $pv= $num_yl * 0.3;
1747
+                $yanglao = round($pv * 0.5, 2);
1748
                 //$v['vr']=$v['price'];
1748
                 //$v['vr']=$v['price'];
1749
                 //1:为会员专区,
1749
                 //1:为会员专区,
1750
 
1750
 
1751
                 $fzone_paytype= [
1751
                 $fzone_paytype= [
1752
                     1=>[
1752
                     1=>[
1753
                         1=>$product['price'],//VR
1753
                         1=>$product['price'],//VR
1754
-                        2=>$product['price']//现金
1754
+                        2=>$product['price'],//现金
1755
+                        3=>$product['price']//复购金
1755
                     ]
1756
                     ]
1756
                 ];
1757
                 ];
1757
             }
1758
             }

+ 7 - 3
app/common/repositories/system/merchant/MerchantRepository.php

@@ -481,12 +481,16 @@ class MerchantRepository extends BaseRepository
481
                 }
481
                 }
482
             }else if($merId == 491){
482
             }else if($merId == 491){
483
                 $num_yl = $v['price'];
483
                 $num_yl = $v['price'];
484
-                $v['yanglao'] = round($num_yl * 0.035, 2);
485
-                $v['pv']=$num_yl *0.7;
484
+                $pv= $num_yl * 0.3;
485
+                $yanglao = round($pv * 0.5, 2);
486
+                $v['pv'] = $pv;
487
+                $v['yanglao'] = $yanglao;
488
+
486
                 $v['fzone_paytype']= [
489
                 $v['fzone_paytype']= [
487
                     1=>[
490
                     1=>[
488
                         1=>$v['price'],//VR
491
                         1=>$v['price'],//VR
489
-                        2=>$v['price']//现金
492
+                        2=>$v['price'],//现金
493
+                        3=>$v['price']//复购金
490
                     ]
494
                     ]
491
                 ];
495
                 ];
492
             }
496
             }