<?php
|
include_once "/Common/Logging.php";
|
include_once "/db/DBOper.php";
|
|
\Logging\CreateLogging("payorderupd.php");
|
|
$channel = "tqxbqy";
|
$find = array("Channel" => $channel);
|
\DBOper\Find("PayOrder", $find, $orderArray, array("OrderAmount" => 1, "OriginalAmount" => 1, "OrderID" => 1, "State" => 1));
|
|
$totalCount = count($orderArray);
|
\Logging\LogInfo("totalCount:" . $totalCount);
|
echo date("Y-m-d h:m:s") . "<br/>";
|
echo "totalCount:" . $totalCount . "<br/>";
|
$okCount = 0;
|
$amountTotal = 0;
|
$amountTotalFail = 0;
|
foreach ($orderArray as $info) {
|
$OrderID = $info["OrderID"];
|
$State = $info["State"];
|
$OrderAmount = floatval($info["OrderAmount"]);
|
$OriginalAmount = floatval($info["OriginalAmount"]);
|
if (\DBOper\Update(
|
"PayOrder",
|
array("OrderID" => $OrderID),
|
array("OrderAmount" => $OrderAmount, "OriginalAmount" => $OriginalAmount)
|
)) {
|
\Logging\LogInfo("OrderID:" . $OrderID);
|
$okCount += 1;
|
if ($State == 1) {
|
$amountTotal += $OrderAmount;
|
} else {
|
$amountTotalFail += $OrderAmount;
|
}
|
}
|
}
|
\Logging\LogInfo("okCount:" . $okCount);
|
\Logging\LogInfo("amountTotal:" . $amountTotal);
|
\Logging\LogInfo("amountTotalFail:" . $amountTotalFail);
|
echo "okCount:" . $okCount . "<br/>";
|
echo "amountTotal:" . $amountTotal . "<br/>";
|
echo "amountTotalFail:" . $amountTotalFail . "<br/>";
|