From c91aae31ea3447d58c0307c21795eaa9c55730b2 Mon Sep 17 00:00:00 2001 From: lingling <1077478963@qq.com> Date: Fri, 28 Feb 2025 19:41:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E9=A2=86=E5=8F=96VIP=E5=A5=96=E5=8A=B1=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=EF=BC=8C=E5=B9=B6=E4=BF=AE=E5=A4=8DVIP?= =?UTF-8?q?=E5=A5=96=E5=8A=B1=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Vip_rewardController.php | 11 ++++++----- app/model/UserReceivesVipLog.php | 22 +++++++++++++++++++++ 2 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 app/model/UserReceivesVipLog.php diff --git a/app/controller/api/Vip_rewardController.php b/app/controller/api/Vip_rewardController.php index 61cbab5..7dbbbd0 100644 --- a/app/controller/api/Vip_rewardController.php +++ b/app/controller/api/Vip_rewardController.php @@ -303,13 +303,14 @@ class Vip_rewardController } } $UserReward = UserReward::where('memo', '首次VIP'.$vip_id.'等级奖励')->where('user_id', $user_id)->get(); + // if() //判断是否有 - // if ($UserReward->count() > 0) { - // UserRewardDao::base($user_id, 6, $money, 'VIP'.$vip_id.'等级奖励'); - // }else{ - // UserRewardDao::base($user_id, 6, $new_money, '首次VIP'.$vip_id.'等级奖励'); + if ($UserReward->count() > 0) { + UserRewardDao::base($user_id, 6, $money, 'VIP'.$vip_id.'等级奖励'); + }else{ + UserRewardDao::base($user_id, 6, $new_money, '首次VIP'.$vip_id.'等级奖励'); - // } + } return ApiResponseApp::success('领取成功'); } diff --git a/app/model/UserReceivesVipLog.php b/app/model/UserReceivesVipLog.php new file mode 100644 index 0000000..21a3e8f --- /dev/null +++ b/app/model/UserReceivesVipLog.php @@ -0,0 +1,22 @@ +