|
|
@@ -1176,7 +1176,14 @@ class PayRechargeController extends Controller
|
|
|
// 需要 >= 3 天,即最后一次充值至少是3天前
|
|
|
$inactiveDays = max(0, (int)$diffDays - 1);
|
|
|
|
|
|
- if ($inactiveDays < 3) {
|
|
|
+ // 5. 查询最近一条 7 日礼包记录状态(用于判断是否进入新一轮)
|
|
|
+ $record = DB::table('agent.dbo.inactive_vip_gift_records')
|
|
|
+ ->where('user_id', $userId)
|
|
|
+ ->where('gift_id', 305)
|
|
|
+ ->orderBy('id', 'desc')
|
|
|
+ ->first();
|
|
|
+
|
|
|
+ if ($inactiveDays < 3 && !$record) {
|
|
|
// 不满足条件:连续未充值天数不足
|
|
|
return apiReturnSuc([
|
|
|
'status' => 0,
|
|
|
@@ -1219,12 +1226,7 @@ class PayRechargeController extends Controller
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // 5. 查询最近一条 7 日礼包记录状态(用于判断是否进入新一轮)
|
|
|
- $record = DB::table('agent.dbo.inactive_vip_gift_records')
|
|
|
- ->where('user_id', $userId)
|
|
|
- ->where('gift_id', 305)
|
|
|
- ->orderBy('id', 'desc')
|
|
|
- ->first();
|
|
|
+
|
|
|
|
|
|
/*
|
|
|
* status 定义:
|