|
@@ -112,12 +112,25 @@ class Order
|
|
|
if ($activity && in_array($activity['type'], ['groupon', 'groupon_ladder'])) {
|
|
|
// 如果是拼团, ext 中存储拼团相关信息(这里拼团肯定是成功了,否则下单前已被拦截)
|
|
|
$order_ext['buy_type'] = request()->param('buy_type', 'groupon'); // 购买方式,alone: 单独购买, groupon: 拼团
|
|
|
- $order_ext['groupon_id'] = request()->param('groupon_id', 0); // 如果是拼团,团 id
|
|
|
+ $order_ext['groupon_id'] = request()->param('groupon_id', 0); // 如果是拼团,团 id,加入别人的团,这里区别于自己开新团
|
|
|
|
|
|
//订单表冗余groupon_id
|
|
|
$order->groupon_id = $order_ext['groupon_id'];
|
|
|
}
|
|
|
|
|
|
+ if ($activity && $activity['type'] == 'kan') {
|
|
|
+ // 如果是拼团, ext 中存储拼团相关信息(这里拼团肯定是成功了,否则下单前已被拦截)
|
|
|
+ $order_ext['buy_type'] = request()->param('buy_type', 'kan'); // 购买方式,alone: 单独购买, groupon: 拼团
|
|
|
+ $order_ext['kan_id'] = request()->param('kan_id', 0); // 如果是拼团,团 id
|
|
|
+
|
|
|
+ //订单表冗余kan_id
|
|
|
+ $order->kan_id = $order_ext['kan_id'];
|
|
|
+
|
|
|
+ //砍价表改状态
|
|
|
+ Db::name('shopro_activity_kan')->where('id',$order_ext['kan_id'])->where('user_id',$user['id'])->update(['order_id'=>$order->id,'status'=>'order']);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
if ($order->status == OrderModel::STATUS_UNPAID) {
|
|
|
// 添加订单自动关闭队列
|
|
|
$this->autoCloseQueue($order, $activity, $order_ext);
|