From 3d9432e4f58a86cc1b6d49359beec8af5c1485f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=92=8A?= Date: Fri, 23 Jan 2026 10:27:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=8F=E6=97=A5=E6=8A=A2=E5=88=B0=E4=BA=94?= =?UTF-8?q?=E4=B8=AA=E7=BA=A2=E5=8C=85=EF=BC=880/5=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/service/RedpacketService.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/application/common/service/RedpacketService.php b/application/common/service/RedpacketService.php index dea1189f..57a343fd 100644 --- a/application/common/service/RedpacketService.php +++ b/application/common/service/RedpacketService.php @@ -187,6 +187,15 @@ class RedpacketService unset($grabResult['all_records']);//前端不要 unset($grabResult['statistics']);//前端不要 + //处理任务 + //查询今日是否抢到5个红包 + $tady_red_num = Db::name('redpacket_record') + ->where('user_id',$userId) + ->where('createtime', '>=', strtotime(date('Y-m-d'))) + ->count(); + if($tady_red_num >= 5){ + model('api/Tasks')->tasks_complete($userId,36); + } return [ 'code' => 1, 'msg' => '抢红包成功',