|
@@ -115,14 +115,14 @@ class AuctionProductController
|
|
|
if ($order){
|
|
|
return app('json')->fail('商品已卖出');
|
|
|
}
|
|
|
+ $redis = new \Redis();
|
|
|
+ $redis->connect('127.0.0.1','6379');
|
|
|
+ if (!$redis->lPop($data['product_id'])){
|
|
|
+ return app('json')->fail('商品已卖出');
|
|
|
+ }
|
|
|
$order_id = getNewOrderId();
|
|
|
if ($count >= 1){
|
|
|
if ($user['anticipate'] < 200) return app('json')->fail('艺金券不足');
|
|
|
- $redis = new \Redis();
|
|
|
- $redis->connect('127.0.0.1','6379');
|
|
|
- if (!$redis->lPop($data['product_id'])){
|
|
|
- return app('json')->fail('商品已卖出');
|
|
|
- }
|
|
|
$user['anticipate'] -= 200;
|
|
|
User::where('uid', $user['uid'])->update(['anticipate' => $user['anticipate']]);
|
|
|
UserBill::expend('冻结艺金券',$user['uid'], 'anticipate', 'fz_anticipate', 200, $user['spread_uid'], $user['anticipate'], '购买订单'.$order_id.'冻结艺金券');
|