diff --git a/README.md b/README.md index fe42465..bb8ef47 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,56 @@ -# HotelSystem -This is 黄钰朝’s hotel_system -## 附:项目链接(已部署于阿里云服务器) -http://www.cxkball.club:2333/xhotel/regist.jsp -## 实现的功能 +# Xhotel +------ + +[![release](https://img.shields.io/badge/release-1.0.0-green)](https://github.com/misterchaos/HotelSystem/releases) +[![release](https://img.shields.io/badge/version-beta-orange)](https://github.com/misterchaos/HotelSystem/releases) +[![release](https://img.shields.io/badge/build-passing-green)](https://github.com/misterchaos/HotelSystem/releases) + +## :smile:Introduction + +TopView工作室一轮考核项目:酒店管理系统(黄钰朝) + +xhotel是一个酒店管理系统,提供查看房间,预订房间,个人信息管理,房间和酒店信息管理(管理员)等功能
+后台技术:Java,tomcat,mysql,servlet,jsp
+ +## :heavy_check_mark:Quick Start + +### :point_right:[点击这里](http://www.cxkball.club:2333/index.jsp)立即体验 + +## :bulb:Information + +开发者:黄钰朝
+联系邮箱:kobe524348@gmail.com
+项目开发时间:2019-04-04至2019-04-25
+版本号:1.0.0
+开源许可:Apache License 2.0
+ +## :sunny:Features + +#### 1.登陆页面 + + +![img](https://github.com/misterchaos/HotelSystem/blob/dev/项目截图/登陆功能.jpg) + +#### 2.首页 + +#### ![img](https://github.com/misterchaos/HotelSystem/blob/dev/项目截图/主页.jpg) + +#### 3.模糊查询房间 + + +![img](https://github.com/misterchaos/HotelSystem/blob/dev/项目截图/模糊查询.jpg) + +#### 4.留言板 + +![img](https://github.com/misterchaos/HotelSystem/blob/dev/项目截图/留言板.jpg) + + + +## :triangular_flag_on_post:实现的功能 + +### 1.用户模块 + -### 用户模块 - 注册功能 - 登陆功能 - 记住登陆状态,下次自动登陆 @@ -18,38 +64,41 @@ http://www.cxkball.club:2333/xhotel/regist.jsp - 订单中可以填写备注信息 - 用户查看自己的订单,取消自己的订单 - 可以在留言板中留言,查看别人的留言 -### 管理员模块 + +### 2.管理员模块 + - 管理员可以添加新用户 - 管理员可以添加新房间 - 管理员可以修改房间信息,删除房间 -### 超级管理员 + +### 3.超级管理员 + - 对酒店增删查改(无界面展示,仅完成到Dao层) -## 功能特色 -- 使用jsp进行界面展示 -- 使用Cookie实现自动登陆 -- 项目部署到阿里云远程服务器 -- 具备图片上传功能 -- 密码使用MD5加密并提供修改功能 -- 交互体验的细节有设计 -## 代码特色 + +## :zap:代码特色 + ### 安全性 + - 使用正则进行输入检查,不允许不合法数据进入数据库 - PrepareStatement防止sql注入 - 过滤标签注入 - 使用md5加密用户密码 - 使用uuid保证全局唯一性 - 空指针检查 + ### 代码复用性 + - 所有Dao都是BaseDao的子类,子类只负责处理对应Service层传入的数据 -和书写部分sql语句,所有数据库操作都在BaseDao的两个方法中 + 和书写部分sql语句,所有数据库操作都在BaseDao的两个方法中 - po层使用继承体系,所有实体都(直接或间接)继承BaseEntity,存储数据库表的id,status,gmt_create,和gmt_modified信息, -并且房间和服务都继承Product类,房间和服务订单都继承Order + 并且房间和服务都继承Product类,房间和服务订单都继承Order - md5加密,获取uuid,等等功能放到工具类复用 - 重复代码抽取重构,使用模板方法和策略模式等优化代码 ### 可维护性 + - 代码注释:绝大部分代码都提供了类注释,方法注释,属性注释 - 接口文档:使用javadoc注释,提供API文档 - 面向接口编程:Dao层和Service层都向上提供接口,与实现类分离 @@ -58,24 +107,29 @@ http://www.cxkball.club:2333/xhotel/regist.jsp - 规范性: 统一前端请求参数规范,使用枚举类管理请求参数 - 使用配置文件,数据库配置,连接池配置,工厂配置全部与代码分离 - MVC设计模式:servlet中没有页面输出,jsp中没有java代码,数据处理 -都下放到service层 + 都下放到service层 - 几乎没有“魔法值”:绝大多数的常量使用枚举类,极少数使用final变量, -剩下的是前端部分请求参数中的常量 + 剩下的是前端部分请求参数中的常量 - 避免代码污染:将CheckException封装成RuntimeException再向 -上层抛出,避免各层之间出现耦合 + 上层抛出,避免各层之间出现耦合 - 单一职责:每个Service都有自己对应的Dao层实现类,每个Service和Dao可以单独完成自己的功能 ### 封装数据的入口和出口: + - 前端数据:所有的请求参数通过BeanUtils映射成实体类对象,在此过程统一过滤标签注入 - 持久化数据:所有的数据库更新操作和数据库查询操作都封装在BaseDaoImpl的executeUpdate和executeQuery -方法中,只有这两个方法中向数据库连接池取连接,资源统一获取和释放 + 方法中,只有这两个方法中向数据库连接池取连接,资源统一获取和释放 - 查询结果集数据:BaseDaoImpl封装了所有的数据库更新操作和大部分的查询操作,只有少数查询 -通过子类传入sql语句执行,结果集的处理全部由BaseDaoImpl封装 + 通过子类传入sql语句执行,结果集的处理全部由BaseDaoImpl封装 - 状态和处理结果:service层返回的转台码和处理后的数据,全部放在Result中返回 - 页面数据:所有返回前端的数据都放在PageVo中返回 + ### 性能 + - 手写数据库连接池,提高访问数据库性能 + ### 设计模式 + - 工厂模式 - 单例模式 - 策略模式 @@ -84,27 +138,54 @@ http://www.cxkball.club:2333/xhotel/regist.jsp - MVC模式 -## 项目开发日志: + +## :page_facing_up:项目开发日志: #### 4月20日更新:构建基本的jsp页面 + #### 4月17日更新:构建房间,订单等服务 + #### 4月14日更新:构建控制层,UserService实现 + #### 4月12日更新:构建房间,订单Dao实现 + #### 4月11日更新:构建UserDao + #### 4月10日更新:构建基础Dao层 + #### 4月9日更新:初步构建Dao层 + #### 4月8日更新:构建数据库连接池 + #### 4月7日更新:建立项目 + #### 4月3日更新:提交项目需求分析(项目命名:Xhotel) + #### 4月1日更新:目前处于需求分析,建立数据模型和业务流程初步设计阶段 + #### 3月30日更新:刚刚完成CAT工作室的项目,加上QG训练营有任务,暂未开始动手 + #### 准备先好好总结一下CAT项目的经验,并且把一些遇到的问题理解清楚再动手写这个项目 -## 目前遇到的疑惑:(4月7日更新:已解决) -### 1.用户和管理员需不需要分表? -#### 目前我想采取的方案是一张user表,只存储用户名,密码,用户类型,提供给注册登陆模块使用,另外分别使用customer表和hotel_admin表分别保存用户和管理员的数据,再引入user_id做外键,原因是将来如果功能扩展,用户和管理员的数据将会有更多不同,分表便于管理,避免数据冗余,详细信息表和user表分离,也便于注册登陆模块的其他模块解耦 -### 2.酒店的星级和评分有什么区别? -#### 酒店的星级直接由评分决定?还是星级是超级管理员设置的,评分是用户评价统计的结果? -### 3.对于数据库的字段,用户类型,房间类型,酒店类型,这种信息,使用0,1这种数字代表,和直接使用varchar存储具体类型,孰优孰劣? -#### 目前我觉得直接使用字符串描述类型,更加方便,避免前端显示数据时需要再次进行转换 -### 4.异常应该如何处理?service层的异常还应该往controller层抛吗?有些并不影响业务需求的异常,比如图片加载不到的异常,是否允许只打印堆栈信息?感觉有些异常确实没有产生严重的影响,又没有很好的解决方案,也没有很大的必要向用户输出提示,就不知道该怎么处理了 +### + +## :star:License + +本软件仅供交流学习,不得用于商业用途 + +Copyright 黄钰朝 + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + +``` + http://www.apache.org/licenses/LICENSE-2.0 +``` + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/db_xhotel.sql b/db_xhotel.sql index 79d8b7d..d8609a4 100644 --- a/db_xhotel.sql +++ b/db_xhotel.sql @@ -11,7 +11,7 @@ Target Server Version : 50725 File Encoding : 65001 - Date: 25/04/2019 15:53:00 + Date: 25/04/2019 22:47:58 */ SET NAMES utf8mb4; @@ -201,10 +201,12 @@ INSERT INTO `t_order_room` VALUES ('52aae8fbc05a493492ab97eeddc12a82', '9092776' INSERT INTO `t_order_room` VALUES ('54d0c4a2b1ce44b7bf2f36bf43b1c3f0', '0.28564133128011604', '2d14f3e43c604805a9c3b18a1ba92c75', '0ae1e0cb4a2e41a68feb8aa8a2dc5f90', '2019-04-25', '2019-04-25', 8199, 'insert*', 0, '2019-04-25 06:56:49', '2019-04-25 06:56:49'); INSERT INTO `t_order_room` VALUES ('592e27e7b242468099ca71b866967742', '0.6202344427843813', 'e830a36cf81048bfb3648c479e4b3ccd', '07b184b88a7445d1929383b8eca1cbbc', '2019-04-25', '2021-05-29', 6199, '我要住一年', 0, '2019-04-25 00:40:13', '2019-04-25 00:40:13'); INSERT INTO `t_order_room` VALUES ('5d29e849204642049d7ddc140bc761bb', '0.4425312139819423', 'c8fa6515088d4bc1872082458b281ec3', '38ed6a1a562d4343954eb99756474f9c', '2019-04-27', '2019-04-13', 4999, '备注一下', 0, '2019-04-24 17:21:01', '2019-04-24 17:21:01'); +INSERT INTO `t_order_room` VALUES ('667fa732127b454498d3aac4890aafac', '0.5154666949359069', '556e52b747c04f628d9a396195789c75', '07b184b88a7445d1929383b8eca1cbbc', '2019-04-11', '2019-04-13', 6199, '', 0, '2019-04-25 18:56:07', '2019-04-25 18:56:07'); INSERT INTO `t_order_room` VALUES ('737b85d8e6a34e5380e2d3b323819433', '0.3577077615276961', 'a39dca5ab0ee49d2861c8b3bd238ea43', '07b184b88a7445d1929383b8eca1cbbc', '2016-12-29', '2019-12-31', 6199, 'hgkhjgb,', 0, '2019-04-25 01:01:59', '2019-04-25 01:01:59'); INSERT INTO `t_order_room` VALUES ('78de6b5b3c0a46cd801e4eecd237b589', '9092776', '', '38ed6a1a562d4343954eb99756474f9c', '2019-04-27', '2019-04-28', 0, '反对撒', 0, '2019-04-21 22:00:40', '2019-04-21 22:00:40'); INSERT INTO `t_order_room` VALUES ('793f219dd27c4d50a5d8a35d722a703e', '9092776', '', '38ed6a1a562d4343954eb99756474f9c', '2019-04-12', '2019-04-14', 0, '吧v', 0, '2019-04-21 21:54:53', '2019-04-21 21:54:53'); INSERT INTO `t_order_room` VALUES ('7acb521630a246d5af363a3b23526d1e', '9092776', '', '38ed6a1a562d4343954eb99756474f9c', '2019-04-05', '2019-04-14', 0, '反对撒', 0, '2019-04-21 21:58:13', '2019-04-21 21:58:13'); +INSERT INTO `t_order_room` VALUES ('7b81632a3dfd4ece9231c92cf7fd8b9e', '0.8470651381976871', 'ca402850b37841048552763ee086c5e0', '07b184b88a7445d1929383b8eca1cbbc', '2019-04-19', '2019-04-06', 6199, '', 0, '2019-04-25 17:29:23', '2019-04-25 17:29:23'); INSERT INTO `t_order_room` VALUES ('7c9a2ec738c34818b8ffabcfec2859b8', '0.913710065992266', 'e9761b5333c04bc88730b891873f6f3c', '07b184b88a7445d1929383b8eca1cbbc', '2019-04-01', '2019-03-16', 6199, '', 0, '2019-04-25 00:16:43', '2019-04-25 00:16:43'); INSERT INTO `t_order_room` VALUES ('7c9cee6b37374c33a0a051fb17961b34', '1020', '0', '0', '2019-04-16', '2019-04-16', 100, '', 0, '2019-04-16 22:42:27', '2019-04-16 22:42:27'); INSERT INTO `t_order_room` VALUES ('830bc8b34e1a43de9b8a155e4a1c21ac', '9092776', '', '38ed6a1a562d4343954eb99756474f9c', '2019-04-21', '2019-04-20', 0, '反对撒', 0, '2019-04-21 22:00:26', '2019-04-21 22:00:26'); @@ -219,6 +221,8 @@ INSERT INTO `t_order_room` VALUES ('a738ab42dfcc44759c7eaaff73950ed2', '1020', ' INSERT INTO `t_order_room` VALUES ('a9f55e9afc024a3d9c806681ddb98d01', '1020', '0', '0', '2019-04-16', '2019-04-16', 100, '', 0, '2019-04-16 22:27:36', '2019-04-16 22:27:36'); INSERT INTO `t_order_room` VALUES ('b17c47884de84fd9b0ccb9cf8cce5f8d', '1020', '0', '0', '2019-04-16', '2019-04-16', 100, '', 0, '2019-04-16 22:31:02', '2019-04-16 22:31:02'); INSERT INTO `t_order_room` VALUES ('bb0b5763a73d4fd3acf018bee8bf60b3', '9092776', '', '38ed6a1a562d4343954eb99756474f9c', '2019-04-21', '2019-04-20', 0, '反对撒', 0, '2019-04-21 21:59:53', '2019-04-21 21:59:53'); +INSERT INTO `t_order_room` VALUES ('bc4fde14ab094a3c9d1400704eabc20b', '0.3562957006653874', 'c7cb031100da4f11923aac94c57d8a91', '07b184b88a7445d1929383b8eca1cbbc', '123123-12-12', '123123-12-23', 6199, '123123', 0, '2019-04-25 22:22:00', '2019-04-25 22:22:00'); +INSERT INTO `t_order_room` VALUES ('bde25b0e6f774a949775ddc501e2ef1b', '0.5488831042266691', '556e52b747c04f628d9a396195789c75', '07b184b88a7445d1929383b8eca1cbbc', '2019-04-06', '2019-04-06', 6199, '', 0, '2019-04-25 19:57:14', '2019-04-25 19:57:14'); INSERT INTO `t_order_room` VALUES ('be34ef9ec58b41d5b5ffa0fa4578c1b5', '1020', '0', '0', '2019-04-16', '2019-04-16', 100, '', 0, '2019-04-16 22:30:44', '2019-04-16 22:30:44'); INSERT INTO `t_order_room` VALUES ('c069cdb3a1b04386aac7f1c72536979f', '9092776', '', '38ed6a1a562d4343954eb99756474f9c', '2019-04-12', '2019-04-10', 0, '反对撒', 0, '2019-04-21 21:54:19', '2019-04-21 21:54:19'); INSERT INTO `t_order_room` VALUES ('c3dcd1a87394429c9190281b53b74efb', '0.7223806484793669', '3cfe4868ee0742499e44c816ac77467d', '2fb0d35466d64d7e92f4b735e2ebe5ba', '2019-04-14', '2019-04-14', 8799, '12345', 0, '2019-04-25 00:41:19', '2019-04-25 00:41:19'); @@ -293,25 +297,190 @@ CREATE TABLE `t_remark` ( -- Records of t_remark -- ---------------------------- INSERT INTO `t_remark` VALUES ('', '黄钰朝', '第一条留言', 0, '2019-04-23 05:17:59', '2019-04-24 16:20:53'); +INSERT INTO `t_remark` VALUES ('00df4ae8e7bf4565a61aa0465e3468c9', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:31:03', '2019-04-25 22:31:03'); +INSERT INTO `t_remark` VALUES ('011eb6281c1b4881ad45b63f6a86a165', 'xiaopan(默认昵称)', '实现', 0, '2019-04-25 20:39:42', '2019-04-25 20:39:42'); +INSERT INTO `t_remark` VALUES ('0312bbe907024a3688810508ca3ee3c1', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:30:53', '2019-04-25 22:30:53'); +INSERT INTO `t_remark` VALUES ('04d1ef2049324ca3939023249fffd8d7', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:31:06', '2019-04-25 22:31:06'); +INSERT INTO `t_remark` VALUES ('0771e082e71a4385a6cfafe83af82231', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:30:53', '2019-04-25 22:30:53'); +INSERT INTO `t_remark` VALUES ('07b7c090ec8a44e4a7c8cc89bd145942', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:39:45', '2019-04-25 22:39:45'); +INSERT INTO `t_remark` VALUES ('07d0337f4049450c947116e6841f1c7b', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:31:04', '2019-04-25 22:31:04'); +INSERT INTO `t_remark` VALUES ('08dd3c4c7e37411384a879d71c276394', 'xiaopan(默认昵称)', '全明制作人的影迷大家好,我是练习时长两年半的个人练习生曾彦祖,喜欢唱、跳、rap、篮球。music', 0, '2019-04-25 18:55:45', '2019-04-25 18:55:45'); +INSERT INTO `t_remark` VALUES ('08fc7656f6e343c9bb1485281e17114c', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:30:48', '2019-04-25 22:30:48'); +INSERT INTO `t_remark` VALUES ('096bd642ba44494e9f8076b69a514db9', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:31:06', '2019-04-25 22:31:06'); +INSERT INTO `t_remark` VALUES ('0bf5e6cd63a0420a94f05ae98afc4a5e', '123112(biger)', '.', 0, '2019-04-25 22:37:20', '2019-04-25 22:37:20'); +INSERT INTO `t_remark` VALUES ('0bff6bd4b2af42d392611d7623bafb42', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:32:24', '2019-04-25 22:32:24'); +INSERT INTO `t_remark` VALUES ('0e937fd191e2438b90453e36da452de6', '123112(biger)', '.', 0, '2019-04-25 22:38:11', '2019-04-25 22:38:11'); +INSERT INTO `t_remark` VALUES ('0edd5cf805c446be95caa5c79a7aadbd', '123112(biger)', '101220', 0, '2019-04-25 22:47:17', '2019-04-25 22:47:17'); INSERT INTO `t_remark` VALUES ('1', 'cxk(徐坤粉丝团)', '牛逼,看到陈宇大佬了', 0, '2019-04-25 00:24:04', '2019-04-25 00:24:04'); INSERT INTO `t_remark` VALUES ('10474519c49f43ab85d0fb0ab1dfde20', '222222(默认昵称)', '', 0, '2019-04-25 01:16:39', '2019-04-25 01:16:39'); +INSERT INTO `t_remark` VALUES ('109090758bce4f619b3c791d891d254b', '123112(biger)', '1', 0, '2019-04-25 22:45:01', '2019-04-25 22:45:01'); +INSERT INTO `t_remark` VALUES ('114c2ee4b0784b99afca3f29e6f314b3', '123112(biger)', '1', 0, '2019-04-25 22:45:11', '2019-04-25 22:45:11'); +INSERT INTO `t_remark` VALUES ('157d78e87b704f71844b668fc15165f6', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:33:53', '2019-04-25 22:33:53'); +INSERT INTO `t_remark` VALUES ('1793faff5f6d42f79b0f9ec8ca28da0b', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:36:32', '2019-04-25 22:36:32'); +INSERT INTO `t_remark` VALUES ('1846947ce7e448f6a51c60de235774e7', '123112(biger)', '.', 0, '2019-04-25 22:30:47', '2019-04-25 22:30:47'); +INSERT INTO `t_remark` VALUES ('1888b7628b894552b73d2414d6a650a9', '123112(biger)', '.', 0, '2019-04-25 22:36:22', '2019-04-25 22:36:22'); +INSERT INTO `t_remark` VALUES ('18fe595529164af091a55b1f26d1bb26', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:31:05', '2019-04-25 22:31:05'); +INSERT INTO `t_remark` VALUES ('19c3a92bb5d54bcab3352a58b7becdf9', '123112(biger)', '.', 0, '2019-04-25 22:37:30', '2019-04-25 22:37:30'); +INSERT INTO `t_remark` VALUES ('19e2235db7964f6cbf96846f04a0b558', 'ikun9527(默认昵称)', '律师函警告。。。', 0, '2019-04-25 22:15:03', '2019-04-25 22:15:03'); +INSERT INTO `t_remark` VALUES ('1c021838269b4f73ba367d66c734fd07', '123112(biger)', '.', 0, '2019-04-25 22:28:01', '2019-04-25 22:28:01'); INSERT INTO `t_remark` VALUES ('1cbe392831854bdab6c360256a248993', '222222(默认昵称)', 'wwww', 0, '2019-04-25 01:15:35', '2019-04-25 01:15:35'); +INSERT INTO `t_remark` VALUES ('1d8c1aa8744a452ca2b95daca01a019b', '123112(biger)', '.', 0, '2019-04-25 22:26:19', '2019-04-25 22:26:19'); +INSERT INTO `t_remark` VALUES ('1f243831490d443aaf846dbed9f6a2b3', 'caixukun123(默认昵称)', '{remark:手机虎扑|虎扑客户端|关注虎扑欢迎访问虎扑,请先注册或者登录NBA虎扑首页|NBA|CBA|电竞|国际足球|中国足球|赛车|装备|识货|社区|步行街|路人王|更多首页|新闻|比赛中心|赛程|球队|选秀|百科|街球|NBA论坛利拉德,已经是世界第一等!利拉德被低估了的实力和决心。勇士的傲慢让自己坐实了反派角色勇士为什么就能被揍成这样?利拉德,', 0, '2019-04-25 22:34:33', '2019-04-25 22:34:33'); INSERT INTO `t_remark` VALUES ('2', '黄钰朝', '大家好,我是练习时长两年。。。呸,我是本酒店管理系统的唯一超管黄钰朝,很荣幸成为置顶留言哈哈哈(后端程序员装逼时刻),各位大佬如果想尝试标签注入或者sql注入,请开始你的表演,但是正常来说是没有用的(吧),所以不要尝试太多次,以保证留言的质量', 0, '2049-04-25 00:30:42', '2019-04-25 01:08:57'); +INSERT INTO `t_remark` VALUES ('202de34611bd427d866bc9ccfe8aca90', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:38:36', '2019-04-25 22:38:36'); +INSERT INTO `t_remark` VALUES ('20cb9dbe71224eb0b860e8a7fce68b2d', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:31:07', '2019-04-25 22:31:07'); +INSERT INTO `t_remark` VALUES ('20e43bb7577f4154afb863b4b4e616c5', 'caixukun123(默认昵称)', '大家好,我是练习时长两年。。。呸,我是本酒店管理系统的唯一超管黄钰朝,很荣幸成为置顶留言哈哈哈(后端程序员装逼时刻),各位大佬如果想尝试标签注入或者sql注入,请开始你的表演,但是正常来说是没有用的(吧),所以不要尝试太多次,以保证留言的质量', 0, '2019-04-25 22:26:30', '2019-04-25 22:26:30'); +INSERT INTO `t_remark` VALUES ('20e966c4ced74d6ebebad81445ec4cb8', '123112(biger)', '.', 0, '2019-04-25 22:26:28', '2019-04-25 22:26:28'); +INSERT INTO `t_remark` VALUES ('228bb8586b8e4b2e938eca135e034e73', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:37:37', '2019-04-25 22:37:37'); +INSERT INTO `t_remark` VALUES ('2609ab95392040a6b64831bdee55a0e6', '123112(biger)', '.', 0, '2019-04-25 22:26:11', '2019-04-25 22:26:11'); +INSERT INTO `t_remark` VALUES ('262886309b87461db89f1a2256f479c8', '123112(biger)', '1', 0, '2019-04-25 22:47:10', '2019-04-25 22:47:10'); INSERT INTO `t_remark` VALUES ('28d2fb47d3a345e08e05646aaf6db2fd', 'huangyuchao123(默认昵称)', '留言警告', 0, '2019-04-25 00:43:04', '2019-04-25 00:43:04'); +INSERT INTO `t_remark` VALUES ('2a45e1ba090e43448d55db0b4052652c', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:31:04', '2019-04-25 22:31:04'); +INSERT INTO `t_remark` VALUES ('2a924a7e8e2b4d569d119aef2ad2fd47', '123112(biger)', '.', 0, '2019-04-25 22:38:01', '2019-04-25 22:38:01'); +INSERT INTO `t_remark` VALUES ('2c0bff5126e2465db21268f0027a8cce', '123112(biger)', '1', 0, '2019-04-25 22:44:59', '2019-04-25 22:44:59'); +INSERT INTO `t_remark` VALUES ('2d1198d207584f22b27a2e457aabe148', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:38:45', '2019-04-25 22:38:45'); +INSERT INTO `t_remark` VALUES ('2e0201e2097a4563a43b23766c90a94d', 'xiaopan(默认昵称)', '实现', 0, '2019-04-25 20:32:29', '2019-04-25 20:32:29'); +INSERT INTO `t_remark` VALUES ('2e9d8b4bfbf04166acb341e8e90daab4', '123112(biger)', '.', 0, '2019-04-25 22:26:25', '2019-04-25 22:26:25'); +INSERT INTO `t_remark` VALUES ('2f3326372bef435ebcc961fa0fadd62b', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:37:36', '2019-04-25 22:37:36'); +INSERT INTO `t_remark` VALUES ('30beacafdbbe4dbe880d3e6fa40c8d42', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:39:42', '2019-04-25 22:39:42'); +INSERT INTO `t_remark` VALUES ('32f7fca585ca449382b8210664cf0b61', 'caixukun123(默认昵称)', '大家好,我是练习时长两年。。。呸,我是本酒店管理系统的唯一超管黄钰朝,很荣幸成为置顶留言哈哈哈(后端程序员装逼时刻),各位大佬如果想尝试标签注入或者sql注入,请开始你的表演,但是正常来说是没有用的(吧),所以不要尝试太多次,以保证留言的质量', 0, '2019-04-25 22:25:42', '2019-04-25 22:25:42'); +INSERT INTO `t_remark` VALUES ('33f7665fd3974b38a334a21fa4cc1bbd', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:30:55', '2019-04-25 22:30:55'); +INSERT INTO `t_remark` VALUES ('36e71d4079104625848ee60d6de44cac', '123112(biger)', '1', 0, '2019-04-25 22:45:07', '2019-04-25 22:45:07'); INSERT INTO `t_remark` VALUES ('396f88f2976f4e849901aa437c07579d', 'woshichenyu(默认昵称)', '我是陈宇,前排留名', 0, '2019-04-25 00:16:06', '2019-04-25 00:16:06'); INSERT INTO `t_remark` VALUES ('3b57fa61347940f8a82d54b249b3a0e8', 'Cerbur(默认昵称)', 'cerbur.club', 0, '2019-04-25 00:22:04', '2019-04-25 00:22:04'); +INSERT INTO `t_remark` VALUES ('3b9c13f4acc7412e978d86e7d4dc214e', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:31:02', '2019-04-25 22:31:02'); +INSERT INTO `t_remark` VALUES ('3ea6f49474dd48c69ab36e8252d7814d', '123112(biger)', '.', 0, '2019-04-25 22:26:07', '2019-04-25 22:26:07'); +INSERT INTO `t_remark` VALUES ('3f57b8a6a04540218fc9bead446112dd', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:38:40', '2019-04-25 22:38:40'); +INSERT INTO `t_remark` VALUES ('41a955b65a3c4831a446fa943741e887', 'caixukun123(默认昵称)', '{remark:手机虎扑|虎扑客户端|关注虎扑欢迎访问虎扑,请先注册或者登录NBA虎扑首页|NBA|CBA|电竞|国际足球|中国足球|赛车|装备|识货|社区|步行街|路人王|更多首页|新闻|比赛中心|赛程|球队|选秀|百科|街球|NBA论坛利拉德,已经是世界第一等!利拉德被低估了的实力和决心。勇士的傲慢让自己坐实了反派角色勇士为什么就能被揍成这样?利拉德,', 0, '2019-04-25 22:36:23', '2019-04-25 22:36:23'); +INSERT INTO `t_remark` VALUES ('41f378ef5ea149caa1cfda747b1b67d1', '123112(biger)', '.', 0, '2019-04-25 22:26:21', '2019-04-25 22:26:21'); +INSERT INTO `t_remark` VALUES ('424a71b4ff0741f5a17863b9e7eb97b0', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:38:19', '2019-04-25 22:38:19'); +INSERT INTO `t_remark` VALUES ('4716dd938f564757a025e2e4b35bb470', '123112(biger)', '1', 0, '2019-04-25 22:44:58', '2019-04-25 22:44:58'); +INSERT INTO `t_remark` VALUES ('47c3daa8ded84978b5612e7be4932944', 'xiaopan(默认昵称)', '????', 0, '2019-04-25 20:35:23', '2019-04-25 20:35:23'); +INSERT INTO `t_remark` VALUES ('4a4511b578c64080b18f18c5e6e40f2f', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:30:54', '2019-04-25 22:30:54'); +INSERT INTO `t_remark` VALUES ('4ea82579a0a34b408068aa844d0a73eb', '123112(biger)', '.', 0, '2019-04-25 22:26:18', '2019-04-25 22:26:18'); +INSERT INTO `t_remark` VALUES ('50ca2c80c1f746b68790ee92d06bb107', '123112(biger)', '.', 0, '2019-04-25 22:36:56', '2019-04-25 22:36:56'); +INSERT INTO `t_remark` VALUES ('529c7c029b63413aa72ee1430c259359', '123112(biger)', '1', 0, '2019-04-25 22:44:54', '2019-04-25 22:44:54'); +INSERT INTO `t_remark` VALUES ('5392159238d94391907fec4898314565', '123112(biger)', '1', 0, '2019-04-25 22:43:41', '2019-04-25 22:43:41'); +INSERT INTO `t_remark` VALUES ('55034ff7c84c438ea3f3dfe4248c6314', '123112(biger)', '.', 0, '2019-04-25 22:31:02', '2019-04-25 22:31:02'); INSERT INTO `t_remark` VALUES ('57685f8b25f34c168deb3e123cb3d31e', '222222(默认昵称)', '', 0, '2019-04-25 01:16:48', '2019-04-25 01:16:48'); +INSERT INTO `t_remark` VALUES ('5873e848a2b74587892bbbbb356c1ca4', 'caixukun123(默认昵称)', '{remark:手机虎扑|虎扑客户端|关注虎扑欢迎访问虎扑,请先注册或者登录NBA虎扑首页|NBA|CBA|电竞|国际足球|中国足球|赛车|装备|识货|社区|步行街|路人王|更多首页|新闻|比赛中心|赛程|球队|选秀|百科|街球|NBA论坛利拉德,已经是世界第一等!利拉德被低估了的实力和决心。勇士的傲慢让自己坐实了反派角色勇士为什么就能被揍成这样?利拉德,', 0, '2019-04-25 22:34:38', '2019-04-25 22:34:38'); +INSERT INTO `t_remark` VALUES ('5cc5a7b491854dc4892293607ec94526', '123112(biger)', '.', 0, '2019-04-25 22:26:08', '2019-04-25 22:26:08'); +INSERT INTO `t_remark` VALUES ('5df79fa383d0460b97765d5cfecbf84c', '123112(biger)', '.', 0, '2019-04-25 22:37:52', '2019-04-25 22:37:52'); +INSERT INTO `t_remark` VALUES ('60ec558bcc384be48c0e0e878fb97cd0', 'xiaopan(默认昵称)', '实现', 0, '2019-04-25 20:46:15', '2019-04-25 20:46:15'); +INSERT INTO `t_remark` VALUES ('61c4f6ce1c454cbbb5b2271d6d6cfd17', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:39:42', '2019-04-25 22:39:42'); +INSERT INTO `t_remark` VALUES ('637c24bb165a431d9a511eeca5b747bf', '123112(biger)', '.', 0, '2019-04-25 22:26:22', '2019-04-25 22:26:22'); +INSERT INTO `t_remark` VALUES ('64d209f9586f40298283d353cd69532a', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:30:57', '2019-04-25 22:30:57'); +INSERT INTO `t_remark` VALUES ('64e54a2ace724805a46ec100bf468673', '123112(biger)', '.', 0, '2019-04-25 22:26:05', '2019-04-25 22:26:05'); +INSERT INTO `t_remark` VALUES ('6699216f44314e2291f74b96488a3581', 'caixukun123(默认昵称)', '{remark:手机虎扑|虎扑客户端|关注虎扑欢迎访问虎扑,请先注册或者登录NBA虎扑首页|NBA|CBA|电竞|国际足球|中国足球|赛车|装备|识货|社区|步行街|路人王|更多首页|新闻|比赛中心|赛程|球队|选秀|百科|街球|NBA论坛利拉德,已经是世界第一等!利拉德被低估了的实力和决心。勇士的傲慢让自己坐实了反派角色勇士为什么就能被揍成这样?利拉德,', 0, '2019-04-25 22:36:19', '2019-04-25 22:36:19'); +INSERT INTO `t_remark` VALUES ('674ea0da4311472aace304fafbd6d93c', '123112(biger)', '1', 0, '2019-04-25 22:45:04', '2019-04-25 22:45:04'); +INSERT INTO `t_remark` VALUES ('6805fffbe9c64036b44b20762b7c4a80', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:36:43', '2019-04-25 22:36:43'); +INSERT INTO `t_remark` VALUES ('6a6b54eee4924df087d24906f739e6a7', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:31:07', '2019-04-25 22:31:07'); +INSERT INTO `t_remark` VALUES ('6d9c6e87661b49c69520873bb6d09283', '123112(biger)', '.', 0, '2019-04-25 22:26:15', '2019-04-25 22:26:15'); +INSERT INTO `t_remark` VALUES ('6e448430a62d4250a24d62ad8bc24a24', '123112(biger)', '.', 0, '2019-04-25 22:36:19', '2019-04-25 22:36:19'); +INSERT INTO `t_remark` VALUES ('6e88bc9d86cf4bba8654d077b8076edb', '123112(biger)', '.', 0, '2019-04-25 22:30:49', '2019-04-25 22:30:49'); +INSERT INTO `t_remark` VALUES ('6e9032d61f06439bbec245cfa4279ca0', 'wzm1742415101(默认昵称)', 'hyc真帅。', 0, '2019-04-25 22:42:12', '2019-04-25 22:42:12'); +INSERT INTO `t_remark` VALUES ('6f83a3d5ab21446f9c60c7233ec14ef6', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:31:01', '2019-04-25 22:31:01'); +INSERT INTO `t_remark` VALUES ('6fbdf901254346f99ab7d0ef12dac916', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:31:04', '2019-04-25 22:31:04'); +INSERT INTO `t_remark` VALUES ('7108f5e9b5994659892bf30e5f5ded3c', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:31:03', '2019-04-25 22:31:03'); +INSERT INTO `t_remark` VALUES ('722465ddefb7401385192dc96304ac85', '123112(biger)', '.', 0, '2019-04-25 22:31:09', '2019-04-25 22:31:09'); +INSERT INTO `t_remark` VALUES ('72f5e4eabebd49f59e228e0af577a9b3', '123112(biger)', '1', 0, '2019-04-25 22:47:00', '2019-04-25 22:47:00'); +INSERT INTO `t_remark` VALUES ('749bef7efaf94f2380a848cfcd6a6bbd', '123112(biger)', '.', 0, '2019-04-25 22:26:03', '2019-04-25 22:26:03'); +INSERT INTO `t_remark` VALUES ('7536539bd22a438480de08d696fa810c', '123112(biger)', '.', 0, '2019-04-25 22:26:20', '2019-04-25 22:26:20'); +INSERT INTO `t_remark` VALUES ('756405a96197444ba20a19e831610717', '123112(biger)', '.', 0, '2019-04-25 22:30:59', '2019-04-25 22:30:59'); INSERT INTO `t_remark` VALUES ('7d76791122e24fbc946f5f967a991cac', 'xiaopan(默认昵称)', '???', 0, '2019-04-25 12:12:22', '2019-04-25 12:12:22'); +INSERT INTO `t_remark` VALUES ('7d9d2d86dc23450d86a77515066dce14', 'caixukun123(默认昵称)', '1大家好,我是练习时长两年。。。呸,我是本酒店管理系统的唯一超管黄钰朝,很荣幸成为置顶留言哈哈哈(后端程序员装逼时刻),各位大佬如果想尝试标签注入或者sql注入,请开始你的表演,但是正常来说是没有用的(吧),所以不要尝试太多次,以保证留言的质量', 0, '2019-04-25 22:30:45', '2019-04-25 22:30:45'); INSERT INTO `t_remark` VALUES ('7ee4a334a2404f219388e2ec1fe492c0', '987654(朗朗)', '123', 0, '2019-04-25 00:38:23', '2019-04-25 00:38:23'); +INSERT INTO `t_remark` VALUES ('7efd6d682cdb42d8a1a677d6a6dc750c', 'caixukun(默认昵称)', '666', 0, '2019-04-25 21:45:56', '2019-04-25 21:45:56'); +INSERT INTO `t_remark` VALUES ('802ec79107f342809a4c41519153e9b3', 'xiaopan(默认昵称)', '实现', 0, '2019-04-25 20:39:21', '2019-04-25 20:39:21'); +INSERT INTO `t_remark` VALUES ('835743a6b1104332b3d20946f42c260c', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:30:54', '2019-04-25 22:30:54'); +INSERT INTO `t_remark` VALUES ('84153648327948c7904029e7ce89a0e1', 'caixukun123(默认昵称)', '{remark:手机虎扑|虎扑客户端|关注虎扑欢迎访问虎扑,请先注册或者登录NBA虎扑首页|NBA|CBA|电竞|国际足球|中国足球|赛车|装备|识货|社区|步行街|路人王|更多首页|新闻|比赛中心|赛程|球队|选秀|百科|街球|NBA论坛利拉德,已经是世界第一等!利拉德被低估了的实力和决心。勇士的傲慢让自己坐实了反派角色勇士为什么就能被揍成这样?利拉德,', 0, '2019-04-25 22:34:24', '2019-04-25 22:34:24'); +INSERT INTO `t_remark` VALUES ('860e6e55a65644d79b4bec9d9920341e', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:37:52', '2019-04-25 22:37:52'); +INSERT INTO `t_remark` VALUES ('8636c9067c3b4959926d8727c257bfbd', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:30:46', '2019-04-25 22:30:46'); +INSERT INTO `t_remark` VALUES ('866a4d56bebd40dc82ef2518a9c52eda', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:31:06', '2019-04-25 22:31:06'); +INSERT INTO `t_remark` VALUES ('86f754c8fae84443b64a8fa9ccb35029', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:39:44', '2019-04-25 22:39:44'); +INSERT INTO `t_remark` VALUES ('8821d67f470c41559d914d53be195871', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:33:55', '2019-04-25 22:33:55'); +INSERT INTO `t_remark` VALUES ('89f680a56fa848d29f67f44a41f6c03b', 'caixukun123(默认昵称)', '大家好,我是练习时长两年。。。呸,我是本酒店管理系统的唯一超管黄钰朝,很荣幸成为置顶留言哈哈哈(后端程序员装逼时刻),各位大佬如果想尝试标签注入或者sql注入,请开始你的表演,但是正常来说是没有用的(吧),所以不要尝试太多次,以保证留言的质量', 0, '2019-04-25 22:26:34', '2019-04-25 22:26:34'); +INSERT INTO `t_remark` VALUES ('8a4b37f29e144afaa46ad52f0599f281', '123112(biger)', '.', 0, '2019-04-25 22:26:10', '2019-04-25 22:26:10'); +INSERT INTO `t_remark` VALUES ('8d41ccfca4184f4ba8c8f5e0cfac0ac3', '123112(biger)', '.', 0, '2019-04-25 22:26:41', '2019-04-25 22:26:41'); +INSERT INTO `t_remark` VALUES ('8ee263279617487e8ccacfb4f45528bc', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:36:31', '2019-04-25 22:36:31'); +INSERT INTO `t_remark` VALUES ('8f1b9dfba35b4a758c9081b04b0d7779', 'caixukun123(默认昵称)', '大家好,我是练习时长两年。。。呸,我是本酒店管理系统的唯一超管黄钰朝,很荣幸成为置顶留言哈哈哈(后端程序员装逼时刻),各位大佬如果想尝试标签注入或者sql注入,请开始你的表演,但是正常来说是没有用的(吧),所以不要尝试太多次,以保证留言的质量', 0, '2019-04-25 22:26:28', '2019-04-25 22:26:28'); +INSERT INTO `t_remark` VALUES ('90c3eb476ef143e58d90adee9cce9634', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:30:59', '2019-04-25 22:30:59'); +INSERT INTO `t_remark` VALUES ('9243e3ff899145cdb13218f739b356f1', '123112(biger)', '.', 0, '2019-04-25 22:36:44', '2019-04-25 22:36:44'); +INSERT INTO `t_remark` VALUES ('9700e132ba2c42ed8df70fab6e50a086', '123112(biger)', '1', 0, '2019-04-25 22:45:15', '2019-04-25 22:45:15'); +INSERT INTO `t_remark` VALUES ('98223d82973245a88b608fb7cfdf1342', '123112(biger)', '.', 0, '2019-04-25 22:31:00', '2019-04-25 22:31:00'); +INSERT INTO `t_remark` VALUES ('982a98bc347f4452acde920ca4fb25ec', '123112(biger)', '.', 0, '2019-04-25 22:26:12', '2019-04-25 22:26:12'); +INSERT INTO `t_remark` VALUES ('9b13b0490bf9413e98bd5603cda045a0', '123112(biger)', '.', 0, '2019-04-25 22:36:24', '2019-04-25 22:36:24'); +INSERT INTO `t_remark` VALUES ('9c60cda3f72c4e5cb05645e70bdff114', '123112(biger)', '.', 0, '2019-04-25 22:30:51', '2019-04-25 22:30:51'); INSERT INTO `t_remark` VALUES ('9cdd1ce141ed4a7cbdfca46507e5f9b9', '黄钰朝', '测试远程服务器中。。。', 0, '2019-04-24 14:24:51', '2019-04-24 16:20:46'); INSERT INTO `t_remark` VALUES ('9fa38afc1df6480a9568fc76c947f82c', '222222(默认昵称)', '现在真的可以玩耍了,刚刚跑去笔试,没同步数据库,崩了现在真的可以玩耍了,刚刚跑去笔试,没同步数据库,崩了现在真的可以玩耍了,刚刚跑去笔试,没同步数据库,崩了现在真的可以玩耍了,刚刚跑去笔试,没同步数据库,崩了现在真的可以玩耍了,刚刚跑去笔试,没同步数据库,崩了现在真的可以玩耍了,刚刚跑去笔试,没同步数据库,崩了现在真的可以玩耍了,刚刚跑去笔试,没同步数据库,崩了现在真的可以玩耍了,刚刚跑去笔试,没', 0, '2019-04-25 01:14:38', '2019-04-25 01:14:38'); +INSERT INTO `t_remark` VALUES ('a3d9c278cae24472947f1e9f6e88fb66', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:36:45', '2019-04-25 22:36:45'); +INSERT INTO `t_remark` VALUES ('a4e0f59bf2f34462b94376f8ac84c04c', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:30:57', '2019-04-25 22:30:57'); INSERT INTO `t_remark` VALUES ('a83a97f603f14fe1b877dc3960e5e671', 'woshiyuqidalao(默认昵称)', '我是煜淇大佬,前来观摩', 0, '2019-04-25 08:45:15', '2019-04-25 08:45:15'); +INSERT INTO `t_remark` VALUES ('a99c9d0f766c448bb5503eeb50706b30', 'caixukun123(默认昵称)', '{remark:手机虎扑|虎扑客户端|关注虎扑欢迎访问虎扑,请先注册或者登录NBA虎扑首页|NBA|CBA|电竞|国际足球|中国足球|赛车|装备|识货|社区|步行街|路人王|更多首页|新闻|比赛中心|赛程|球队|选秀|百科|街球|NBA论坛利拉德,已经是世界第一等!利拉德被低估了的实力和决心。勇士的傲慢让自己坐实了反派角色勇士为什么就能被揍成这样?利拉德,', 0, '2019-04-25 22:36:30', '2019-04-25 22:36:30'); +INSERT INTO `t_remark` VALUES ('aa7179750a9647ae8f94290f6dabc931', '123112(biger)', '1', 0, '2019-04-25 22:47:02', '2019-04-25 22:47:02'); +INSERT INTO `t_remark` VALUES ('ac3690df93c0416b9897c9485c6e4fc1', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:39:56', '2019-04-25 22:39:56'); +INSERT INTO `t_remark` VALUES ('b2c0b75895f94f1eb7a143597dfffe2b', '123112(biger)', '1', 0, '2019-04-25 22:45:09', '2019-04-25 22:45:09'); +INSERT INTO `t_remark` VALUES ('b3666d79c59c4757ac9bc9f57c2378f3', 'caixukun123(默认昵称)', '大家好,我是练习时长两年。。。呸,我是本酒店管理系统的唯一超管黄钰朝,很荣幸成为置顶留言哈哈哈(后端程序员装逼时刻),各位大佬如果想尝试标签注入或者sql注入,请开始你的表演,但是正常来说是没有用的(吧),所以不要尝试太多次,以保证留言的质量', 0, '2019-04-25 22:26:28', '2019-04-25 22:26:28'); +INSERT INTO `t_remark` VALUES ('b6d01dba52ae47fbba4e4fc4ea43b233', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:38:51', '2019-04-25 22:38:51'); +INSERT INTO `t_remark` VALUES ('b78a0c10baca4534ab977af97d952633', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:36:47', '2019-04-25 22:36:47'); +INSERT INTO `t_remark` VALUES ('b7dfb730ee0440129865e7928ae7480b', '123112(biger)', '1', 0, '2019-04-25 22:44:56', '2019-04-25 22:44:56'); +INSERT INTO `t_remark` VALUES ('ba57cad421794022b482c80cccb4e8b8', '123112(biger)', '.', 0, '2019-04-25 22:38:03', '2019-04-25 22:38:03'); +INSERT INTO `t_remark` VALUES ('bb49ffd52a3845acbbba67351720099a', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:31:00', '2019-04-25 22:31:00'); +INSERT INTO `t_remark` VALUES ('bc182bd91123418e83fc6082348fe357', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:31:02', '2019-04-25 22:31:02'); INSERT INTO `t_remark` VALUES ('be81b02a1cbd414bb10abfe468d708d4', '222222(默认昵称)', '', 0, '2019-04-25 01:16:25', '2019-04-25 01:16:25'); +INSERT INTO `t_remark` VALUES ('bef39da7cc1d49bea2515e481e9492d1', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:30:56', '2019-04-25 22:30:56'); INSERT INTO `t_remark` VALUES ('c14e018919f243e7aa3c80473b91df47', 'xiaopan(默认昵称)', '全明制作人的影迷大家好,我是练习时长两年半的个人练习生曾彦祖,喜欢唱、跳、rap、篮球。music', 0, '2019-04-25 12:10:26', '2019-04-25 12:10:26'); INSERT INTO `t_remark` VALUES ('c1cd1a237bfd443f850102427673bb94', 'a1179374184(默认昵称)', '这房子好贵', 0, '2019-04-25 00:55:18', '2019-04-25 00:55:18'); +INSERT INTO `t_remark` VALUES ('c38b63dddb7e4bad83cccaae96908e28', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:31:00', '2019-04-25 22:31:00'); +INSERT INTO `t_remark` VALUES ('c39df814ae5c4508b5b2907cb3241ba5', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:33:51', '2019-04-25 22:33:51'); INSERT INTO `t_remark` VALUES ('c4dc714aa0804e81bfc63befa42ebba7', '987654(默认昵称)', '大学生陈宇前来报到', 0, '2019-04-25 00:28:41', '2019-04-25 00:28:41'); +INSERT INTO `t_remark` VALUES ('c54b0bb509f54ef7a5dc25924e4f44d6', 'xiaopan(默认昵称)', '实现', 0, '2019-04-25 20:39:37', '2019-04-25 20:39:37'); +INSERT INTO `t_remark` VALUES ('c6f21f8e5c2f4b0bb2e4195aebd2f79a', '123456(默认昵称)', ';rm-rf/;', 0, '2019-04-25 21:57:13', '2019-04-25 21:57:13'); +INSERT INTO `t_remark` VALUES ('ca03c517080948e799883dafb7c0c5a5', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:32:30', '2019-04-25 22:32:30'); +INSERT INTO `t_remark` VALUES ('cadda994bec446bea3b329109d69f644', '123112(biger)', '.', 0, '2019-04-25 22:30:46', '2019-04-25 22:30:46'); +INSERT INTO `t_remark` VALUES ('cb6378750cbd4696add073fb527a1826', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:33:48', '2019-04-25 22:33:48'); +INSERT INTO `t_remark` VALUES ('cc9ff526d8f543c3be74c90b65deddce', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:30:41', '2019-04-25 22:30:41'); INSERT INTO `t_remark` VALUES ('cf2c4a14fdaf47b2bdbef6011568f813', '蔡徐坤', '大家好,我是练习时长两年半的个人练习生蔡徐坤', 0, '2019-04-24 16:32:31', '2019-04-25 01:08:53'); +INSERT INTO `t_remark` VALUES ('d24ffde8db6348e4bc8d046eabdac5be', 'caixukun123(默认昵称)', '大家好,我是练习时长两年。。。呸,我是本酒店管理系统的唯一超管黄钰朝,很荣幸成为置顶留言哈哈哈(后端程序员装逼时刻),各位大佬如果想尝试标签注入或者sql注入,请开始你的表演,但是正常来说是没有用的(吧),所以不要尝试太多次,以保证留言的质量', 0, '2019-04-25 22:30:24', '2019-04-25 22:30:24'); +INSERT INTO `t_remark` VALUES ('d492c9980e544fb283dfabe2e1c11b0b', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:30:49', '2019-04-25 22:30:49'); +INSERT INTO `t_remark` VALUES ('d58682ae7ce9451faea879ff3d5d9f0c', '123112(biger)', '.', 0, '2019-04-25 22:38:00', '2019-04-25 22:38:00'); +INSERT INTO `t_remark` VALUES ('d71d038cf5b9421d8add3ff35190cbe6', 'chencile(默认昵称)', '啊,钰朝大佬牛逼', 0, '2019-04-25 21:52:55', '2019-04-25 21:52:55'); +INSERT INTO `t_remark` VALUES ('d74b736dd2264d088394f229a06a39ad', 'wzm1742415101(默认昵称)', '这东西真好用', 0, '2019-04-25 22:42:25', '2019-04-25 22:42:25'); +INSERT INTO `t_remark` VALUES ('d820f584553f4853af14379df2abdfd8', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:31:07', '2019-04-25 22:31:07'); +INSERT INTO `t_remark` VALUES ('d9167c37a12c46cc82af9566bebd41bc', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:30:57', '2019-04-25 22:30:57'); +INSERT INTO `t_remark` VALUES ('d9fb9ed3741342f086dfca0e70ee63af', '123112(biger)', '.', 0, '2019-04-25 22:37:56', '2019-04-25 22:37:56'); +INSERT INTO `t_remark` VALUES ('daabb8cf130b4871a66c205b7f9e3bc1', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:39:57', '2019-04-25 22:39:57'); +INSERT INTO `t_remark` VALUES ('db79d3b773ce443dbadda2643d1e0263', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:30:52', '2019-04-25 22:30:52'); +INSERT INTO `t_remark` VALUES ('dcde480c1a544ca7a45115f520b5e3a5', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:36:46', '2019-04-25 22:36:46'); +INSERT INTO `t_remark` VALUES ('dd15a460fad24331b77f6fbc090a6e9e', 'caixukun123(默认昵称)', '11', 0, '2019-04-25 22:31:00', '2019-04-25 22:31:00'); INSERT INTO `t_remark` VALUES ('dd377078264041d4b8d683313b18bd9d', 'xiaopan(默认昵称)', '???', 0, '2019-04-25 12:30:01', '2019-04-25 12:30:01'); +INSERT INTO `t_remark` VALUES ('dde36a6c0a324ba89c4a950f13cdb3c1', '123112(biger)', '.', 0, '2019-04-25 22:26:23', '2019-04-25 22:26:23'); +INSERT INTO `t_remark` VALUES ('ddedfcd85e434f50a90f29635b84b5d0', 'caixukun(默认昵称)', '第一', 0, '2019-04-25 21:45:43', '2019-04-25 21:45:43'); +INSERT INTO `t_remark` VALUES ('e0b7951488d2450b959564853e73edb1', '123112(biger)', '.', 0, '2019-04-25 22:26:04', '2019-04-25 22:26:04'); +INSERT INTO `t_remark` VALUES ('e0ff081b9db145668de3f02d8e927cb8', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:31:05', '2019-04-25 22:31:05'); +INSERT INTO `t_remark` VALUES ('e1674fb14cda460d8ff0ac4c6598ae52', '123112(biger)', '.', 0, '2019-04-25 22:30:47', '2019-04-25 22:30:47'); +INSERT INTO `t_remark` VALUES ('e3e955bd338545b2843b472a5eb48ac1', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:30:55', '2019-04-25 22:30:55'); +INSERT INTO `t_remark` VALUES ('e40493777a804f779be2007f420322c6', '123112(biger)', '.', 0, '2019-04-25 22:26:31', '2019-04-25 22:26:31'); +INSERT INTO `t_remark` VALUES ('e558c8c5ccea432ab48ffb2deceebe93', '123112(biger)', '.', 0, '2019-04-25 22:36:33', '2019-04-25 22:36:33'); +INSERT INTO `t_remark` VALUES ('e5ddf0a647e043cc8399d129ba163bad', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:31:03', '2019-04-25 22:31:03'); +INSERT INTO `t_remark` VALUES ('e9eddaf759f2490fb32339a0fcab2a11', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:30:55', '2019-04-25 22:30:55'); +INSERT INTO `t_remark` VALUES ('e9f04225944e414a9db519f276aaf0fa', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:36:44', '2019-04-25 22:36:44'); +INSERT INTO `t_remark` VALUES ('ea188749a894417da07ac4c3c643160f', 'caixukun123(默认昵称)', '123', 0, '2019-04-25 22:30:50', '2019-04-25 22:30:50'); +INSERT INTO `t_remark` VALUES ('ea82f1f83ab64a79ad6d619b508fc455', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:30:54', '2019-04-25 22:30:54'); +INSERT INTO `t_remark` VALUES ('ea9ea2f437e74becbe211166f55ddfe8', 'caixukun123(默认昵称)', '大家好,我是练习时长两年。。。呸,我是本酒店管理系统的唯一超管黄钰朝,很荣幸成为置顶留言哈哈哈(后端程序员装逼时刻),各位大佬如果想尝试标签注入或者sql注入,请开始你的表演,但是正常来说是没有用的(吧),所以不要尝试太多次,以保证留言的质量', 0, '2019-04-25 22:25:39', '2019-04-25 22:25:39'); +INSERT INTO `t_remark` VALUES ('ebb8599953aa431ab3e43676b9cab057', '123112(biger)', '.', 0, '2019-04-25 22:26:09', '2019-04-25 22:26:09'); +INSERT INTO `t_remark` VALUES ('eda8ab541bf144319ae845a4506ad19a', 'caixukun123(默认昵称)', '123', 0, '2019-04-25 22:30:51', '2019-04-25 22:30:51'); +INSERT INTO `t_remark` VALUES ('efeae674369f4862b850a62f41eb1bbe', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:31:02', '2019-04-25 22:31:02'); +INSERT INTO `t_remark` VALUES ('efef3050b341422397815968242b46f5', '123112(biger)', '.', 0, '2019-04-25 22:26:16', '2019-04-25 22:26:16'); +INSERT INTO `t_remark` VALUES ('f2d7c84abd2549d8ab7de94a56ea8a71', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:30:42', '2019-04-25 22:30:42'); +INSERT INTO `t_remark` VALUES ('f332c64d981e46a585200be35d0b1929', '123112(biger)', '.', 0, '2019-04-25 22:26:26', '2019-04-25 22:26:26'); +INSERT INTO `t_remark` VALUES ('f3d4e8a005cf476686619056725b20c3', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:38:18', '2019-04-25 22:38:18'); +INSERT INTO `t_remark` VALUES ('f7e7612dad9844e99444d784c2041117', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:39:44', '2019-04-25 22:39:44'); +INSERT INTO `t_remark` VALUES ('fa59903d3f8d4baf8b008d426f917008', '123112(biger)', '101220', 0, '2019-04-25 22:47:20', '2019-04-25 22:47:20'); +INSERT INTO `t_remark` VALUES ('fba856010a8e413ea2a407eee25a5ad1', 'caixukun123(默认昵称)', '1', 0, '2019-04-25 22:30:53', '2019-04-25 22:30:53'); +INSERT INTO `t_remark` VALUES ('fdc6d72a8f004142ad5b4dcdea0d5fb4', 'caixukun123(默认昵称)', '2', 0, '2019-04-25 22:39:43', '2019-04-25 22:39:43'); +INSERT INTO `t_remark` VALUES ('fe3b7851ab7649a48ed3d93799e9925d', '123112(biger)', '1', 0, '2019-04-25 22:46:59', '2019-04-25 22:46:59'); +INSERT INTO `t_remark` VALUES ('fe51e9f445f844fcb2384b787b60f0a6', 'xiaopan(默认昵称)', '实现', 0, '2019-04-25 20:27:09', '2019-04-25 20:27:09'); -- ---------------------------- -- Table structure for t_role @@ -451,6 +620,7 @@ CREATE TABLE `t_user` ( -- Records of t_user -- ---------------------------- INSERT INTO `t_user` VALUES ('012aa177e364413999f8f14469272b0f', 'hrzgj666', 'nL+KTcuOMGgrkn81LWVZoA==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 08:40:26', '2019-04-25 08:40:26'); +INSERT INTO `t_user` VALUES ('022dfb00bfa34680b9aeab94b215fec8', 'Billie', 'cXxh5tMOXLlMPrapZ0CcsQ==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 22:34:03', '2019-04-25 22:34:03'); INSERT INTO `t_user` VALUES ('04847a4e4ac74dbf9ca4d76595833559', '123456789', 'JfnnlDI7RTiF9RgfG2JNCw==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 14:02:08', '2019-04-25 14:02:08'); INSERT INTO `t_user` VALUES ('04c2501024ac4c9187f9aec9b7f65639', 'test17', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 999170, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:20:38', '2019-04-20 20:20:38'); INSERT INTO `t_user` VALUES ('0ab4a07a8e754cf4b6ed4ba68cb31982', 'test2', '1234', 'user', '', '', '', 'test', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:33:50', '2019-04-20 20:33:50'); @@ -459,7 +629,11 @@ INSERT INTO `t_user` VALUES ('0f5f1f0f69bf4ebf905832edf7d83831', 'test25', 'gdyb INSERT INTO `t_user` VALUES ('10f2da64d1164912b2c378fcd12cdd85', 'test13', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 999130, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:20:38', '2019-04-20 20:20:38'); INSERT INTO `t_user` VALUES ('11a04040cd0844caa84f7b81f5d4132d', '1111sysg', 'ljhZYtpDwNEjy+gvskn1tw==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 01:27:16', '2019-04-25 01:27:16'); INSERT INTO `t_user` VALUES ('139e1cc8c6bd4fa1a2d01ee2b6ef5ff5', 'a1179374184', 'Khr/4ea4Gkq8XF8G7AG9Wg==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 00:19:33', '2019-04-25 00:19:33'); +INSERT INTO `t_user` VALUES ('145caacaf3aa46e99700e7a28deaf890', 'test500', 'LkCKwuQFjIiwI/dfDlvBqg==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 21:33:06', '2019-04-25 21:33:06'); +INSERT INTO `t_user` VALUES ('14f3fc11f3634fdab52a412b9bfd1444', 'wzm1742415101', 'K36jKn7OyLsjJKgQIetHzQ==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 22:40:51', '2019-04-25 22:40:51'); +INSERT INTO `t_user` VALUES ('15692a63cdcb490b8a78c83bf5966996', 'Woshicxk', 'ReSBIBTYPd5WZuvfWo7R7Q==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 22:35:16', '2019-04-25 22:35:16'); INSERT INTO `t_user` VALUES ('15ba1147233b47d282524b03201e1b41', 'test2', '1234', 'user', '', '', '', 'test', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:21:30', '2019-04-20 20:21:30'); +INSERT INTO `t_user` VALUES ('164b6dd1546047438d6a4000e7e31030', 'caixukun', 'JfnnlDI7RTiF9RgfG2JNCw==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 21:42:30', '2019-04-25 21:42:30'); INSERT INTO `t_user` VALUES ('17283549c2b143d6a2bf740aa6b6c8d5', 'Dffffe', 'tNsCcc0FKtwaQgfaEi2Y4A==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 01:22:53', '2019-04-25 01:22:53'); INSERT INTO `t_user` VALUES ('186a3a21340a4525adbabce20d0ff307', 'test29', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 999290, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:21:30', '2019-04-20 20:21:30'); INSERT INTO `t_user` VALUES ('21bac58f55f341e9b0e0badaf26394a2', '', 'test1111', 'USER', '15816019723', '440823199912202117', 'tssg134', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-21 17:29:06', '2019-04-21 17:29:06'); @@ -489,6 +663,7 @@ INSERT INTO `t_user` VALUES ('5b86d6ffe8fd43c6afad55147134d50d', 'woshiyuqidalao INSERT INTO `t_user` VALUES ('5be07df07fe34ff197995fe353154ff0', 'test1', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 99910, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:21:30', '2019-04-20 20:21:30'); INSERT INTO `t_user` VALUES ('5bf689171bb547d19fbb1901e113e996', 'test7', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 99970, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:21:30', '2019-04-20 20:21:30'); INSERT INTO `t_user` VALUES ('5cb9b57ad9ef4c8b9d55e0f37d47fe43', 'test1010', 'v9dL879MDsh9UbrTI0/MmQ==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 00:03:25', '2019-04-25 00:03:25'); +INSERT INTO `t_user` VALUES ('63d8022f9ef04063acd9db29c146584f', 'chencile', 'CE5/dqycSLo+wX9Nqqrgww==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 21:52:11', '2019-04-25 21:52:11'); INSERT INTO `t_user` VALUES ('64efe412b01a43c88ab1324a2592308d', 'test2333', '2+etbTK+RmWzcW/2ml0bJg==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-24 16:38:21', '2019-04-24 16:38:21'); INSERT INTO `t_user` VALUES ('66c5c05305d3445cb32e71afdeedaa23', 'Abcdef', '4QrcOUm6Wau+VuBX8g+IPg==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 00:49:52', '2019-04-25 00:49:52'); INSERT INTO `t_user` VALUES ('6c3549e21efa4bd991bbfb7befabc6ab', 'test88882', 'mifkJ+63z+8GeC/5okjcvw==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-24 16:49:15', '2019-04-24 16:49:15'); @@ -507,9 +682,12 @@ INSERT INTO `t_user` VALUES ('906938fcf8b2404093b636e348de9d5e', 'test20', 'gdyb INSERT INTO `t_user` VALUES ('91fdb6ad45a140ea8b70c63e862063af', 'test20', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 999200, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:20:38', '2019-04-20 20:20:38'); INSERT INTO `t_user` VALUES ('948ea8f36bf142699a95702f32d36172', 'test7', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 99970, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:20:37', '2019-04-20 20:20:37'); INSERT INTO `t_user` VALUES ('982d24deab6e4b54a0c89926c148aa56', 'test22', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 999220, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:20:38', '2019-04-20 20:20:38'); +INSERT INTO `t_user` VALUES ('986b7ac3fda24d6b886f717e538f3fab', 'chenille', 'O5ZmmNkqUAnsUAjeNnnJcA==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 21:50:35', '2019-04-25 21:50:35'); INSERT INTO `t_user` VALUES ('99b867f28c014d2ca8f14ccac528b360', 'test2', '1234', 'user', '', '', '', 'test', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:20:37', '2019-04-20 20:20:37'); INSERT INTO `t_user` VALUES ('9e78bcdf51d14d8cb623a437622f1dcb', 'test23', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 999230, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:20:38', '2019-04-20 20:20:38'); INSERT INTO `t_user` VALUES ('a0638e2200a349559c4671a2db15768c', 'test88881', '2AirQug8Z3L75BQxUzoujA==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-24 16:48:17', '2019-04-24 16:48:17'); +INSERT INTO `t_user` VALUES ('a0a7943c9b0f445d9d97a869587696b2', '123112', '4QrcOUm6Wau+VuBX8g+IPg==', 'USER', '13111111111', '111111111111111111', 'biger', '81f098970a2448849ea01abad947b3e4.pdf', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 22:18:43', '2019-04-25 22:23:02'); +INSERT INTO `t_user` VALUES ('a10b8c56668345049458d5f54ab6e45f', 'medw1n', 'ZwsUcorZkCrsujLiL6T2vQ==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 22:19:27', '2019-04-25 22:19:27'); INSERT INTO `t_user` VALUES ('a187278c81944233a86c7e2e725376c5', 'test26', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 999260, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:20:38', '2019-04-20 20:20:38'); INSERT INTO `t_user` VALUES ('a39dca5ab0ee49d2861c8b3bd238ea43', '222222', '4861iBoKH9qtASltdVSGjQ==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 01:01:19', '2019-04-25 01:01:19'); INSERT INTO `t_user` VALUES ('a92090e6c6e74ded80f765985b01d081', 'test10', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 999100, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:20:37', '2019-04-20 20:20:37'); @@ -525,10 +703,13 @@ INSERT INTO `t_user` VALUES ('b720395217484fbf97d6fff071933811', 'test18', 'gdyb INSERT INTO `t_user` VALUES ('b80c72cf9d7b43bbb0ded5cd20317353', 'test4', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 99940, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:20:37', '2019-04-20 20:20:37'); INSERT INTO `t_user` VALUES ('bdda533fedde452f817527386e70d762', 'test404', 'PrC3Z+3KqoAeOIwoDF1O9A==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 00:07:43', '2019-04-25 00:07:43'); INSERT INTO `t_user` VALUES ('c346ea3088ae4cf3934e59a531245af7', 'test2', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 99920, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:21:30', '2019-04-20 20:21:30'); +INSERT INTO `t_user` VALUES ('c53cce10735d4117aa0cbc69c90b4913', 'chenille_0318', 'CE5/dqycSLo+wX9Nqqrgww==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 21:50:04', '2019-04-25 21:50:04'); INSERT INTO `t_user` VALUES ('c6cd987782f64a589cc356b01fd0fa35', 'test12', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 999120, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:21:30', '2019-04-20 20:21:30'); +INSERT INTO `t_user` VALUES ('c7cb031100da4f11923aac94c57d8a91', 'caixukun123', 'jPFdaq9zTNHxXblLukpuWg==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 22:17:11', '2019-04-25 22:17:11'); INSERT INTO `t_user` VALUES ('c809571f96744de9a10d91445645db3d', 'test21', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 999210, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:21:30', '2019-04-20 20:21:30'); INSERT INTO `t_user` VALUES ('c85b599fa53a4590810c7e93147cfd74', 'test21', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 999210, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:20:38', '2019-04-20 20:20:38'); INSERT INTO `t_user` VALUES ('c8fa6515088d4bc1872082458b281ec3', 'test88889', 'mifkJ+63z+8GeC/5okjcvw==', 'USER', '15816019723', '440823199912202117', '黄', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-24 16:40:51', '2019-04-24 17:23:36'); +INSERT INTO `t_user` VALUES ('ca402850b37841048552763ee086c5e0', 'l123456', 'xXViZTx4P664ts2RfvJYwQ==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 17:28:47', '2019-04-25 17:28:47'); INSERT INTO `t_user` VALUES ('cca5a7e9ab534317975b984bf78f0e54', 'test2222', 'iKx4AVsqegtTbH3WedYDLQ==', 'USER', '15816019723', '440823199912202117', 'qqqasdf', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-21 17:43:15', '2019-04-21 17:43:15'); INSERT INTO `t_user` VALUES ('cdc69b1141bc43baa12ea26c82503d98', 'test9999', 'sd5WqSjZxUAFACmGYmSoKw==', 'USER', '15816019723', '440823199912202113', '默认昵称', 'eb377ec4e4084e898aba7dda86632cba.jpg', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 00:00:26', '2019-04-25 00:02:05'); INSERT INTO `t_user` VALUES ('ceacd341135542218795450a946c22f0', 'test6', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 99960, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:20:37', '2019-04-20 20:20:37'); @@ -538,6 +719,7 @@ INSERT INTO `t_user` VALUES ('d2c77a9fa07c4802ba5afa14410a0009', '1234567', '/Oq INSERT INTO `t_user` VALUES ('d3e150a8cc3442cd82413fe629ba8b4b', 'Qwerty', '2FeO34RYzgb7xbt2pYxcpA==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 01:23:22', '2019-04-25 01:23:22'); INSERT INTO `t_user` VALUES ('d7cab5c9dfff40a1b53f5080d963a13d', 'test25', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 999250, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:20:38', '2019-04-20 20:20:38'); INSERT INTO `t_user` VALUES ('dac00243234949e185370902c636f578', 'test8888', 'v9dL879MDsh9UbrTI0/MmQ==', 'ADMIN', '15816019723', '440823199912202117', '我的新昵称', 'a3b15733ce4140c08aa813fb73fcd4bd.jpg', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-21 02:33:37', '2019-04-24 16:34:27'); +INSERT INTO `t_user` VALUES ('daf2b614d4c9463fb34ec81d8ffc4792', 'ikun9527', '4QrcOUm6Wau+VuBX8g+IPg==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 22:13:51', '2019-04-25 22:13:51'); INSERT INTO `t_user` VALUES ('db66f538aa6049e0aa759d7072711646', 'fhjkuhnf', '6Afx/PgtEy+bsBjKZzihnw==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 08:22:03', '2019-04-25 08:22:03'); INSERT INTO `t_user` VALUES ('dee2ba0987af4028af7d6a6a35b6826b', 'test5', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 99950, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:21:30', '2019-04-20 20:21:30'); INSERT INTO `t_user` VALUES ('dfdcab2a783246ae9e14d395caab2947', 'test2', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 99920, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:20:37', '2019-04-20 20:20:37'); @@ -550,7 +732,7 @@ INSERT INTO `t_user` VALUES ('f1929fdffd39495ba1aad2405c27cb59', '123333', 'M42B INSERT INTO `t_user` VALUES ('f36b16fe4dee4b38a510e6c4d5b389e4', 'test22', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 999220, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:21:30', '2019-04-20 20:21:30'); INSERT INTO `t_user` VALUES ('f7af8e09806148e684e8707a8aa8ccb5', 'test8', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 99980, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:21:30', '2019-04-20 20:21:30'); INSERT INTO `t_user` VALUES ('fb3a74b295404dc38627d3eeeb1d779d', '12345678', 'JdVa0oOqQAr0ZMdtcTwHrQ==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 00:27:11', '2019-04-25 00:27:11'); -INSERT INTO `t_user` VALUES ('fb942b30f55d43ca9b52bf275dd3f8dc', '123456', '4QrcOUm6Wau+VuBX8g+IPg==', 'USER', '', '', '默认昵称', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 00:59:18', '2019-04-25 00:59:18'); +INSERT INTO `t_user` VALUES ('fb942b30f55d43ca9b52bf275dd3f8dc', '123456', '4QrcOUm6Wau+VuBX8g+IPg==', 'USER', '13424567876', '440102010101010101', ';deletefromuser;', '', 0, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-25 00:59:18', '2019-04-25 21:58:50'); INSERT INTO `t_user` VALUES ('fd8f21ac4da14ee0924eba4faf8458c2', 'test23', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 999230, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:21:30', '2019-04-20 20:21:30'); INSERT INTO `t_user` VALUES ('fed597e60a414793849e544e615fa71a', 'test15', 'gdyb21LQTcIANtvYMT7QVQ==', 'user', '15816019724', '440823199912202118', 'tom', '默认头像.jpg', 999150, '4QrcOUm6Wau+VuBX8g+IPg==', 0, '2019-04-20 20:20:38', '2019-04-20 20:20:38'); diff --git a/src/com/hyc/www/annotation/DML.java b/src/com/hyc/www/annotation/DML.java new file mode 100644 index 0000000..1714df5 --- /dev/null +++ b/src/com/hyc/www/annotation/DML.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2019. 黄钰朝 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hyc.www.annotation; + +import java.lang.annotation.*; + +/** + * @author 黄钰朝 + * @program XHotel + * @description 用于描述DML语句(update/delete/insert) + * @date 2019-05-01 11:41 + */ +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.METHOD) +public @interface DML { + String value()default ""; +} diff --git a/src/com/hyc/www/annotation/InsertSQL.java b/src/com/hyc/www/annotation/InsertSQL.java new file mode 100644 index 0000000..ac3021e --- /dev/null +++ b/src/com/hyc/www/annotation/InsertSQL.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2019. 黄钰朝 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hyc.www.annotation; + +import java.lang.annotation.*; + +/** + * @author 黄钰朝 + * @program XHotel + * @description 用于标注执行插入语句 + * @date 2019-05-01 13:32 + */ +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.METHOD) +public @interface InsertSQL { + String value()default ""; +} diff --git a/src/com/hyc/www/annotation/SQLParam.java b/src/com/hyc/www/annotation/SQLParam.java new file mode 100644 index 0000000..146dde3 --- /dev/null +++ b/src/com/hyc/www/annotation/SQLParam.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2019. 黄钰朝 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hyc.www.annotation; + +import java.lang.annotation.*; + +/** + * @author 黄钰朝 + * @program XHotel + * @description 用于标注PrepareStatement的参数索引 + * @date 2019-05-01 12:04 + */ +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.PARAMETER) +public @interface SQLParam { + int index()default 1; +} diff --git a/src/com/hyc/www/annotation/TableName.java b/src/com/hyc/www/annotation/TableName.java new file mode 100644 index 0000000..6f01858 --- /dev/null +++ b/src/com/hyc/www/annotation/TableName.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2019. 黄钰朝 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hyc.www.annotation; + +import java.lang.annotation.*; + + +/** + * @author 黄钰朝 + * @program XHotel + * @description 用于注解表名 + * @date 2019-05-01 00:19 + */ +@Documented +@Retention(value = RetentionPolicy.RUNTIME) +@Target(value = ElementType.TYPE) +public @interface TableName { + String value() default""; +} diff --git a/src/com/hyc/www/controller/filter/EncodingFilter.java b/src/com/hyc/www/controller/filter/EncodingFilter.java index 00b95db..677097e 100644 --- a/src/com/hyc/www/controller/filter/EncodingFilter.java +++ b/src/com/hyc/www/controller/filter/EncodingFilter.java @@ -70,6 +70,9 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo //TODO debug System.out.println("编码过滤器:" + "method = " + req.getParameter("method") + " view = " + req.getParameter("view") + " find = " + req.getParameter("find") + " name = " + req.getParameter("name")); + System.out.println("用户名:" + req.getParameter("name")); + System.out.println("电话号码"+req.getParameter("phoneNumber")); + System.out.println("昵称"+req.getParameter("nickName")); System.out.println("请求链接:" + req.getQueryString()); } } diff --git a/src/com/hyc/www/controller/filter/LoginFilter.java b/src/com/hyc/www/controller/filter/LoginFilter.java index 714a8dd..b8b05a7 100644 --- a/src/com/hyc/www/controller/filter/LoginFilter.java +++ b/src/com/hyc/www/controller/filter/LoginFilter.java @@ -59,7 +59,8 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo if (!(("/"+Pages.LOGIN_JSP.toString()).equalsIgnoreCase(path) || ("/"+Pages.REGIST_JSP.toString()).equalsIgnoreCase(path) || (Methods.LOGIN_DO.toString()).equalsIgnoreCase(method) - || (Methods.REGIST_DO.toString()).equalsIgnoreCase(method))) { + || (Methods.REGIST_DO.toString()).equalsIgnoreCase(method) + || uri.endsWith("jpg"))) { /** * 如果session不存在则检查cookie */ diff --git a/src/com/hyc/www/controller/servlet/RemarkServlet.java b/src/com/hyc/www/controller/servlet/RemarkServlet.java index 4245bee..d2827ba 100644 --- a/src/com/hyc/www/controller/servlet/RemarkServlet.java +++ b/src/com/hyc/www/controller/servlet/RemarkServlet.java @@ -68,8 +68,14 @@ private void add(HttpServletRequest req, HttpServletResponse resp) throws Servle Status status = result.getStatus(); switch (status) { + case DATA_TOO_MUCH: + forward(req, resp, result.getData(), "您的留言次数已达上限!如果您是测试所需,请联系作者", Pages.REMARK_JSP); + return; + case DATA_ILLEGAL: + forward(req, resp, result.getData(), "数据不合法!(不可为空)", Pages.REMARK_JSP); + return; case SUCCESS: - forward(req, resp, result.getData(), "添加留言成功", Pages.REMARK_JSP); + redirect(resp,Pages.REMARK_JSP.toString()); return; case ERROR: forward(req, resp, result.getData(), "添加留言失败!", Pages.REMARK_JSP); diff --git a/src/com/hyc/www/dao/impl/BaseDaoImpl.java b/src/com/hyc/www/dao/impl/BaseDaoImpl.java index 3133cd3..bcc820d 100644 --- a/src/com/hyc/www/dao/impl/BaseDaoImpl.java +++ b/src/com/hyc/www/dao/impl/BaseDaoImpl.java @@ -20,6 +20,7 @@ import com.hyc.www.dao.inter.ResultMapper; import com.hyc.www.dao.inter.SqlMapper; import com.hyc.www.exception.DaoException; +import com.hyc.www.po.User; import com.hyc.www.util.JdbcUtils; import java.lang.reflect.Field; @@ -47,6 +48,36 @@ public class BaseDaoImpl implements BaseDao { * 负责数据库insert,update,delete等功能 ************************************************************** */ + /** + * 执行一条预编译指令,并且填入参数 + * + * @param sql 要执行的预编译sql语句 + * @param params 参数,如果没有参数需要填,则赋值为null即可 + * @return java.lang.Object + * @name executeUpdate + * @notice none + * @author 黄钰朝 + * @date 2019/4/9 + */ + public int executeUpdate(String sql, Object[] params) { + Connection conn = JdbcUtils.getConnection(); + try (PreparedStatement ps = conn.prepareStatement(sql)) { + JdbcUtils.setParams(ps, params); + /** + * 将ps填入参数后的完整语句赋值给sql + */ + sql = ps.toString(); + System.out.println(sql); + return ps.executeUpdate(); + } catch (SQLException e) { + e.printStackTrace(); + throw new DaoException("预编译更新语句异常:" + sql, e); + } finally { + JdbcUtils.close(conn); + } + } + + /** * 将一个对象映射成预编译sql语句并执行
@@ -426,7 +457,7 @@ public Long queryCount(String tableName, String countField) { */ /** - * 返回一个where A ? B and/or/not C ? D 形式查询语句的查询结果 + * 返回一个where A ? B and/or C ? D 形式查询语句的查询结果 * * @param selectFields 查询的字段数组,如{"user_name","password"} * * @param obj 用于描述附加查询条件的对象
diff --git a/src/com/hyc/www/dao/impl/MyDataSourceImpl.java b/src/com/hyc/www/dao/impl/MyDataSourceImpl.java index 8286cc1..351922d 100644 --- a/src/com/hyc/www/dao/impl/MyDataSourceImpl.java +++ b/src/com/hyc/www/dao/impl/MyDataSourceImpl.java @@ -18,10 +18,7 @@ import com.hyc.www.dao.inter.MyDataSource; import com.hyc.www.exception.DaoException; -import com.hyc.www.util.JdbcUtils; -import java.io.File; -import java.io.FileReader; import java.io.IOException; import java.sql.Connection; import java.sql.DriverManager; @@ -39,15 +36,19 @@ public class MyDataSourceImpl implements MyDataSource { /** * 配置文件路径 */ - private static final String PROP_PATH ="data_source.properties"; + private static String PROP_PATH ="data_source.properties"; + /** + * 测试数据库连接的等待时长 + */ + private static int TIMEOUT; /** * 初始连接数 */ - private static int initCount; + private static int INIT_SIZE; /** * 最大连接数 */ - private static int maxCount; + private static int MAX_SIZE; /** * 当前已经创建的连接数 */ @@ -76,12 +77,14 @@ public class MyDataSourceImpl implements MyDataSource { url = prop.getProperty("url"); user = prop.getProperty("user"); password = prop.getProperty("password"); - maxCount = Integer.parseInt(prop.getProperty("maxCount")); - initCount = Integer.parseInt(prop.getProperty("initCount")); + MAX_SIZE = Integer.parseInt(prop.getProperty("MAX_SIZE")); + INIT_SIZE = Integer.parseInt(prop.getProperty("INIT_SIZE")); + TIMEOUT = Integer.parseInt(prop.getProperty("TIMEOUT")); /** * 注册驱动 */ Class.forName(driver); + instance= new MyDataSourceImpl(); } catch (ClassNotFoundException | IOException e) { e.printStackTrace(); throw new ExceptionInInitializerError(e); @@ -98,9 +101,6 @@ public class MyDataSourceImpl implements MyDataSource { * @date 2019/4/8 */ public static MyDataSourceImpl getInstance() { - if (instance == null) { - instance = new MyDataSourceImpl(); - } return instance; } @@ -118,8 +118,21 @@ public static MyDataSourceImpl getInstance() { @Override public Connection getConnection() throws DaoException { if (connPool.size() > 0) { - return connPool.removeLast(); - } else if (currentCount < maxCount) { + /** + * 先检查连接是否可用,如果不可用,关闭该连接,返回一个新连接 + */ + Connection conn = connPool.removeLast(); + try { + if(conn.isValid(TIMEOUT)){ + return conn; + }else { + destroyConnection(conn); + return createConnection(); + } + } catch (SQLException e) { + throw new DaoException("测试数据库连接产生异常",e); + } + } else if (currentCount < MAX_SIZE) { return createConnection(); } else { throw new DaoException("数据库连接数已达到最大值"); @@ -131,12 +144,12 @@ public Connection getConnection() throws DaoException { * 用于将数据库连接放回连接池中 * * @param conn 数据库连接 - * @name free + * @name freeConnection * @author 黄钰朝 * @date 2019/4/8 */ @Override - public void free(Connection conn) { + public void freeConnection(Connection conn) { this.connPool.addLast(conn); } @@ -184,6 +197,26 @@ private Connection createConnection() throws DaoException { } } + + /** + * 关闭数据库连接 + * + * @return java.sql.Connection + * @name createConnection + * @author 黄钰朝 + * @date 2019/4/30 + */ + private void destroyConnection(Connection conn) throws DaoException { + try { + if(conn!=null){ + conn.close(); + } + } catch (SQLException e) { + throw new DaoException("关闭数据库连接异常",e); + } + } + + /** * 创建连接池实例,初始化数据库连接池 * @@ -192,7 +225,7 @@ private Connection createConnection() throws DaoException { * @date 2019/4/8 */ private MyDataSourceImpl() { - for (int i = 0; i < initCount; i++) { + for (int i = 0; i < INIT_SIZE; i++) { this.connPool.add(this.createConnection()); } } diff --git a/src/com/hyc/www/dao/impl/RemarkDaoImpl.java b/src/com/hyc/www/dao/impl/RemarkDaoImpl.java index a8ccd54..17e2a37 100644 --- a/src/com/hyc/www/dao/impl/RemarkDaoImpl.java +++ b/src/com/hyc/www/dao/impl/RemarkDaoImpl.java @@ -67,7 +67,7 @@ public boolean add(Remark remark) { */ @Override public LinkedList listAll() { - String sql = "select id,user_name,remark,status,gmt_create,gmt_modified from " + TABLE_NAME+" order by gmt_create desc"; + String sql = "select id,user_name,remark,status,gmt_create,gmt_modified from " + TABLE_NAME + " order by gmt_create desc"; LinkedList remarks = new LinkedList<>(); List list = super.queryList(sql, new String[0], Remark.class); if (list != null) { @@ -79,4 +79,21 @@ public LinkedList listAll() { } return null; } + + + /** + * 返回该用户名对应留言数量 + * + * @param userName 用户名 + * @return + * @name getUserRemarkCount + * @notice none + * @author 黄钰朝 + * @date 2019/4/26 + */ + @Override + public int getUserRemarkCount(String userName) { + String sql = "select count(*) from " + TABLE_NAME + " where user_name = ? "; + return Math.toIntExact((Long) super.queryValue(sql, new String[]{userName})); + } } diff --git a/src/com/hyc/www/dao/inter/BaseDao.java b/src/com/hyc/www/dao/inter/BaseDao.java index a2ba56d..b1de846 100644 --- a/src/com/hyc/www/dao/inter/BaseDao.java +++ b/src/com/hyc/www/dao/inter/BaseDao.java @@ -16,6 +16,9 @@ package com.hyc.www.dao.inter; +import com.hyc.www.annotation.InsertSQL; +import com.hyc.www.po.User; + import java.util.LinkedList; /** @@ -25,6 +28,9 @@ * @date 2019-04-08 23:05 */ public interface BaseDao { + + + /* ************************************************************** * 负责数据库insert,update,delete等功能 @@ -56,6 +62,7 @@ public interface BaseDao { * @author 黄钰朝 * @date 2019/4/9 */ + @InsertSQL() int insert(Object obj); /** diff --git a/src/com/hyc/www/dao/inter/MyDataSource.java b/src/com/hyc/www/dao/inter/MyDataSource.java index 81fa170..5857a44 100644 --- a/src/com/hyc/www/dao/inter/MyDataSource.java +++ b/src/com/hyc/www/dao/inter/MyDataSource.java @@ -46,11 +46,11 @@ public interface MyDataSource { * 用于将数据库连接放回连接池中 * * @param conn 数据库连接 - * @name free + * @name freeConnection * @author 黄钰朝 * @date 2019/4/8 */ - void free(Connection conn); + void freeConnection(Connection conn); /** diff --git a/src/com/hyc/www/dao/inter/MyUserDao.java b/src/com/hyc/www/dao/inter/MyUserDao.java new file mode 100644 index 0000000..fbb569a --- /dev/null +++ b/src/com/hyc/www/dao/inter/MyUserDao.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2019. 黄钰朝 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hyc.www.dao.inter; + +import com.hyc.www.annotation.DML; +import com.hyc.www.annotation.InsertSQL; +import com.hyc.www.annotation.SQLParam; +import com.hyc.www.po.User; + +/** + * @author 黄钰朝 + * @program XHotel + * @description + * @date 2019-05-01 10:46 + */ +public interface MyUserDao extends BaseDao { + + @InsertSQL("insert into t_user (id,name) values (?,?) ") + boolean insert(@SQLParam() String id,@SQLParam (index = 2)String name); + + +} diff --git a/src/com/hyc/www/dao/inter/RemarkDao.java b/src/com/hyc/www/dao/inter/RemarkDao.java index 67730bf..6b12c76 100644 --- a/src/com/hyc/www/dao/inter/RemarkDao.java +++ b/src/com/hyc/www/dao/inter/RemarkDao.java @@ -50,5 +50,15 @@ public interface RemarkDao { * @date 2019/4/23 */ LinkedList listAll(); - + /** + * 返回该用户名对应留言数量 + * + * @param userName 用户名 + * @return + * @name getUserRemarkCount + * @notice none + * @author 黄钰朝 + * @date 2019/4/26 + */ + int getUserRemarkCount(String userName); } diff --git a/src/com/hyc/www/dao/inter/UserDao.java b/src/com/hyc/www/dao/inter/UserDao.java index 694afb7..e8faa0d 100644 --- a/src/com/hyc/www/dao/inter/UserDao.java +++ b/src/com/hyc/www/dao/inter/UserDao.java @@ -16,6 +16,7 @@ package com.hyc.www.dao.inter; +import com.hyc.www.annotation.TableName; import com.hyc.www.po.User; import java.math.BigInteger; diff --git a/src/com/hyc/www/po/User.java b/src/com/hyc/www/po/User.java index dac270c..e65e32c 100644 --- a/src/com/hyc/www/po/User.java +++ b/src/com/hyc/www/po/User.java @@ -16,6 +16,7 @@ package com.hyc.www.po; +import com.hyc.www.annotation.TableName; import com.hyc.www.po.abs.BaseEntity; import java.math.BigDecimal; @@ -26,6 +27,7 @@ * @description 对应数据库中的用户表,用来存储用户信息 * @date 2019-04-09 20:12 */ +@TableName(value = "t_user") public class User extends BaseEntity implements Cloneable { private String name; private String password; diff --git a/src/com/hyc/www/proxy/SQLHandler.java b/src/com/hyc/www/proxy/SQLHandler.java new file mode 100644 index 0000000..f7c44b2 --- /dev/null +++ b/src/com/hyc/www/proxy/SQLHandler.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2019. 黄钰朝 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hyc.www.proxy; + +import com.hyc.www.annotation.InsertSQL; +import com.hyc.www.annotation.SQLParam; +import com.hyc.www.dao.impl.BaseDaoImpl; + +import java.lang.annotation.Annotation; +import java.lang.reflect.InvocationHandler; +import java.lang.reflect.Method; +import java.lang.reflect.Parameter; + +/** + * @author 黄钰朝 + * @program XHotel + * @description + * @date 2019-05-01 11:01 + */ +public class SQLHandler implements InvocationHandler { + + @Override + public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { + if (method.getAnnotation(InsertSQL.class) != null) { + BaseDaoImpl baseDao = new BaseDaoImpl(); + /** + * 默认没有sql语句,使用直接插入对象的方法 + */ + if ("".equalsIgnoreCase(method.getAnnotation(InsertSQL.class).value())) { + Object obj = args[0]; + return baseDao.insert(obj) ; + } else { + String sql = method.getDeclaredAnnotation(InsertSQL.class).value(); + return baseDao.executeUpdate(sql, args); + } + } + return null; + } +} diff --git a/src/com/hyc/www/service/constant/Status.java b/src/com/hyc/www/service/constant/Status.java index ab2a3fe..7c3dbdb 100644 --- a/src/com/hyc/www/service/constant/Status.java +++ b/src/com/hyc/www/service/constant/Status.java @@ -41,6 +41,10 @@ public enum Status { * 数据不合法 */ DATA_ILLEGAL, + /** + * 输入次数过多 + */ + DATA_TOO_MUCH, /* diff --git a/src/com/hyc/www/service/impl/RemarkServiceImpl.java b/src/com/hyc/www/service/impl/RemarkServiceImpl.java index bfa8777..718e364 100644 --- a/src/com/hyc/www/service/impl/RemarkServiceImpl.java +++ b/src/com/hyc/www/service/impl/RemarkServiceImpl.java @@ -17,7 +17,6 @@ package com.hyc.www.service.impl; import com.hyc.www.dao.inter.RemarkDao; -import com.hyc.www.dao.inter.UserDao; import com.hyc.www.po.Remark; import com.hyc.www.service.Result; import com.hyc.www.service.inter.RemarkService; @@ -29,8 +28,7 @@ import javax.servlet.http.HttpServletResponse; import java.util.LinkedList; -import static com.hyc.www.service.constant.Status.ERROR; -import static com.hyc.www.service.constant.Status.SUCCESS; +import static com.hyc.www.service.constant.Status.*; import static com.hyc.www.util.ServiceUtils.setResult; import static com.hyc.www.util.StringUtils.toLegalText; import static com.hyc.www.util.UUIDUtils.getUUID; @@ -58,18 +56,27 @@ public class RemarkServiceImpl implements RemarkService { @Override public Result add(HttpServletRequest req, HttpServletResponse resp) { Remark remark = (Remark) BeanUtils.toObject(req.getParameterMap(), Remark.class); + String user = remark.getUserName(); + if (dao.getUserRemarkCount(user) > 20) { + PagesVo vo = new PagesVo(); + vo.setRemarks(dao.listAll()); + return new Result(DATA_TOO_MUCH, vo); + } remark.setId(getUUID()); /** * 使用toLegalText过滤非法字符 */ remark.setRemark(toLegalText(remark.getRemark())); + if (remark.getRemark().trim().isEmpty()) { + PagesVo vo = new PagesVo(); + vo.setRemarks(dao.listAll()); + return new Result(DATA_ILLEGAL, vo); + } /** * 此处将留言中的用户名字段修改为用户的昵称 */ - UserDao userDao = (UserDao) BeanFactory.getBean(BeanFactory.DaoType.UserDao); String userName = remark.getUserName(); - String nickName = userDao.getUser(remark.getUserName()).getNickName(); - remark.setUserName(userName+"("+nickName+")"); + remark.setUserName(userName); if (dao.add(remark)) { PagesVo vo = new PagesVo(); vo.setRemarks(dao.listAll()); diff --git a/src/com/hyc/www/test/TestJdbcUtils.java b/src/com/hyc/www/test/TestJdbcUtils.java index e429471..e3e1b9c 100644 --- a/src/com/hyc/www/test/TestJdbcUtils.java +++ b/src/com/hyc/www/test/TestJdbcUtils.java @@ -21,6 +21,9 @@ import com.hyc.www.util.JdbcUtils; import java.sql.Connection; +import java.sql.SQLException; + +import static com.hyc.www.util.JdbcUtils.getConnection; /** * @author 黄钰朝 @@ -29,21 +32,30 @@ * @date 2019-04-08 23:24 */ public class TestJdbcUtils { - public static void main(String[] args) { - System.out.println("测试通过jdbcUtil获取连接"); - Connection conn = JdbcUtils.getConnection(); + public static void main(String[] args) throws SQLException { - for (int i = 0; i < 9; i++) { - conn = JdbcUtils.getConnection(); - System.out.println(conn); - JdbcUtils.close(conn); + /* + *************************************************************** + * 测试从jdbcUtils取链接 + * ************************************************************ + * */ + + System.out.println("当前连接数:" + JdbcUtils.getCurrentCount()); + System.out.println("空闲连接数:" + JdbcUtils.getfreeCount()); + for (int i = 0; i < 3; i++) { + + System.out.println(getConnection()); } - System.out.println("释放一个连接"); - JdbcUtils.close(null,null,conn); - System.out.println("当前已创建连接数 = " + JdbcUtils.getCurrentCount()); - System.out.println("当前空闲连接数 = " + JdbcUtils.getfreeCount()); + System.out.println("当前连接数:" + JdbcUtils.getCurrentCount()); + System.out.println("空闲连接数:" + JdbcUtils.getfreeCount()); - System.out.println(JdbcUtils.getTableName(new User())); - System.out.println(JdbcUtils.getTableName(new Room())); + Connection conn=null; + for (int i = 0; i < 10; i++) { + conn = getConnection(); + JdbcUtils.close(conn); + System.out.println(conn); + } + System.out.println("当前连接数:" + JdbcUtils.getCurrentCount()); + System.out.println("空闲连接数:" + JdbcUtils.getfreeCount()); } } diff --git a/src/com/hyc/www/test/TestMyDataSource.java b/src/com/hyc/www/test/TestMyDataSource.java index 705072d..b66f49d 100644 --- a/src/com/hyc/www/test/TestMyDataSource.java +++ b/src/com/hyc/www/test/TestMyDataSource.java @@ -18,6 +18,7 @@ import com.hyc.www.dao.impl.MyDataSourceImpl; import com.hyc.www.dao.inter.MyDataSource; +import com.hyc.www.util.JdbcUtils; import java.sql.Connection; @@ -34,7 +35,6 @@ public class TestMyDataSource { public static void main(String[] args) throws ClassNotFoundException { - getConnection(); System.out.println("测试直接从连接池获取连接"); MyDataSource dataSource = MyDataSourceImpl.getInstance(); @@ -44,17 +44,18 @@ public static void main(String[] args) throws ClassNotFoundException { System.out.println("当前已创建连接数 = " + dataSource.getCurrentCount()); System.out.println("当前空闲连接数 = " + dataSource.getfreeCount()); System.out.println("释放一个连接"); - dataSource.free(conn); + dataSource.freeConnection(conn); for (int i = 0; i < 10; i++) { conn = dataSource.getConnection(); System.out.println(conn); - dataSource.free(conn); + dataSource.freeConnection(conn); } System.out.println("释放一个连接"); - dataSource.free(conn); + dataSource.freeConnection(conn); System.out.println("当前已创建连接数 = " + dataSource.getCurrentCount()); System.out.println("当前空闲连接数 = " + dataSource.getfreeCount()); + } } diff --git a/src/com/hyc/www/test/TestMyUserDao.java b/src/com/hyc/www/test/TestMyUserDao.java new file mode 100644 index 0000000..e38ca5e --- /dev/null +++ b/src/com/hyc/www/test/TestMyUserDao.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2019. 黄钰朝 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hyc.www.test; + +import com.hyc.www.dao.inter.MyUserDao; +import com.hyc.www.po.User; +import com.hyc.www.proxy.SQLHandler; + +import java.lang.reflect.Proxy; + +import static com.hyc.www.util.UUIDUtils.getUUID; + +/** + * @author 黄钰朝 + * @program XHotel + * @description + * @date 2019-05-01 10:47 + */ +public class TestMyUserDao { + public static void main(String[] args) { + User user = new User(); + user.setId(getUUID()); + user.setName("testtest"); + MyUserDao dao = (MyUserDao) Proxy.newProxyInstance(SQLHandler.class.getClassLoader(),new Class[]{MyUserDao.class},new SQLHandler()); + dao.insert(user); + + } +} diff --git a/src/com/hyc/www/test/TestRemarkDao.java b/src/com/hyc/www/test/TestRemarkDao.java index 11ae720..b7fc5e3 100644 --- a/src/com/hyc/www/test/TestRemarkDao.java +++ b/src/com/hyc/www/test/TestRemarkDao.java @@ -29,5 +29,6 @@ public class TestRemarkDao { public static void main(String[] args) { RemarkDao dao = new RemarkDaoImpl(); System.out.printf(dao.listAll().get(0).getRemark()); + System.out.println(dao.getUserRemarkCount("test8888(我的新昵称)")); } } diff --git a/src/com/hyc/www/util/BeanUtils.java b/src/com/hyc/www/util/BeanUtils.java index 5f97127..f567622 100644 --- a/src/com/hyc/www/util/BeanUtils.java +++ b/src/com/hyc/www/util/BeanUtils.java @@ -67,8 +67,9 @@ public static Object toObject(Map map, Class clazz) { e.printStackTrace(); throw new RuntimeException("无法实例化类:" + clazz.getName()); } - for (Field f : fields) { + + for (Field f : fields) { /** * 获取每个属性的String类型参数的构造器 */ diff --git a/src/com/hyc/www/util/JdbcUtils.java b/src/com/hyc/www/util/JdbcUtils.java index 8165f86..b7023b0 100644 --- a/src/com/hyc/www/util/JdbcUtils.java +++ b/src/com/hyc/www/util/JdbcUtils.java @@ -77,7 +77,7 @@ public static void close(ResultSet rs, Statement st, Connection conn) { e.printStackTrace(); } if (conn != null) { - dataSrc.free(conn); + dataSrc.freeConnection(conn); } } @@ -91,7 +91,7 @@ public static void close(ResultSet rs, Statement st, Connection conn) { */ public static void close(Connection conn) { if (conn != null) { - dataSrc.free(conn); + dataSrc.freeConnection(conn); } } diff --git a/src/data_source.properties b/src/data_source.properties index 212a4e8..ec5a435 100644 --- a/src/data_source.properties +++ b/src/data_source.properties @@ -17,12 +17,14 @@ #\u6570\u636E\u5E93\u914D\u7F6E driver=com.mysql.cj.jdbc.Driver -url = jdbc:mysql://localhost:3306/db_xhotel?serverTimezone=GMT%2B8&useSSL=false +url = jdbc:mysql://47.102.139.183:3306/db_xhotel?serverTimezone=GMT%2B8&useSSL=false user =root password = 6868 #\u6570\u636E\u5E93\u8FDE\u63A5\u6C60\u914D\u7F6E #\u521D\u59CB\u5316\u8FDE\u63A5\u6570 -initCount=3 +INIT_SIZE=3 #\u6700\u5927\u8FDE\u63A5\u6570 -maxCount=100 +MAX_SIZE=100 +#\u6700\u5927\u7B49\u5F85\u65F6\u95F4 +TIMEOUT=3000 diff --git a/web/regist.jsp b/web/regist.jsp index 9d3f5d1..1b7a2ba 100644 --- a/web/regist.jsp +++ b/web/regist.jsp @@ -36,13 +36,6 @@ - @@ -84,7 +77,7 @@
+ method="post" >
diff --git a/web/remark.jsp b/web/remark.jsp index 21e3c5a..89e7866 100644 --- a/web/remark.jsp +++ b/web/remark.jsp @@ -38,12 +38,18 @@ - - - + +
+ + 提示:${message} +
+
- <%-- 网页头部 --%> +<%-- 网页头部 --%>