|
@@ -233,6 +233,15 @@ class Order extends Base
|
|
throw new Exception($validate->getError());
|
|
throw new Exception($validate->getError());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //限制购买
|
|
|
|
+ $buy_count = Db::name('unishop_order')->alias('order')
|
|
|
|
+ ->join('unishop_order_product op','order.id = op.order_id','LEFT')
|
|
|
|
+ ->where('op.product_id',$data['product_id'])->where('order.book_mobile',$data['book_mobile'])->where('order.have_paid','gt',0)
|
|
|
|
+ ->find();
|
|
|
|
+ if ($buy_count) {
|
|
|
|
+ throw new Exception('该手机号已报名本活动');
|
|
|
|
+ }
|
|
|
|
+
|
|
Db::startTrans();
|
|
Db::startTrans();
|
|
|
|
|
|
// 判断创建订单的条件
|
|
// 判断创建订单的条件
|