diff --git a/src/Services/Tg/ReportUser.php b/src/Services/Tg/ReportUser.php index 3ffed2fd..2eb22c97 100755 --- a/src/Services/Tg/ReportUser.php +++ b/src/Services/Tg/ReportUser.php @@ -71,10 +71,10 @@ final class ReportUser $iRegFromRate = 0; $iPayRagRate = 0; - if ($iTotalRegCount && $iTotalFromCount) { + if (!empty($iTotalRegCount) && !empty($iTotalFromCount)) { $iRegFromRate = (int) (($iTotalRegCount / $iTotalFromCount) * 100); } - if ($iTotalPayCount && $iTotalRegCount) { + if (!empty($iTotalPayCount) && !empty($iTotalRegCount)) { $iPayRagRate = (int) (($iTotalPayCount / $iTotalRegCount) * 100); } @@ -84,7 +84,7 @@ final class ReportUser $sStr .= "*总支付:".$iTotalPayCount."\n"; $sStr .= "*总金额:".$iTotalMoneyCount."\n"; $sStr .= "*访问注册比".$iRegFromRate."%\n"; - $sStr .= "*注册付款比".$iRegFromRate."%\n"; + $sStr .= "*注册付款比".$iPayRagRate."%\n"; $iFromRate = 0; $iRegRate = 0;