分销推广支付默认2倍

This commit is contained in:
xucong 2024-12-20 15:14:05 +08:00
parent 80bd747584
commit 6586ce26af
2 changed files with 43 additions and 43 deletions

@ -303,7 +303,7 @@ MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlu5coHWBbtrz8DyX0VbPWiJZlAsofwZ99pZq
$order['order_sn'] = $gtpay_msg['orderNo']; $order['order_sn'] = $gtpay_msg['orderNo'];
$order['type'] = 4; $order['type'] = 4;
$type = "local_pay"; $type = "local_pay";
$billions_result = $billions->billions($order,$user['id'],$type); $billions_result = $billions->billions($order,$user['id'],$type,$post['lid']);
return JsonServer::success('分账成功'); return JsonServer::success('分账成功');
} }
} }

@ -383,7 +383,7 @@ class GoodsLogic extends Logic
// $old_spec_type = Goods::where('id', $post['goods_id'])->value('spec_type'); // $old_spec_type = Goods::where('id', $post['goods_id'])->value('spec_type');
$goods_msg = Goods::where('id', $post['goods_id'])->find(); $goods_msg = Goods::where('id', $post['goods_id'])->find();
$old_spec_type = $goods_msg['spec_type']; $old_spec_type = $goods_msg['spec_type'];
if($goods_msg['wholesale_percent'] > 0){ if(isset($goods_msg['wholesale_percent'])&&$goods_msg['wholesale_percent'] > 0&&$wholesale_price!=""){
$wholesale_price = round((100+$goods_msg['wholesale_percent'])*$wholesale_price/100,2); $wholesale_price = round((100+$goods_msg['wholesale_percent'])*$wholesale_price/100,2);
} }
if($goods_msg['purchase_percent'] > 0){ if($goods_msg['purchase_percent'] > 0){
@ -391,7 +391,7 @@ class GoodsLogic extends Logic
$purchase_price = round((100+$goods_msg['purchase_percent'])*$purchase_price/100,2); $purchase_price = round((100+$goods_msg['purchase_percent'])*$purchase_price/100,2);
} }
} }
if($goods_msg['issuing_percent'] > 0){ if($goods_msg['issuing_percent'] > 0&&$issuing_price>0&&$issuing_price!=""){
$issuing_price = round((100+$goods_msg['issuing_percent'])*$issuing_price/100,2); $issuing_price = round((100+$goods_msg['issuing_percent'])*$issuing_price/100,2);
} }
// 格式化数据 // 格式化数据
@ -740,13 +740,13 @@ class GoodsLogic extends Logic
$wholesale_pce = $v['wholesale_pce']; $wholesale_pce = $v['wholesale_pce'];
$purchase_price = $v['purchase_price']; $purchase_price = $v['purchase_price'];
$issuing_price = $v['issuing_price']; $issuing_price = $v['issuing_price'];
if($goods_msg['wholesale_percent'] > 0){ if($goods_msg['wholesale_percent'] > 0&&$wholesale_pce>0&&$wholesale_pce!=""){
$wholesale_pce = round((100+$goods_msg['wholesale_percent'])*$wholesale_pce/100,2); $wholesale_pce = round((100+$goods_msg['wholesale_percent'])*$wholesale_pce/100,2);
} }
if($goods_msg['purchase_percent'] > 0){ if($goods_msg['purchase_percent'] > 0&&$purchase_price>0&&$purchase_price!=""){
$purchase_price = round((100+$goods_msg['purchase_percent'])*$purchase_price/100,2); $purchase_price = round((100+$goods_msg['purchase_percent'])*$purchase_price/100,2);
} }
if($goods_msg['issuing_percent'] > 0){ if($goods_msg['issuing_percent'] > 0&&$issuing_price>0&&$issuing_price!=""){
$issuing_price = round((100+$goods_msg['issuing_percent'])*$issuing_price/100,2); $issuing_price = round((100+$goods_msg['issuing_percent'])*$issuing_price/100,2);
} }
$spec_lists[$k]['wh_price'] = $v['wholesale_pce']; $spec_lists[$k]['wh_price'] = $v['wholesale_pce'];
@ -1228,7 +1228,7 @@ class GoodsLogic extends Logic
} }
/** /**
* @notes 格式化商品数据 * @notes 格式化商品数据
* @param array $data * @param array $data
* @return array * @return array