no message
This commit is contained in:
parent
21006541b0
commit
ecbf4c8e9f
@ -842,17 +842,17 @@ final class Cron
|
|||||||
}
|
}
|
||||||
|
|
||||||
DB::beginTransaction();
|
DB::beginTransaction();
|
||||||
var_dump($invoice->id);
|
// var_dump($invoice->id);
|
||||||
var_dump($invoice->status);
|
// var_dump($invoice->status);
|
||||||
// 付款完成后
|
// 付款完成后
|
||||||
if (in_array($invoice->status, ['paid_gateway', 'paid_balance', 'paid_admin'])) {
|
if (in_array($invoice->status, ['paid_gateway', 'paid_balance', 'paid_admin'])) {
|
||||||
var_dump(111);
|
// var_dump(111);
|
||||||
$oUser = User::find($invoice->user_id);
|
$oUser = User::find($invoice->user_id);
|
||||||
|
|
||||||
$iPayAmount = $invoice->price - $invoice->money_use;
|
$iPayAmount = $invoice->price - $invoice->money_use;
|
||||||
|
|
||||||
if ($oOrder->product_code == "code") { // 钱包充值
|
if ($oOrder->product_code == "code") { // 钱包充值
|
||||||
var_dump(222);
|
// var_dump(222);
|
||||||
$iUserMoneyOld = $oUser->money;
|
$iUserMoneyOld = $oUser->money;
|
||||||
$iUserMoneyNew = $oUser->money + $invoice->price;
|
$iUserMoneyNew = $oUser->money + $invoice->price;
|
||||||
$iAmount = $invoice->price;
|
$iAmount = $invoice->price;
|
||||||
@ -875,8 +875,6 @@ final class Cron
|
|||||||
self::_helper_log("订单".$oOrder->id."钱包充值到账");
|
self::_helper_log("订单".$oOrder->id."钱包充值到账");
|
||||||
} else if ($oUser->class < $iPayClass) { // 当前无套餐,直接进激活队列
|
} else if ($oUser->class < $iPayClass) { // 当前无套餐,直接进激活队列
|
||||||
|
|
||||||
echo $oUser->class;
|
|
||||||
echo ":::";
|
|
||||||
$oUser->total_pay += $iPayAmount;
|
$oUser->total_pay += $iPayAmount;
|
||||||
$oUser->save();
|
$oUser->save();
|
||||||
|
|
||||||
@ -884,7 +882,7 @@ final class Cron
|
|||||||
$oOrder->_save();
|
$oOrder->_save();
|
||||||
|
|
||||||
$oPlanQueue = new PlanQueue();
|
$oPlanQueue = new PlanQueue();
|
||||||
echo $oPlanQueue->_add($oOrder, "new");
|
$oPlanQueue->_add($oOrder, "new");
|
||||||
|
|
||||||
self::_helper_log("订单".$oOrder->id."进入到激活队列");
|
self::_helper_log("订单".$oOrder->id."进入到激活队列");
|
||||||
} else { // 当前有套餐,进入pending表
|
} else { // 当前有套餐,进入pending表
|
||||||
@ -898,6 +896,8 @@ final class Cron
|
|||||||
self::_helper_log("订单".$oOrder->id."转为待激活状态");
|
self::_helper_log("订单".$oOrder->id."转为待激活状态");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$aUserInQueue[] = $oOrder->user_id;
|
||||||
|
|
||||||
} else if ($oOrder->create_time + 86400 < time()) {
|
} else if ($oOrder->create_time + 86400 < time()) {
|
||||||
|
|
||||||
$invoice->status = 'cancelled';
|
$invoice->status = 'cancelled';
|
||||||
@ -925,8 +925,6 @@ final class Cron
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$aUserInQueue[] = $oOrder->user_id;
|
|
||||||
|
|
||||||
DB::commit();
|
DB::commit();
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user