serverrep/report.php
@@ -92,26 +92,14 @@
   $DNU = \DBOper\Count("AccountFirstLogin", array("Channel" => $Channel, "CreateYMD" => $YMD));
   \Logging\LogInfo(" 日新增用户数 DNU:" . $DNU);
   $DNPU = \DBOper\Count("AccountFirstPay", array("Channel" => $Channel, "PayYMD" => $YMD));
   \Logging\LogInfo(" 日新增充值用户数 DNPU:" . $DNPU);
   $ret = \DBOper\Aggregate("AccountFirstPay", array(
      array(
         '$match' => array("Channel" => $Channel, "PayYMD" => $YMD),
      ),
      array(
         '$group' => array(
            '_id' => null,
            'total' => array('$sum' => '$OrderAmount'),
         ),
      )
   ), $retInfo);
   $DRNPU = 0;
   if ($ret && isset($retInfo) && count($retInfo) > 0) {
      $DRNPU = $retInfo[0]["total"];
   \DBOper\Find("AccountFirstPay", array("Channel" => $Channel, "PayYMD" => $YMD), $ret, array("AccountID" => 1));
   $firstPayAccountIDInfo = array();
   if (isset($ret)) {
      foreach ($ret as $firstPayInfo) {
         $AccountID = $firstPayInfo["AccountID"];
         $firstPayAccountIDInfo[$AccountID] = 1;
      }
   }
   $DRNPU = round($DRNPU, 2);
   \Logging\LogInfo(" 日新增充值用户充值总额 DRNPU:" . $DRNPU);
   $ret = \DBOper\Aggregate("PayOrder", array(
      array(
@@ -129,13 +117,22 @@
   ), $retInfo);
   $DPU = 0;
   $DRPU = 0;
   $DRNPU = 0;
   if ($ret && isset($retInfo)) {
      foreach ($retInfo as $info) {
         $DPU += 1;
         $AccountID = $info["_id"]["AccountID"];
         $DRPU += $info["total"];
         if ($firstPayAccountIDInfo[$AccountID]) {
            $DRNPU += $info["total"];
         }
      }
   }
   $DRPU = round($DRPU, 2);
   $DRNPU = round($DRNPU, 2);
   $DNPU = count($firstPayAccountIDInfo);
   \Logging\LogInfo(" 日新增充值用户数 DNPU:" . $DNPU);
   \Logging\LogInfo(" 日新增充值用户充值总额 DRNPU:" . $DRNPU);
   \Logging\LogInfo(" 日充值用户数 DPU:" . $DPU);
   \Logging\LogInfo(" 日充值用户数充值总额 DRPU:" . $DRPU);