|
|
@@ -100,7 +100,7 @@ class Auction extends BaseModel
|
|
|
$recovery = (int)SystemConfigService::get('recovery');
|
|
|
if ($auction){
|
|
|
foreach ($auction as $k => $v) {
|
|
|
- if (strtotime($v['rend_time'])-600 < time()){
|
|
|
+ if (strtotime($v['rend_time'])-600 < time() and strtotime($v['rend_time']) > time()){
|
|
|
//关闭场次五分钟前
|
|
|
// $orderCount = AuctionOrder::where('auction_id', '=', $v['id'])->where('frequency', '=', $v['frequency'])->where('status', '>',0)->where('price', '<', $recovery)->count();// 当前订单数量
|
|
|
// $bok = AuctionBooking::where([['auction_id', '=', $v['id']], ['frequency', '=', $v['frequency']]])->count();
|
|
|
@@ -108,7 +108,7 @@ class Auction extends BaseModel
|
|
|
$orderId = AuctionOrder::where([['auction_id', '=', $v['id']], ['frequency', '=', $v['frequency']], ['status', '>', 0]])->column('product_id');
|
|
|
// 如果购买人数没有到放单人数
|
|
|
$dayo = AuctionOrder::where('auction_id', '=', $v['id'])->where('frequency', '=', $v['frequency'])->where('status', '>',0)->where('price', '<', $recovery)->column('product_id');// 当前出售商品
|
|
|
- $product = AuctionProduct::where([['id', 'notIn', $dayo], ['uid', '>', 1], ['price', '<', $recovery], ['auction_id', '=', $v['id']]])->select();
|
|
|
+ $product = AuctionProduct::where([['id', 'notIn', $dayo], ['uid', '>', 1], ['is_show', '=', 1],['hanging_price', '<', $recovery], ['auction_id', '=', $v['id']]])->select();
|
|
|
if ($product){
|
|
|
// 存在挂售没卖出的订单
|
|
|
foreach ($product as &$item){
|