...
|
...
|
@@ -30,7 +30,7 @@ class TeamGroup extends Model |
|
|
$res1 = $this->where(['id'=>['in',$ids]])->update(['status'=>3]);
|
|
|
//修改订单表拼团状态
|
|
|
$res2 = $orderModel->where(['team_group_id'=>['in',$ids]])->update(['team_group_status'=>3]);
|
|
|
$orderList = $orderModel->where(['team_group_id'=>['in',$ids]])->field('order_num,pay_total,pay_type,user_id')->select();
|
|
|
$orderList = $orderModel->where(['team_group_id'=>['in',$ids]])->field('id,order_num,pay_total,pay_type,user_id')->select();
|
|
|
//退款
|
|
|
foreach ($orderList as $k => $orderInfo){
|
|
|
if ($orderInfo['pay_type'] == 1){
|
...
|
...
|
@@ -38,7 +38,7 @@ class TeamGroup extends Model |
|
|
$res3 = $pay->refund($orderInfo['order_num'],$orderInfo['pay_total']);
|
|
|
}else{
|
|
|
//余额退款
|
|
|
$res3 = $userModel->refund($orderInfo['user_id'],$orderInfo['pay_total']);
|
|
|
$res3 = $userModel->refund($orderInfo['user_id'],$orderInfo['pay_total'],$orderInfo['id']);
|
|
|
}
|
|
|
}
|
|
|
if ($res1 && $res2 && $res3){
|
...
|
...
|
|