修改大礼包限购
This commit is contained in:
parent
a6775a5eb3
commit
859dbe5970
@ -22,6 +22,16 @@ class Enum
|
|||||||
/** 购物车下单支付**/
|
/** 购物车下单支付**/
|
||||||
const public = 10;//对公账户
|
const public = 10;//对公账户
|
||||||
|
|
||||||
|
/** 订单状态 **/
|
||||||
|
const STATUS_WAIT_DELIVERY = 0;//待发货
|
||||||
|
const STATUS_WAIT_RECEIPT = 1;//待发货
|
||||||
|
const STATUS_WAIT_COMMENT = 2;//待评价
|
||||||
|
const STATUS_FINISHED = 3;//已完成
|
||||||
|
const STATUS_GROUPING = 9;//拼团中
|
||||||
|
const STATUS_WAIT_PAY = 10;//待付尾款
|
||||||
|
const STATUS_TIME_OUT = 11;//尾款超时
|
||||||
|
const STATUS_REFUNDED = -1;//已退款
|
||||||
|
|
||||||
|
|
||||||
/** @const MAP */
|
/** @const MAP */
|
||||||
const MAP = [
|
const MAP = [
|
||||||
|
@ -125,8 +125,9 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
|||||||
->leftJoin('store_order_product t2', 't1.order_id = t2.order_id')
|
->leftJoin('store_order_product t2', 't1.order_id = t2.order_id')
|
||||||
->whereIn('product_id', $productIds)
|
->whereIn('product_id', $productIds)
|
||||||
->where('t1.uid', $uid)
|
->where('t1.uid', $uid)
|
||||||
->where('paid', 1)
|
->where('is_del', 0)
|
||||||
->where('is_refund', 0)
|
->where('is_system_del', 0)
|
||||||
|
->where('status', '<>', Enum::STATUS_REFUNDED)
|
||||||
->count();
|
->count();
|
||||||
if ($orderRecord > 0) {
|
if ($orderRecord > 0) {
|
||||||
throw new ValidateException('大礼包仅能购买一次');
|
throw new ValidateException('大礼包仅能购买一次');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user