|
|
@@ -43,18 +43,19 @@ class PledgeLogic
|
|
|
->join('product_list b', 'a.product_id = b.id', 'left')
|
|
|
->where('a.user_id', $user_id)
|
|
|
->where('a.status', $model::Paid)
|
|
|
- ->whereIn('a.order_no', $order_no)->column('a.id,b.thum');
|
|
|
+ ->whereIn('a.order_no', $order_no)->column('b.id,b.thum');
|
|
|
|
|
|
if(empty($product) || count($product) != count($order_no)) throw new Exception('订单不存在');
|
|
|
$pledge_num = 1;
|
|
|
if($pledge->type_id == ProductPledges::Single){
|
|
|
$pledge_num = count($order_no);
|
|
|
}
|
|
|
+
|
|
|
//添加订单
|
|
|
Loader::model('UserPledge')::setPledgeData($user_id, $pledge->id, $pledge->product_id,
|
|
|
['product'=>$product, 'order_no'=>$order_no], //订单信息
|
|
|
$pledge->day_num, $pledge_num);
|
|
|
-
|
|
|
+
|
|
|
//修改状态
|
|
|
return $model->whereIn('order_no', $order_no)->setField('status', $model::Freeze);
|
|
|
}
|