|
@@ -24,7 +24,7 @@ class DemandDeal extends Command
|
|
protected function execute(Input $input, Output $output)
|
|
protected function execute(Input $input, Output $output)
|
|
{
|
|
{
|
|
$output->writeln("bidding:deal:");
|
|
$output->writeln("bidding:deal:");
|
|
-// $this->confirmReceiptTimeoutDeal($input, $output);
|
|
|
|
|
|
+ $this->confirmReceiptTimeoutDeal($input, $output);
|
|
$this->demandProfitUnfreezeDeal($input, $output);
|
|
$this->demandProfitUnfreezeDeal($input, $output);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -50,12 +50,12 @@ class DemandDeal extends Command
|
|
$item->status = DemandService::STATUS_FINISHED;
|
|
$item->status = DemandService::STATUS_FINISHED;
|
|
$item->settle_status = DemandService::$Common::ONGOING;
|
|
$item->settle_status = DemandService::$Common::ONGOING;
|
|
$saveRes = $item->save();
|
|
$saveRes = $item->save();
|
|
- if(!$saveRes) {
|
|
|
|
|
|
+ if (!$saveRes) {
|
|
exception('更新结算状态失败');
|
|
exception('更新结算状态失败');
|
|
}
|
|
}
|
|
//订单状态改为已完成
|
|
//订单状态改为已完成
|
|
$upRes = OrderService::where(['parent_order_no' => $item->parent_order_no])->update(['order_status' => OrderService::ORDER_STATUS_FINISHED]);
|
|
$upRes = OrderService::where(['parent_order_no' => $item->parent_order_no])->update(['order_status' => OrderService::ORDER_STATUS_FINISHED]);
|
|
- if(!$upRes) {
|
|
|
|
|
|
+ if (!$upRes) {
|
|
exception('更新订单状态失败');
|
|
exception('更新订单状态失败');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -82,9 +82,6 @@ class DemandDeal extends Command
|
|
DemandService::where($where)->with(['orders', 'winBidding'])->chunk(100, function ($demandList) {
|
|
DemandService::where($where)->with(['orders', 'winBidding'])->chunk(100, function ($demandList) {
|
|
foreach ($demandList as $item) {
|
|
foreach ($demandList as $item) {
|
|
try {
|
|
try {
|
|
- if ($item->id != 27) {
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
Db::transaction(function () use ($item) {
|
|
Db::transaction(function () use ($item) {
|
|
//根据订单列表查找冻结金额日志,根据冻结日志解冻冻结金额到余额
|
|
//根据订单列表查找冻结金额日志,根据冻结日志解冻冻结金额到余额
|
|
$userId = $item->winBidding->user_id;
|
|
$userId = $item->winBidding->user_id;
|