...
|
...
|
@@ -497,9 +497,6 @@ class Common |
|
|
}
|
|
|
if(isset($data['coupon_id']) && !empty($data['coupon_id'])){
|
|
|
$data1['coupon_id'] = $data['coupon_id'];//优惠券id
|
|
|
//更新优惠券已使用
|
|
|
$flag = config('verify.flag');
|
|
|
self::updateRCoupon($uid,$data['coupon_id'],$flag[1]);
|
|
|
}
|
|
|
$data1['total_goods_price'] = $data['total_goods_price'];//商品金额
|
|
|
$data1['discount_price'] = $data['discount_price'];//优惠金额
|
...
|
...
|
@@ -584,9 +581,9 @@ class Common |
|
|
$status = config('verify.status');
|
|
|
//更新订单号成功
|
|
|
$orderModel = new Order();
|
|
|
$orderModel->where(['pay_order_sn'=>$out_trade_no,'status'=>$status[0]])->update(['status'=>$status[2]]);
|
|
|
$orderModel->where(['pay_order_sn'=>$out_trade_no,'status'=>$status[0]])->update(['status'=>$status[2]]);//待发货
|
|
|
//销量增加1
|
|
|
$res = self::findSoftWhereData('order',['pay_order_sn'=>$out_trade_no,'status'=>$status[2]],'id,uid');
|
|
|
$res = self::findSoftWhereData('order',['pay_order_sn'=>$out_trade_no,'status'=>$status[2]],'id,uid,coupon_id');
|
|
|
if($res){
|
|
|
$res1 = self::selectSoftWhereData('ogoods',['o_id'=>$res['id']],'id,g_id,style,goods_number');
|
|
|
$g_ids = array_column($res1,'g_id');
|
...
|
...
|
@@ -613,6 +610,10 @@ class Common |
|
|
}
|
|
|
//删除购物车
|
|
|
self::deleteCar(['uid'=>$res['uid'],'g_id'=>['in',$g_ids]]);
|
|
|
|
|
|
//更新优惠券已使用
|
|
|
$flag = config('verify.flag');
|
|
|
self::updateRCoupon($res['uid'],$res['coupon_id'],$flag[1]);
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|