砍价添加一个单只能砍一次判断
parent
d77c7394bc
commit
0ba1c7b985
|
|
@ -78,6 +78,10 @@ class BargainService
|
|||
throw new BizException('当前砍价已结束,无法再砍');
|
||||
}
|
||||
|
||||
//如果已经砍过了,不能再砍了
|
||||
if ($order->logs()->where('user_id', $user->id)->exists()) {
|
||||
throw new BizException('您已砍价');
|
||||
}
|
||||
|
||||
//执行砍价动作;
|
||||
//计算第几次砍价,并获得当前砍价金额
|
||||
|
|
@ -99,8 +103,4 @@ class BargainService
|
|||
|
||||
return $order;
|
||||
}
|
||||
|
||||
public function createMallOrder(BargainOrder $order)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue