From 349841a8a1615a5784dfada788cfedbb4f39906e Mon Sep 17 00:00:00 2001 From: xiadc <251308692@qq.com> Date: Sat, 28 Jun 2025 21:42:42 +0800 Subject: [PATCH] =?UTF-8?q?feat(zy):=20=E6=B7=BB=E5=8A=A0=E8=AE=BF?= =?UTF-8?q?=E5=AE=A2=E8=AE=B0=E5=BD=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 zy_visitor 表,用于记录访客信息 - 调整签到活动逻辑,暂时注释掉活动状态检查 --- add.sql | 19 ++++++++++++++++++- addons/shopro/controller/zy/Sys.php | 6 +++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/add.sql b/add.sql index 23c0b23..f595ec4 100644 --- a/add.sql +++ b/add.sql @@ -47,4 +47,21 @@ ADD COLUMN `name` varchar(255) NOT NULL DEFAULT '' COMMENT '名称' AFTER `statu ADD COLUMN `begin_date` date NULL DEFAULT NULL COMMENT '有效期开始' AFTER `name`, ADD COLUMN `end_date` date NULL DEFAULT NULL COMMENT '有效期结束' AFTER `begin_date`, ADD COLUMN `intro` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '说明' AFTER `end_date`; --- 已执行 2025-06-17 \ No newline at end of file +-- 已执行 2025-06-17 + +CREATE TABLE `zy_visitor` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '类型(0俱乐部/1球馆/2用户)', + `obj_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '对象id', + `user_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '用户id', + `nickname` varchar(255) NOT NULL DEFAULT '' COMMENT '昵称', + `avatar` varchar(255) NOT NULL DEFAULT '' COMMENT '头像', + `gender` tinyint(4) NOT NULL DEFAULT 0 COMMENT '性别(0女,1男)', + `times` int(11) NOT NULL DEFAULT 0 COMMENT '次数', + `create_time` datetime NOT NULL DEFAULT current_timestamp() COMMENT '创建时间', + `update_time` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT '修改时间', + PRIMARY KEY (`id`) USING BTREE, + KEY `type` (`type`) USING BTREE, + KEY `obj_id` (`obj_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='标签'; +-- 已执行 2025-06-28 diff --git a/addons/shopro/controller/zy/Sys.php b/addons/shopro/controller/zy/Sys.php index 2cc6a93..24d95de 100644 --- a/addons/shopro/controller/zy/Sys.php +++ b/addons/shopro/controller/zy/Sys.php @@ -86,9 +86,9 @@ class Sys extends Base public function signin() { $signSet = SignSet::where('status', 1)->select(); - if (empty($signSet)) { - $this->error('没有签到活动'); - } + // if (empty($signSet)) { + // $this->error('没有签到活动'); + // } Db::startTrans(); try { $user = auth_user();