|
|
@@ -11,6 +11,7 @@ use app\common\model\store\order\StoreOrder;
|
|
11
|
11
|
use app\common\model\store\product\Product;
|
|
12
|
12
|
use app\common\model\store\product\ProductContent;
|
|
13
|
13
|
use app\common\model\user\User;
|
|
|
14
|
+use app\common\repositories\merchant\MerchantRepository;
|
|
14
|
15
|
use app\common\repositories\store\coupon\StoreCouponRepository;
|
|
15
|
16
|
use app\common\repositories\store\order\StoreOrderRepository;
|
|
16
|
17
|
use app\common\repositories\store\order\StoreRefundOrderRepository;
|
|
|
@@ -1755,6 +1756,44 @@ class ProductRepository extends BaseRepository
|
|
1755
|
1756
|
3=>$product['price']//复购金
|
|
1756
|
1757
|
]
|
|
1757
|
1758
|
];
|
|
|
1759
|
+ } else {
|
|
|
1760
|
+ // 商贸区
|
|
|
1761
|
+ /** @var MerchantRepository $merchant */
|
|
|
1762
|
+ $merchant = app()->make(MerchantRepository::class);
|
|
|
1763
|
+ $merchantInfo = $merchant->get($product['mer_id']);
|
|
|
1764
|
+ // 1企业2个体3个人
|
|
|
1765
|
+ if ($merchantInfo && in_array($merchantInfo['type'],[2,3])) {
|
|
|
1766
|
+ //商贸区
|
|
|
1767
|
+ $jf = $product['price'] - round($product['concession_pri']*0.3, 2) . ' + ' . round($product['concession_pri']*0.3, 2);
|
|
|
1768
|
+ $jd = $product['price'] - round($product['concession_pri']*0.35, 2) . ' + ' . round($product['concession_pri']*0.35, 2);
|
|
|
1769
|
+ if($product['concession_pri'] !=null || $product['concession_pri'] !=0){
|
|
|
1770
|
+ $yanglao = round($product['concession_pri'] * 0.3, 2);
|
|
|
1771
|
+ $pv = round($product['concession_pri'] * 0.35, 2);
|
|
|
1772
|
+ $srtArry['jfduihuan'] =$jf;
|
|
|
1773
|
+ $srtArry['jdduihuan'] = $jd;
|
|
|
1774
|
+ $jifen = round($product['concession_pri'] * 0.35, 2);
|
|
|
1775
|
+ $gongxian = round($product['concession_pri'] * 0.35, 2);
|
|
|
1776
|
+
|
|
|
1777
|
+ $jcvr = $product['price'] - round($product['concession_pri']*0.3, 2);
|
|
|
1778
|
+ $jcjf = round($product['concession_pri']*0.3, 2);
|
|
|
1779
|
+ $jcprice = $product['price'] - round($product['concession_pri']*0.3, 2);
|
|
|
1780
|
+ $jcjf1 = round($product['concession_pri']*0.3, 2);
|
|
|
1781
|
+ $jcvr1 = $product['price'] - round($product['concession_pri']*0.35, 2);
|
|
|
1782
|
+ $jcjd = round($product['concession_pri']*0.35, 2);
|
|
|
1783
|
+ $jcprice1 = $product['price'] - round($product['concession_pri']*0.35, 2);
|
|
|
1784
|
+ $jcjd1 = round($product['concession_pri']*0.35, 2);
|
|
|
1785
|
+
|
|
|
1786
|
+ $fzone_paytype= [
|
|
|
1787
|
+// ['type'=>'b1','price'=>$jcvr,'other'=>$jcjf],
|
|
|
1788
|
+ ['type'=>'b2','price'=>$jcprice,'other'=>$jcjf1],
|
|
|
1789
|
+// ['type'=>'b3','price'=>$jcvr1,'other'=>$jcjd],
|
|
|
1790
|
+ ['type'=>'b4','price'=>$jcprice1,'other'=>$jcjd1],
|
|
|
1791
|
+// ['type'=>'b5','price'=>$product['price'],'other'=>0],
|
|
|
1792
|
+ ['type'=>'b6','price'=>$product['price'],'other'=>0],
|
|
|
1793
|
+ ];
|
|
|
1794
|
+
|
|
|
1795
|
+ }
|
|
|
1796
|
+ }
|
|
1758
|
1797
|
}
|
|
1759
|
1798
|
|
|
1760
|
1799
|
|