From c88bc91120563c66667a73e1ea0e5764234e1ccc Mon Sep 17 00:00:00 2001 From: Qing Date: Sun, 2 Jul 2023 22:50:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E5=BA=93/?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8E=B7=E5=8F=96=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/hellogithub.sql | 7 ++++--- src/com/hellogithub/servlet/deletelabelServlet.java | 2 +- src/com/hellogithub/servlet/selectUserLabelServlet.java | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sql/hellogithub.sql b/sql/hellogithub.sql index aa3c71c..eefde35 100644 --- a/sql/hellogithub.sql +++ b/sql/hellogithub.sql @@ -11,7 +11,7 @@ Target Server Version : 80031 (8.0.31) File Encoding : 65001 - Date: 02/07/2023 11:09:44 + Date: 02/07/2023 22:50:04 */ SET NAMES utf8mb4; @@ -68,7 +68,7 @@ CREATE TABLE `category` ( -- ---------------------------- -- Records of category -- ---------------------------- -INSERT INTO `category` VALUES (0, ' 综合', '综合', NULL); +INSERT INTO `category` VALUES (0, ' 综合', '综合', 1); INSERT INTO `category` VALUES (1, ' C', 'C', 1); INSERT INTO `category` VALUES (2, ' C#', 'C#', 1); INSERT INTO `category` VALUES (3, ' C++', 'C++', 1); @@ -178,12 +178,13 @@ CREATE TABLE `user` ( `isValid` int NULL DEFAULT NULL COMMENT '是否有效(0/1)', `projectNum` int NULL DEFAULT NULL COMMENT '提交的项目总数', `searchHistory` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '搜索历史', + `contributionValue` int NULL DEFAULT NULL COMMENT '贡献值', PRIMARY KEY (`userId`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 4 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, 1, NULL); +INSERT INTO `user` VALUES (1, '666', '666', '2023-06-29 22:43:22', 1, 1, '666;777;33;测试;hhh;rrr;12e;', NULL); SET FOREIGN_KEY_CHECKS = 1; diff --git a/src/com/hellogithub/servlet/deletelabelServlet.java b/src/com/hellogithub/servlet/deletelabelServlet.java index b9ee2c2..51fdf0b 100644 --- a/src/com/hellogithub/servlet/deletelabelServlet.java +++ b/src/com/hellogithub/servlet/deletelabelServlet.java @@ -38,7 +38,7 @@ public class deletelabelServlet extends HttpServlet { HttpSession session = req.getSession(); userEntity user = (userEntity)session.getAttribute("user"); String name = user.getUserName(); - String str = req.getParameter("xxxxx"); + String str = req.getParameter("tag"); int num = userService.dedletePieceLabel(name,str); //返回处理行数,如果为零则代表处理零条结果 diff --git a/src/com/hellogithub/servlet/selectUserLabelServlet.java b/src/com/hellogithub/servlet/selectUserLabelServlet.java index 81584a6..bea0339 100644 --- a/src/com/hellogithub/servlet/selectUserLabelServlet.java +++ b/src/com/hellogithub/servlet/selectUserLabelServlet.java @@ -38,7 +38,7 @@ public class selectUserLabelServlet extends HttpServlet { String name = userEntity.getUserName(); String jsonString = JSONObject.toJSONString(userService.selectLabel(name)); writer.println(jsonString); - setResultOK("success",writer); +// setResultOK("success",writer); writer.close(); }