xialei 1 год назад
Родитель
Сommit
b78ddec689

+ 48 - 5
app/common/repositories/store/product/ProductRepository.php

@@ -986,9 +986,10 @@ class ProductRepository extends BaseRepository
986 986
 
987 987
         $res['yanglao']=($k['yanglao']);
988 988
         if($res['mer_id'] != 496){
989
-
990
-            $res['jfduihuan']=($k['jfduihuan']);
991
-            $res['jdduihuan']=($k['jdduihuan']);
989
+            if($res['mer_id'] != 491){
990
+                $res['jfduihuan']=($k['jfduihuan']);
991
+                $res['jdduihuan']=($k['jdduihuan']);
992
+            }
992 993
         }
993 994
 
994 995
         if($res['mer_id'] == 496){
@@ -1740,9 +1741,51 @@ class ProductRepository extends BaseRepository
1740 1741
                     ];
1741 1742
 
1742 1743
                 }
1743
-            }else if($product['mer_id'] == 476){
1744
-                //复购区
1744
+            }else if($product['mer_id'] == 491){
1745
+                //精彩生活和商贸区
1746
+                $jf = $product['price'] - round($product['concession_pri']*0.3, 2) . ' + ' . round($product['concession_pri']*0.3, 2);
1747
+                $jd = $product['price'] - round($product['concession_pri']*0.35, 2) . ' + ' . round($product['concession_pri']*0.35, 2);
1748
+                if($product['concession_pri'] !=null || $product['concession_pri'] !=0){
1749
+                    $yanglao = round($product['concession_pri'] * 0.3, 2);
1750
+                    $pv = round($product['concession_pri'] * 0.35, 2);
1751
+                    $srtArry['jfduihuan'] =$jf;
1752
+                    $srtArry['jdduihuan'] = $jd;
1753
+                    $jifen = round($product['concession_pri'] * 0.35, 2);
1754
+                    $gongxian = round($product['concession_pri'] * 0.35, 2);
1745 1755
 
1756
+                    $jcvr = $product['price'] - round($product['concession_pri']*0.3, 2);
1757
+                    $jcjf = round($product['concession_pri']*0.3, 2);
1758
+                    $jcprice = $product['price'] - round($product['concession_pri']*0.3, 2);
1759
+                    $jcjf1 = round($product['concession_pri']*0.3, 2);
1760
+                    $jcvr1 = $product['price'] - round($product['concession_pri']*0.35, 2);
1761
+                    $jcjd = round($product['concession_pri']*0.35, 2);
1762
+                    $jcprice1 = $product['price'] - round($product['concession_pri']*0.35, 2);
1763
+                    $jcjd1 = round($product['concession_pri']*0.35, 2);
1764
+
1765
+
1766
+                    //支付组合
1767
+                    // $fzone_paytype= [
1768
+
1769
+                    //     2=>[
1770
+                    //         1=>[$jcvr,$jcjf],//VR+积分
1771
+                    //         2=>[$jcprice,$jcjf1],//现金+积分
1772
+                    //         3=>[$jcvr1,$jcjd],//VR+京豆
1773
+                    //         4=>[$jcprice1,$jcjd1],//现金+金豆
1774
+                    //         5=>$product['price'],//VR
1775
+                    //         6=>$product['price'],//现金
1776
+                    //     ]
1777
+                    // ]; 
1778
+
1779
+                    $fzone_paytype= [
1780
+                        ['type'=>'b1','price'=>$jcvr,'other'=>$jcjf],
1781
+                        ['type'=>'b2','price'=>$jcprice,'other'=>$jcjf1],
1782
+                        ['type'=>'b3','price'=>$jcvr1,'other'=>$jcjd],
1783
+                        ['type'=>'b4','price'=>$jcprice1,'other'=>$jcjd1],
1784
+                        ['type'=>'b5','price'=>$product['price'],'other'=>0],
1785
+                        ['type'=>'b6','price'=>$product['price'],'other'=>0],
1786
+                    ];
1787
+
1788
+                }
1746 1789
             }
1747 1790
 
1748 1791
 

+ 13 - 0
app/common/repositories/system/merchant/MerchantRepository.php

@@ -479,6 +479,18 @@ class MerchantRepository extends BaseRepository
479 479
                     $v['jifen'] = round($v['concession_pri'] * 0.35, 2);
480 480
                     $v['gongxian'] = round($v['concession_pri'] * 0.35, 2);
481 481
                 }
482
+            }else if($merId == 491){
483
+                //复购
484
+                $jf = $v['price'] - round($v['concession_pri']*0.3, 2) . ' + ' . round($v['concession_pri']*0.3, 2);
485
+                $jd = $v['price'] - round($v['concession_pri']*0.35, 2) . ' + ' . round($v['concession_pri']*0.35, 2);
486
+                if($v['concession_pri'] !=null || $v['concession_pri'] !=0){
487
+                    $v['yanglao'] = round($v['concession_pri'] * 0.3, 2);
488
+                    $v['pv'] = round($v['concession_pri'] * 0.35, 2);
489
+                    $v['jfduihuan'] =$jf;
490
+                    $v['jdduihuan'] = $jd;
491
+                    $v['jifen'] = round($v['concession_pri'] * 0.35, 2);
492
+                    $v['gongxian'] = round($v['concession_pri'] * 0.35, 2);
493
+                }
482 494
             }
483 495
 
484 496
 //            $v=($v,$k);
@@ -487,6 +499,7 @@ class MerchantRepository extends BaseRepository
487 499
 
488 500
 
489 501
         }
502
+        $list["merId"]=$merId;
490 503
         $list["list"]=$arr;
491 504
         return $list;
492 505
     }