|
@@ -405,14 +405,19 @@ class AuctionOrder extends BaseModel
|
|
if (time() > $time) {
|
|
if (time() > $time) {
|
|
// 如果当前时间已经过了
|
|
// 如果当前时间已经过了
|
|
$product = AuctionProduct::where('id', $item['product_id'])->find();
|
|
$product = AuctionProduct::where('id', $item['product_id'])->find();
|
|
- $product['uid'] = $item['uid'];// 商品拥有人更新
|
|
|
|
- $product['add_time'] = 111111;
|
|
|
|
- $product['order'] = $item['order_id'];
|
|
|
|
-
|
|
|
|
- self::where('id', $item['id'])->update(['status' => 3]);
|
|
|
|
- self::earn($item['uid'], $item['price'], $product);
|
|
|
|
- self::return($item['id']);
|
|
|
|
- $product->save();
|
|
|
|
|
|
+ if ($product['uid'] == $item['uid']) {
|
|
|
|
+ self::where('id', $item['id'])->update(['status' => 3]);
|
|
|
|
+ }else{
|
|
|
|
+ $product['uid'] = $item['uid'];// 商品拥有人更新
|
|
|
|
+ $product['add_time'] = 111111;
|
|
|
|
+ $product['order'] = $item['order_id'];
|
|
|
|
+
|
|
|
|
+ self::where('id', $item['id'])->update(['status' => 3]);
|
|
|
|
+ self::earn($item['uid'], $item['price'], $product);
|
|
|
|
+ self::return($item['id']);
|
|
|
|
+ $product->save();
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|