diff --git a/sql/hellogithub.sql b/sql/hellogithub.sql index 0decd2c..c345759 100644 --- a/sql/hellogithub.sql +++ b/sql/hellogithub.sql @@ -11,7 +11,7 @@ Target Server Version : 80031 (8.0.31) File Encoding : 65001 - Date: 09/07/2023 18:44:52 + Date: 10/07/2023 23:35:48 */ SET NAMES utf8mb4; @@ -28,12 +28,13 @@ CREATE TABLE `admin` ( `isValid` int NULL DEFAULT NULL COMMENT '是否有效(0/1)', `loginTime` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '登录时间', PRIMARY KEY (`adminId`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '管理员表' ROW_FORMAT = DYNAMIC; +) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '管理员表' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of admin -- ---------------------------- -INSERT INTO `admin` VALUES (1, 'admin', 'admin', 1, '2023-07-09 17:09:16'); +INSERT INTO `admin` VALUES (1, 'admin', 'admin', 1, '2023-07-10 23:31:54'); +INSERT INTO `admin` VALUES (9, '666', '666', 0, '2023-07-10'); -- ---------------------------- -- Table structure for article @@ -49,25 +50,14 @@ CREATE TABLE `article` ( `articleTitle` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章标题', `articleIco` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文章缩略图', PRIMARY KEY (`articleId`) USING BTREE, - INDEX `userId_article`(`userId` ASC) USING BTREE, - CONSTRAINT `userId_article` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB AUTO_INCREMENT = 30 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章表' ROW_FORMAT = DYNAMIC; + INDEX `userId_article`(`userId` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 32 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章表' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of article -- ---------------------------- -INSERT INTO `article` VALUES (1, 1, '
https://pic.imgdb.cn/item/640f1b9df144a01007db08a4.jpg
conn = JdbcUtils.getConnection();\n conn1 = JdbcUtils.getConnection();\n preparedStatement = conn.prepareStatement(sql);\n preparedStatement.setInt(1, id);\n preparedStatement1 = conn1.prepareStatement(sql1);\n preparedStatement1.setInt(1, id);
测试文章
都是固定工会打发发的观点和方法啊哈哈的方法的风格啊哈哈动画噶反对法地方和
gDG
和施工方
1111
2222
爱德华给
', '2023-07-06', 1, 2, '测试文章', 'https://pic.imgdb.cn/item/640f1b9df144a01007db08a4.jpg'); -INSERT INTO `article` VALUES (23, 6, 'https://pic.imgdb.cn/item/646b2803e03e90d874c45f3f.gif
https://pic.imgdb.cn/item/646b24b0e03e90d874bf7075.png
https://pic.imgdb.cn/item/646b24b0e03e90d874bf7075.png
', '2023-07-07', 1, 1, '发布贡献值增加测试', 'https://pic.imgdb.cn/item/646b24b0e03e90d874bf7075.png');
-INSERT INTO `article` VALUES (27, 11, 'https://pic.imgdb.cn/item/6484889d1ddac507cc4fa95f.jpg
行不行啊
https://pic.imgdb.cn/item/6484889d1ddac507cc4fa95f.jpg
https://pic.imgdb.cn/item/640f1e5ef144a01007dfb60c.jpg
优秀的导航项目,优质的导航站搜集整理:https://github.com/eryajf/awesome-navigation
nav: ? 发现导航
https://github.com/xjh22222228/nav
WebStackPage
https://github.com/WebStackPage/WebStackPage.github.io
hexo-theme-webstack 一个基于webstack的hexo主题。
https://github.com/HCLonely/hexo-theme-webstack
WebStack-Hugo 一键配置的纯静态网址导航网站
https://github.com/shenweiyan/WebStack-Hugo
typecho 导航主题Webstack
onenav: 书签管理系统
https://github.com/helloxz/onenav
geek-navigation: ❤️ 极客猿导航
https://github.com/geekape/geek-navigation
aNavigation:
https://github.com/Jackie1123/aNavigation
team-nav:
https://github.com/tuituidan/team-nav
daohang: 运维导航系统
https://github.com/zhuima/daohang
【来源:https://landaiqing.space/451.html,转载请注明】
', '2023-07-10', 1, 6, '优秀的导航项目,优质的导航站搜集整', 'https://pic.imgdb.cn/item/64107dd8ebf10e5d538b2f3b.jpg'); +INSERT INTO `article` VALUES (31, 12, '推荐一款支持谷歌插件,微软插件的手机浏览器~
站长我使用的也是这款手机浏览器,还是比较好用的,界面简单优雅!
而且关键还支持Tampermonkey哦!!!
下载地址:
https://lemurbrowser.com/app/zh/
【来源:https://landaiqing.space/436.html,转载请注明】
', '2023-07-10', 1, 7, '推荐一个支持谷歌插件,微软插件的手机浏览器~', 'https://pic.imgdb.cn/item/640f214ef144a01007e4e317.jpg'); -- ---------------------------- -- Table structure for category @@ -120,32 +110,13 @@ CREATE TABLE `comment` ( `likeNum` int NULL DEFAULT NULL COMMENT '点赞数', PRIMARY KEY (`commentId`) USING BTREE, INDEX `userId_comment`(`userId` ASC) USING BTREE, - INDEX `projectId_comment`(`projectId` ASC) USING BTREE, - CONSTRAINT `projectId_comment` FOREIGN KEY (`projectId`) REFERENCES `project` (`projectId`) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT `userId_comment` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB AUTO_INCREMENT = 48 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '评论表' ROW_FORMAT = DYNAMIC; + INDEX `projectId_comment`(`projectId` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 50 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '评论表' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of comment -- ---------------------------- -INSERT INTO `comment` VALUES (20, 1, 1, '6666666666666666666666666666666666', 1, '2023-07-05 13:26:29', 1, 5, '2023-07-05 13:26:29', 215); -INSERT INTO `comment` VALUES (25, 1, 1, '0000000', 1, '2023-07-05 13:52:45', 1, 2, '2023-07-05 13:52:45', 61); -INSERT INTO `comment` VALUES (32, 1, 7, '888888888', 1, '2023-07-06 10:21:08', 1, 3, '2023-07-06 10:21:08', 6); -INSERT INTO `comment` VALUES (33, 7, 2, '1234567890', 1, '2023-07-06 12:32:29', 1, 5, '2023-07-06 12:32:29', 2); -INSERT INTO `comment` VALUES (34, 1, 3, '111111111111', 0, '2023-07-06 13:47:41', 1, 0, '2023-07-06 13:47:41', 3); -INSERT INTO `comment` VALUES (35, 1, 5, '88888', 1, '2023-07-06 20:07:51', 1, 5, '2023-07-06 20:07:51', 1); -INSERT INTO `comment` VALUES (36, 1, 7, '还不错哦', 1, '2023-07-06 21:17:24', 1, 5, '2023-07-06 21:17:24', 2); -INSERT INTO `comment` VALUES (37, 7, 2, '666666', 0, '2023-07-06 23:44:20', 1, 3, '2023-07-06 23:44:20', 0); -INSERT INTO `comment` VALUES (38, 1, 3, '挺好的,能用,完美', 1, '2023-07-07 15:41:02', 1, 5, '2023-07-07 15:41:02', 2); -INSERT INTO `comment` VALUES (39, 7, 3, '6666', 0, '2023-07-07 15:42:02', 1, 3, '2023-07-07 15:42:02', 0); -INSERT INTO `comment` VALUES (40, 1, 1, '6666', 1, '2023-07-07 21:49:58', 1, 3, '2023-07-07 21:49:58', 5); -INSERT INTO `comment` VALUES (41, 2, 2, '11111111', 1, '2023-07-07 23:33:47', 1, 4, '2023-07-07 23:33:47', 1); -INSERT INTO `comment` VALUES (42, 2, 6, 'e44444444444444', 1, '2023-07-07 23:34:28', 1, 5, '2023-07-07 23:34:28', 0); -INSERT INTO `comment` VALUES (43, 11, 1, '可以啊', 1, '2023-07-08 20:25:38', 1, 5, '2023-07-08 20:25:38', 0); -INSERT INTO `comment` VALUES (44, 11, 8, '暂无评论', 1, '2023-07-09 01:13:42', 1, 4, '2023-07-09 01:13:42', 0); -INSERT INTO `comment` VALUES (45, 1, 4, '随着《数据安全法》和《个人信息保护法》的相继颁布,隐私计算技术在近两年迎来了前所未有的热度。该项目是由密码学专家团队打造的隐私计算平台,它开箱即用、安全可靠,支持隐匿查询、隐私求交、联合统计、数据资源管理等功能,实现了“数据可用不可见”,为数据安全流通保驾护航。', 1, '2023-07-09 01:25:17', 1, 5, '2023-07-09 01:25:17', 6); -INSERT INTO `comment` VALUES (46, 1, 2, '66666666666', 1, '2023-07-09 11:25:19', 1, 5, '2023-07-09 11:25:19', 2); -INSERT INTO `comment` VALUES (47, 1, 2, '66666666666666666666666666666666666666666666666666666', 1, '2023-07-09 11:26:04', 1, 5, '2023-07-09 11:26:04', 0); +INSERT INTO `comment` VALUES (49, 13, 26, '可以,666', 0, '2023-07-10 20:31:59', 1, 5, '2023-07-10 20:31:59', 0); -- ---------------------------- -- Table structure for githubinfo @@ -169,27 +140,16 @@ CREATE TABLE `githubinfo` ( `version` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最新版本', `isVaild` int NULL DEFAULT NULL COMMENT '是否有效', PRIMARY KEY (`id`) USING BTREE, - INDEX `projectId_info`(`projectId` ASC) USING BTREE, - CONSTRAINT `projectId_info` FOREIGN KEY (`projectId`) REFERENCES `project` (`projectId`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; + INDEX `projectId_info`(`projectId` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 27 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of githubinfo -- ---------------------------- -INSERT INTO `githubinfo` VALUES (1, 2, 'https://avatars.githubusercontent.com/u/62598626?v=4', 'winsw', 'https://starchart.cc/winsw/winsw.svg', 9648, 'C#', 'true', 223, 186, 'Organization', 'v3', 1392, 'MIT', '0', 1); -INSERT INTO `githubinfo` VALUES (4, 19, 'https://avatars.githubusercontent.com/u/69631?v=4', 'redex', 'https://starchart.cc/facebook/redex.svg', 5844, 'C++', 'true', 229, 70, 'Organization', 'main', 671, 'MIT', '0', 1); -INSERT INTO `githubinfo` VALUES (5, 8, 'https://avatars.githubusercontent.com/u/6154722?v=4', 'AI-For-Beginners', 'https://starchart.cc/microsoft/AI-For-Beginners.svg', 15399, 'Jupyter Notebook', 'true', 191, 22, 'Organization', 'main', 2522, 'MIT', '0', 1); -INSERT INTO `githubinfo` VALUES (6, 1, 'https://avatars.githubusercontent.com/u/62598626?v=4', 'winsw', 'https://starchart.cc/winsw/winsw.svg', 9652, 'C#', 'true', 224, 186, 'Organization', 'v3', 1392, 'MIT', '0', 1); -INSERT INTO `githubinfo` VALUES (7, 7, 'https://avatars.githubusercontent.com/u/6154722?v=4', 'AI-For-Beginners', 'https://starchart.cc/microsoft/AI-For-Beginners.svg', 15405, 'Jupyter Notebook', 'true', 191, 22, 'Organization', 'main', 2523, 'MIT', '0', 1); -INSERT INTO `githubinfo` VALUES (8, 21, 'https://avatars.githubusercontent.com/u/3992393?v=4', 'SurveyKing', 'https://starchart.cc/javahuang/SurveyKing.svg', 1695, 'Java', 'true', 27, 15, 'User', 'master', 249, 'MIT', '0', 1); -INSERT INTO `githubinfo` VALUES (9, 20, 'https://avatars.githubusercontent.com/u/1862727?v=4', 'personal-security-checklist', 'https://starchart.cc/Lissy93/personal-security-checklist.svg', 11811, 'Java', 'true', 184, 26, 'User', 'master', 848, 'NOASSERTION', '0', 1); -INSERT INTO `githubinfo` VALUES (10, 3, 'https://avatars.githubusercontent.com/u/101538790?v=4', 'primihub', 'https://starchart.cc/primihub/primihub.svg', 573, 'C++', 'true', 18, 6, 'Organization', 'develop', 98, 'Apache-2.0', '0', 1); -INSERT INTO `githubinfo` VALUES (11, 22, 'https://avatars.githubusercontent.com/u/944947?v=4', 'httprouter', 'https://starchart.cc/julienschmidt/httprouter.svg', 15511, 'Go', 'true', 320, 83, 'User', 'master', 1442, 'BSD-3-Clause', '0', 1); -INSERT INTO `githubinfo` VALUES (12, 4, 'https://avatars.githubusercontent.com/u/101538790?v=4', 'primihub', 'https://starchart.cc/primihub/primihub.svg', 573, 'C++', 'true', 18, 6, 'Organization', 'develop', 98, 'Apache-2.0', '0', 1); -INSERT INTO `githubinfo` VALUES (13, 23, 'https://avatars.githubusercontent.com/u/15728815?v=4', 'LocationSimulator', 'https://starchart.cc/Schlaubischlump/LocationSimulator.svg', 1042, 'Swift', 'true', 17, 17, 'User', 'master', 98, 'GPL-3.0', '0', 0); -INSERT INTO `githubinfo` VALUES (14, 24, 'https://avatars.githubusercontent.com/u/825710?v=4', 'ckeditor5-vue', 'https://starchart.cc/ckeditor/ckeditor5-vue.svg', 306, 'JavaScript', 'true', 17, 15, 'Organization', 'master', 73, 'NOASSERTION', '0', 0); -INSERT INTO `githubinfo` VALUES (15, 5, 'https://avatars.githubusercontent.com/u/66820499?v=4', 'gotenberg', 'https://starchart.cc/gotenberg/gotenberg.svg', 5162, 'Go', 'true', 62, 52, 'Organization', 'main', 372, 'MIT', '0', 0); -INSERT INTO `githubinfo` VALUES (16, 25, 'https://avatars.githubusercontent.com/u/81452695?v=4', 'giscus', 'https://starchart.cc/giscus/giscus.svg', 5239, 'TypeScript', 'true', 21, 51, 'Organization', 'main', 224, 'MIT', '0', 0); +INSERT INTO `githubinfo` VALUES (23, 27, 'https://avatars.githubusercontent.com/u/6154722?v=4', 'AI-For-Beginners', 'https://starchart.cc/microsoft/AI-For-Beginners.svg', 15599, 'Jupyter Notebook', 'true', 192, 24, 'Organization', 'main', 2555, 'MIT', '0', 0); +INSERT INTO `githubinfo` VALUES (24, 26, 'https://avatars.githubusercontent.com/u/3266363?v=4', 'awesome-macos-screensavers', 'https://starchart.cc/agarrharr/awesome-macos-screensavers.svg', 3180, '无', 'true', 80, 4, 'User', 'master', 129, '无', '0', 0); +INSERT INTO `githubinfo` VALUES (25, 42, 'https://avatars.githubusercontent.com/u/65466868?v=4', 'devpod', 'https://starchart.cc/loft-sh/devpod.svg', 3233, 'Go', 'true', 21, 69, 'Organization', 'main', 137, 'MPL-2.0', '0', 0); +INSERT INTO `githubinfo` VALUES (26, 43, 'https://avatars.githubusercontent.com/u/69631?v=4', 'redex', 'https://starchart.cc/facebook/redex.svg', 5854, 'C++', 'true', 229, 70, 'Organization', 'main', 671, 'MIT', '0', 0); -- ---------------------------- -- Table structure for project @@ -210,31 +170,19 @@ CREATE TABLE `project` ( `fileAddress` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目文件地址', `periodicals` int NULL DEFAULT NULL COMMENT '期刊', `lookCount` int NULL DEFAULT NULL COMMENT '阅读次数', + `creatTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', PRIMARY KEY (`projectId`) USING BTREE, INDEX `userId`(`userId` ASC) USING BTREE, - INDEX `categoryId_project`(`categoryId` ASC) USING BTREE, - CONSTRAINT `categoryId_project` FOREIGN KEY (`categoryId`) REFERENCES `category` (`categoryId`) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT `userId` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目表' ROW_FORMAT = DYNAMIC; + INDEX `categoryId_project`(`categoryId` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 44 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目表' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of project -- ---------------------------- -INSERT INTO `project` VALUES (1, 1, 'winsw/winsw', 'https://github.com/winsw/winsw', 'https://pic.imgdb.cn/item/6495df131ddac507cc80689f.png', '由密码学专家团队打造的开源隐私计算平台\r\nHelloGitHub 评分\r\n', '随着《数据安全法》和《个人信息保护法》的相继颁布,隐私计算技术在近两年迎来了前所未有的热度。该项目是由密码学专家团队打造的隐私计算平台,它开箱即用、安全可靠,支持隐匿查询、隐私求交、联合统计、数据资源管理等功能,实现了“数据可用不可见”,为数据安全流通保驾护航。', 2, '2023-06-30 18:58:01', 8, 1, 'E:\\Desktop\\helloGithub\\web\\projectFile\\42f7b08d-59db-4083-8a59-ac2ad473a49b_general-background-master.zip', 1, 1222); -INSERT INTO `project` VALUES (2, 2, 'winsw/winsw', 'https://github.com/winsw/winsw', 'https://pic.imgdb.cn/item/6450e1b10d2dde5777f2fdbc.jpg', '由密码学专家团队打造的开源隐私计算平台\r\nHelloGitHub 评分\r\n', '随着《数据安全法》和《个人信息保护法》的相继颁布,隐私计算技术在近两年迎来了前所未有的热度。该项目是由密码学专家团队打造的隐私计算平台,它开箱即用、安全可靠,支持隐匿查询、隐私求交、联合统计、数据资源管理等功能,实现了“数据可用不可见”,为数据安全流通保驾护航。', 1, '2023-06-30 18:58:01', 2, 1, 'E:\\Desktop\\helloGithub\\web\\projectFile\\42f7b08d-59db-4083-8a59-ac2ad473a49b_general-background-master.zip', 1, 234); -INSERT INTO `project` VALUES (3, 4, 'primihub/primihub', 'https://github.com/winsw/winsw', 'https://pic.imgdb.cn/item/6495df131ddac507cc80689f.png', '由密码学专家团队打造的开源隐私计算平台\r\nHelloGitHub 评分\r\n', '随着《数据安全法》和《个人信息保护法》的相继颁布,隐私计算技术在近两年迎来了前所未有的热度。该项目是由密码学专家团队打造的隐私计算平台,它开箱即用、安全可靠,支持隐匿查询、隐私求交、联合统计、数据资源管理等功能,实现了“数据可用不可见”,为数据安全流通保驾护航。', 1, '2023-06-30 18:58:01', 3, 1, 'E:\\Desktop\\helloGithub\\web\\projectFile\\42f7b08d-59db-4083-8a59-ac2ad473a49b_general-background-master.zip', 1, 442); -INSERT INTO `project` VALUES (4, 1, 'primihub/primihub', 'https://github.com/winsw/winsw', 'https://pic.imgdb.cn/item/6450e1b10d2dde5777f2fdbc.jpg', '由密码学专家团队打造的开源隐私计算平台\r\nHelloGitHub 评分\r\n', '随着《数据安全法》和《个人信息保护法》的相继颁布,隐私计算技术在近两年迎来了前所未有的热度。该项目是由密码学专家团队打造的隐私计算平台,它开箱即用、安全可靠,支持隐匿查询、隐私求交、联合统计、数据资源管理等功能,实现了“数据可用不可见”,为数据安全流通保驾护航。', 1, '2023-06-30 18:58:01', 4, 1, '', 2, 4507); -INSERT INTO `project` VALUES (5, 5, 'gotenberg/gotenberg', 'https://github.com/winsw/winsw', 'https://pic.imgdb.cn/item/6495df131ddac507cc80689f.png', '由密码学专家团队打造的开源隐私计算平台\r\nHelloGitHub 评分\r\n', '随着《数据安全法》和《个人信息保护法》的相继颁布,隐私计算技术在近两年迎来了前所未有的热度。该项目是由密码学专家团队打造的隐私计算平台,它开箱即用、安全可靠,支持隐匿查询、隐私求交、联合统计、数据资源管理等功能,实现了“数据可用不可见”,为数据安全流通保驾护航。', 0, '2023-06-30 18:58:01', 5, 1, '', 4, 642); -INSERT INTO `project` VALUES (6, 2, 'gotenberg/gotenberg', 'https://github.com/winsw/winsw', 'https://pic.imgdb.cn/item/6450e1b10d2dde5777f2fdbc.jpg', '由密码学专家团队打造的开源隐私计算平台\r\nHelloGitHub 评分\r\n', '随着《数据安全法》和《个人信息保护法》的相继颁布,隐私计算技术在近两年迎来了前所未有的热度。该项目是由密码学专家团队打造的隐私计算平台,它开箱即用、安全可靠,支持隐匿查询、隐私求交、联合统计、数据资源管理等功能,实现了“数据可用不可见”,为数据安全流通保驾护航。', 0, '2023-06-30 18:58:01', 6, 1, '', 1, 704); -INSERT INTO `project` VALUES (7, 6, 'microsoft/AI-For-Beginners', 'https://github.com/winsw/winsw', 'https://pic.imgdb.cn/item/6495df131ddac507cc80689f.png', '由密码学专家团队打造的开源隐私计算平台\r\nHelloGitHub 评分\r\n', '随着《数据安全法》和《个人信息保护法》的相继颁布,隐私计算技术在近两年迎来了前所未有的热度。该项目是由密码学专家团队打造的隐私计算平台,它开箱即用、安全可靠,支持隐匿查询、隐私求交、联合统计、数据资源管理等功能,实现了“数据可用不可见”,为数据安全流通保驾护航。', 1, '2023-06-30 18:58:01', 7, 1, '', 3, 7870); -INSERT INTO `project` VALUES (8, 7, 'microsoft/AI-For-Beginners', 'https://github.com/winsw/winsw', 'https://pic.imgdb.cn/item/646870fce03e90d874c39515.png', '666', '随着《数据安全法》和《个人信息保护法》', 1, '2023-06-30 18:58:01', 8, 1, '', 1, 8973); -INSERT INTO `project` VALUES (19, 1, 'facebook/redex', 'https://github.com/facebook/redex', 'https://avatars.githubusercontent.com/u/69631?v=4', 'ReDex: An Android Bytecod', 'ReDex is an Android bytecode (dex) optimizer originally developed at Facebook. It provides a framework for reading, writing, and analyzing .dex files, and a set of optimization passes that use this framework to improve the bytecode. An APK optimized by ReDex should be smaller and faster than its source.
', 0, '2023-07-08 22:58:39', 3, 1, 'E:\\Desktop\\helloGithub\\web\\projectFile\\88ad2539-b401-4ba7-b131-7a6163738ba7_general-background-master.zip', 3, 19); -INSERT INTO `project` VALUES (20, 1, 'Lissy93/personal-security-checklist', 'https://github.com/Lissy93/personal-security-checklist', 'https://avatars.githubusercontent.com/u/1862727?v=4', 'https://github.com/Lissy9', '', 0, '2023-07-09 00:09:23', 7, 1, 'E:\\Desktop\\helloGithub\\web\\projectFile\\ced05562-0a07-47af-a743-5ac208baf9f2_1.jpg', 4, 7); -INSERT INTO `project` VALUES (21, 1, 'javahuang/SurveyKing', 'https://github.com/javahuang/SurveyKing', 'https://avatars.githubusercontent.com/u/3992393?v=4', 'https://github.com/javahu', 'https://github.com/javahuang/SurveyKing
', 0, '2023-07-09 00:30:49', 7, 1, 'helloGithub\\web\\projectFile\\47d25f4d-2fd8-48bb-9299-06e53ecb2d55_17.jpg', 5, 16); -INSERT INTO `project` VALUES (22, 11, 'julienschmidt/httprouter', 'https://github.com/julienschmidt/httprouter', 'https://avatars.githubusercontent.com/u/944947?v=4', 'HttpRouter Build Status', 'HttpRouter is a lightweight high performance HTTP request router (also called multiplexer or just mux for short) for Go.
In contrast to the default mux of Go\'s net/http package, this router supports variables in the routing pattern and matches against the request method. It also scales better.
The router is optimized for high performance and a small memory footprint. It scales well even with very long paths and a large number of routes. A compressing dynamic trie (radix tree) structure is used for efficient matching.
', 0, '2023-07-09 01:19:31', 5, 1, 'helloGithub\\web\\projectFile\\8d46b39e-be81-4558-ad68-5c5ffa094fc5_general-background-master.zip', 6, 11); -INSERT INTO `project` VALUES (23, 6, 'Schlaubischlump/LocationSimulator', 'https://github.com/Schlaubischlump/LocationSimulator', 'https://avatars.githubusercontent.com/u/15728815?v=4', 'https://github.com/Schlau', 'https://github.com/Schlaubischlump/LocationSimulator
', 0, '2023-07-09 14:10:07', 7, 1, NULL, 6, 20); -INSERT INTO `project` VALUES (24, 1, 'ckeditor/ckeditor5-vue', 'https://github.com/ckeditor/ckeditor5-vue', 'https://avatars.githubusercontent.com/u/825710?v=4', '适用于 Vue.js 的 CKEditor 5 富', '该存储库包含 Vue.js 的 CKEditor 5 组件3+。较低 Vue.js 版本的组件位于另一个存储库 - @ckeditor/ckeditor5-vue2中。
Vue.js 的官方CKEditor 5富文本编辑器组件。
npm install --save @ckeditor/ckeditor5-vue @ckeditor/ckeditor5-build-classic
https://github.com/giscus/giscus
', 0, '2023-07-09 16:47:33', 7, 1, '123', 9, 5); +INSERT INTO `project` VALUES (26, 12, 'agarrharr/awesome-macos-screensavers', 'https://github.com/agarrharr/awesome-macos-screensavers', 'https://avatars.githubusercontent.com/u/3266363?v=4', '令人惊艳的 macOS 屏保集合', '这里有不同风格、样式、趣味性十足的 macOS 屏保,相信总有一款适合你。', 0, '2023-07-10 16:08:35', 15, 1, NULL, 1, 59, '2023-07-10 22:29:58'); +INSERT INTO `project` VALUES (27, 12, 'microsoft/AI-For-Beginners', 'https://github.com/microsoft/AI-For-Beginners', 'https://avatars.githubusercontent.com/u/6154722?v=4', '微软开源的入门级人工智能教程', '这是一份完全免费、面向零基础人群的 AI 课程,为期 12 周共计 24 节课。你将学习到关于 AI 的历史、基本知识、主流框架、CV 和 NLP 等知识。', 1, '2023-07-10 17:10:07', 15, 1, NULL, 1, 18, '2023-07-10 22:29:58'); +INSERT INTO `project` VALUES (32, 12, 'loft-sh/devpod', 'https://github.com/loft-sh/devpod', 'https://avatars.githubusercontent.com/u/65466868?v=4', '连接本地 IDE 和远程开发环境的工具', '它通过在本地启动一个连接远程开发机器的容器,让开发环境跑在容器里,从而轻松启动任何开发环境。支持 K8s 集群、云端虚拟机、任何可访问的远程机器,还能够自动关闭云服务降低成本。', 0, '2023-07-10 21:28:34', 5, 1, NULL, 0, 2, '2023-07-10 22:29:58'); +INSERT INTO `project` VALUES (43, 13, 'facebook/redex', 'https://github.com/facebook/redex', 'https://avatars.githubusercontent.com/u/69631?v=4', '优化 Android 应用的字节码优化器', 'Facebook 开源的字节码优化器,它提供了一个框架,可用来读取、写入和分析 .dex 文件,并使用这个框架进行一系列的优化处理来改进字节码。经过 ReDex 优化后的 APK 会比其源文件更小且更快。', 0, '2023-07-10 22:54:53', 3, 1, NULL, 0, 5, '2023-07-10 22:54:53'); -- ---------------------------- -- Table structure for project_category @@ -246,40 +194,16 @@ CREATE TABLE `project_category` ( `projectId` int NULL DEFAULT NULL COMMENT '项目ID', PRIMARY KEY (`id`) USING BTREE, INDEX `categoryId`(`categoryId` ASC) USING BTREE, - INDEX `projectId`(`projectId` ASC) USING BTREE, - CONSTRAINT `categoryId` FOREIGN KEY (`categoryId`) REFERENCES `category` (`categoryId`) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT `projectId` FOREIGN KEY (`projectId`) REFERENCES `project` (`projectId`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB AUTO_INCREMENT = 48 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目标签中间表' ROW_FORMAT = DYNAMIC; + INDEX `projectId`(`projectId` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 53 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目标签中间表' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of project_category -- ---------------------------- -INSERT INTO `project_category` VALUES (1, 1, 1); -INSERT INTO `project_category` VALUES (2, 2, 2); -INSERT INTO `project_category` VALUES (3, 3, 3); -INSERT INTO `project_category` VALUES (4, 4, 4); -INSERT INTO `project_category` VALUES (5, 5, 5); -INSERT INTO `project_category` VALUES (6, 6, 6); -INSERT INTO `project_category` VALUES (7, 7, 7); -INSERT INTO `project_category` VALUES (8, 8, 8); -INSERT INTO `project_category` VALUES (9, 2, 1); -INSERT INTO `project_category` VALUES (31, 3, 19); -INSERT INTO `project_category` VALUES (32, 6, 19); -INSERT INTO `project_category` VALUES (33, 11, 19); -INSERT INTO `project_category` VALUES (34, 7, 20); -INSERT INTO `project_category` VALUES (35, 5, 20); -INSERT INTO `project_category` VALUES (36, 6, 20); -INSERT INTO `project_category` VALUES (37, 7, 21); -INSERT INTO `project_category` VALUES (38, 6, 21); -INSERT INTO `project_category` VALUES (39, 5, 21); -INSERT INTO `project_category` VALUES (40, 5, 22); -INSERT INTO `project_category` VALUES (41, 7, 23); -INSERT INTO `project_category` VALUES (42, 6, 23); -INSERT INTO `project_category` VALUES (43, 5, 23); -INSERT INTO `project_category` VALUES (44, 7, 24); -INSERT INTO `project_category` VALUES (45, 7, 25); -INSERT INTO `project_category` VALUES (46, 6, 25); -INSERT INTO `project_category` VALUES (47, 5, 25); +INSERT INTO `project_category` VALUES (48, 15, 26); +INSERT INTO `project_category` VALUES (49, 15, 27); +INSERT INTO `project_category` VALUES (51, 5, 32); +INSERT INTO `project_category` VALUES (52, 3, 43); -- ---------------------------- -- Table structure for support @@ -292,20 +216,14 @@ CREATE TABLE `support` ( `isValid` int NULL DEFAULT NULL COMMENT '是否有效', PRIMARY KEY (`id`) USING BTREE, INDEX `userId_support`(`userId` ASC) USING BTREE, - INDEX `projectId_support`(`projectId` ASC) USING BTREE, - CONSTRAINT `projectId_support` FOREIGN KEY (`projectId`) REFERENCES `project` (`projectId`) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT `userId_support` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB AUTO_INCREMENT = 73 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; + INDEX `projectId_support`(`projectId` ASC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 77 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of support -- ---------------------------- -INSERT INTO `support` VALUES (44, 1, 7, 1); -INSERT INTO `support` VALUES (66, 11, 1, 1); -INSERT INTO `support` VALUES (67, 1, 3, 1); -INSERT INTO `support` VALUES (68, 11, 8, 1); -INSERT INTO `support` VALUES (69, 1, 4, 1); -INSERT INTO `support` VALUES (70, 1, 2, 1); +INSERT INTO `support` VALUES (75, 13, 27, 1); +INSERT INTO `support` VALUES (76, 12, 32, 1); -- ---------------------------- -- Table structure for user @@ -323,19 +241,12 @@ CREATE TABLE `user` ( `userAvatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户头像', `userLevel` int NULL DEFAULT NULL COMMENT '用户等级', PRIMARY KEY (`userId`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表' ROW_FORMAT = DYNAMIC; +) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表' ROW_FORMAT = DYNAMIC; -- ---------------------------- -- Records of user -- ---------------------------- -INSERT INTO `user` VALUES (1, '666', '666', '2023-06-29 22:43:22', 1, 5, '666;666;666;密码;', 5, '\\helloGithub\\web\\uploadFile\\e19c96bf-d591-40cb-b677-cf8d1334870b_4.jpg', 5); -INSERT INTO `user` VALUES (2, '111', '111', '2023-06-29 22:43:22', 1, 1, '', 5, '\\helloGithub\\web\\uploadFile\\2f39ee7b-3c6f-4fe4-8b01-5546a3140e5b_7.jpg', 1); -INSERT INTO `user` VALUES (4, '222', '222', '2023-07-03', 1, NULL, '', 0, '\\helloGithub\\web\\uploadFile\\2f39ee7b-3c6f-4fe4-8b01-5546a3140e5b_7.jpg', 1); -INSERT INTO `user` VALUES (5, '333', '333', '2023-07-03', 1, NULL, '', 0, '\\helloGithub\\web\\uploadFile\\2f39ee7b-3c6f-4fe4-8b01-5546a3140e5b_7.jpg', 1); -INSERT INTO `user` VALUES (6, '999', '999', '2023-07-03', 1, NULL, '66;', 0, '\\helloGithub\\web\\uploadFile\\2f39ee7b-3c6f-4fe4-8b01-5546a3140e5b_7.jpg', 1); -INSERT INTO `user` VALUES (7, '777', '777', '2023-07-07', 1, 0, '', 0, '\\helloGithub\\web\\uploadFile\\2f39ee7b-3c6f-4fe4-8b01-5546a3140e5b_7.jpg', 1); -INSERT INTO `user` VALUES (9, 'zhy', 'zhy', '2023-07-08', 1, 0, '', 0, '\\helloGithub\\web\\uploadFile\\2f39ee7b-3c6f-4fe4-8b01-5546a3140e5b_7.jpg', 1); -INSERT INTO `user` VALUES (10, 'test', 'test', '2023-07-08', 1, 0, '', 0, '\\helloGithub\\web\\uploadFile\\2f39ee7b-3c6f-4fe4-8b01-5546a3140e5b_7.jpg', 1); -INSERT INTO `user` VALUES (11, '000', '000', '2023-07-08', 1, 0, '', 10, '\\helloGithub\\web\\uploadFile\\2f39ee7b-3c6f-4fe4-8b01-5546a3140e5b_7.jpg', 1); +INSERT INTO `user` VALUES (12, 'landaiqing', 'landaiqing', '2023-07-10', 1, 0, NULL, 5, '\\helloGithub\\web\\uploadFile\\81ea8579-5c45-4073-bbf2-d1ce530f71bb_touxiang.png', 1); +INSERT INTO `user` VALUES (13, '666', '666', '2023-07-10', 1, 0, '微软;', 5, '\\helloGithub\\web\\uploadFile\\69e56c15-20d5-43a4-916b-1d6230a33b8e_default.png', 1); SET FOREIGN_KEY_CHECKS = 1; diff --git a/src/com/hellogithub/dao/AdminDao.java b/src/com/hellogithub/dao/AdminDao.java index f071027..75ff663 100644 --- a/src/com/hellogithub/dao/AdminDao.java +++ b/src/com/hellogithub/dao/AdminDao.java @@ -185,7 +185,7 @@ public class AdminDao { try { Connection conn = JdbcUtils.getConnection(); QueryRunner runner = new QueryRunner(); - String sql="UPDATE project SET isValid = ? WHERE userId = ?"; + String sql="UPDATE project SET isValid = ? WHERE projectId = ?"; num = runner.update(conn, sql, isvalid,id); conn.close(); } catch (SQLException e) { @@ -200,7 +200,7 @@ public class AdminDao { try { Connection conn = JdbcUtils.getConnection(); QueryRunner runner = new QueryRunner(); - String sql="UPDATE comment SET isValid = ? WHERE userId = ?"; + String sql="UPDATE comment SET isValid = ? WHERE commentId = ?"; num = runner.update(conn, sql, isvalid,id); conn.close(); } catch (SQLException e) { @@ -245,7 +245,7 @@ public class AdminDao { try { Connection conn = JdbcUtils.getConnection(); QueryRunner runner = new QueryRunner(); - String sql="UPDATE admin SET isValid = ? WHERE userId = ?"; + String sql="UPDATE admin SET isValid = ? WHERE adminId = ?"; num = runner.update(conn, sql, isvalid,id); conn.close(); } catch (SQLException e) { diff --git a/src/com/hellogithub/dao/UserDao.java b/src/com/hellogithub/dao/UserDao.java index 930e68f..5858803 100644 --- a/src/com/hellogithub/dao/UserDao.java +++ b/src/com/hellogithub/dao/UserDao.java @@ -148,6 +148,7 @@ public class UserDao { } sql="UPDATE user SET searchHistory = ? WHERE userName= ?"; num = runner.update(conn,sql,label,name); + conn.close(); } catch (SQLException e) { throw new RuntimeException(e); } @@ -167,6 +168,7 @@ public class UserDao { String sql = "select searchHistory from user where userName=? and isValid = 1"; userEntity1 = runner.query(conn, sql, new BeanHandler<>(userEntity.class),name); label=userEntity1.getSearchHistory(); + conn.close(); } catch (SQLException e) { throw new RuntimeException(e); } @@ -186,6 +188,7 @@ public class UserDao { QueryRunner runner = new QueryRunner(); String sql="UPDATE user SET searchHistory = ? WHERE userName= ? and isValid = 1"; num = runner.update(conn,sql,label,name); + conn.close(); } catch (SQLException e) { throw new RuntimeException(e); } @@ -206,6 +209,7 @@ public class UserDao { String sql="select count(*) as num from user where isValid = 1"; userEntity = runner.query(conn,sql,new BeanHandler<>(userEntity.class)); num = userEntity.getNum(); + conn.close(); } catch (SQLException e) { throw new RuntimeException(e); } @@ -259,6 +263,7 @@ public class UserDao { label = userEntity.getSearchHistory()+str+";"; sql="UPDATE user SET searchHistory = ? WHERE userName= ? and isValid = 1"; num = runner.update(conn,sql,label,username); + conn.close(); } catch (SQLException e) { throw new RuntimeException(e); } @@ -276,6 +281,7 @@ public class UserDao { String sql = "select * from user where userName=? and isValid = 1"; userEntity = runner.query(conn, sql, new BeanHandler<>(userEntity.class),name); num = userEntity.getUserId(); + conn.close(); } catch (SQLException e) { throw new RuntimeException(e); } @@ -292,6 +298,7 @@ public class UserDao { String sql = "select * from user where userId=? and isValid = 1"; userEntity = runner.query(conn, sql, new BeanHandler<>(userEntity.class),id); label = userEntity.getUserName(); + conn.close(); } catch (SQLException e) { throw new RuntimeException(e); } @@ -307,6 +314,7 @@ public class UserDao { String sql = "select * from user where userName=? and isValid = 1"; userEntity = runner.query(conn, sql, new BeanHandler<>(userEntity.class),name); userEntity.setUserPassword("*"); + conn.close(); } catch (SQLException e) { throw new RuntimeException(e); } @@ -347,6 +355,7 @@ public class UserDao { QueryRunner runner = new QueryRunner(); String sql="UPDATE user SET userAvatar = ? WHERE userName= ? and isValid = 1"; num = runner.update(conn,sql,url,name); + conn.close(); } catch (SQLException e) { throw new RuntimeException(e); } @@ -390,6 +399,7 @@ public class UserDao { QueryRunner runner = new QueryRunner(); String sql="select * from user "; userEntityList = runner.query(conn,sql,new BeanListHandler<>(userEntity.class)); + conn.close(); } catch (SQLException e) { throw new RuntimeException(e); } @@ -404,6 +414,7 @@ public class UserDao { QueryRunner runner = new QueryRunner(); String sql="update user set userName = ? , userPassword = ? , creatTime = ? ,isValid =?, projectNum=?, searchHistory=?,contributionValue=?,userAvatar=?,userLevel=? where userId = ?"; num = runner.update(conn,sql,userName, userPassword , creatTime , isValid, projectNum, searchHistory, contributionValue, userAvatar ,userLevel,userId); + conn.close(); } catch (SQLException e) { throw new RuntimeException(e); } @@ -426,6 +437,7 @@ public class UserDao { runner.update(conn,sql,id); sql="update article set isValid = 0 where userId = ?"; runner.update(conn,sql,id); + conn.close(); } catch (SQLException e) { throw new RuntimeException(e); } diff --git a/src/com/hellogithub/dao/categoryDao.java b/src/com/hellogithub/dao/categoryDao.java index da51c9f..7a16350 100644 --- a/src/com/hellogithub/dao/categoryDao.java +++ b/src/com/hellogithub/dao/categoryDao.java @@ -33,7 +33,7 @@ public class categoryDao { try { Connection conn = JdbcUtils.getConnection(); QueryRunner runner = new QueryRunner(); - String sql = "select * from category where categoryId=? and isValid = 1"; + String sql = "select * from category where categoryId= ? and isValid = 1"; categoryEntity = runner.query(conn, sql, new BeanHandler<>(categoryEntity.class),id); conn.close(); } catch (SQLException e) { diff --git a/src/com/hellogithub/dao/projectDao.java b/src/com/hellogithub/dao/projectDao.java index 8c20a17..5a2a8aa 100644 --- a/src/com/hellogithub/dao/projectDao.java +++ b/src/com/hellogithub/dao/projectDao.java @@ -63,7 +63,7 @@ public class projectDao { try { Connection conn = JdbcUtils.getConnection(); QueryRunner runner = new QueryRunner(); - String sql = "select count(*) as num from project"; + String sql = "select count(*) as num from project where isValid = 1;"; p = runner.query(conn, sql, new BeanHandler<>(projectEntity.class)); count = p.getNum(); conn.close(); @@ -166,7 +166,7 @@ public class projectDao { try { Connection conn = JdbcUtils.getConnection(); QueryRunner runner = new QueryRunner(); - String sql = "select * from project where isValid = 1 and projectId = ?"; + String sql = "select * from project where projectId = ? and isValid= 1;"; projectEntity = runner.query(conn, sql, new BeanHandler<>(projectEntity.class),id); conn.close(); } catch (SQLException e) { @@ -230,7 +230,7 @@ public class projectDao { try { Connection conn = JdbcUtils.getConnection(); QueryRunner runner = new QueryRunner(); - String sql = "select * from project where isValid = 1 and userId= ?"; + String sql = "select * from project where userId= ? and isValid = 1;"; projectEntityList = runner.query(conn, sql, new BeanListHandler<>(projectEntity.class),id); conn.close(); } catch (SQLException e) { @@ -274,7 +274,7 @@ public class projectDao { try { Connection conn = JdbcUtils.getConnection(); QueryRunner runner = new QueryRunner(); - String sql ="INSERT into project (userId,projectName,projectUrl,projectIco,projectTitle,projectDescription,startNum,submitTime,categoryId,isValid,periodicals,lookCount) VALUES (?,?,?,?,?,?,0,?,?,1,0,0)"; + String sql ="INSERT into project (userId,projectName,projectUrl,projectIco,projectTitle,projectDescription,startNum,submitTime,categoryId,isValid,periodicals,lookCount) VALUES (?,?,?,?,?,?,0,?,?,0,0,0)"; num = runner.update(conn, sql,userId,projectName,projectUrl,projectIco,projectTitle,projectDescription,submitTime,categoryId); conn.close(); } catch (SQLException e) { @@ -303,7 +303,7 @@ public class projectDao { try { Connection conn = JdbcUtils.getConnection(); QueryRunner runner = new QueryRunner(); - String sql = "select * from project where isValid = 1 and projectName = ?"; + String sql = "select * from project where projectName = ? "; projectEntity = runner.query(conn, sql, new BeanHandler<>(projectEntity.class),projectName); conn.close(); } catch (SQLException e) { diff --git a/src/com/hellogithub/service/projectService.java b/src/com/hellogithub/service/projectService.java index ab7f865..906f460 100644 --- a/src/com/hellogithub/service/projectService.java +++ b/src/com/hellogithub/service/projectService.java @@ -274,6 +274,7 @@ public class projectService { { flag=0; } + int proId = projectDao.selectProByProName(projectName).getProjectId(); for(int i=0;i