|
@@ -285,7 +285,7 @@ class mratio_control
|
|
|
[$_succ, $_fail, $gross_ratio] = $this->gross_ratio($mchid, $period);
|
|
|
Log::record("{$header} gross_ratio = {$gross_ratio},lower_ratio={$ratio}",Log::DEBUG);
|
|
|
|
|
|
-// if($gross_ratio >= $ratio) return true;
|
|
|
+ if($gross_ratio >= $ratio) return true;
|
|
|
|
|
|
if (!PolicyUtil::mixed_quality($org_quality)) {
|
|
|
return false;
|
|
@@ -321,7 +321,10 @@ class mratio_control
|
|
|
$prices = $this->getPrice($mchid, $org_quality, $card_type, $spec);
|
|
|
$out_price = $prices[$org_quality];
|
|
|
$in_price = $prices[$quality] ?? false;
|
|
|
- if ($in_price === false) continue;
|
|
|
+ if ($in_price === false) {
|
|
|
+ Log::record("error price",Log::ERR);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
|
|
|
[$succ, $fail, $ratio] = $this->detail_ratio($mchid, $quality,$card_type, $spec, $period);
|
|
|
$profit += $succ * ($out_price - $in_price);
|