|
@@ -66,7 +66,7 @@ class VipRevokeHandler
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 防止重复撤销
|
|
// 防止重复撤销
|
|
|
- $existingRevokeLog = MemberLog::where('order_id', $order->increment_id)
|
|
|
|
|
|
|
+ $existingRevokeLog = MemberLog::where('order_id', $order->id)
|
|
|
->whereIn('type', [2, 3])
|
|
->whereIn('type', [2, 3])
|
|
|
->first();
|
|
->first();
|
|
|
|
|
|
|
@@ -75,7 +75,7 @@ class VipRevokeHandler
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 查找该订单的激活记录
|
|
// 查找该订单的激活记录
|
|
|
- $activationLog = MemberLog::where('order_id', $order->increment_id)
|
|
|
|
|
|
|
+ $activationLog = MemberLog::where('order_id', $order->id)
|
|
|
->where('type', 1)
|
|
->where('type', 1)
|
|
|
->first();
|
|
->first();
|
|
|
|
|
|
|
@@ -97,7 +97,7 @@ class VipRevokeHandler
|
|
|
// 记录撤销日志
|
|
// 记录撤销日志
|
|
|
MemberLog::create([
|
|
MemberLog::create([
|
|
|
'customer_id' => $order->customer_id,
|
|
'customer_id' => $order->customer_id,
|
|
|
- 'order_id' => $order->increment_id,
|
|
|
|
|
|
|
+ 'order_id' => $order->id,
|
|
|
'amount' => $activationLog->amount,
|
|
'amount' => $activationLog->amount,
|
|
|
'type' => $revokeType,
|
|
'type' => $revokeType,
|
|
|
'previous_expire_date' => $activationLog->expirationdate,
|
|
'previous_expire_date' => $activationLog->expirationdate,
|