水滴返款 -修复bug

This commit is contained in:
“wanyongkang”
2025-04-03 14:46:14 +08:00
parent 90f7352d9c
commit 2afea875ae
3 changed files with 16 additions and 6 deletions

View File

@@ -179,10 +179,13 @@ class Alipay {
if($agent_info['discount_id'] != 0){
$scheme_model = new ProductPriceScheme();
//获取代理折扣
$discount = $scheme_model->getOne(['discount_id' => $agent_info['discount_id']]);
//获取代理折扣
$discount = $scheme_model->getOne(['Id' => $agent_info['discount_id']]);
$price = $package_info['LinePrice'] * $discount['discount'] / 100;
if ($price < $package_info['MinPrice']) {
$price = $package_info['MinPrice'];
}
$score_money = $order_info['PaymentAmount'] - $order_info['ConnectCount'] * $order_info['AccountCount'] * $price;
}

View File

@@ -160,10 +160,13 @@ class Wxpay {
if($agent_info['discount_id'] != 0){
$scheme_model = new ProductPriceScheme();
//获取代理折扣
$discount = $scheme_model->getOne(['discount_id' => $agent_info['discount_id']]);
//获取代理折扣
$discount = $scheme_model->getOne(['Id' => $agent_info['discount_id']]);
$price = $package_info['LinePrice'] * $discount['discount'] / 100;
if ($price < $package_info['MinPrice']) {
$price = $package_info['MinPrice'];
}
$score_money = $order_info['PaymentAmount'] - $order_info['ConnectCount'] * $order_info['AccountCount'] * $price;
}

View File

@@ -259,13 +259,17 @@ class Jinyoujt extends Controller
if($agent_info['discount_id'] != 0){
$scheme_model = new ProductPriceScheme();
//获取代理折扣
$discount = $scheme_model->getOne(['discount_id' => $agent_info['discount_id']]);
//获取代理折扣
$discount = $scheme_model->getOne(['Id' => $agent_info['discount_id']]);
$price = $package_info['LinePrice'] * $discount['discount'] / 100;
if ($price < $package_info['MinPrice']) {
$price = $package_info['MinPrice'];
}
$score_money = $order_info['PaymentAmount'] - $order_info['ConnectCount'] * $order_info['AccountCount'] * $price;
}
$score_model = new AgentScoreModel();
$score_data = [