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 @@ +