From d7b41834a8ec8b0829eddb3dd90b62d3841f2568 Mon Sep 17 00:00:00 2001 From: liudeyu Date: Wed, 12 Jun 2019 11:05:03 +0800 Subject: [PATCH 01/17] =?UTF-8?q?=E5=8A=A0=E4=B8=8Ajava=20version=201.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- quark-common/pom.xml | 3 +++ quark-parent/pom.xml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/quark-common/pom.xml b/quark-common/pom.xml index 07f3a0c..a86471c 100644 --- a/quark-common/pom.xml +++ b/quark-common/pom.xml @@ -13,6 +13,9 @@ quark-common + + 1.8 + org.springframework.boot diff --git a/quark-parent/pom.xml b/quark-parent/pom.xml index fd6e573..5f33014 100644 --- a/quark-parent/pom.xml +++ b/quark-parent/pom.xml @@ -24,8 +24,12 @@ 1.9.22 2.8.0 2.2.2 + 1.8 + 1.8 + + From 88650827613d7517719a56c036129b59818ceaa9 Mon Sep 17 00:00:00 2001 From: liudeyu Date: Wed, 12 Jun 2019 11:22:28 +0800 Subject: [PATCH 02/17] =?UTF-8?q?sql=20ddl=E8=AF=AD=E5=8F=A5=E5=92=8C?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E8=AF=AD=E5=8F=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.properties | 4 +- resource/sql/quarkcommunity.sql | 541 ++++++++++++------ 2 files changed, 378 insertions(+), 167 deletions(-) diff --git a/quark-common/src/main/resources/application.properties b/quark-common/src/main/resources/application.properties index 39ffd43..df3133f 100644 --- a/quark-common/src/main/resources/application.properties +++ b/quark-common/src/main/resources/application.properties @@ -1,8 +1,8 @@ #Mysql配置 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource spring.datasource.url=jdbc:mysql://127.0.0.1:3306/quarkCommunity?useUnicode=true&characterEncoding=UTF-8&useSSL=false -spring.datasource.username=root -spring.datasource.password=root +spring.datasource.username=ldy +spring.datasource.password=abcd1234 spring.datasource.driver-class-name=com.mysql.jdbc.Driver #jpa配置 diff --git a/resource/sql/quarkcommunity.sql b/resource/sql/quarkcommunity.sql index fc7dcab..c3b76cb 100644 --- a/resource/sql/quarkcommunity.sql +++ b/resource/sql/quarkcommunity.sql @@ -13,20 +13,27 @@ File Encoding : 65001 Date: 2017-09-07 14:34:10 */ -SET FOREIGN_KEY_CHECKS=0; +CREATE DATABASE IF NOT EXISTS quarkCommunity + CHARACTER SET utf8 + COLLATE utf8_general_ci; +USE quarkCommunity; +SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for quark_adminuser -- ---------------------------- DROP TABLE IF EXISTS `quark_adminuser`; CREATE TABLE `quark_adminuser` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `enable` int(11) NOT NULL, - `password` varchar(255) NOT NULL, - `username` varchar(255) NOT NULL, + `id` INT(11) NOT NULL AUTO_INCREMENT, + `enable` INT(11) NOT NULL, + `password` VARCHAR(255) NOT NULL, + `username` VARCHAR(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `UK_4erqa44qkwwkl539xouso7v4c` (`username`) -) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8; +) + ENGINE = InnoDB + AUTO_INCREMENT = 51 + DEFAULT CHARSET = utf8; -- ---------------------------- -- Records of quark_adminuser @@ -69,13 +76,15 @@ INSERT INTO `quark_adminuser` VALUES ('50', '1', '0db82a65c8f98f62e9670ba35ab7a1 -- ---------------------------- DROP TABLE IF EXISTS `quark_adminuser_role`; CREATE TABLE `quark_adminuser_role` ( - `adminuser_id` int(11) NOT NULL, - `role_id` int(11) NOT NULL, - PRIMARY KEY (`adminuser_id`,`role_id`), + `adminuser_id` INT(11) NOT NULL, + `role_id` INT(11) NOT NULL, + PRIMARY KEY (`adminuser_id`, `role_id`), KEY `FK26lllx1jn0c1k8f8oj2qt4io1` (`role_id`), CONSTRAINT `FK26lllx1jn0c1k8f8oj2qt4io1` FOREIGN KEY (`role_id`) REFERENCES `quark_role` (`id`), CONSTRAINT `FKatv5o94k3fooskwr53rvqfven` FOREIGN KEY (`adminuser_id`) REFERENCES `quark_adminuser` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) + ENGINE = InnoDB + DEFAULT CHARSET = utf8; -- ---------------------------- -- Records of quark_adminuser_role @@ -87,16 +96,18 @@ INSERT INTO `quark_adminuser_role` VALUES ('3', '1'); -- ---------------------------- DROP TABLE IF EXISTS `quark_collect`; CREATE TABLE `quark_collect` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `init_time` datetime DEFAULT NULL, - `posts_id` int(11) NOT NULL, - `user_id` int(11) NOT NULL, + `id` INT(11) NOT NULL AUTO_INCREMENT, + `init_time` DATETIME DEFAULT NULL, + `posts_id` INT(11) NOT NULL, + `user_id` INT(11) NOT NULL, PRIMARY KEY (`id`), KEY `FK5a8rh83fve6ug3utggpy8wdvi` (`posts_id`), KEY `FKg4gtyqabrsuwr5y35lxvjy515` (`user_id`), CONSTRAINT `FK5a8rh83fve6ug3utggpy8wdvi` FOREIGN KEY (`posts_id`) REFERENCES `quark_posts` (`id`), CONSTRAINT `FKg4gtyqabrsuwr5y35lxvjy515` FOREIGN KEY (`user_id`) REFERENCES `quark_user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) + ENGINE = InnoDB + DEFAULT CHARSET = utf8; -- ---------------------------- -- Records of quark_collect @@ -107,13 +118,16 @@ CREATE TABLE `quark_collect` ( -- ---------------------------- DROP TABLE IF EXISTS `quark_label`; CREATE TABLE `quark_label` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `details` varchar(255) DEFAULT NULL, - `name` varchar(255) NOT NULL, - `posts_count` int(11) DEFAULT NULL, + `id` INT(11) NOT NULL AUTO_INCREMENT, + `details` VARCHAR(255) DEFAULT NULL, + `name` VARCHAR(255) NOT NULL, + `posts_count` INT(11) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `UK_6vml4ba2itmaor84892v92b1f` (`name`) -) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; +) + ENGINE = InnoDB + AUTO_INCREMENT = 10 + DEFAULT CHARSET = utf8; -- ---------------------------- -- Records of quark_label @@ -132,12 +146,12 @@ INSERT INTO `quark_label` VALUES ('9', '关于Android的话题', 'Android', '2') -- ---------------------------- DROP TABLE IF EXISTS `quark_notification`; CREATE TABLE `quark_notification` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `is_read` bit(1) DEFAULT NULL, - `fromuser_id` int(11) NOT NULL, - `posts_id` int(11) NOT NULL, - `touser_id` int(11) NOT NULL, - `init_time` datetime NOT NULL, + `id` INT(11) NOT NULL AUTO_INCREMENT, + `is_read` BIT(1) DEFAULT NULL, + `fromuser_id` INT(11) NOT NULL, + `posts_id` INT(11) NOT NULL, + `touser_id` INT(11) NOT NULL, + `init_time` DATETIME NOT NULL, PRIMARY KEY (`id`), KEY `FKac4wjs0b3992ohkf61jy4ilmj` (`fromuser_id`), KEY `FKilg05a7ki3vkv7lfjnn57pdw2` (`posts_id`), @@ -145,7 +159,10 @@ CREATE TABLE `quark_notification` ( CONSTRAINT `FKac4wjs0b3992ohkf61jy4ilmj` FOREIGN KEY (`fromuser_id`) REFERENCES `quark_user` (`id`), CONSTRAINT `FKilg05a7ki3vkv7lfjnn57pdw2` FOREIGN KEY (`posts_id`) REFERENCES `quark_posts` (`id`), CONSTRAINT `FKquscxmtiqggsch7w833ywubux` FOREIGN KEY (`touser_id`) REFERENCES `quark_user` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8; +) + ENGINE = InnoDB + AUTO_INCREMENT = 23 + DEFAULT CHARSET = utf8; -- ---------------------------- -- Records of quark_notification @@ -158,14 +175,17 @@ INSERT INTO `quark_notification` VALUES ('22', '', '71', '4', '2', '2017-09-07 -- ---------------------------- DROP TABLE IF EXISTS `quark_permission`; CREATE TABLE `quark_permission` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(255) DEFAULT NULL, - `perurl` varchar(255) DEFAULT NULL, - `sort` int(11) DEFAULT NULL, - `type` int(11) DEFAULT NULL, - `parentid` int(11) NOT NULL, + `id` INT(11) NOT NULL AUTO_INCREMENT, + `name` VARCHAR(255) DEFAULT NULL, + `perurl` VARCHAR(255) DEFAULT NULL, + `sort` INT(11) DEFAULT NULL, + `type` INT(11) DEFAULT NULL, + `parentid` INT(11) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8; +) + ENGINE = InnoDB + AUTO_INCREMENT = 29 + DEFAULT CHARSET = utf8; -- ---------------------------- -- Records of quark_permission @@ -201,30 +221,37 @@ INSERT INTO `quark_permission` VALUES ('28', '修改标签', '/labels/update', ' -- ---------------------------- DROP TABLE IF EXISTS `quark_posts`; CREATE TABLE `quark_posts` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `content` text, - `good` bit(1) NOT NULL, - `init_time` datetime NOT NULL, - `label_id` int(11) DEFAULT NULL, - `reply_count` int(11) DEFAULT NULL, - `title` varchar(255) NOT NULL, - `top` bit(1) NOT NULL, - `user_id` int(11) NOT NULL, + `id` INT(11) NOT NULL AUTO_INCREMENT, + `content` TEXT, + `good` BIT(1) NOT NULL, + `init_time` DATETIME NOT NULL, + `label_id` INT(11) DEFAULT NULL, + `reply_count` INT(11) DEFAULT NULL, + `title` VARCHAR(255) NOT NULL, + `top` BIT(1) NOT NULL, + `user_id` INT(11) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `UK_46eh0lt2x9ftqcv9tjs8meqj8` (`title`), KEY `FK41ebsa5jpn18egdtjo6uiaugn` (`user_id`), KEY `FKnxd3qh1m3c0o6tc3ojfa8fm6o` (`label_id`), CONSTRAINT `FK41ebsa5jpn18egdtjo6uiaugn` FOREIGN KEY (`user_id`) REFERENCES `quark_user` (`id`), CONSTRAINT `FKnxd3qh1m3c0o6tc3ojfa8fm6o` FOREIGN KEY (`label_id`) REFERENCES `quark_label` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=214 DEFAULT CHARSET=utf8; +) + ENGINE = InnoDB + AUTO_INCREMENT = 214 + DEFAULT CHARSET = utf8; -- ---------------------------- -- Records of quark_posts -- ---------------------------- INSERT INTO `quark_posts` VALUES ('1', 'hahaha hello world Java', '\0', '2017-08-26 15:33:39', '1', '32', 'Hello World', '\0', '2'); INSERT INTO `quark_posts` VALUES ('2', 'hahaha hello world Java', '\0', '2017-08-26 15:46:53', '1', '0', 'Hello World Scala', '\0', '2'); -INSERT INTO `quark_posts` VALUES ('3', '

测试发布内容\"[鼓掌]\"\"[鼓掌]\"\"[鼓掌]\"\"[鼓掌]\"\"[鼓掌]\"

', '\0', '2017-08-27 15:13:44', '1', '0', '测试发布', '\0', '2'); -INSERT INTO `quark_posts` VALUES ('4', '\"null\"', '', '2017-08-27 15:49:42', '3', '22', '推荐连续剧《请回答1988》', '', '2'); +INSERT INTO `quark_posts` VALUES ('3', + '

测试发布内容\"[鼓掌]\"\"[鼓掌]\"\"[鼓掌]\"\"[鼓掌]\"\"[鼓掌]\"

', + '\0', '2017-08-27 15:13:44', '1', '0', '测试发布', '\0', '2'); +INSERT INTO `quark_posts` VALUES + ('4', '\"null\"', '', '2017-08-27 15:49:42', + '3', '22', '推荐连续剧《请回答1988》', '', '2'); INSERT INTO `quark_posts` VALUES ('105', '希鲁鲁鲁鲁鲁鲁鲁鲁鲁鲁鲁鲁1', '\0', '2017-08-28 16:03:00', '1', '1', '测试帖子1', '\0', '2'); INSERT INTO `quark_posts` VALUES ('106', '希鲁鲁鲁鲁鲁鲁鲁鲁鲁鲁鲁鲁2', '\0', '2017-08-28 16:03:00', '1', '0', '测试帖子2', '\0', '2'); INSERT INTO `quark_posts` VALUES ('107', '希鲁鲁鲁鲁鲁鲁鲁鲁鲁鲁鲁鲁3', '\0', '2017-08-28 16:03:00', '1', '0', '测试帖子3', '\0', '2'); @@ -324,32 +351,50 @@ INSERT INTO `quark_posts` VALUES ('200', '希鲁鲁鲁鲁鲁鲁鲁鲁鲁鲁鲁 INSERT INTO `quark_posts` VALUES ('201', '希鲁鲁鲁鲁鲁鲁鲁鲁鲁鲁鲁鲁97', '\0', '2017-08-28 16:03:06', '1', '0', '测试帖子97', '\0', '2'); INSERT INTO `quark_posts` VALUES ('202', '希鲁鲁鲁鲁鲁鲁鲁鲁鲁鲁鲁鲁98', '\0', '2017-08-28 16:03:06', '1', '0', '测试帖子98', '\0', '2'); INSERT INTO `quark_posts` VALUES ('203', '希鲁鲁鲁鲁鲁鲁鲁鲁鲁鲁鲁鲁99', '\0', '2017-08-28 16:03:06', '1', '0', '测试帖子99', '\0', '2'); -INSERT INTO `quark_posts` VALUES ('205', '

<dependency>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-starter-thymeleaf</artifactId>

</dependency>

', '', '2017-08-28 21:52:55', '4', '1', '在Spring boot中配置Thymeleaf', '\0', '2'); -INSERT INTO `quark_posts` VALUES ('206', '

\"null\"

', '', '2017-08-28 22:46:59', '3', '1', 'Class文件装载流程', '\0', '2'); -INSERT INTO `quark_posts` VALUES ('208', '

\"null\"


', '', '2017-09-01 22:01:27', '3', '2', 'JVM体系', '', '2'); -INSERT INTO `quark_posts` VALUES ('209', '\"[爱你]\"', '\0', '2017-09-03 11:05:25', '5', '2', '探索R闪背后的奥秘', '\0', '71'); -INSERT INTO `quark_posts` VALUES ('210', '

filterChainDefinitionMap.put(\"/favicon.ico\",\"anon\");//解决弹出favicon.ico下载

\"null\"

', '\0', '2017-09-03 11:07:21', '2', '4', 'shiro在登录的时候下载favicon.ico问题', '\0', '71'); -INSERT INTO `quark_posts` VALUES ('211', 'view结构\"null\"', '\0', '2017-09-05 10:38:27', '9', '1', 'Android View机制', '\0', '72'); -INSERT INTO `quark_posts` VALUES ('212', '\"[兔子]\"', '\0', '2017-09-05 10:38:59', '9', '4', '新人报到', '\0', '72'); -INSERT INTO `quark_posts` VALUES ('213', '

1 先来先服务 - 时间片轮转调度
\n
这个很简单,就是谁先来,就给谁分配时间片运行,缺点是有些紧急的任务要很久才能得到运行。

2. 优先级调度
\n
每个线程有一个优先级,CPU每次去拿优先级高的运行,优先级低的等等,为了避免优先级低的等太久,每等一定时间,就给优先级低的线程提高一个级别

3.最短作业优先
\n
把线程任务量排序,每次拿处理时间短的线程运行,就像我去银行办业务一样,我的事情很快就处理完了,所以让我插队先办完,后面时间长的人先等等,时间长的人就很难得到响应了。

4. 最高响应比优先
\n
用线程的等待时间除以服务时间,得到响应比,响应比小的优先运行。这样不会造成某些任务一直得不到响应。

\n\n\n\n\n\n\n\n

5.多级反馈队列调度
\n
有多个优先级不同的队列,每个队列里面有多个等待线程。
\nCPU
每次从优先级高的遍历到低的,取队首的线程运行,运行完了放回队尾,优先级越高,时间片越短,即响应越快,时间片大小就不是固定的了。
\n
每个队列的内部还是用先来先服务的策略。

', '\0', '2017-09-07 10:21:06', '8', '6', '并发的CPU调度策略', '\0', '2'); +INSERT INTO `quark_posts` VALUES ('205', + '

<dependency>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-starter-thymeleaf</artifactId>

</dependency>

', + '', '2017-08-28 21:52:55', '4', '1', '在Spring boot中配置Thymeleaf', '\0', '2'); +INSERT INTO `quark_posts` VALUES + ('206', '

\"null\"

', '', + '2017-08-28 22:46:59', '3', '1', 'Class文件装载流程', '\0', '2'); +INSERT INTO `quark_posts` VALUES + ('208', '

\"null\"


', '', + '2017-09-01 22:01:27', '3', '2', 'JVM体系', '', '2'); +INSERT INTO `quark_posts` VALUES + ('209', '\"[爱你]\"', '\0', '2017-09-03 11:05:25', '5', '2', '探索R闪背后的奥秘', '\0', + '71'); +INSERT INTO `quark_posts` VALUES ('210', + '

filterChainDefinitionMap.put(\"/favicon.ico\",\"anon\");//解决弹出favicon.ico下载

\"null\"

', + '\0', '2017-09-03 11:07:21', '2', '4', 'shiro在登录的时候下载favicon.ico问题', '\0', '71'); +INSERT INTO `quark_posts` VALUES + ('211', 'view结构\"null\"', '\0', + '2017-09-05 10:38:27', '9', '1', 'Android View机制', '\0', '72'); +INSERT INTO `quark_posts` VALUES + ('212', '\"[兔子]\"', '\0', '2017-09-05 10:38:59', '9', '4', '新人报到', '\0', '72'); +INSERT INTO `quark_posts` VALUES ('213', + '

1 先来先服务 - 时间片轮转调度
\n
这个很简单,就是谁先来,就给谁分配时间片运行,缺点是有些紧急的任务要很久才能得到运行。

2. 优先级调度
\n
每个线程有一个优先级,CPU每次去拿优先级高的运行,优先级低的等等,为了避免优先级低的等太久,每等一定时间,就给优先级低的线程提高一个级别

3.最短作业优先
\n
把线程任务量排序,每次拿处理时间短的线程运行,就像我去银行办业务一样,我的事情很快就处理完了,所以让我插队先办完,后面时间长的人先等等,时间长的人就很难得到响应了。

4. 最高响应比优先
\n
用线程的等待时间除以服务时间,得到响应比,响应比小的优先运行。这样不会造成某些任务一直得不到响应。

\n\n\n\n\n\n\n\n

5.多级反馈队列调度
\n
有多个优先级不同的队列,每个队列里面有多个等待线程。
\nCPU
每次从优先级高的遍历到低的,取队首的线程运行,运行完了放回队尾,优先级越高,时间片越短,即响应越快,时间片大小就不是固定的了。
\n
每个队列的内部还是用先来先服务的策略。

', + '\0', '2017-09-07 10:21:06', '8', '6', '并发的CPU调度策略', '\0', '2'); -- ---------------------------- -- Table structure for quark_reply -- ---------------------------- DROP TABLE IF EXISTS `quark_reply`; CREATE TABLE `quark_reply` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `content` text NOT NULL, - `init_time` datetime DEFAULT NULL, - `up` int(11) NOT NULL, - `posts_id` int(11) NOT NULL, - `user_id` int(11) NOT NULL, + `id` INT(11) NOT NULL AUTO_INCREMENT, + `content` TEXT NOT NULL, + `init_time` DATETIME DEFAULT NULL, + `up` INT(11) NOT NULL, + `posts_id` INT(11) NOT NULL, + `user_id` INT(11) NOT NULL, PRIMARY KEY (`id`), KEY `FKnr6a7xtk9rm31ptn6gchi9113` (`posts_id`), KEY `FKnt12hb9oqfm5eamjpg27bkpvv` (`user_id`), CONSTRAINT `FKnr6a7xtk9rm31ptn6gchi9113` FOREIGN KEY (`posts_id`) REFERENCES `quark_posts` (`id`), CONSTRAINT `FKnt12hb9oqfm5eamjpg27bkpvv` FOREIGN KEY (`user_id`) REFERENCES `quark_user` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=77 DEFAULT CHARSET=utf8; +) + ENGINE = InnoDB + AUTO_INCREMENT = 77 + DEFAULT CHARSET = utf8; -- ---------------------------- -- Records of quark_reply @@ -389,38 +434,60 @@ INSERT INTO `quark_reply` VALUES ('35', '希鲁鲁', '2017-08-30 22:42:38', '0', INSERT INTO `quark_reply` VALUES ('36', '测试', '2017-08-30 22:44:50', '0', '105', '2'); INSERT INTO `quark_reply` VALUES ('37', '不错啊不错哇', '2017-08-30 22:45:31', '0', '4', '2'); INSERT INTO `quark_reply` VALUES ('38', '不错啊不错哇', '2017-08-30 22:47:36', '0', '206', '2'); -INSERT INTO `quark_reply` VALUES ('39', '好剧,谢谢推荐\"[心]\"', '2017-08-30 23:20:37', '0', '4', '2'); -INSERT INTO `quark_reply` VALUES ('40', '

垃圾哥乱入\"[偷笑]\"

\"null\"

', '2017-08-30 23:25:33', '0', '4', '2'); +INSERT INTO `quark_reply` +VALUES ('39', '好剧,谢谢推荐\"[心]\"', '2017-08-30 23:20:37', '0', '4', '2'); +INSERT INTO `quark_reply` VALUES ('40', + '

垃圾哥乱入\"[偷笑]\"

\"null\"

', + '2017-08-30 23:25:33', '0', '4', '2'); INSERT INTO `quark_reply` VALUES ('41', '不错', '2017-08-30 23:26:34', '0', '4', '2'); INSERT INTO `quark_reply` VALUES ('42', '哈哈', '2017-08-30 23:27:55', '0', '4', '2'); -INSERT INTO `quark_reply` VALUES ('43', '铁打的父母流水的孩子~\"[挤眼]\"', '2017-08-30 23:29:51', '0', '4', '2'); -INSERT INTO `quark_reply` VALUES ('44', '

\"[太开心]\"\"[太开心]\"\"[太开心]\"\"[太开心]\"好看

', '2017-08-31 14:57:03', '0', '4', '2'); +INSERT INTO `quark_reply` +VALUES ('43', '铁打的父母流水的孩子~\"[挤眼]\"', '2017-08-30 23:29:51', '0', '4', '2'); +INSERT INTO `quark_reply` VALUES ('44', + '

\"[太开心]\"\"[太开心]\"\"[太开心]\"\"[太开心]\"好看

', + '2017-08-31 14:57:03', '0', '4', '2'); INSERT INTO `quark_reply` VALUES ('45', '好好好', '2017-08-31 15:05:10', '0', '4', '2'); -INSERT INTO `quark_reply` VALUES ('46', '牛逼\"[微笑]\"', '2017-08-31 15:35:15', '0', '4', '2'); -INSERT INTO `quark_reply` VALUES ('47', '不错,很清晰\"[猪头]\"', '2017-09-01 22:01:43', '0', '208', '2'); -INSERT INTO `quark_reply` VALUES ('48', '厉害啊\"[酷]\"', '2017-09-03 11:32:23', '0', '210', '2'); -INSERT INTO `quark_reply` VALUES ('49', '\"[怒]\"', '2017-09-05 10:26:14', '0', '209', '2'); -INSERT INTO `quark_reply` VALUES ('50', '有意思\"null\"', '2017-09-05 10:32:42', '0', '210', '72'); -INSERT INTO `quark_reply` VALUES ('51', '很清晰\"[爱你]\"', '2017-09-05 10:39:18', '0', '211', '2'); +INSERT INTO `quark_reply` +VALUES ('46', '牛逼\"[微笑]\"', '2017-08-31 15:35:15', '0', '4', '2'); +INSERT INTO `quark_reply` +VALUES ('47', '不错,很清晰\"[猪头]\"', '2017-09-01 22:01:43', '0', '208', '2'); +INSERT INTO `quark_reply` +VALUES ('48', '厉害啊\"[酷]\"', '2017-09-03 11:32:23', '0', '210', '2'); +INSERT INTO `quark_reply` +VALUES ('49', '\"[怒]\"', '2017-09-05 10:26:14', '0', '209', '2'); +INSERT INTO `quark_reply` VALUES + ('50', '有意思\"null\"', '2017-09-05 10:32:42', + '0', '210', '72'); +INSERT INTO `quark_reply` +VALUES ('51', '很清晰\"[爱你]\"', '2017-09-05 10:39:18', '0', '211', '2'); INSERT INTO `quark_reply` VALUES ('52', '?', '2017-09-06 15:43:18', '0', '212', '2'); -INSERT INTO `quark_reply` VALUES ('53', '不错嘛\"null\"', '2017-09-06 15:45:58', '0', '205', '2'); -INSERT INTO `quark_reply` VALUES ('54', '新人爆照\"[思考]\"', '2017-09-06 16:27:28', '0', '212', '2'); -INSERT INTO `quark_reply` VALUES ('55', '希鲁鲁鲁\"[酷]\"', '2017-09-06 16:36:25', '0', '212', '71'); -INSERT INTO `quark_reply` VALUES ('56', '希鲁鲁鲁\"[酷]\"', '2017-09-06 16:36:26', '0', '212', '71'); +INSERT INTO `quark_reply` VALUES + ('53', '不错嘛\"null\"', '2017-09-06 15:45:58', + '0', '205', '2'); +INSERT INTO `quark_reply` +VALUES ('54', '新人爆照\"[思考]\"', '2017-09-06 16:27:28', '0', '212', '2'); +INSERT INTO `quark_reply` +VALUES ('55', '希鲁鲁鲁\"[酷]\"', '2017-09-06 16:36:25', '0', '212', '71'); +INSERT INTO `quark_reply` +VALUES ('56', '希鲁鲁鲁\"[酷]\"', '2017-09-06 16:36:26', '0', '212', '71'); INSERT INTO `quark_reply` VALUES ('57', '不错嘛
', '2017-09-06 20:22:16', '0', '4', '71'); INSERT INTO `quark_reply` VALUES ('58', '对啊', '2017-09-06 20:28:36', '0', '210', '2'); INSERT INTO `quark_reply` VALUES ('59', '不错', '2017-09-06 20:36:17', '0', '4', '2'); INSERT INTO `quark_reply` VALUES ('60', '居然自问自答,呵呵
', '2017-09-06 20:36:32', '0', '4', '71'); INSERT INTO `quark_reply` VALUES ('61', '再看看自问自答是否修复了', '2017-09-06 20:41:01', '0', '4', '2'); INSERT INTO `quark_reply` VALUES ('62', '很强势啊,试试推送功能', '2017-09-06 20:41:42', '0', '208', '71'); -INSERT INTO `quark_reply` VALUES ('63', '测试推送?\"[微笑]\"', '2017-09-07 10:03:03', '0', '210', '2'); +INSERT INTO `quark_reply` +VALUES ('63', '测试推送?\"[微笑]\"', '2017-09-07 10:03:03', '0', '210', '2'); INSERT INTO `quark_reply` VALUES ('64', '很实用
', '2017-09-07 10:21:23', '0', '213', '71'); -INSERT INTO `quark_reply` VALUES ('65', '简直无解\"[太开心]\"\"[太开心]\"\"[抱抱]\"', '2017-09-07 10:21:47', '0', '213', '71'); +INSERT INTO `quark_reply` VALUES ('65', + '简直无解\"[太开心]\"\"[太开心]\"\"[抱抱]\"', + '2017-09-07 10:21:47', '0', '213', '71'); INSERT INTO `quark_reply` VALUES ('66', '很好', '2017-09-07 10:22:19', '0', '213', '71'); INSERT INTO `quark_reply` VALUES ('67', '测试推送', '2017-09-07 10:24:43', '0', '213', '71'); INSERT INTO `quark_reply` VALUES ('68', '测试测试测试', '2017-09-07 10:25:30', '0', '213', '71'); INSERT INTO `quark_reply` VALUES ('69', '测试推送', '2017-09-07 10:27:51', '0', '213', '71'); -INSERT INTO `quark_reply` VALUES ('70', '\"[抓狂]\"', '2017-09-07 10:39:33', '0', '209', '2'); +INSERT INTO `quark_reply` +VALUES ('70', '\"[抓狂]\"', '2017-09-07 10:39:33', '0', '209', '2'); INSERT INTO `quark_reply` VALUES ('71', '测试推送
', '2017-09-07 11:02:23', '0', '4', '71'); INSERT INTO `quark_reply` VALUES ('72', '测试推送', '2017-09-07 11:04:15', '0', '4', '71'); INSERT INTO `quark_reply` VALUES ('73', '测试推送
', '2017-09-07 11:12:22', '0', '4', '71'); @@ -433,12 +500,15 @@ INSERT INTO `quark_reply` VALUES ('76', '真.最后一次测试了', '2017-09-07 -- ---------------------------- DROP TABLE IF EXISTS `quark_role`; CREATE TABLE `quark_role` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `description` varchar(255) DEFAULT NULL, - `name` varchar(255) NOT NULL, + `id` INT(11) NOT NULL AUTO_INCREMENT, + `description` VARCHAR(255) DEFAULT NULL, + `name` VARCHAR(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `UK_ff572j64wr6y4taed1c27vfo6` (`name`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; +) + ENGINE = InnoDB + AUTO_INCREMENT = 7 + DEFAULT CHARSET = utf8; -- ---------------------------- -- Records of quark_role @@ -451,13 +521,15 @@ INSERT INTO `quark_role` VALUES ('6', '管理用户', '用户管理员'); -- ---------------------------- DROP TABLE IF EXISTS `quark_role_permission`; CREATE TABLE `quark_role_permission` ( - `role_id` int(11) NOT NULL, - `permissions_id` int(11) NOT NULL, - PRIMARY KEY (`role_id`,`permissions_id`), + `role_id` INT(11) NOT NULL, + `permissions_id` INT(11) NOT NULL, + PRIMARY KEY (`role_id`, `permissions_id`), KEY `FKlsdkf5vtsq5qvepw45r0y89jw` (`permissions_id`), CONSTRAINT `FK763ep4ix05naeoliv21sm6m81` FOREIGN KEY (`role_id`) REFERENCES `quark_role` (`id`), CONSTRAINT `FKlsdkf5vtsq5qvepw45r0y89jw` FOREIGN KEY (`permissions_id`) REFERENCES `quark_permission` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) + ENGINE = InnoDB + DEFAULT CHARSET = utf8; -- ---------------------------- -- Records of quark_role_permission @@ -496,88 +568,227 @@ INSERT INTO `quark_role_permission` VALUES ('1', '28'); -- ---------------------------- DROP TABLE IF EXISTS `quark_user`; CREATE TABLE `quark_user` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `icon` varchar(255) NOT NULL, - `enable` int(11) NOT NULL, - `init_time` datetime NOT NULL, - `password` varchar(255) NOT NULL, - `sex` int(11) DEFAULT NULL, - `signature` varchar(255) DEFAULT NULL, - `username` varchar(255) NOT NULL, - `email` varchar(255) NOT NULL, + `id` INT(11) NOT NULL AUTO_INCREMENT, + `icon` VARCHAR(255) NOT NULL, + `enable` INT(11) NOT NULL, + `init_time` DATETIME NOT NULL, + `password` VARCHAR(255) NOT NULL, + `sex` INT(11) DEFAULT NULL, + `signature` VARCHAR(255) DEFAULT NULL, + `username` VARCHAR(255) NOT NULL, + `email` VARCHAR(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `UK_2uqfoo05i1p5qm4ntysj2ivbs` (`username`) -) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=utf8; +) + ENGINE = InnoDB + AUTO_INCREMENT = 73 + DEFAULT CHARSET = utf8; -- ---------------------------- -- Records of quark_user -- ---------------------------- -INSERT INTO `quark_user` VALUES ('2', 'http://127.0.0.1/images/upload/2017-09-06/70e5b07c-4609-4925-bb1f-e965daa65899.jpeg', '1', '2017-08-22 23:10:17', '25d55ad283aa400af464c76d713c07ad', '0', 'Java从入门到弃坑', 'lhr1988', '1420432344@qq.com'); -INSERT INTO `quark_user` VALUES ('5', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 10:37:28', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '丁三石', '163@163.com'); -INSERT INTO `quark_user` VALUES ('6', 'http://127.0.0.1/images/upload/default.png', '0', '2017-08-25 11:56:38', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '马化腾', 'qq@qq.com'); -INSERT INTO `quark_user` VALUES ('7', 'http://127.0.0.1/images/upload/default.png', '0', '2017-08-25 20:51:23', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵0号', '0tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('8', 'http://127.0.0.1/images/upload/default.png', '0', '2017-08-25 20:51:23', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵1号', '1tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('9', 'http://127.0.0.1/images/upload/default.png', '0', '2017-08-25 20:51:23', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵2号', '2tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('10', 'http://127.0.0.1/images/upload/default.png', '0', '2017-08-25 20:51:23', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵3号', '3tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('11', 'http://127.0.0.1/images/upload/default.png', '0', '2017-08-25 20:51:23', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵4号', '4tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('12', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:23', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵5号', '5tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('13', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵6号', '6tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('14', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵7号', '7tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('15', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵8号', '8tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('16', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵9号', '9tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('17', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵10号', '10tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('18', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵11号', '11tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('19', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵12号', '12tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('20', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵13号', '13tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('21', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵14号', '14tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('22', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵15号', '15tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('23', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵16号', '16tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('24', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵17号', '17tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('25', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵18号', '18tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('26', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵19号', '19tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('27', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵20号', '20tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('28', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵21号', '21tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('29', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵22号', '22tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('30', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵23号', '23tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('31', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵24号', '24tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('32', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵25号', '25tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('33', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵26号', '26tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('34', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵27号', '27tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('35', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵28号', '28tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('36', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:25', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵29号', '29tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('37', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:18', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵30号', '30tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('38', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:18', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵31号', '31tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('39', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:18', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵32号', '32tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('40', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:18', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵33号', '33tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('41', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:18', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵34号', '34tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('42', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:18', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵35号', '35tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('43', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:18', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵36号', '36tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('44', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵37号', '37tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('45', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵38号', '38tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('46', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵39号', '39tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('47', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵40号', '40tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('48', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵41号', '41tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('49', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵42号', '42tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('50', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵43号', '43tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('51', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵44号', '44tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('52', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵45号', '45tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('53', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵46号', '46tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('54', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵47号', '47tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('55', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵48号', '48tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('56', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵49号', '49tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('57', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵50号', '50tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('58', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵51号', '51tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('59', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵52号', '52tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('60', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵53号', '53tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('61', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵54号', '54tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('62', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:20', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵55号', '55tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('63', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:20', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵56号', '56tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('64', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:20', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵57号', '57tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('65', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:20', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵58号', '58tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('66', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:20', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '图灵59号', '59tulin@gmail.com'); -INSERT INTO `quark_user` VALUES ('67', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-26 15:03:21', 'f379eaf3c831b04de153469d1bec345e', '0', null, '拉里·佩奇', 'gmail@gmail.com'); -INSERT INTO `quark_user` VALUES ('68', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-26 22:29:11', 'e10adc3949ba59abbe56e057f20f883e', '0', null, '比尔盖茨', 'Microsoft@Outlook.com'); -INSERT INTO `quark_user` VALUES ('69', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-27 10:35:14', 'c8837b23ff8aaa8a2dde915473ce0991', '0', null, 'cc', '111@cc.com'); -INSERT INTO `quark_user` VALUES ('70', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-31 12:13:54', 'e10adc3949ba59abbe56e057f20f883e', '0', null, 'CCTV旗下品牌', 'ccav@china.com'); -INSERT INTO `quark_user` VALUES ('71', 'http://127.0.0.1/images/upload/2017-09-03/51fb238d-00a3-49d2-91c5-25d1e54fff3e.jpeg', '1', '2017-09-03 11:04:03', 'e10adc3949ba59abbe56e057f20f883e', '1', '一库~~~~', '盲僧李青', 'lol@lol.com'); -INSERT INTO `quark_user` VALUES ('72', 'http://127.0.0.1/images/upload/2017-09-05/679e2736-54b5-4d73-b38f-b7b7ab61e3c1.jpeg', '1', '2017-09-05 10:31:27', 'e10adc3949ba59abbe56e057f20f883e', '1', '汪汪汪~~~', '萨摩王~', 'sa@sa.com'); +INSERT INTO `quark_user` VALUES + ('2', 'http://127.0.0.1/images/upload/2017-09-06/70e5b07c-4609-4925-bb1f-e965daa65899.jpeg', '1', '2017-08-22 23:10:17', + '25d55ad283aa400af464c76d713c07ad', '0', 'Java从入门到弃坑', 'lhr1988', '1420432344@qq.com'); +INSERT INTO `quark_user` VALUES + ('5', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 10:37:28', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '丁三石', + '163@163.com'); +INSERT INTO `quark_user` VALUES + ('6', 'http://127.0.0.1/images/upload/default.png', '0', '2017-08-25 11:56:38', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '马化腾', 'qq@qq.com'); +INSERT INTO `quark_user` VALUES + ('7', 'http://127.0.0.1/images/upload/default.png', '0', '2017-08-25 20:51:23', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵0号', + '0tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('8', 'http://127.0.0.1/images/upload/default.png', '0', '2017-08-25 20:51:23', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵1号', + '1tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('9', 'http://127.0.0.1/images/upload/default.png', '0', '2017-08-25 20:51:23', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵2号', + '2tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('10', 'http://127.0.0.1/images/upload/default.png', '0', '2017-08-25 20:51:23', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵3号', + '3tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('11', 'http://127.0.0.1/images/upload/default.png', '0', '2017-08-25 20:51:23', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵4号', + '4tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('12', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:23', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵5号', + '5tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('13', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵6号', + '6tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('14', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵7号', + '7tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('15', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵8号', + '8tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('16', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵9号', + '9tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('17', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵10号', + '10tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('18', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵11号', + '11tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('19', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵12号', + '12tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('20', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵13号', + '13tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('21', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵14号', + '14tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('22', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵15号', + '15tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('23', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵16号', + '16tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('24', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵17号', + '17tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('25', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵18号', + '18tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('26', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵19号', + '19tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('27', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵20号', + '20tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('28', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵21号', + '21tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('29', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵22号', + '22tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('30', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵23号', + '23tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('31', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵24号', + '24tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('32', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵25号', + '25tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('33', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵26号', + '26tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('34', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵27号', + '27tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('35', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:24', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵28号', + '28tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('36', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:51:25', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵29号', + '29tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('37', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:18', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵30号', + '30tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('38', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:18', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵31号', + '31tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('39', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:18', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵32号', + '32tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('40', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:18', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵33号', + '33tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('41', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:18', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵34号', + '34tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('42', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:18', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵35号', + '35tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('43', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:18', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵36号', + '36tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('44', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵37号', + '37tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('45', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵38号', + '38tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('46', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵39号', + '39tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('47', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵40号', + '40tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('48', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵41号', + '41tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('49', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵42号', + '42tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('50', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵43号', + '43tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('51', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵44号', + '44tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('52', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵45号', + '45tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('53', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵46号', + '46tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('54', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵47号', + '47tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('55', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵48号', + '48tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('56', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵49号', + '49tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('57', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵50号', + '50tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('58', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵51号', + '51tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('59', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵52号', + '52tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('60', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵53号', + '53tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('61', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:19', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵54号', + '54tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('62', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:20', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵55号', + '55tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('63', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:20', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵56号', + '56tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('64', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:20', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵57号', + '57tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('65', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:20', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵58号', + '58tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('66', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-25 20:52:20', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '图灵59号', + '59tulin@gmail.com'); +INSERT INTO `quark_user` VALUES + ('67', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-26 15:03:21', 'f379eaf3c831b04de153469d1bec345e', '0', NULL, '拉里·佩奇', + 'gmail@gmail.com'); +INSERT INTO `quark_user` VALUES + ('68', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-26 22:29:11', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, '比尔盖茨', + 'Microsoft@Outlook.com'); +INSERT INTO `quark_user` VALUES + ('69', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-27 10:35:14', 'c8837b23ff8aaa8a2dde915473ce0991', '0', NULL, 'cc', '111@cc.com'); +INSERT INTO `quark_user` VALUES + ('70', 'http://127.0.0.1/images/upload/default.png', '1', '2017-08-31 12:13:54', 'e10adc3949ba59abbe56e057f20f883e', '0', NULL, 'CCTV旗下品牌', + 'ccav@china.com'); +INSERT INTO `quark_user` VALUES + ('71', 'http://127.0.0.1/images/upload/2017-09-03/51fb238d-00a3-49d2-91c5-25d1e54fff3e.jpeg', '1', '2017-09-03 11:04:03', + 'e10adc3949ba59abbe56e057f20f883e', '1', '一库~~~~', '盲僧李青', 'lol@lol.com'); +INSERT INTO `quark_user` VALUES + ('72', 'http://127.0.0.1/images/upload/2017-09-05/679e2736-54b5-4d73-b38f-b7b7ab61e3c1.jpeg', '1', '2017-09-05 10:31:27', + 'e10adc3949ba59abbe56e057f20f883e', '1', '汪汪汪~~~', '萨摩王~', 'sa@sa.com'); From 88119d72a9677294f34e82c22a9b60c328cddb0a Mon Sep 17 00:00:00 2001 From: liudeyu Date: Wed, 12 Jun 2019 11:29:57 +0800 Subject: [PATCH 03/17] =?UTF-8?q?=E5=8A=A0=E5=85=A5erm=E6=96=87=E6=A1=A3?= =?UTF-8?q?=EF=BC=8C=E6=96=B9=E4=BE=BF=E8=A7=82=E5=AF=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- forumER1.mwb | Bin 0 -> 18208 bytes forumErpdf.pdf | Bin 0 -> 20427 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 forumER1.mwb create mode 100644 forumErpdf.pdf diff --git a/forumER1.mwb b/forumER1.mwb new file mode 100644 index 0000000000000000000000000000000000000000..498d35d5085f38387822ad48ffafaf271b1b4db0 GIT binary patch literal 18208 zcmZsCb95zL*Jo_owr$%sZ)_(WyF0dRn;qNe*ha^;lgabE-#asF&HQ!Gsa31$R@K@2 zhrN%IEGQTn5D*X)P(`t`f^!9xp1j!iln@*U>HEjj!NkqZ%-)s3&fS>7!_M}?*UAM~ zI^p2y1)b%hh1o@YV??WEY44oAlE$rBE#u;YOcqEQh6Diyl6tCkTZ#aM{6@-@0*VZa zpWhk<1ut+E%72=4BlqjV-#=Z!AS*fYz(e5eP4*q8>wUZSYu};JSiO_Wph^Jm59Yk_ z!&55R$57;~Pisy}<6`LIkk!jms=r?6+wv9T=ar8W3zfw{EaPWd?D*Kk`tSM_N6q;8dAoL>d{7zhi@zQ^zqlv*KoH3A z#R|wMe$t2cWHBfKMm%a%&%k;9wAtu<9bLZJ-}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-?QxayR{;oNU!^~ zH~KYy|Hs$;^}khru6p#f{!e`X{OFO#3yb{jIX~FT0X%Yq4TxEQI43_j+t}2=#5|pW z0aayX-s=ysj6fwk3=G^r${{65KP9mwQ7tLI~b2GDv09JE<9QHAWCGt+P})Uzy5nF3#1P>*bAM%T=;6y z8Y#lwa+py|q35C|gOi8T?FV~ue(iUfdVhk7p^D*8NzQ-P{nvLytP1&XnNMAKe%~*@ z`>!M`l_jUGysdWQSLF4U8iA0daqPd3B~NHQV6vmafv8Q26{}wYmzUuk3A^o4>PD{gQ+%>NfpL zPqmaONjy94(WRM_kJbh*vi$Ej)6LPr`QO>B+Sh-AwjV1`%aM@*Ad_WRY;{*SIqeqR5Ciyu?EH_+i zH@E0UbEFLGgnAxr&y%12i>j&#aQtKLiaECW%klRC-i%BP47d-A0Y(K9KtDPLSvR)$ zMrf^efy6$#4)l0O=vWHWfs_gYyjel1h=CahR|08mHwFeX2H(oyKp%zh{G#ln)V$;j p1>gLX)EtGxqU4OsvQz~_Jp-;>kce(^az<)yVzHG%NosKk7Xa_I_g?@2 literal 0 HcmV?d00001 diff --git a/forumErpdf.pdf b/forumErpdf.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3ac310df51d69823d015e6ebf44a3df23dd0eb18 GIT binary patch literal 20427 zcmd6P1zeQfwl`e@(jYl>C^2+*BOTJ+Eg{_{-QChH4N{UyN(j;+ASs}f^f!a~zIx6* z_n!0J@0;HYv!69<*IH|@y`KMiHk1mY;`BfUHYCdWkChilEC42eouMTXFE4=cp^2@T zlR1DDL{dTm004~Q7S>KC4xn#q11A$v6C*og6C{3qBu6I)69XG0*NjP>g{U1)hxT{M zUtl!{eUx63;Rc}KAjE{vWVDDejBHJ`g$G6UQsDNlZrra4%eT?6k@@UoX3D!zo}}KZ zRDCUW!(I%1b&)JUa($pfbbYcEfbWH{bs+GiyJO`rdZp^dO(Bo_lCX~Z@?xbiV1%P} zG&*GnFY@uqfjfRgV_w)6+A{*9h>!^(Y937i)z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TYEsT;(n{k`I|m~EI{x%p}+RQ z0%ZAZEG%q)qOt$h2MY(+Z+6AX%=vfu0XaC?e&gfd13f>}>?ChKXtl%~Ob!Px4R{*y@=+><{ YIvF@P-L7sR7b`Op5+$XWyg1VT0kpsc;Q#;t literal 0 HcmV?d00001 From 7ff326ec5f61ec587d649c462da02334191b0614 Mon Sep 17 00:00:00 2001 From: liudeyu Date: Sun, 16 Jun 2019 20:36:36 +0800 Subject: [PATCH 04/17] file constants change --- .../java/com/quark/rest/utils/Constants.java | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/quark-rest/src/main/java/com/quark/rest/utils/Constants.java b/quark-rest/src/main/java/com/quark/rest/utils/Constants.java index df6d82a..ae50a90 100644 --- a/quark-rest/src/main/java/com/quark/rest/utils/Constants.java +++ b/quark-rest/src/main/java/com/quark/rest/utils/Constants.java @@ -1,12 +1,26 @@ package com.quark.rest.utils; +import java.io.File; + /** * @Author LHR * Create By 2017/8/22 */ public class Constants { - //Upload常量 - public static final String UPLOAD_PATH = "D:\\home\\images\\upload\\"; - public static final String STATIC_URL ="http://127.0.0.1/images/upload/"; + + public static final String RELEATIVE_UPLOAD_PATH = "images/upload"; + //Upload常 + public static String UPLOAD_PATH = ""; + public static final String STATIC_URL = "http://127.0.0.1/" + RELEATIVE_UPLOAD_PATH; + + static { + UPLOAD_PATH = System.getProperty("user.home"); + if (UPLOAD_PATH.endsWith(File.separator)) { + UPLOAD_PATH = UPLOAD_PATH = File.separator; + } + UPLOAD_PATH = UPLOAD_PATH + RELEATIVE_UPLOAD_PATH; + + + } } From d409d30984553befc12d2ca060e15969ead055e3 Mon Sep 17 00:00:00 2001 From: liudeyu Date: Thu, 27 Jun 2019 18:52:11 +0800 Subject: [PATCH 05/17] =?UTF-8?q?=E5=8A=A0=E4=B8=80=E4=BA=9Bentity=20?= =?UTF-8?q?=EF=BC=8C=E6=95=B0=E6=8D=AE=E5=BA=93=E5=AF=B9=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbssource/pom.xml | 82 ++++++++++++ .../main/java/common/entity/AdminUser.java | 78 +++++++++++ .../src/main/java/common/entity/Collect.java | 60 +++++++++ .../src/main/java/common/entity/Label.java | 62 +++++++++ .../main/java/common/entity/Notification.java | 85 ++++++++++++ .../src/main/java/common/entity/Post.java | 118 +++++++++++++++++ .../src/main/java/common/entity/Reply.java | 81 ++++++++++++ .../src/main/java/common/entity/Role.java | 63 +++++++++ .../src/main/java/common/entity/User.java | 121 ++++++++++++++++++ bbssource/src/main/java/common/test | 0 bbssource/src/main/java/test | 0 11 files changed, 750 insertions(+) create mode 100644 bbssource/pom.xml create mode 100644 bbssource/src/main/java/common/entity/AdminUser.java create mode 100644 bbssource/src/main/java/common/entity/Collect.java create mode 100644 bbssource/src/main/java/common/entity/Label.java create mode 100644 bbssource/src/main/java/common/entity/Notification.java create mode 100644 bbssource/src/main/java/common/entity/Post.java create mode 100644 bbssource/src/main/java/common/entity/Reply.java create mode 100644 bbssource/src/main/java/common/entity/Role.java create mode 100644 bbssource/src/main/java/common/entity/User.java create mode 100644 bbssource/src/main/java/common/test create mode 100644 bbssource/src/main/java/test diff --git a/bbssource/pom.xml b/bbssource/pom.xml new file mode 100644 index 0000000..6e1bad5 --- /dev/null +++ b/bbssource/pom.xml @@ -0,0 +1,82 @@ + + + 4.0.0 + + bbspratise + bbssource + 1.0-SNAPSHOT + + + quark-parent + com.quark + 1.0-SNAPSHOT + ../quark-parent/pom.xml + + + + + 1.8 + + + + + org.springframework.boot + spring-boot-starter-data-jpa + + + + org.springframework.boot + spring-boot-starter-cache + + + + net.sf.ehcache + ehcache + + + mysql + mysql-connector-java + runtime + + + com.alibaba + druid + + + net.sourceforge.nekohtml + nekohtml + + + org.springframework.boot + spring-boot-starter-test + test + + + + com.alibaba + fastjson + + + com.google.guava + guava + + + com.fasterxml.jackson.core + jackson-annotations + + + + + + bbsproject + + + org.springframework.boot + spring-boot-maven-plugin + + + + + \ No newline at end of file diff --git a/bbssource/src/main/java/common/entity/AdminUser.java b/bbssource/src/main/java/common/entity/AdminUser.java new file mode 100644 index 0000000..a925f20 --- /dev/null +++ b/bbssource/src/main/java/common/entity/AdminUser.java @@ -0,0 +1,78 @@ +package common.entity; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +import javax.persistence.*; +import java.io.Serializable; +import java.util.HashSet; +import java.util.Set; + +/** + * Created by liudeyu on 2019/6/27. + */ +@Entity +@Table(name = "quark_adminuser") +public class AdminUser implements Serializable { + @Column(name = "id") + @GeneratedValue + private int id; + + @Column(name = "enable") + private int enable; + + @Column(name = "password") + @JsonIgnore + private String password; + + @Column(name = "username") + private String userName; + + @JsonIgnore + @JoinTable(name = "quark_adminuser_role", joinColumns = {@JoinColumn + (name = "adminuser_id", referencedColumnName = "id")}, inverseJoinColumns = { + @JoinColumn(name = "role_id", referencedColumnName = "id") + }) + @ManyToOne(cascade = CascadeType.ALL) + private Set adminUsers = new HashSet<>(); + + + public Set getAdminUsers() { + return adminUsers; + } + + public void setAdminUsers(Set adminUsers) { + this.adminUsers = adminUsers; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public int getEnable() { + return enable; + } + + public void setEnable(int enable) { + this.enable = enable; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } +} diff --git a/bbssource/src/main/java/common/entity/Collect.java b/bbssource/src/main/java/common/entity/Collect.java new file mode 100644 index 0000000..66073ec --- /dev/null +++ b/bbssource/src/main/java/common/entity/Collect.java @@ -0,0 +1,60 @@ +package common.entity; + +import javafx.geometry.Pos; + +import javax.persistence.*; +import java.io.Serializable; +import java.sql.Timestamp; + +/** + * Created by liudeyu on 2019/6/27. + */ +public class Collect implements Serializable{ + + @GeneratedValue + @Column(name = "id") + private int id; + + @Column(name = "init_time") + private Timestamp initTime; + + @ManyToOne + @Column(name = "posts_id") + private Post post; + + @ManyToOne + @Column(name = "user_id") + private User user; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public Timestamp getInitTime() { + return initTime; + } + + public void setInitTime(Timestamp initTime) { + this.initTime = initTime; + } + + public Post getPost() { + return post; + } + + public void setPost(Post post) { + this.post = post; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } +} diff --git a/bbssource/src/main/java/common/entity/Label.java b/bbssource/src/main/java/common/entity/Label.java new file mode 100644 index 0000000..2cbb95b --- /dev/null +++ b/bbssource/src/main/java/common/entity/Label.java @@ -0,0 +1,62 @@ +package common.entity; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Table; +import java.io.Serializable; + +/** + * Created by liudeyu on 2019/6/27. + */ +@Entity +@Table(name = "quark_label") +public class Label implements Serializable { + + @Column(name = "id") + @GeneratedValue + private int id; + + @Column(name = "name") + private String name; + + @Column(name = "details") + private String detail; + + @Column(name = "posts_count") + private int postCount; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDetail() { + return detail; + } + + public void setDetail(String detail) { + this.detail = detail; + } + + public int getPostCount() { + return postCount; + } + + public void setPostCount(int postCount) { + this.postCount = postCount; + } +} diff --git a/bbssource/src/main/java/common/entity/Notification.java b/bbssource/src/main/java/common/entity/Notification.java new file mode 100644 index 0000000..231040c --- /dev/null +++ b/bbssource/src/main/java/common/entity/Notification.java @@ -0,0 +1,85 @@ +package common.entity; + +import javax.persistence.Column; +import javax.persistence.GeneratedValue; +import javax.persistence.OneToOne; +import java.io.Serializable; +import java.sql.Timestamp; + +/** + * Created by liudeyu on 2019/6/27. + */ +public class Notification implements Serializable { + + @GeneratedValue + @Column(name = "id") + private int id; + + @Column(name = "is_read") + private boolean isRead; + + + @Column(name = "fromuser_id") + @OneToOne + private int fromUserId; + + @Column(name = "posts_id") + @OneToOne + private int postsId; + + @Column(name = "touser_id") + @OneToOne + private int toUserId; + + @Column(name = "init_time") + private Timestamp initTime; + + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public boolean isRead() { + return isRead; + } + + public void setRead(boolean read) { + isRead = read; + } + + public int getFromUserId() { + return fromUserId; + } + + public void setFromUserId(int fromUserId) { + this.fromUserId = fromUserId; + } + + public int getPostsId() { + return postsId; + } + + public void setPostsId(int postsId) { + this.postsId = postsId; + } + + public int getToUserId() { + return toUserId; + } + + public void setToUserId(int toUserId) { + this.toUserId = toUserId; + } + + public Timestamp getInitTime() { + return initTime; + } + + public void setInitTime(Timestamp initTime) { + this.initTime = initTime; + } +} diff --git a/bbssource/src/main/java/common/entity/Post.java b/bbssource/src/main/java/common/entity/Post.java new file mode 100644 index 0000000..5fd138a --- /dev/null +++ b/bbssource/src/main/java/common/entity/Post.java @@ -0,0 +1,118 @@ +package common.entity; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +import javax.persistence.*; +import java.io.Serializable; +import java.sql.Timestamp; + +/** + * Created by liudeyu on 2019/6/27. + */ +@Entity +@Table(name = "quark_posts") +public class Post implements Serializable { + + @GeneratedValue + @Column(name = "id") + private int id; + + @Column(name = + "content") + private String content; + + @Column(name = "good") + private boolean isGood; + + @Column(name = "init_time") + private Timestamp initTime; + + @Column(name = "label_id") + @ManyToOne + private Label label; + + @Column(name = "reply_count") + private int replyCount; + + @Column(name = "title") + private String title; + + @Column(name = "top") + private boolean isTop; + + @ManyToOne + @Column(name = "user_id") + private User user; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public boolean isGood() { + return isGood; + } + + public void setGood(boolean good) { + isGood = good; + } + + public Timestamp getInitTime() { + return initTime; + } + + public void setInitTime(Timestamp initTime) { + this.initTime = initTime; + } + + public Label getLabel() { + return label; + } + + public void setLabel(Label label) { + this.label = label; + } + + public int getReplyCount() { + return replyCount; + } + + public void setReplyCount(int replyCount) { + this.replyCount = replyCount; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public boolean isTop() { + return isTop; + } + + public void setTop(boolean top) { + isTop = top; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } +} diff --git a/bbssource/src/main/java/common/entity/Reply.java b/bbssource/src/main/java/common/entity/Reply.java new file mode 100644 index 0000000..54482d1 --- /dev/null +++ b/bbssource/src/main/java/common/entity/Reply.java @@ -0,0 +1,81 @@ +package common.entity; + +import javax.persistence.*; +import java.io.Serializable; +import java.sql.Timestamp; + +/** + * Created by liudeyu on 2019/6/27. + */ +@Entity +@Table(name = "quark_reply") +public class Reply implements Serializable{ + + @GeneratedValue + @Column(name = "id") + private int id; + + @Column(name = "content") + private String content; + @Column(name = "init_time") + private Timestamp initTime; + + @Column(name = "up") + private int upState; + + @ManyToOne + @Column(name = "post_id") + private Post post; + + @ManyToOne + @Column(name = "user_id") + private User user; + + public int getUpState() { + return upState; + } + + public void setUpState(int upState) { + this.upState = upState; + } + + public Post getPost() { + return post; + } + + public void setPost(Post post) { + this.post = post; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public Timestamp getInitTime() { + return initTime; + } + + public void setInitTime(Timestamp initTime) { + this.initTime = initTime; + } +} diff --git a/bbssource/src/main/java/common/entity/Role.java b/bbssource/src/main/java/common/entity/Role.java new file mode 100644 index 0000000..2de3acd --- /dev/null +++ b/bbssource/src/main/java/common/entity/Role.java @@ -0,0 +1,63 @@ +package common.entity; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +import javax.persistence.Column; +import javax.persistence.GeneratedValue; +import javax.persistence.ManyToMany; +import java.io.Serializable; +import java.util.HashSet; +import java.util.Set; + +/** + * Created by liudeyu on 2019/6/27. + */ +public class Role implements Serializable { + + @JsonIgnore + @Column(name = "id") + @GeneratedValue + private int id; + + @Column(name = "description") + private String des; + + @Column(name = "name",unique = true) + private String name; + + @ManyToMany(mappedBy = "adminUsers") + private Set adminUsers=new HashSet<>(); + + + public Set getAdminUsers() { + return adminUsers; + } + + public void setAdminUsers(Set adminUsers) { + this.adminUsers = adminUsers; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getDes() { + return des; + } + + public void setDes(String des) { + this.des = des; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/bbssource/src/main/java/common/entity/User.java b/bbssource/src/main/java/common/entity/User.java new file mode 100644 index 0000000..af691f9 --- /dev/null +++ b/bbssource/src/main/java/common/entity/User.java @@ -0,0 +1,121 @@ +package common.entity; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Table; +import java.io.Serializable; +import java.sql.Timestamp; + +/** + * Created by liudeyu on 2019/6/27. + */ +@Entity +@Table(name = "quark_user") +public class User implements Serializable{ + + @GeneratedValue + @Column(name = "id") + private int id; + + + @Column(name = "icon") + private String icon; + + @Column(name = "enable") + private int enable; + @Column(name = "init_time") + private Timestamp initTime; + + + @JsonIgnore + @Column(name = "password") + private String password; + + @Column(name = "sex") + private int sex; + + @Column(name = "signature") + private String signature; + + @Column(name = "username") + private String userName; + + @Column(name = "email") + private String email; + + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getIcon() { + return icon; + } + + public void setIcon(String icon) { + this.icon = icon; + } + + public int getEnable() { + return enable; + } + + public void setEnable(int enable) { + this.enable = enable; + } + + public Timestamp getInitTime() { + return initTime; + } + + public void setInitTime(Timestamp initTime) { + this.initTime = initTime; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public int getSex() { + return sex; + } + + public void setSex(int sex) { + this.sex = sex; + } + + public String getSignature() { + return signature; + } + + public void setSignature(String signature) { + this.signature = signature; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } +} diff --git a/bbssource/src/main/java/common/test b/bbssource/src/main/java/common/test new file mode 100644 index 0000000..e69de29 diff --git a/bbssource/src/main/java/test b/bbssource/src/main/java/test new file mode 100644 index 0000000..e69de29 From dfa8d441b13697342eb9f856f0ee6a5789ffd944 Mon Sep 17 00:00:00 2001 From: liudeyu Date: Fri, 28 Jun 2019 17:41:40 +0800 Subject: [PATCH 06/17] fix some entity --- .../src/main/java/common/entity/Collect.java | 7 +++---- .../main/java/common/entity/Notification.java | 16 +++++++--------- bbssource/src/main/java/common/entity/Post.java | 4 ++-- bbssource/src/main/java/common/entity/Reply.java | 4 ++-- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/bbssource/src/main/java/common/entity/Collect.java b/bbssource/src/main/java/common/entity/Collect.java index 66073ec..c683a01 100644 --- a/bbssource/src/main/java/common/entity/Collect.java +++ b/bbssource/src/main/java/common/entity/Collect.java @@ -1,7 +1,5 @@ package common.entity; -import javafx.geometry.Pos; - import javax.persistence.*; import java.io.Serializable; import java.sql.Timestamp; @@ -19,13 +17,14 @@ public class Collect implements Serializable{ private Timestamp initTime; @ManyToOne - @Column(name = "posts_id") + @JoinColumn(name = "posts_id") private Post post; @ManyToOne - @Column(name = "user_id") + @JoinColumn(name = "user_id") private User user; + public int getId() { return id; } diff --git a/bbssource/src/main/java/common/entity/Notification.java b/bbssource/src/main/java/common/entity/Notification.java index 231040c..f525e1a 100644 --- a/bbssource/src/main/java/common/entity/Notification.java +++ b/bbssource/src/main/java/common/entity/Notification.java @@ -1,8 +1,6 @@ package common.entity; -import javax.persistence.Column; -import javax.persistence.GeneratedValue; -import javax.persistence.OneToOne; +import javax.persistence.*; import java.io.Serializable; import java.sql.Timestamp; @@ -19,16 +17,16 @@ public class Notification implements Serializable { private boolean isRead; - @Column(name = "fromuser_id") - @OneToOne + @JoinColumn(name = "fromuser_id") + @ManyToOne private int fromUserId; - @Column(name = "posts_id") - @OneToOne + @JoinColumn(name = "posts_id") + @ManyToOne private int postsId; - @Column(name = "touser_id") - @OneToOne + @JoinColumn(name = "touser_id") + @ManyToOne private int toUserId; @Column(name = "init_time") diff --git a/bbssource/src/main/java/common/entity/Post.java b/bbssource/src/main/java/common/entity/Post.java index 5fd138a..ff086d8 100644 --- a/bbssource/src/main/java/common/entity/Post.java +++ b/bbssource/src/main/java/common/entity/Post.java @@ -27,7 +27,7 @@ public class Post implements Serializable { @Column(name = "init_time") private Timestamp initTime; - @Column(name = "label_id") + @JoinColumn(name = "label_id") @ManyToOne private Label label; @@ -41,7 +41,7 @@ public class Post implements Serializable { private boolean isTop; @ManyToOne - @Column(name = "user_id") + @JoinColumn(name = "user_id") private User user; public int getId() { diff --git a/bbssource/src/main/java/common/entity/Reply.java b/bbssource/src/main/java/common/entity/Reply.java index 54482d1..9f9aae0 100644 --- a/bbssource/src/main/java/common/entity/Reply.java +++ b/bbssource/src/main/java/common/entity/Reply.java @@ -24,11 +24,11 @@ public class Reply implements Serializable{ private int upState; @ManyToOne - @Column(name = "post_id") + @JoinColumn(name = "post_id") private Post post; @ManyToOne - @Column(name = "user_id") + @JoinColumn(name = "user_id") private User user; public int getUpState() { From 98df9f8ca264fe57737464df08b4a2985976a2f0 Mon Sep 17 00:00:00 2001 From: ldy Date: Sat, 29 Jun 2019 13:21:17 +0800 Subject: [PATCH 07/17] many entity correctfiy ,orm atri --- bbssource/src/main/java/common/entity/Permission.java | 4 ++++ bbssource/src/main/java/common/utils/Constants.java | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 bbssource/src/main/java/common/entity/Permission.java create mode 100644 bbssource/src/main/java/common/utils/Constants.java diff --git a/bbssource/src/main/java/common/entity/Permission.java b/bbssource/src/main/java/common/entity/Permission.java new file mode 100644 index 0000000..e010ac7 --- /dev/null +++ b/bbssource/src/main/java/common/entity/Permission.java @@ -0,0 +1,4 @@ +package common.entity; + +public class Permission { +} diff --git a/bbssource/src/main/java/common/utils/Constants.java b/bbssource/src/main/java/common/utils/Constants.java new file mode 100644 index 0000000..964ed32 --- /dev/null +++ b/bbssource/src/main/java/common/utils/Constants.java @@ -0,0 +1,4 @@ +package common.utils; + +public class Constants { +} From bfbc2f56e92d301229f07bc4a7db7218dd4fb96f Mon Sep 17 00:00:00 2001 From: ldy Date: Sun, 30 Jun 2019 09:57:45 +0800 Subject: [PATCH 08/17] =?UTF-8?q?=E7=9F=AB=E6=AD=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbssource/src/test/java/testcommon/TestOne.java | 4 ++++ bbssource/src/test/test | 0 2 files changed, 4 insertions(+) create mode 100644 bbssource/src/test/java/testcommon/TestOne.java create mode 100644 bbssource/src/test/test diff --git a/bbssource/src/test/java/testcommon/TestOne.java b/bbssource/src/test/java/testcommon/TestOne.java new file mode 100644 index 0000000..05aed1e --- /dev/null +++ b/bbssource/src/test/java/testcommon/TestOne.java @@ -0,0 +1,4 @@ +package testcommon; + +public class TestOne { +} diff --git a/bbssource/src/test/test b/bbssource/src/test/test new file mode 100644 index 0000000..e69de29 From 6cb5e45adf0584b3a8cec7ea13a603344f592c25 Mon Sep 17 00:00:00 2001 From: liudeyu Date: Sun, 30 Jun 2019 11:20:25 +0800 Subject: [PATCH 09/17] =?UTF-8?q?git=20=E4=BD=BF=E7=94=A8=E9=94=99?= =?UTF-8?q?=E8=AF=AF=EF=BC=8C=E6=B2=A1=E6=9C=89=E6=88=90=E5=8A=9F=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E4=B8=A4=E4=B8=AA=E7=94=B5=E8=84=91=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=8C=E6=95=B4=E4=B8=AAentity=20copy,for=20progress?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/common/entity/AdminUser.java | 80 ++++++---- .../src/main/java/common/entity/Collect.java | 62 ++++---- .../src/main/java/common/entity/Label.java | 48 +++--- .../main/java/common/entity/Notification.java | 82 +++++----- .../main/java/common/entity/Permission.java | 105 ++++++++++++- .../src/main/java/common/entity/Post.java | 118 -------------- .../src/main/java/common/entity/Posts.java | 145 ++++++++++++++++++ .../src/main/java/common/entity/Reply.java | 98 +++++++----- .../src/main/java/common/entity/Role.java | 95 ++++++++---- .../src/main/java/common/entity/User.java | 132 +++++++++------- .../src/main/java/common/utils/Constants.java | 2 + 11 files changed, 607 insertions(+), 360 deletions(-) delete mode 100644 bbssource/src/main/java/common/entity/Post.java create mode 100644 bbssource/src/main/java/common/entity/Posts.java diff --git a/bbssource/src/main/java/common/entity/AdminUser.java b/bbssource/src/main/java/common/entity/AdminUser.java index a925f20..6b433a4 100644 --- a/bbssource/src/main/java/common/entity/AdminUser.java +++ b/bbssource/src/main/java/common/entity/AdminUser.java @@ -1,5 +1,6 @@ package common.entity; + import com.fasterxml.jackson.annotation.JsonIgnore; import javax.persistence.*; @@ -8,56 +9,50 @@ import java.util.Set; /** - * Created by liudeyu on 2019/6/27. + * Created by lhr on 17-7-31. */ + @Entity @Table(name = "quark_adminuser") -public class AdminUser implements Serializable { - @Column(name = "id") +public class AdminUser implements Serializable{ + + @Id @GeneratedValue - private int id; + private Integer id; - @Column(name = "enable") - private int enable; + @Column(unique = true,nullable = false) + private String username; - @Column(name = "password") + @Column(nullable = false) @JsonIgnore private String password; - @Column(name = "username") - private String userName; - - @JsonIgnore - @JoinTable(name = "quark_adminuser_role", joinColumns = {@JoinColumn - (name = "adminuser_id", referencedColumnName = "id")}, inverseJoinColumns = { - @JoinColumn(name = "role_id", referencedColumnName = "id") - }) - @ManyToOne(cascade = CascadeType.ALL) - private Set adminUsers = new HashSet<>(); - - public Set getAdminUsers() { - return adminUsers; - } + //是否可以使用,默认为1 + @Column(nullable = false) + private Integer enable = 1; - public void setAdminUsers(Set adminUsers) { - this.adminUsers = adminUsers; - } + @JsonIgnore + @JoinTable(name = "quark_adminuser_role", + joinColumns = {@JoinColumn(name = "adminuser_id",referencedColumnName = "id")}, + inverseJoinColumns = {@JoinColumn(name = "role_id",referencedColumnName = "id")}) + @ManyToMany(cascade = CascadeType.ALL) + private Set roles = new HashSet<>(); - public int getId() { + public Integer getId() { return id; } - public void setId(int id) { + public void setId(Integer id) { this.id = id; } - public int getEnable() { - return enable; + public String getUsername() { + return username; } - public void setEnable(int enable) { - this.enable = enable; + public void setUsername(String username) { + this.username = username; } public String getPassword() { @@ -68,11 +63,28 @@ public void setPassword(String password) { this.password = password; } - public String getUserName() { - return userName; + public Integer getEnable() { + return enable; + } + + public void setEnable(Integer enable) { + this.enable = enable; + } + + public Set getRoles() { + return roles; + } + + public void setRoles(Set roles) { + this.roles = roles; } - public void setUserName(String userName) { - this.userName = userName; + @Override + public String toString() { + return "AdminUser{" + + "Id=" + id + + ", username='" + username + '\'' + + ", password='" + password + '\'' + + ", enable=" + enable; } } diff --git a/bbssource/src/main/java/common/entity/Collect.java b/bbssource/src/main/java/common/entity/Collect.java index c683a01..10c50ac 100644 --- a/bbssource/src/main/java/common/entity/Collect.java +++ b/bbssource/src/main/java/common/entity/Collect.java @@ -1,52 +1,54 @@ package common.entity; +import com.fasterxml.jackson.annotation.JsonFormat; +import common.utils.Constants; + import javax.persistence.*; import java.io.Serializable; -import java.sql.Timestamp; +import java.util.Date; /** - * Created by liudeyu on 2019/6/27. + * @Author LHR + * Create By 2017/8/18 + * + * 收藏 */ +@Entity +@Table(name = "quark_collect") public class Collect implements Serializable{ + @Id @GeneratedValue - @Column(name = "id") - private int id; - - @Column(name = "init_time") - private Timestamp initTime; + private Integer id; - @ManyToOne - @JoinColumn(name = "posts_id") - private Post post; + //与帖子的关联关系:立即加载 + @ManyToOne(fetch = FetchType.EAGER) + @JoinColumn(nullable = false, name = "posts_id") + private Posts posts; - @ManyToOne - @JoinColumn(name = "user_id") + //与用户的关联关系:立即加载 + @ManyToOne(fetch = FetchType.EAGER) + @JoinColumn(nullable = false, name = "user_id") private User user; + //收藏时间 + @JsonFormat(pattern = Constants.DATETIME_FORMAT) + private Date initTime; - public int getId() { + public Integer getId() { return id; } - public void setId(int id) { + public void setId(Integer id) { this.id = id; } - public Timestamp getInitTime() { - return initTime; - } - - public void setInitTime(Timestamp initTime) { - this.initTime = initTime; - } - - public Post getPost() { - return post; + public Posts getPosts() { + return posts; } - public void setPost(Post post) { - this.post = post; + public void setPosts(Posts posts) { + this.posts = posts; } public User getUser() { @@ -56,4 +58,12 @@ public User getUser() { public void setUser(User user) { this.user = user; } + + public Date getInitTime() { + return initTime; + } + + public void setInitTime(Date initTime) { + this.initTime = initTime; + } } diff --git a/bbssource/src/main/java/common/entity/Label.java b/bbssource/src/main/java/common/entity/Label.java index 2cbb95b..4b2689f 100644 --- a/bbssource/src/main/java/common/entity/Label.java +++ b/bbssource/src/main/java/common/entity/Label.java @@ -1,38 +1,38 @@ package common.entity; -import com.fasterxml.jackson.annotation.JsonIgnore; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Table; +import javax.persistence.*; import java.io.Serializable; /** - * Created by liudeyu on 2019/6/27. + * @Author LHR + * Create By 2017/8/18 + * + * 标签 */ @Entity @Table(name = "quark_label") public class Label implements Serializable { - @Column(name = "id") + @Id @GeneratedValue - private int id; + private Integer id; - @Column(name = "name") + //标签名称 + @Column(nullable = false, unique = true) private String name; - @Column(name = "details") - private String detail; - + //主题数量 @Column(name = "posts_count") - private int postCount; + private Integer postsCount = 0; + + //详情 + private String details; - public int getId() { + public Integer getId() { return id; } - public void setId(int id) { + public void setId(Integer id) { this.id = id; } @@ -44,19 +44,19 @@ public void setName(String name) { this.name = name; } - public String getDetail() { - return detail; + public Integer getPostsCount() { + return postsCount; } - public void setDetail(String detail) { - this.detail = detail; + public void setPostsCount(Integer postsCount) { + this.postsCount = postsCount; } - public int getPostCount() { - return postCount; + public String getDetails() { + return details; } - public void setPostCount(int postCount) { - this.postCount = postCount; + public void setDetails(String details) { + this.details = details; } } diff --git a/bbssource/src/main/java/common/entity/Notification.java b/bbssource/src/main/java/common/entity/Notification.java index f525e1a..072f992 100644 --- a/bbssource/src/main/java/common/entity/Notification.java +++ b/bbssource/src/main/java/common/entity/Notification.java @@ -1,43 +1,53 @@ package common.entity; +import com.fasterxml.jackson.annotation.JsonFormat; +import common.utils.Constants; + import javax.persistence.*; -import java.io.Serializable; -import java.sql.Timestamp; +import java.util.Date; /** - * Created by liudeyu on 2019/6/27. + * @Author LHR + * Create By 2017/8/18 + * + * 通知 */ -public class Notification implements Serializable { +@Entity +@Table(name = "quark_notification") +public class Notification { + @Id @GeneratedValue - @Column(name = "id") - private int id; + private Integer id; + //通知是否已读 @Column(name = "is_read") - private boolean isRead; - - - @JoinColumn(name = "fromuser_id") - @ManyToOne - private int fromUserId; + private boolean isRead = false; - @JoinColumn(name = "posts_id") - @ManyToOne - private int postsId; + //要通知的用户:立即加载 + @ManyToOne(fetch = FetchType.EAGER) + @JoinColumn(nullable = false,name = "touser_id") + private User touser; - @JoinColumn(name = "touser_id") - @ManyToOne - private int toUserId; + //发起通知的用户 + @ManyToOne(fetch = FetchType.EAGER) + @JoinColumn(nullable = false,name = "fromuser_id") + private User fromuser; - @Column(name = "init_time") - private Timestamp initTime; + @ManyToOne(fetch = FetchType.EAGER) + @JoinColumn(nullable = false,name = "posts_id") + private Posts posts; + //发布时间 + @Column(nullable = false) + @JsonFormat(pattern = Constants.DATETIME_FORMAT, timezone = "GMT+8") + private Date initTime; - public int getId() { + public Integer getId() { return id; } - public void setId(int id) { + public void setId(Integer id) { this.id = id; } @@ -49,35 +59,35 @@ public void setRead(boolean read) { isRead = read; } - public int getFromUserId() { - return fromUserId; + public User getTouser() { + return touser; } - public void setFromUserId(int fromUserId) { - this.fromUserId = fromUserId; + public void setTouser(User touser) { + this.touser = touser; } - public int getPostsId() { - return postsId; + public User getFromuser() { + return fromuser; } - public void setPostsId(int postsId) { - this.postsId = postsId; + public void setFromuser(User fromuser) { + this.fromuser = fromuser; } - public int getToUserId() { - return toUserId; + public Posts getPosts() { + return posts; } - public void setToUserId(int toUserId) { - this.toUserId = toUserId; + public void setPosts(Posts posts) { + this.posts = posts; } - public Timestamp getInitTime() { + public Date getInitTime() { return initTime; } - public void setInitTime(Timestamp initTime) { + public void setInitTime(Date initTime) { this.initTime = initTime; } } diff --git a/bbssource/src/main/java/common/entity/Permission.java b/bbssource/src/main/java/common/entity/Permission.java index e010ac7..d737444 100644 --- a/bbssource/src/main/java/common/entity/Permission.java +++ b/bbssource/src/main/java/common/entity/Permission.java @@ -1,4 +1,107 @@ package common.entity; -public class Permission { +import com.fasterxml.jackson.annotation.JsonIgnore; + +import javax.persistence.*; +import java.io.Serializable; +import java.util.HashSet; +import java.util.Set; + +/** + * Created by lhr on 17-7-31. + */ + +@Entity +@Table(name = "quark_permission") +public class Permission implements Serializable{ + + @Id + @GeneratedValue + private Integer id; + + private String name; + + private String perurl; + + //资源类型  1:菜单 2:按钮 + private Integer type; + + //父权限 + @Column(nullable = false) + private Integer parentid; + + //排序 + private Integer sort; + + //是否选中 + @Transient + private String checked; + + @JsonIgnore + @ManyToMany(mappedBy = "permissions") + private Set roles = new HashSet<>(); + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPerurl() { + return perurl; + } + + public void setPerurl(String perurl) { + this.perurl = perurl; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public Integer getParentid() { + return parentid; + } + + public void setParentid(Integer parentid) { + this.parentid = parentid; + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public Set getRoles() { + return roles; + } + + public void setRoles(Set roles) { + this.roles = roles; + } + + public String getChecked() { + return checked; + } + + public void setChecked(String checked) { + this.checked = checked; + } } diff --git a/bbssource/src/main/java/common/entity/Post.java b/bbssource/src/main/java/common/entity/Post.java deleted file mode 100644 index ff086d8..0000000 --- a/bbssource/src/main/java/common/entity/Post.java +++ /dev/null @@ -1,118 +0,0 @@ -package common.entity; - -import com.fasterxml.jackson.annotation.JsonIgnore; - -import javax.persistence.*; -import java.io.Serializable; -import java.sql.Timestamp; - -/** - * Created by liudeyu on 2019/6/27. - */ -@Entity -@Table(name = "quark_posts") -public class Post implements Serializable { - - @GeneratedValue - @Column(name = "id") - private int id; - - @Column(name = - "content") - private String content; - - @Column(name = "good") - private boolean isGood; - - @Column(name = "init_time") - private Timestamp initTime; - - @JoinColumn(name = "label_id") - @ManyToOne - private Label label; - - @Column(name = "reply_count") - private int replyCount; - - @Column(name = "title") - private String title; - - @Column(name = "top") - private boolean isTop; - - @ManyToOne - @JoinColumn(name = "user_id") - private User user; - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content; - } - - public boolean isGood() { - return isGood; - } - - public void setGood(boolean good) { - isGood = good; - } - - public Timestamp getInitTime() { - return initTime; - } - - public void setInitTime(Timestamp initTime) { - this.initTime = initTime; - } - - public Label getLabel() { - return label; - } - - public void setLabel(Label label) { - this.label = label; - } - - public int getReplyCount() { - return replyCount; - } - - public void setReplyCount(int replyCount) { - this.replyCount = replyCount; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public boolean isTop() { - return isTop; - } - - public void setTop(boolean top) { - isTop = top; - } - - public User getUser() { - return user; - } - - public void setUser(User user) { - this.user = user; - } -} diff --git a/bbssource/src/main/java/common/entity/Posts.java b/bbssource/src/main/java/common/entity/Posts.java new file mode 100644 index 0000000..fc3e8cc --- /dev/null +++ b/bbssource/src/main/java/common/entity/Posts.java @@ -0,0 +1,145 @@ +package common.entity; + +import com.fasterxml.jackson.annotation.JsonFormat; +import common.utils.Constants; + +import javax.persistence.*; +import java.io.Serializable; +import java.util.Date; + +/** + * @Author LHR + * Create By 2017/8/18 + * + * 帖子 + */ +@Entity +@Table(name = "quark_posts") +public class Posts implements Serializable { + + @Id + @GeneratedValue + private Integer id; + + //与标签的关系 + @ManyToOne + @JoinColumn(nullable = false, name = "label_id") + private Label label; + + //标题 + @Column(unique = true, nullable = false) + private String title; + + //内容 + @Column(columnDefinition = "text") + private String content; + + //发布时间 + @Column(nullable = false) + @JsonFormat(pattern = Constants.DATETIME_FORMAT, timezone = "GMT+8") + private Date initTime; + + //是否置顶 + private boolean top; + + //是否精华 + private boolean good; + + //与用户的关联关系 + @ManyToOne + @JoinColumn(nullable = false, name = "user_id") + private User user; + + + //回复数量 + @Column(name = "reply_count") + private int replyCount = 0; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Label getLabel() { + return label; + } + + public void setLabel(Label label) { + this.label = label; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public Date getInitTime() { + return initTime; + } + + public void setInitTime(Date initTime) { + this.initTime = initTime; + } + + public Boolean getTop() { + return top; + } + + public void setTop(Boolean top) { + this.top = top; + } + + public Boolean getGood() { + return good; + } + + public void setGood(Boolean good) { + this.good = good; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public int getReplyCount() { + return replyCount; + } + + public void setReplyCount(int replyCount) { + this.replyCount = replyCount; + } + + @Override + public String toString() { + return "Posts{" + + "id=" + id + + ", label=" + label + + ", title='" + title + '\'' + + ", content='" + content + '\'' + + ", initTime=" + initTime + + ", top=" + top + + ", good=" + good + + ", user=" + user + + ", replyCount=" + replyCount + + '}'; + } +} diff --git a/bbssource/src/main/java/common/entity/Reply.java b/bbssource/src/main/java/common/entity/Reply.java index 9f9aae0..e86b46f 100644 --- a/bbssource/src/main/java/common/entity/Reply.java +++ b/bbssource/src/main/java/common/entity/Reply.java @@ -1,81 +1,105 @@ package common.entity; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import common.utils.Constants; + import javax.persistence.*; import java.io.Serializable; -import java.sql.Timestamp; +import java.util.Date; /** - * Created by liudeyu on 2019/6/27. + * @Author LHR + * Create By 2017/8/18 + * + * 回复 */ @Entity @Table(name = "quark_reply") -public class Reply implements Serializable{ +public class Reply implements Serializable { + @Id @GeneratedValue - @Column(name = "id") - private int id; + private Integer id; - @Column(name = "content") + //回复的内容 + @Column(columnDefinition = "text", nullable = false) private String content; - @Column(name = "init_time") - private Timestamp initTime; - @Column(name = "up") - private int upState; + //回复时间 + @JsonFormat(pattern = Constants.DATETIME_FORMAT, timezone = "GMT+8") + private Date initTime; + + //点赞个数 + private Integer up = 0; + //与话题的关联关系 @ManyToOne - @JoinColumn(name = "post_id") - private Post post; + @JoinColumn(nullable = false, name = "posts_id") + @JsonIgnore + private Posts posts; + //与用户的关联关系 @ManyToOne - @JoinColumn(name = "user_id") + @JoinColumn(nullable = false, name = "user_id") private User user; - public int getUpState() { - return upState; + public Integer getId() { + return id; } - public void setUpState(int upState) { - this.upState = upState; + public void setId(Integer id) { + this.id = id; } - public Post getPost() { - return post; + public String getContent() { + return content; } - public void setPost(Post post) { - this.post = post; + public void setContent(String content) { + this.content = content; } - public User getUser() { - return user; + public Date getInitTime() { + return initTime; } - public void setUser(User user) { - this.user = user; + public void setInitTime(Date initTime) { + this.initTime = initTime; } - public int getId() { - return id; + public Integer getUp() { + return up; } - public void setId(int id) { - this.id = id; + public void setUp(Integer up) { + this.up = up; } - public String getContent() { - return content; + public Posts getPosts() { + return posts; } - public void setContent(String content) { - this.content = content; + public void setPosts(Posts posts) { + this.posts = posts; } - public Timestamp getInitTime() { - return initTime; + public User getUser() { + return user; } - public void setInitTime(Timestamp initTime) { - this.initTime = initTime; + public void setUser(User user) { + this.user = user; + } + + @Override + public String toString() { + return "Reply{" + + "id=" + id + + ", content='" + content + '\'' + + ", initTime=" + initTime + + ", up=" + up + + ", user=" + user + + '}'; } } diff --git a/bbssource/src/main/java/common/entity/Role.java b/bbssource/src/main/java/common/entity/Role.java index 2de3acd..5db3f9f 100644 --- a/bbssource/src/main/java/common/entity/Role.java +++ b/bbssource/src/main/java/common/entity/Role.java @@ -2,32 +2,69 @@ import com.fasterxml.jackson.annotation.JsonIgnore; -import javax.persistence.Column; -import javax.persistence.GeneratedValue; -import javax.persistence.ManyToMany; +import javax.persistence.*; import java.io.Serializable; import java.util.HashSet; import java.util.Set; /** - * Created by liudeyu on 2019/6/27. + * Created by lhr on 17-7-31. */ -public class Role implements Serializable { - @JsonIgnore - @Column(name = "id") - @GeneratedValue - private int id; +@Entity +@Table(name = "quark_role") +public class Role implements Serializable{ - @Column(name = "description") - private String des; + @Id + @GeneratedValue + private Integer id; - @Column(name = "name",unique = true) + @Column(unique = true,nullable = false) private String name; - @ManyToMany(mappedBy = "adminUsers") - private Set adminUsers=new HashSet<>(); + //角色描述 + private String description; + //是否持有角色标志 + @Transient + private Integer selected; + + //角色与用户的关联关系 + @JsonIgnore + @ManyToMany(mappedBy = "roles") + private Set adminUsers = new HashSet<>(); + + //角色与权限的关联关系 + @JsonIgnore + @JoinTable(name = "quark_role_permission", + joinColumns = {@JoinColumn(name = "role_id",referencedColumnName = "id")}, + inverseJoinColumns = {@JoinColumn(name = "permissions_id",referencedColumnName = "id")}) + @ManyToMany(cascade = CascadeType.ALL) + private Set permissions = new HashSet<>(); + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } public Set getAdminUsers() { return adminUsers; @@ -37,27 +74,29 @@ public void setAdminUsers(Set adminUsers) { this.adminUsers = adminUsers; } - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; + public Set getPermissions() { + return permissions; } - public String getDes() { - return des; + public void setPermissions(Set permissions) { + this.permissions = permissions; } - public void setDes(String des) { - this.des = des; + public Integer getSelected() { + return selected; } - public String getName() { - return name; + public void setSelected(Integer selected) { + this.selected = selected; } - public void setName(String name) { - this.name = name; + @Override + public String toString() { + return "Role{" + + "id=" + id + + ", name='" + name + '\'' + + ", description='" + description + '\'' + + ", selected=" + selected + + '}'; } } diff --git a/bbssource/src/main/java/common/entity/User.java b/bbssource/src/main/java/common/entity/User.java index af691f9..1bb706c 100644 --- a/bbssource/src/main/java/common/entity/User.java +++ b/bbssource/src/main/java/common/entity/User.java @@ -1,82 +1,72 @@ package common.entity; +import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; +import common.utils.Constants; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Table; +import javax.persistence.*; import java.io.Serializable; -import java.sql.Timestamp; +import java.util.Date; /** - * Created by liudeyu on 2019/6/27. + * @Author LHR + * Create By 2017/8/18 + * + * 用户 */ @Entity -@Table(name = "quark_user") -public class User implements Serializable{ +@Table(name="quark_user") +public class User implements Serializable { + @Id @GeneratedValue - @Column(name = "id") - private int id; + private Integer id; + //注册邮箱 + @Column(nullable = false) + private String email; - @Column(name = "icon") - private String icon; - - @Column(name = "enable") - private int enable; - @Column(name = "init_time") - private Timestamp initTime; - + // 用户名 + @Column(unique = true, nullable = false) + private String username; + // 密码 + @Column(nullable = false) @JsonIgnore - @Column(name = "password") private String password; - @Column(name = "sex") - private int sex; + // 头像 + private String icon ="http://127.0.0.1/images/upload/default.png"; - @Column(name = "signature") + // 个人签名 private String signature; - @Column(name = "username") - private String userName; + // 注册时间 + @Column(nullable = false) + @JsonFormat(pattern = Constants.DATE_FORMAT, timezone = "GMT+8") + private Date initTime; - @Column(name = "email") - private String email; + //性别 0 :男 1:女 + private Integer sex = 0; + //是否被封禁,默认为1:开启 + @Column(nullable = false) + private Integer enable = 1; - public int getId() { + public Integer getId() { return id; } - public void setId(int id) { + public void setId(Integer id) { this.id = id; } - public String getIcon() { - return icon; + public String getUsername() { + return username; } - public void setIcon(String icon) { - this.icon = icon; - } - - public int getEnable() { - return enable; - } - - public void setEnable(int enable) { - this.enable = enable; - } - - public Timestamp getInitTime() { - return initTime; - } - - public void setInitTime(Timestamp initTime) { - this.initTime = initTime; + public void setUsername(String username) { + this.username = username; } public String getPassword() { @@ -87,12 +77,12 @@ public void setPassword(String password) { this.password = password; } - public int getSex() { - return sex; + public String getIcon() { + return icon; } - public void setSex(int sex) { - this.sex = sex; + public void setIcon(String icon) { + this.icon = icon; } public String getSignature() { @@ -103,12 +93,28 @@ public void setSignature(String signature) { this.signature = signature; } - public String getUserName() { - return userName; + public Date getInitTime() { + return initTime; } - public void setUserName(String userName) { - this.userName = userName; + public void setInitTime(Date initTime) { + this.initTime = initTime; + } + + public Integer getSex() { + return sex; + } + + public void setSex(Integer sex) { + this.sex = sex; + } + + public Integer getEnable() { + return enable; + } + + public void setEnable(Integer enable) { + this.enable = enable; } public String getEmail() { @@ -118,4 +124,18 @@ public String getEmail() { public void setEmail(String email) { this.email = email; } + + @Override + public String toString() { + return "User{" + + "id=" + id + + ", username='" + username + '\'' + + ", password='" + password + '\'' + + ", Icon='" + icon + '\'' + + ", signature='" + signature + '\'' + + ", initTime=" + initTime + + ", sex=" + sex + + ", enable=" + enable + + '}'; + } } diff --git a/bbssource/src/main/java/common/utils/Constants.java b/bbssource/src/main/java/common/utils/Constants.java index 964ed32..6aa7c25 100644 --- a/bbssource/src/main/java/common/utils/Constants.java +++ b/bbssource/src/main/java/common/utils/Constants.java @@ -1,4 +1,6 @@ package common.utils; public class Constants { + public static final String DATE_FORMAT = "yyyy-MM-dd"; + public static final String DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss"; } From 50126b861cd2dc88ec138fcc2aab5facc7cf0c32 Mon Sep 17 00:00:00 2001 From: liudeyu Date: Sun, 30 Jun 2019 12:55:48 +0800 Subject: [PATCH 10/17] test module adjust --- .../main/java/common/CommonApplication.java | 19 +++ .../src/main/java/common/dao/UserDao.java | 25 ++++ .../src/main/resources/application.properties | 25 ++++ bbssource/src/main/resources/ehcache.xml | 138 ++++++++++++++++++ .../java/testcommon/AbsTestConfigure.java | 19 +++ .../src/test/java/testcommon/TestOne.java | 33 ++++- .../java/com/quark/common/dao/UserDao.java | 4 +- .../quark/common/CommonApplicationTest.java | 13 +- 8 files changed, 266 insertions(+), 10 deletions(-) create mode 100644 bbssource/src/main/java/common/CommonApplication.java create mode 100644 bbssource/src/main/java/common/dao/UserDao.java create mode 100644 bbssource/src/main/resources/application.properties create mode 100644 bbssource/src/main/resources/ehcache.xml create mode 100644 bbssource/src/test/java/testcommon/AbsTestConfigure.java diff --git a/bbssource/src/main/java/common/CommonApplication.java b/bbssource/src/main/java/common/CommonApplication.java new file mode 100644 index 0000000..86cf2af --- /dev/null +++ b/bbssource/src/main/java/common/CommonApplication.java @@ -0,0 +1,19 @@ +package common; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.context.annotation.Configuration; + +/** + * Created by liudeyu on 2019/6/30. + */ + +@SpringBootApplication +@EnableCaching +public class CommonApplication { + public static void main(String[]argv){ + SpringApplication.run(CommonApplication.class,argv); + } +} diff --git a/bbssource/src/main/java/common/dao/UserDao.java b/bbssource/src/main/java/common/dao/UserDao.java new file mode 100644 index 0000000..317f2ff --- /dev/null +++ b/bbssource/src/main/java/common/dao/UserDao.java @@ -0,0 +1,25 @@ +package common.dao; + +import common.entity.User; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * Created by liudeyu on 2019/6/30. + */ +@Repository +@CacheConfig(cacheNames = "users") +public interface UserDao extends JpaRepository, JpaSpecificationExecutor { + + User findUserByEmail(String email); + + User findUserByUsername(String name); + + @Query(value = "select * from quark_user u where DATE_SUB(CURDATE(),INTERVAL 3000 DAY)<=DATE(u.init_time) ORDER BY u.id DESC limit 12", nativeQuery = true) + List findNewUser(); +} diff --git a/bbssource/src/main/resources/application.properties b/bbssource/src/main/resources/application.properties new file mode 100644 index 0000000..df3133f --- /dev/null +++ b/bbssource/src/main/resources/application.properties @@ -0,0 +1,25 @@ +#Mysql配置 +spring.datasource.type=com.alibaba.druid.pool.DruidDataSource +spring.datasource.url=jdbc:mysql://127.0.0.1:3306/quarkCommunity?useUnicode=true&characterEncoding=UTF-8&useSSL=false +spring.datasource.username=ldy +spring.datasource.password=abcd1234 +spring.datasource.driver-class-name=com.mysql.jdbc.Driver + +#jpa配置 +spring.jpa.database = MYSQL +spring.jpa.show-sql = true +spring.jpa.hibernate.ddl-auto = update +spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy +spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect + +#datasource +spring.datasource.initialSize=5 +spring.datasource.minIdle=5 +spring.datasource.maxActive=20 +# 配置获取连接等待超时的时间 +spring.datasource.maxWait=60000 + + + + + diff --git a/bbssource/src/main/resources/ehcache.xml b/bbssource/src/main/resources/ehcache.xml new file mode 100644 index 0000000..4922ae7 --- /dev/null +++ b/bbssource/src/main/resources/ehcache.xml @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/bbssource/src/test/java/testcommon/AbsTestConfigure.java b/bbssource/src/test/java/testcommon/AbsTestConfigure.java new file mode 100644 index 0000000..f0be361 --- /dev/null +++ b/bbssource/src/test/java/testcommon/AbsTestConfigure.java @@ -0,0 +1,19 @@ +package testcommon; + +import common.CommonApplication; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.junit4.SpringRunner; + +/** + * Created by liudeyu on 2019/6/30. + */ + +@RunWith(SpringJUnit4ClassRunner.class) +@EnableCaching +@SpringBootTest(classes = CommonApplication.class) +public abstract class AbsTestConfigure { +} diff --git a/bbssource/src/test/java/testcommon/TestOne.java b/bbssource/src/test/java/testcommon/TestOne.java index 05aed1e..8204b5e 100644 --- a/bbssource/src/test/java/testcommon/TestOne.java +++ b/bbssource/src/test/java/testcommon/TestOne.java @@ -1,4 +1,35 @@ package testcommon; -public class TestOne { +import common.CommonApplication; +import common.dao.UserDao; +import common.entity.User; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringRunner; + +import java.util.List; + +public class TestOne extends AbsTestConfigure{ + + @Autowired + UserDao userDao; + @Test + public void testHello(){ + System.out.println("hello"); + } + + + @Test + public void testDataBase(){ + ListnewUsers=userDao.findNewUser(); + for(User u:newUsers){ + System.out.println(u.getUsername()); + } + } + } diff --git a/quark-common/src/main/java/com/quark/common/dao/UserDao.java b/quark-common/src/main/java/com/quark/common/dao/UserDao.java index 41623cb..eef98c5 100644 --- a/quark-common/src/main/java/com/quark/common/dao/UserDao.java +++ b/quark-common/src/main/java/com/quark/common/dao/UserDao.java @@ -17,7 +17,7 @@ public interface UserDao extends JpaRepository ,JpaSpecificationEx User findByEmail(String email); - @Query(value = "select u.id, u.username , u.icon from quark_user u where DATE_SUB(CURDATE(), INTERVAL 30 DAY) <=DATE(u.init_time) ORDER BY u.id DESC limit 12" ,nativeQuery = true) - List findNewUser(); + @Query(value = "select * from quark_user u where DATE_SUB(CURDATE(), INTERVAL 3000 DAY) <=DATE(u.init_time) ORDER BY u.id DESC limit 12" ,nativeQuery = true) + List findNewUser(); } diff --git a/quark-common/src/test/java/com/quark/common/CommonApplicationTest.java b/quark-common/src/test/java/com/quark/common/CommonApplicationTest.java index 1dfa416..b10c2a5 100644 --- a/quark-common/src/test/java/com/quark/common/CommonApplicationTest.java +++ b/quark-common/src/test/java/com/quark/common/CommonApplicationTest.java @@ -4,6 +4,7 @@ import com.quark.common.dao.NotificationDao; import com.quark.common.dao.PostsDao; import com.quark.common.dao.UserDao; +import com.quark.common.entity.User; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -12,6 +13,7 @@ import org.springframework.test.context.junit4.SpringRunner; import javax.sql.DataSource; +import java.util.List; /** * Created by lhr on 17-7-30. @@ -38,12 +40,9 @@ public class CommonApplicationTest { @Test public void TestDataSource(){ -// long count = notificationDao.getNotificationCount(72); -// System.out.println(count); -// List list = notificationDao.getByTouser(UserDao.findOne(2)); -// System.out.println(list); -// list.forEach(t->{ -// System.out.println(t.getPosts().getTitle()); -// }); + Listusers= UserDao.findNewUser(); + users.forEach(user -> { + System.out.println(user.getUsername()); + }); } } From 701b79857d69e681180727bf69b30097b9ad929f Mon Sep 17 00:00:00 2001 From: liudeyu Date: Sun, 30 Jun 2019 19:01:59 +0800 Subject: [PATCH 11/17] dao,base service tmp save --- .../common/baseservice/BaseController.java | 22 ++++++++ .../java/common/baseservice/BaseService.java | 27 ++++++++++ .../common/baseservice/BaseServiceImp.java | 51 +++++++++++++++++++ .../java/common/baseservice/Processor.java | 9 ++++ .../main/java/common/dao/AdminUserDao.java | 12 +++++ .../src/main/java/common/dao/LabelDao.java | 14 +++++ .../main/java/common/dao/NotificationDao.java | 13 +++++ .../src/main/java/common/dao/PostDao.java | 35 +++++++++++++ .../src/main/java/common/dao/ReplyDao.java | 20 ++++++++ .../src/main/java/common/dto/QuarkResult.kt | 15 ++++++ .../java/common/exceptions/ApiException.java | 25 +++++++++ .../src/main/java/common/utils/Logger.kt | 13 +++++ 12 files changed, 256 insertions(+) create mode 100644 bbssource/src/main/java/common/baseservice/BaseController.java create mode 100644 bbssource/src/main/java/common/baseservice/BaseService.java create mode 100644 bbssource/src/main/java/common/baseservice/BaseServiceImp.java create mode 100644 bbssource/src/main/java/common/baseservice/Processor.java create mode 100644 bbssource/src/main/java/common/dao/AdminUserDao.java create mode 100644 bbssource/src/main/java/common/dao/LabelDao.java create mode 100644 bbssource/src/main/java/common/dao/NotificationDao.java create mode 100644 bbssource/src/main/java/common/dao/PostDao.java create mode 100644 bbssource/src/main/java/common/dao/ReplyDao.java create mode 100644 bbssource/src/main/java/common/dto/QuarkResult.kt create mode 100644 bbssource/src/main/java/common/exceptions/ApiException.java create mode 100644 bbssource/src/main/java/common/utils/Logger.kt diff --git a/bbssource/src/main/java/common/baseservice/BaseController.java b/bbssource/src/main/java/common/baseservice/BaseController.java new file mode 100644 index 0000000..29a29ff --- /dev/null +++ b/bbssource/src/main/java/common/baseservice/BaseController.java @@ -0,0 +1,22 @@ +package common.baseservice; + +import common.exceptions.ApiException; +import common.utils.Logger; + +/** + * Created by liudeyu on 2019/6/30. + */ +public class BaseController { + + public void process(Processor processor){ + try { + processor.process(); + }catch (ApiException ex){ + + + }catch (Exception ex){ + + } + } + +} diff --git a/bbssource/src/main/java/common/baseservice/BaseService.java b/bbssource/src/main/java/common/baseservice/BaseService.java new file mode 100644 index 0000000..e85dc39 --- /dev/null +++ b/bbssource/src/main/java/common/baseservice/BaseService.java @@ -0,0 +1,27 @@ +package common.baseservice; + +import java.util.Iterator; +import java.util.List; + +/** + * Created by liudeyu on 2019/6/30. + */ +public interface BaseService { + + T save(T entity); + + void delete(Object key); + + T findOne(int key); + + List findAll(); + + + void deleteInBatch(Iterable entities); + + List findInBatch(Iterable keys); + + List saveInBatch(Iterable keys); + + +} diff --git a/bbssource/src/main/java/common/baseservice/BaseServiceImp.java b/bbssource/src/main/java/common/baseservice/BaseServiceImp.java new file mode 100644 index 0000000..de80f42 --- /dev/null +++ b/bbssource/src/main/java/common/baseservice/BaseServiceImp.java @@ -0,0 +1,51 @@ +package common.baseservice; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.jpa.repository.JpaRepository; + +import java.util.List; + +/** + * Created by liudeyu on 2019/6/30. + */ +public class BaseServiceImp implements BaseService { + + @Autowired + protected E reposity; + + + @Override + public T save(T entity) { + return (T) reposity.save(entity); + } + + @Override + public void delete(Object key) { + reposity.delete(key); + } + + @Override + public T findOne(int key) { + return (T) reposity.findOne(key); + } + + @Override + public List findAll() { + return reposity.findAll(); + } + + @Override + public void deleteInBatch(Iterable entities) { + reposity.deleteInBatch(entities); + } + + @Override + public List findInBatch(Iterable keys) { + return reposity.findAll(keys); + } + + @Override + public List saveInBatch(Iterable keys) { + return reposity.save(keys); + } +} diff --git a/bbssource/src/main/java/common/baseservice/Processor.java b/bbssource/src/main/java/common/baseservice/Processor.java new file mode 100644 index 0000000..337eb4f --- /dev/null +++ b/bbssource/src/main/java/common/baseservice/Processor.java @@ -0,0 +1,9 @@ +package common.baseservice; + +/** + * Created by liudeyu on 2019/6/30. + */ +public interface Processor { + + void process(); +} diff --git a/bbssource/src/main/java/common/dao/AdminUserDao.java b/bbssource/src/main/java/common/dao/AdminUserDao.java new file mode 100644 index 0000000..46844a2 --- /dev/null +++ b/bbssource/src/main/java/common/dao/AdminUserDao.java @@ -0,0 +1,12 @@ +package common.dao; + +import common.entity.AdminUser; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +/** + * Created by liudeyu on 2019/6/30. + */ +@Repository +public interface AdminUserDao extends JpaRepository { +} diff --git a/bbssource/src/main/java/common/dao/LabelDao.java b/bbssource/src/main/java/common/dao/LabelDao.java new file mode 100644 index 0000000..8511afa --- /dev/null +++ b/bbssource/src/main/java/common/dao/LabelDao.java @@ -0,0 +1,14 @@ +package common.dao; + +import common.entity.Label; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; +import org.springframework.stereotype.Repository; + +/** + * Created by liudeyu on 2019/6/30. + */ +@Repository +public interface LabelDao extends JpaRepository,JpaSpecificationExecutor{ + +} diff --git a/bbssource/src/main/java/common/dao/NotificationDao.java b/bbssource/src/main/java/common/dao/NotificationDao.java new file mode 100644 index 0000000..805ae7b --- /dev/null +++ b/bbssource/src/main/java/common/dao/NotificationDao.java @@ -0,0 +1,13 @@ +package common.dao; + +import common.entity.Notification; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; + +/** + * Created by liudeyu on 2019/6/30. + */ +public interface NotificationDao extends JpaRepository,JpaSpecificationExecutor{ + + +} diff --git a/bbssource/src/main/java/common/dao/PostDao.java b/bbssource/src/main/java/common/dao/PostDao.java new file mode 100644 index 0000000..70324da --- /dev/null +++ b/bbssource/src/main/java/common/dao/PostDao.java @@ -0,0 +1,35 @@ +package common.dao; + +import common.entity.Label; +import common.entity.Posts; +import common.entity.User; +import org.springframework.cache.annotation.CacheConfig; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * Created by liudeyu on 2019/6/30. + */ +@Repository +@CacheConfig(cacheNames = "postses") +public interface PostDao extends JpaRepository ,JpaSpecificationExecutor{ + @Override + @Cacheable + List findAll(); + + Page findByUser(User user,Pageable page); + Page findByLabel(Label label,Pageable pageable); + + @Query(value = "select p.id,p.title,p.reply_count from quark_posts p where DATE_SUB(CURDATE(), INTERVAL 30 DAY) <=DATE(p.init_time) ORDER by reply_count desc limit 10" + ,nativeQuery = true) + List findHotPosts(); + +} diff --git a/bbssource/src/main/java/common/dao/ReplyDao.java b/bbssource/src/main/java/common/dao/ReplyDao.java new file mode 100644 index 0000000..d900cc8 --- /dev/null +++ b/bbssource/src/main/java/common/dao/ReplyDao.java @@ -0,0 +1,20 @@ +package common.dao; + +import common.entity.Reply; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * Created by liudeyu on 2019/6/30. + */ +@Repository +public interface ReplyDao extends JpaRepository,JpaSpecificationExecutor { + + @Cacheable + @Override + List findAll(); +} diff --git a/bbssource/src/main/java/common/dto/QuarkResult.kt b/bbssource/src/main/java/common/dto/QuarkResult.kt new file mode 100644 index 0000000..1728203 --- /dev/null +++ b/bbssource/src/main/java/common/dto/QuarkResult.kt @@ -0,0 +1,15 @@ +package common.dto + +import org.omg.CORBA.Object +import java.io.Serializable + +/** + * Created by liudeyu on 2019/6/30. + */ +class QuarkResult() : Serializable { + var status = 0; + var data: Object? = null + var error: String = "" + + +} \ No newline at end of file diff --git a/bbssource/src/main/java/common/exceptions/ApiException.java b/bbssource/src/main/java/common/exceptions/ApiException.java new file mode 100644 index 0000000..5963a0a --- /dev/null +++ b/bbssource/src/main/java/common/exceptions/ApiException.java @@ -0,0 +1,25 @@ +package common.exceptions; + +/** + * Created by liudeyu on 2019/6/30. + */ +public class ApiException extends RuntimeException{ + private int status; + private Throwable throwable; + + public int getStatus() { + return status; + } + + public void setStatus(int status) { + this.status = status; + } + + public Throwable getThrowable() { + return throwable; + } + + public void setThrowable(Throwable throwable) { + this.throwable = throwable; + } +} diff --git a/bbssource/src/main/java/common/utils/Logger.kt b/bbssource/src/main/java/common/utils/Logger.kt new file mode 100644 index 0000000..1e0eeb5 --- /dev/null +++ b/bbssource/src/main/java/common/utils/Logger.kt @@ -0,0 +1,13 @@ +package common.utils + +import org.slf4j.LoggerFactory + +/** + * Created by liudeyu on 2019/6/30. + */ + +class Logger{ + companion object{ + val logger=LoggerFactory.getLogger("Logger") + } +} \ No newline at end of file From dd9401e176781b2d94308cac666e3c44257fbcd1 Mon Sep 17 00:00:00 2001 From: liudeyu Date: Sun, 30 Jun 2019 20:02:00 +0800 Subject: [PATCH 12/17] simple common package basic done --- .../src/main/java/common/dao/CollectDao.java | 10 ++++++ .../main/java/common/dao/PermissionDao.java | 10 ++++++ .../src/main/java/common/dto/PageResult.kt | 14 ++++++++ .../src/main/java/common/dto/QuarkResult.kt | 33 ++++++++++++++++++- .../src/main/java/common/dto/SocketMessage.kt | 11 +++++++ .../src/main/java/common/dto/UploadResult.kt | 25 ++++++++++++++ 6 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 bbssource/src/main/java/common/dao/CollectDao.java create mode 100644 bbssource/src/main/java/common/dao/PermissionDao.java create mode 100644 bbssource/src/main/java/common/dto/PageResult.kt create mode 100644 bbssource/src/main/java/common/dto/SocketMessage.kt create mode 100644 bbssource/src/main/java/common/dto/UploadResult.kt diff --git a/bbssource/src/main/java/common/dao/CollectDao.java b/bbssource/src/main/java/common/dao/CollectDao.java new file mode 100644 index 0000000..f51e927 --- /dev/null +++ b/bbssource/src/main/java/common/dao/CollectDao.java @@ -0,0 +1,10 @@ +package common.dao; + +import common.entity.Collect; +import org.springframework.data.jpa.repository.JpaRepository; + +/** + * Created by liudeyu on 2019/6/30. + */ +public interface CollectDao extends JpaRepository { +} diff --git a/bbssource/src/main/java/common/dao/PermissionDao.java b/bbssource/src/main/java/common/dao/PermissionDao.java new file mode 100644 index 0000000..7c37842 --- /dev/null +++ b/bbssource/src/main/java/common/dao/PermissionDao.java @@ -0,0 +1,10 @@ +package common.dao; + +import common.entity.Permission; +import org.springframework.data.jpa.repository.JpaRepository; + +/** + * Created by liudeyu on 2019/6/30. + */ +public interface PermissionDao extends JpaRepository { +} diff --git a/bbssource/src/main/java/common/dto/PageResult.kt b/bbssource/src/main/java/common/dto/PageResult.kt new file mode 100644 index 0000000..dc45edd --- /dev/null +++ b/bbssource/src/main/java/common/dto/PageResult.kt @@ -0,0 +1,14 @@ +package common.dto + +import java.io.Serializable + +/** + * Created by liudeyu on 2019/6/30. + */ +class PageResult : Serializable { + var totalRecord = 0 + var filterRecord = 0 + var draw = 0 + var data: T? = null + +} \ No newline at end of file diff --git a/bbssource/src/main/java/common/dto/QuarkResult.kt b/bbssource/src/main/java/common/dto/QuarkResult.kt index 1728203..cab6d8c 100644 --- a/bbssource/src/main/java/common/dto/QuarkResult.kt +++ b/bbssource/src/main/java/common/dto/QuarkResult.kt @@ -1,15 +1,46 @@ package common.dto +import com.google.common.net.HttpHeaders +import com.sun.deploy.net.HttpUtils +import com.sun.net.httpserver.HttpServer import org.omg.CORBA.Object import java.io.Serializable +import java.net.HttpURLConnection +import javax.xml.ws.spi.http.HttpHandler /** * Created by liudeyu on 2019/6/30. */ class QuarkResult() : Serializable { + + + companion object { + + fun ok(data: Any): QuarkResult { + val data = QuarkResult(HttpURLConnection.HTTP_OK, data) + return data + } + fun error(errorMsg:String):QuarkResult{ + return QuarkResult(HttpURLConnection.HTTP_INTERNAL_ERROR,errorMsg) + } + + } + + constructor(status: Int, data: Any) : this() { + this.status = status + this.data = data + } + + constructor(status: Int, error: String) : this() { + this.status = status + this.error = error + } + var status = 0; - var data: Object? = null + var data: Any? = null var error: String = "" + var pageSize: Int = 0 + var total: Int = 0 } \ No newline at end of file diff --git a/bbssource/src/main/java/common/dto/SocketMessage.kt b/bbssource/src/main/java/common/dto/SocketMessage.kt new file mode 100644 index 0000000..3329ed3 --- /dev/null +++ b/bbssource/src/main/java/common/dto/SocketMessage.kt @@ -0,0 +1,11 @@ +package common.dto + +import java.io.Serializable + +/** + * Created by liudeyu on 2019/6/30. + */ +class SocketMessage : Serializable { + var message: String = "" + var code = 0 +} \ No newline at end of file diff --git a/bbssource/src/main/java/common/dto/UploadResult.kt b/bbssource/src/main/java/common/dto/UploadResult.kt new file mode 100644 index 0000000..e94d08b --- /dev/null +++ b/bbssource/src/main/java/common/dto/UploadResult.kt @@ -0,0 +1,25 @@ +package common.dto + +import java.io.Serializable + +/** + * Created by liudeyu on 2019/6/30. + */ + + +class UploadResult() : Serializable { + + constructor(status: Int) : this() { + this.status = status + } + + class UploadData { + var title = "" + var src = "" + } + + var status = 0 + var data:UploadData?=null + var errorMessage="" // error message + +} \ No newline at end of file From 55369e12b628487f38aadaa61bc59cc5ff1e7bae Mon Sep 17 00:00:00 2001 From: liudeyu Date: Mon, 1 Jul 2019 20:02:51 +0800 Subject: [PATCH 13/17] rest service doing --- bbs_restservice/pom.xml | 70 +++++++++++++++++++ bbs_restservice/src/main/java/Test.java | 8 +++ .../src/main/java/service/RedisService.java | 44 ++++++++++++ {bbssource => bbssource_common}/pom.xml | 0 .../main/java/common/CommonApplication.java | 0 .../common/baseservice/BaseController.java | 1 - .../java/common/baseservice/BaseService.java | 0 .../common/baseservice/BaseServiceImp.java | 0 .../java/common/baseservice/Processor.java | 0 .../main/java/common/dao/AdminUserDao.java | 0 .../src/main/java/common/dao/CollectDao.java | 0 .../src/main/java/common/dao/LabelDao.java | 0 .../main/java/common/dao/NotificationDao.java | 0 .../main/java/common/dao/PermissionDao.java | 0 .../src/main/java/common/dao/PostDao.java | 0 .../src/main/java/common/dao/ReplyDao.java | 0 .../src/main/java/common/dao/UserDao.java | 0 .../src/main/java/common/dto/PageResult.kt | 0 .../src/main/java/common/dto/QuarkResult.kt | 0 .../src/main/java/common/dto/SocketMessage.kt | 0 .../src/main/java/common/dto/UploadResult.kt | 0 .../main/java/common/entity/AdminUser.java | 0 .../src/main/java/common/entity/Collect.java | 0 .../src/main/java/common/entity/Label.java | 0 .../main/java/common/entity/Notification.java | 0 .../main/java/common/entity/Permission.java | 0 .../src/main/java/common/entity/Posts.java | 0 .../src/main/java/common/entity/Reply.java | 0 .../src/main/java/common/entity/Role.java | 0 .../src/main/java/common/entity/User.java | 0 .../java/common/exceptions/ApiException.java | 0 .../src/main/java/common/test | 0 .../src/main/java/common/utils/Constants.java | 0 .../src/main/java/common/utils/Logger.kt | 0 .../src/main/java/test | 0 .../src/main/resources/application.properties | 0 .../src/main/resources/ehcache.xml | 0 .../java/testcommon/AbsTestConfigure.java | 0 .../src/test/java/testcommon/TestOne.java | 0 {bbssource => bbssource_common}/src/test/test | 0 40 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 bbs_restservice/pom.xml create mode 100644 bbs_restservice/src/main/java/Test.java create mode 100644 bbs_restservice/src/main/java/service/RedisService.java rename {bbssource => bbssource_common}/pom.xml (100%) rename {bbssource => bbssource_common}/src/main/java/common/CommonApplication.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/baseservice/BaseController.java (92%) rename {bbssource => bbssource_common}/src/main/java/common/baseservice/BaseService.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/baseservice/BaseServiceImp.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/baseservice/Processor.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/dao/AdminUserDao.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/dao/CollectDao.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/dao/LabelDao.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/dao/NotificationDao.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/dao/PermissionDao.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/dao/PostDao.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/dao/ReplyDao.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/dao/UserDao.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/dto/PageResult.kt (100%) rename {bbssource => bbssource_common}/src/main/java/common/dto/QuarkResult.kt (100%) rename {bbssource => bbssource_common}/src/main/java/common/dto/SocketMessage.kt (100%) rename {bbssource => bbssource_common}/src/main/java/common/dto/UploadResult.kt (100%) rename {bbssource => bbssource_common}/src/main/java/common/entity/AdminUser.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/entity/Collect.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/entity/Label.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/entity/Notification.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/entity/Permission.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/entity/Posts.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/entity/Reply.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/entity/Role.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/entity/User.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/exceptions/ApiException.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/test (100%) rename {bbssource => bbssource_common}/src/main/java/common/utils/Constants.java (100%) rename {bbssource => bbssource_common}/src/main/java/common/utils/Logger.kt (100%) rename {bbssource => bbssource_common}/src/main/java/test (100%) rename {bbssource => bbssource_common}/src/main/resources/application.properties (100%) rename {bbssource => bbssource_common}/src/main/resources/ehcache.xml (100%) rename {bbssource => bbssource_common}/src/test/java/testcommon/AbsTestConfigure.java (100%) rename {bbssource => bbssource_common}/src/test/java/testcommon/TestOne.java (100%) rename {bbssource => bbssource_common}/src/test/test (100%) diff --git a/bbs_restservice/pom.xml b/bbs_restservice/pom.xml new file mode 100644 index 0000000..cf82143 --- /dev/null +++ b/bbs_restservice/pom.xml @@ -0,0 +1,70 @@ + + + + quark-parent + com.quark + 1.0-SNAPSHOT + ../quark-parent/pom.xml + + 4.0.0 + + bbs_rest + restservice + 1.0-SNAPSHOT + + + + + bbspratise + bbssource + 1.0-SNAPSHOT + + + + org.springframework.boot + + spring-boot-starter + + + + + org.springframework.boot + + spring-boot-starter-web + + + + + org.springframework.boot + spring-boot-starter-test + + + + org.springframework.boot + spring-boot-starter-data-redis + + + + + org.springframework.boot + spring-boot-starter-websocket + + + org.springframework + spring-messaging + + + io.springfox + springfox-swagger2 + + + io.springfox + springfox-swagger-ui + + + + + + \ No newline at end of file diff --git a/bbs_restservice/src/main/java/Test.java b/bbs_restservice/src/main/java/Test.java new file mode 100644 index 0000000..a921821 --- /dev/null +++ b/bbs_restservice/src/main/java/Test.java @@ -0,0 +1,8 @@ + +/** + * Created by liudeyu on 2019/7/1. + */ +public class Test { + + +} diff --git a/bbs_restservice/src/main/java/service/RedisService.java b/bbs_restservice/src/main/java/service/RedisService.java new file mode 100644 index 0000000..9f5ed67 --- /dev/null +++ b/bbs_restservice/src/main/java/service/RedisService.java @@ -0,0 +1,44 @@ +package service; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.core.ValueOperations; +import org.springframework.stereotype.Service; + +import java.util.concurrent.TimeUnit; + +/** + * Created by liudeyu on 2019/7/1. + */ +@Service +public class RedisService { + + @Autowired + private RedisTemplate template; + + + /** + * time is hour + */ + public void putDataInCache(String key, T value, int time) { + ValueOperations valueOperations = template.opsForValue(); + valueOperations.set(key, value, time, TimeUnit.HOURS); + } + + public T getDataFromCache(String key) { + ValueOperations valueOperations = template.opsForValue(); + return valueOperations.get(key); + } + + + public T getDataAndUpdateTime(String key, int time) { + ValueOperations valueOperations = template.opsForValue(); + if (valueOperations.get(key) == null) { + return valueOperations.get(key); + } + T data = valueOperations.get(key); + valueOperations.set(key, data, time); + return data; + } + +} diff --git a/bbssource/pom.xml b/bbssource_common/pom.xml similarity index 100% rename from bbssource/pom.xml rename to bbssource_common/pom.xml diff --git a/bbssource/src/main/java/common/CommonApplication.java b/bbssource_common/src/main/java/common/CommonApplication.java similarity index 100% rename from bbssource/src/main/java/common/CommonApplication.java rename to bbssource_common/src/main/java/common/CommonApplication.java diff --git a/bbssource/src/main/java/common/baseservice/BaseController.java b/bbssource_common/src/main/java/common/baseservice/BaseController.java similarity index 92% rename from bbssource/src/main/java/common/baseservice/BaseController.java rename to bbssource_common/src/main/java/common/baseservice/BaseController.java index 29a29ff..b34b8fe 100644 --- a/bbssource/src/main/java/common/baseservice/BaseController.java +++ b/bbssource_common/src/main/java/common/baseservice/BaseController.java @@ -1,7 +1,6 @@ package common.baseservice; import common.exceptions.ApiException; -import common.utils.Logger; /** * Created by liudeyu on 2019/6/30. diff --git a/bbssource/src/main/java/common/baseservice/BaseService.java b/bbssource_common/src/main/java/common/baseservice/BaseService.java similarity index 100% rename from bbssource/src/main/java/common/baseservice/BaseService.java rename to bbssource_common/src/main/java/common/baseservice/BaseService.java diff --git a/bbssource/src/main/java/common/baseservice/BaseServiceImp.java b/bbssource_common/src/main/java/common/baseservice/BaseServiceImp.java similarity index 100% rename from bbssource/src/main/java/common/baseservice/BaseServiceImp.java rename to bbssource_common/src/main/java/common/baseservice/BaseServiceImp.java diff --git a/bbssource/src/main/java/common/baseservice/Processor.java b/bbssource_common/src/main/java/common/baseservice/Processor.java similarity index 100% rename from bbssource/src/main/java/common/baseservice/Processor.java rename to bbssource_common/src/main/java/common/baseservice/Processor.java diff --git a/bbssource/src/main/java/common/dao/AdminUserDao.java b/bbssource_common/src/main/java/common/dao/AdminUserDao.java similarity index 100% rename from bbssource/src/main/java/common/dao/AdminUserDao.java rename to bbssource_common/src/main/java/common/dao/AdminUserDao.java diff --git a/bbssource/src/main/java/common/dao/CollectDao.java b/bbssource_common/src/main/java/common/dao/CollectDao.java similarity index 100% rename from bbssource/src/main/java/common/dao/CollectDao.java rename to bbssource_common/src/main/java/common/dao/CollectDao.java diff --git a/bbssource/src/main/java/common/dao/LabelDao.java b/bbssource_common/src/main/java/common/dao/LabelDao.java similarity index 100% rename from bbssource/src/main/java/common/dao/LabelDao.java rename to bbssource_common/src/main/java/common/dao/LabelDao.java diff --git a/bbssource/src/main/java/common/dao/NotificationDao.java b/bbssource_common/src/main/java/common/dao/NotificationDao.java similarity index 100% rename from bbssource/src/main/java/common/dao/NotificationDao.java rename to bbssource_common/src/main/java/common/dao/NotificationDao.java diff --git a/bbssource/src/main/java/common/dao/PermissionDao.java b/bbssource_common/src/main/java/common/dao/PermissionDao.java similarity index 100% rename from bbssource/src/main/java/common/dao/PermissionDao.java rename to bbssource_common/src/main/java/common/dao/PermissionDao.java diff --git a/bbssource/src/main/java/common/dao/PostDao.java b/bbssource_common/src/main/java/common/dao/PostDao.java similarity index 100% rename from bbssource/src/main/java/common/dao/PostDao.java rename to bbssource_common/src/main/java/common/dao/PostDao.java diff --git a/bbssource/src/main/java/common/dao/ReplyDao.java b/bbssource_common/src/main/java/common/dao/ReplyDao.java similarity index 100% rename from bbssource/src/main/java/common/dao/ReplyDao.java rename to bbssource_common/src/main/java/common/dao/ReplyDao.java diff --git a/bbssource/src/main/java/common/dao/UserDao.java b/bbssource_common/src/main/java/common/dao/UserDao.java similarity index 100% rename from bbssource/src/main/java/common/dao/UserDao.java rename to bbssource_common/src/main/java/common/dao/UserDao.java diff --git a/bbssource/src/main/java/common/dto/PageResult.kt b/bbssource_common/src/main/java/common/dto/PageResult.kt similarity index 100% rename from bbssource/src/main/java/common/dto/PageResult.kt rename to bbssource_common/src/main/java/common/dto/PageResult.kt diff --git a/bbssource/src/main/java/common/dto/QuarkResult.kt b/bbssource_common/src/main/java/common/dto/QuarkResult.kt similarity index 100% rename from bbssource/src/main/java/common/dto/QuarkResult.kt rename to bbssource_common/src/main/java/common/dto/QuarkResult.kt diff --git a/bbssource/src/main/java/common/dto/SocketMessage.kt b/bbssource_common/src/main/java/common/dto/SocketMessage.kt similarity index 100% rename from bbssource/src/main/java/common/dto/SocketMessage.kt rename to bbssource_common/src/main/java/common/dto/SocketMessage.kt diff --git a/bbssource/src/main/java/common/dto/UploadResult.kt b/bbssource_common/src/main/java/common/dto/UploadResult.kt similarity index 100% rename from bbssource/src/main/java/common/dto/UploadResult.kt rename to bbssource_common/src/main/java/common/dto/UploadResult.kt diff --git a/bbssource/src/main/java/common/entity/AdminUser.java b/bbssource_common/src/main/java/common/entity/AdminUser.java similarity index 100% rename from bbssource/src/main/java/common/entity/AdminUser.java rename to bbssource_common/src/main/java/common/entity/AdminUser.java diff --git a/bbssource/src/main/java/common/entity/Collect.java b/bbssource_common/src/main/java/common/entity/Collect.java similarity index 100% rename from bbssource/src/main/java/common/entity/Collect.java rename to bbssource_common/src/main/java/common/entity/Collect.java diff --git a/bbssource/src/main/java/common/entity/Label.java b/bbssource_common/src/main/java/common/entity/Label.java similarity index 100% rename from bbssource/src/main/java/common/entity/Label.java rename to bbssource_common/src/main/java/common/entity/Label.java diff --git a/bbssource/src/main/java/common/entity/Notification.java b/bbssource_common/src/main/java/common/entity/Notification.java similarity index 100% rename from bbssource/src/main/java/common/entity/Notification.java rename to bbssource_common/src/main/java/common/entity/Notification.java diff --git a/bbssource/src/main/java/common/entity/Permission.java b/bbssource_common/src/main/java/common/entity/Permission.java similarity index 100% rename from bbssource/src/main/java/common/entity/Permission.java rename to bbssource_common/src/main/java/common/entity/Permission.java diff --git a/bbssource/src/main/java/common/entity/Posts.java b/bbssource_common/src/main/java/common/entity/Posts.java similarity index 100% rename from bbssource/src/main/java/common/entity/Posts.java rename to bbssource_common/src/main/java/common/entity/Posts.java diff --git a/bbssource/src/main/java/common/entity/Reply.java b/bbssource_common/src/main/java/common/entity/Reply.java similarity index 100% rename from bbssource/src/main/java/common/entity/Reply.java rename to bbssource_common/src/main/java/common/entity/Reply.java diff --git a/bbssource/src/main/java/common/entity/Role.java b/bbssource_common/src/main/java/common/entity/Role.java similarity index 100% rename from bbssource/src/main/java/common/entity/Role.java rename to bbssource_common/src/main/java/common/entity/Role.java diff --git a/bbssource/src/main/java/common/entity/User.java b/bbssource_common/src/main/java/common/entity/User.java similarity index 100% rename from bbssource/src/main/java/common/entity/User.java rename to bbssource_common/src/main/java/common/entity/User.java diff --git a/bbssource/src/main/java/common/exceptions/ApiException.java b/bbssource_common/src/main/java/common/exceptions/ApiException.java similarity index 100% rename from bbssource/src/main/java/common/exceptions/ApiException.java rename to bbssource_common/src/main/java/common/exceptions/ApiException.java diff --git a/bbssource/src/main/java/common/test b/bbssource_common/src/main/java/common/test similarity index 100% rename from bbssource/src/main/java/common/test rename to bbssource_common/src/main/java/common/test diff --git a/bbssource/src/main/java/common/utils/Constants.java b/bbssource_common/src/main/java/common/utils/Constants.java similarity index 100% rename from bbssource/src/main/java/common/utils/Constants.java rename to bbssource_common/src/main/java/common/utils/Constants.java diff --git a/bbssource/src/main/java/common/utils/Logger.kt b/bbssource_common/src/main/java/common/utils/Logger.kt similarity index 100% rename from bbssource/src/main/java/common/utils/Logger.kt rename to bbssource_common/src/main/java/common/utils/Logger.kt diff --git a/bbssource/src/main/java/test b/bbssource_common/src/main/java/test similarity index 100% rename from bbssource/src/main/java/test rename to bbssource_common/src/main/java/test diff --git a/bbssource/src/main/resources/application.properties b/bbssource_common/src/main/resources/application.properties similarity index 100% rename from bbssource/src/main/resources/application.properties rename to bbssource_common/src/main/resources/application.properties diff --git a/bbssource/src/main/resources/ehcache.xml b/bbssource_common/src/main/resources/ehcache.xml similarity index 100% rename from bbssource/src/main/resources/ehcache.xml rename to bbssource_common/src/main/resources/ehcache.xml diff --git a/bbssource/src/test/java/testcommon/AbsTestConfigure.java b/bbssource_common/src/test/java/testcommon/AbsTestConfigure.java similarity index 100% rename from bbssource/src/test/java/testcommon/AbsTestConfigure.java rename to bbssource_common/src/test/java/testcommon/AbsTestConfigure.java diff --git a/bbssource/src/test/java/testcommon/TestOne.java b/bbssource_common/src/test/java/testcommon/TestOne.java similarity index 100% rename from bbssource/src/test/java/testcommon/TestOne.java rename to bbssource_common/src/test/java/testcommon/TestOne.java diff --git a/bbssource/src/test/test b/bbssource_common/src/test/test similarity index 100% rename from bbssource/src/test/test rename to bbssource_common/src/test/test From b7ca6d8688b5846c5e66e28a540a81520aff7217 Mon Sep 17 00:00:00 2001 From: liudeyu Date: Tue, 2 Jul 2019 20:23:47 +0800 Subject: [PATCH 14/17] base configure redis --- bbs_restservice/pom.xml | 6 ++++ .../src/main/java/BBsRestApplication.java | 17 ++++++++++ .../main/java/configure/RedisConfigure.java | 16 ++++++++++ .../src/main/java/service/RedisService.java | 31 +++++++++++++++++-- .../src/main/resources/application.properties | 29 +++++++++++++++++ .../src/main/resources/rest.properties | 0 6 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 bbs_restservice/src/main/java/BBsRestApplication.java create mode 100644 bbs_restservice/src/main/java/configure/RedisConfigure.java create mode 100644 bbs_restservice/src/main/resources/application.properties create mode 100644 bbs_restservice/src/main/resources/rest.properties diff --git a/bbs_restservice/pom.xml b/bbs_restservice/pom.xml index cf82143..78e2a44 100644 --- a/bbs_restservice/pom.xml +++ b/bbs_restservice/pom.xml @@ -47,6 +47,12 @@ + + redis.clients + jedis + LATEST + + org.springframework.boot spring-boot-starter-websocket diff --git a/bbs_restservice/src/main/java/BBsRestApplication.java b/bbs_restservice/src/main/java/BBsRestApplication.java new file mode 100644 index 0000000..7c7483c --- /dev/null +++ b/bbs_restservice/src/main/java/BBsRestApplication.java @@ -0,0 +1,17 @@ +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cache.annotation.EnableCaching; + +/** + * Created by liudeyu on 2019/7/2. + */ + +@SpringBootApplication +@EnableCaching +public class BBsRestApplication { + + public static void main(String[] argv) { + SpringApplication.run( + BBsRestApplication.class, argv); + } +} diff --git a/bbs_restservice/src/main/java/configure/RedisConfigure.java b/bbs_restservice/src/main/java/configure/RedisConfigure.java new file mode 100644 index 0000000..5ec9f59 --- /dev/null +++ b/bbs_restservice/src/main/java/configure/RedisConfigure.java @@ -0,0 +1,16 @@ +package configure; + +import org.springframework.cache.annotation.CachingConfigurationSelector; +import org.springframework.cache.annotation.CachingConfigurerSupport; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.context.annotation.Configuration; + +/** + * Created by liudeyu on 2019/7/2. + */ +@Configuration +@EnableCaching +public class RedisConfigure extends CachingConfigurerSupport{ + + +} diff --git a/bbs_restservice/src/main/java/service/RedisService.java b/bbs_restservice/src/main/java/service/RedisService.java index 9f5ed67..c38fa94 100644 --- a/bbs_restservice/src/main/java/service/RedisService.java +++ b/bbs_restservice/src/main/java/service/RedisService.java @@ -2,6 +2,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.core.SetOperations; import org.springframework.data.redis.core.ValueOperations; import org.springframework.stereotype.Service; @@ -20,12 +21,12 @@ public class RedisService { /** * time is hour */ - public void putDataInCache(String key, T value, int time) { + public void putDataInMap(String key, T value, int time) { ValueOperations valueOperations = template.opsForValue(); valueOperations.set(key, value, time, TimeUnit.HOURS); } - public T getDataFromCache(String key) { + public T getDataFromMap(String key) { ValueOperations valueOperations = template.opsForValue(); return valueOperations.get(key); } @@ -41,4 +42,30 @@ public T getDataAndUpdateTime(String key, int time) { return data; } + public void deleteFromMap(String key) { + ValueOperations valueOperations = template.opsForValue(); + template.delete(key); + } + + public void putDataInSet(String key, T t) { + SetOperations setOp = template.opsForSet(); + setOp.add(key, t); + } + + public void removeDataFromSet(String key, T t) { + SetOperations setOp = template.opsForSet(); + setOp.remove(key, t); + } + + public boolean isDataInSet(String key, T t) { + SetOperations setOp = template.opsForSet(); + return setOp.isMember(key, t); + } + + public void putSetIfNotExists(String key,T t){ + if(!isDataInSet(key,t)) { + putDataInSet(key,t); + } + } + } diff --git a/bbs_restservice/src/main/resources/application.properties b/bbs_restservice/src/main/resources/application.properties new file mode 100644 index 0000000..321daa4 --- /dev/null +++ b/bbs_restservice/src/main/resources/application.properties @@ -0,0 +1,29 @@ +server.port=8081 +logging.level.org.springframework.web=DEBUG + + +#redis +# REDIS (RedisProperties) +# Redis数据库索引(默认为0) +spring.redis.database=5 +# Redis服务器地址 +spring.redis.host=127.0.0.1 +# Redis服务器连接端口 +spring.redis.port=6379 +# Redis服务器连接密码(默认为空) +spring.redis.password=***** +# 连接池最大连接数(使用负值表示没有限制) +spring.redis.pool.max-active=8 +# 连接池最大阻塞等待时间(使用负值表示没有限制) +spring.redis.pool.max-wait=-1 +# 连接池中的最大空闲连接 +spring.redis.pool.max-idle=8 +# 连接池中的最小空闲连接 +spring.redis.pool.min-idle=0 +# 连接超时时间(毫秒) +spring.redis.timeout=10 + + +#encode +spring.http.encoding.charset=utf-8 +spring.http.encoding.force=true \ No newline at end of file diff --git a/bbs_restservice/src/main/resources/rest.properties b/bbs_restservice/src/main/resources/rest.properties new file mode 100644 index 0000000..e69de29 From e31b01c3b48839421cdbec1812388ad7d71b8976 Mon Sep 17 00:00:00 2001 From: liudeyu Date: Wed, 3 Jul 2019 18:00:04 +0800 Subject: [PATCH 15/17] =?UTF-8?q?=E8=B0=83rest=20=E6=B3=A8=E5=85=A5?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E6=9C=89=E7=82=B9=E7=83=A6=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LICENSE | 2 +- bbs_restservice/pom.xml | 2 + .../src/main/java/BBsRestApplication.java | 17 ----- bbs_restservice/src/main/java/Test.java | 8 --- .../com/restservice/BBSRestApplication.java | 35 +++++++++ .../restservice/configure/RedisConfigure.java | 71 +++++++++++++++++++ .../com/restservice/configure/RestConfig.java | 12 ++++ .../restservice}/service/RedisService.java | 2 +- .../main/java/configure/RedisConfigure.java | 16 ----- .../src/main/resources/application.properties | 28 +++++++- .../src/main/resources/rest.properties | 25 +++++++ bbs_restservice/src/test/java/Test.java | 20 ++++++ bbssource_common/pom.xml | 53 ++++++++++++++ .../common/baseservice/BaseController.java | 16 ++--- .../java/common/baseservice/Processor.java | 4 +- .../src/main/java/common/dto/QuarkResult.kt | 9 ++- .../src/test/java/testcommon/TestOne.java | 7 -- .../java/com/quark/common/dao/UserDao.java | 2 +- .../quark/common/CommonApplicationTest.java | 6 +- quark-rest/pom.xml | 9 ++- .../rest/service/impl/RankServiceImpl.java | 2 +- .../com/quark/rest/RestApplicationTest.java | 1 + 22 files changed, 279 insertions(+), 68 deletions(-) delete mode 100644 bbs_restservice/src/main/java/BBsRestApplication.java delete mode 100644 bbs_restservice/src/main/java/Test.java create mode 100644 bbs_restservice/src/main/java/com/restservice/BBSRestApplication.java create mode 100644 bbs_restservice/src/main/java/com/restservice/configure/RedisConfigure.java create mode 100644 bbs_restservice/src/main/java/com/restservice/configure/RestConfig.java rename bbs_restservice/src/main/java/{ => com/restservice}/service/RedisService.java (98%) delete mode 100644 bbs_restservice/src/main/java/configure/RedisConfigure.java create mode 100644 bbs_restservice/src/test/java/Test.java diff --git a/LICENSE b/LICENSE index 8dada3e..a921bc8 100644 --- a/LICENSE +++ b/LICENSE @@ -136,7 +136,7 @@ with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, + names, trademarks, com.restservice.service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. diff --git a/bbs_restservice/pom.xml b/bbs_restservice/pom.xml index 78e2a44..5288e1f 100644 --- a/bbs_restservice/pom.xml +++ b/bbs_restservice/pom.xml @@ -22,6 +22,8 @@ 1.0-SNAPSHOT + + org.springframework.boot diff --git a/bbs_restservice/src/main/java/BBsRestApplication.java b/bbs_restservice/src/main/java/BBsRestApplication.java deleted file mode 100644 index 7c7483c..0000000 --- a/bbs_restservice/src/main/java/BBsRestApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cache.annotation.EnableCaching; - -/** - * Created by liudeyu on 2019/7/2. - */ - -@SpringBootApplication -@EnableCaching -public class BBsRestApplication { - - public static void main(String[] argv) { - SpringApplication.run( - BBsRestApplication.class, argv); - } -} diff --git a/bbs_restservice/src/main/java/Test.java b/bbs_restservice/src/main/java/Test.java deleted file mode 100644 index a921821..0000000 --- a/bbs_restservice/src/main/java/Test.java +++ /dev/null @@ -1,8 +0,0 @@ - -/** - * Created by liudeyu on 2019/7/1. - */ -public class Test { - - -} diff --git a/bbs_restservice/src/main/java/com/restservice/BBSRestApplication.java b/bbs_restservice/src/main/java/com/restservice/BBSRestApplication.java new file mode 100644 index 0000000..0501851 --- /dev/null +++ b/bbs_restservice/src/main/java/com/restservice/BBSRestApplication.java @@ -0,0 +1,35 @@ +package com.restservice; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; +import org.springframework.cache.annotation.EnableCaching; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; + +/** + * Created by liudeyu on 2019/7/2. + */ + +@SpringBootApplication +@EnableCaching +public class BBSRestApplication { + + public static void main(String[] argv) { + SpringApplication springApplication = new SpringApplication(BBSRestApplication.class); +// InputStream inputStream = BBSRestApplication.class.getClassLoader().getResourceAsStream("rest.properties"); +// Properties properties = new Properties(); +// try { +// properties.load(inputStream); +// springApplication.setDefaultProperties(properties); +// } catch (IOException e) { +// e.printStackTrace(); +// } + + springApplication.run(argv); + + } +} diff --git a/bbs_restservice/src/main/java/com/restservice/configure/RedisConfigure.java b/bbs_restservice/src/main/java/com/restservice/configure/RedisConfigure.java new file mode 100644 index 0000000..0ed9647 --- /dev/null +++ b/bbs_restservice/src/main/java/com/restservice/configure/RedisConfigure.java @@ -0,0 +1,71 @@ +package com.restservice.configure; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.PropertyAccessor; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.cache.CacheManager; +import org.springframework.cache.annotation.CachingConfigurerSupport; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.cache.interceptor.KeyGenerator; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.redis.cache.RedisCacheManager; +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.core.StringRedisTemplate; +import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; + +import java.lang.reflect.Method; + +/** + * Created by liudeyu on 2019/7/2. + */ +@Configuration +@EnableCaching +public class RedisConfigure extends CachingConfigurerSupport { + + + @Bean + @Override + public KeyGenerator keyGenerator() { + return new KeyGenerator() { + @Override + public Object generate(Object o, Method method, Object... objects) { + StringBuilder builder = new StringBuilder(); + builder.append(o.getClass().toString()).append(method.getName()); + for (Object object : objects) { + builder.append(object.toString()); + } + return builder.toString(); + } + }; + } + + + + + @Bean + public CacheManager cacheManager(RedisTemplate redisTemplate) { + RedisCacheManager rcm = new RedisCacheManager(redisTemplate); + //设置缓存过期时间 + //rcm.setDefaultExpiration(60);//秒 + return rcm; + } + + + + + @Bean + public RedisTemplate redisemplate(RedisConnectionFactory factory){ + StringRedisTemplate stringRedisTemplate=new StringRedisTemplate(factory); + Jackson2JsonRedisSerializer jackson2JsonRedisSerializer=new Jackson2JsonRedisSerializer(Object.class); + ObjectMapper mapper=new ObjectMapper(); + mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); + mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); + jackson2JsonRedisSerializer.setObjectMapper(mapper); + stringRedisTemplate.setValueSerializer(jackson2JsonRedisSerializer); + stringRedisTemplate.afterPropertiesSet(); + return stringRedisTemplate; + + } +} diff --git a/bbs_restservice/src/main/java/com/restservice/configure/RestConfig.java b/bbs_restservice/src/main/java/com/restservice/configure/RestConfig.java new file mode 100644 index 0000000..1162a8b --- /dev/null +++ b/bbs_restservice/src/main/java/com/restservice/configure/RestConfig.java @@ -0,0 +1,12 @@ +package com.restservice.configure; + +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; + +/** + * Created by liudeyu on 2019/7/3. + */ +@Configuration +@ComponentScan(basePackages = "common") +public class RestConfig { +} diff --git a/bbs_restservice/src/main/java/service/RedisService.java b/bbs_restservice/src/main/java/com/restservice/service/RedisService.java similarity index 98% rename from bbs_restservice/src/main/java/service/RedisService.java rename to bbs_restservice/src/main/java/com/restservice/service/RedisService.java index c38fa94..b65124c 100644 --- a/bbs_restservice/src/main/java/service/RedisService.java +++ b/bbs_restservice/src/main/java/com/restservice/service/RedisService.java @@ -1,4 +1,4 @@ -package service; +package com.restservice.service; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; diff --git a/bbs_restservice/src/main/java/configure/RedisConfigure.java b/bbs_restservice/src/main/java/configure/RedisConfigure.java deleted file mode 100644 index 5ec9f59..0000000 --- a/bbs_restservice/src/main/java/configure/RedisConfigure.java +++ /dev/null @@ -1,16 +0,0 @@ -package configure; - -import org.springframework.cache.annotation.CachingConfigurationSelector; -import org.springframework.cache.annotation.CachingConfigurerSupport; -import org.springframework.cache.annotation.EnableCaching; -import org.springframework.context.annotation.Configuration; - -/** - * Created by liudeyu on 2019/7/2. - */ -@Configuration -@EnableCaching -public class RedisConfigure extends CachingConfigurerSupport{ - - -} diff --git a/bbs_restservice/src/main/resources/application.properties b/bbs_restservice/src/main/resources/application.properties index 321daa4..e6d5d43 100644 --- a/bbs_restservice/src/main/resources/application.properties +++ b/bbs_restservice/src/main/resources/application.properties @@ -26,4 +26,30 @@ spring.redis.timeout=10 #encode spring.http.encoding.charset=utf-8 -spring.http.encoding.force=true \ No newline at end of file +spring.http.encoding.force=true + +#Mysql配置 +spring.datasource.type=com.alibaba.druid.pool.DruidDataSource +spring.datasource.url=jdbc:mysql://127.0.0.1:3306/quarkCommunity?useUnicode=true&characterEncoding=UTF-8&useSSL=false +spring.datasource.username=ldy +spring.datasource.password=abcd1234 +spring.datasource.driver-class-name=com.mysql.jdbc.Driver + +#jpa配置 +spring.jpa.database = MYSQL +spring.jpa.show-sql = true +spring.jpa.hibernate.ddl-auto = update +spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy +spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect + +#datasource +spring.datasource.initialSize=5 +spring.datasource.minIdle=5 +spring.datasource.maxActive=20 +# 配置获取连接等待超时的时间 +spring.datasource.maxWait=60000 + + + + + diff --git a/bbs_restservice/src/main/resources/rest.properties b/bbs_restservice/src/main/resources/rest.properties index e69de29..df3133f 100644 --- a/bbs_restservice/src/main/resources/rest.properties +++ b/bbs_restservice/src/main/resources/rest.properties @@ -0,0 +1,25 @@ +#Mysql配置 +spring.datasource.type=com.alibaba.druid.pool.DruidDataSource +spring.datasource.url=jdbc:mysql://127.0.0.1:3306/quarkCommunity?useUnicode=true&characterEncoding=UTF-8&useSSL=false +spring.datasource.username=ldy +spring.datasource.password=abcd1234 +spring.datasource.driver-class-name=com.mysql.jdbc.Driver + +#jpa配置 +spring.jpa.database = MYSQL +spring.jpa.show-sql = true +spring.jpa.hibernate.ddl-auto = update +spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy +spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect + +#datasource +spring.datasource.initialSize=5 +spring.datasource.minIdle=5 +spring.datasource.maxActive=20 +# 配置获取连接等待超时的时间 +spring.datasource.maxWait=60000 + + + + + diff --git a/bbs_restservice/src/test/java/Test.java b/bbs_restservice/src/test/java/Test.java new file mode 100644 index 0000000..cf1df35 --- /dev/null +++ b/bbs_restservice/src/test/java/Test.java @@ -0,0 +1,20 @@ +import com.restservice.BBSRestApplication; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.test.context.junit4.SpringRunner; + +/** + * Created by liudeyu on 2019/7/3. + */ +@RunWith(SpringRunner.class) +@EnableCaching +@SpringBootTest(classes = BBSRestApplication.class) +public class Test { + + @org.junit.Test + public void sayHello(){ + System.out.println("hello"); + } + +} diff --git a/bbssource_common/pom.xml b/bbssource_common/pom.xml index 6e1bad5..9d8c4ad 100644 --- a/bbssource_common/pom.xml +++ b/bbssource_common/pom.xml @@ -18,6 +18,7 @@ 1.8 + 1.0.0 @@ -66,6 +67,17 @@ com.fasterxml.jackson.core jackson-annotations + + org.jetbrains.kotlin + kotlin-stdlib + ${kotlin.version} + + + org.jetbrains.kotlin + kotlin-test + ${kotlin.version} + test + @@ -76,6 +88,47 @@ org.springframework.boot spring-boot-maven-plugin + + org.jetbrains.kotlin + kotlin-maven-plugin + ${kotlin.version} + + + compile + compile + + compile + + + + test-compile + test-compile + + test-compile + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + compile + compile + + compile + + + + testCompile + test-compile + + testCompile + + + + diff --git a/bbssource_common/src/main/java/common/baseservice/BaseController.java b/bbssource_common/src/main/java/common/baseservice/BaseController.java index b34b8fe..b5f6666 100644 --- a/bbssource_common/src/main/java/common/baseservice/BaseController.java +++ b/bbssource_common/src/main/java/common/baseservice/BaseController.java @@ -1,20 +1,20 @@ package common.baseservice; +import common.dto.QuarkResult; import common.exceptions.ApiException; /** * Created by liudeyu on 2019/6/30. */ -public class BaseController { +public class BaseController { - public void process(Processor processor){ + public QuarkResult process(Processor processor) { try { - processor.process(); - }catch (ApiException ex){ - - - }catch (Exception ex){ - + return processor.process(); + } catch (ApiException ex) { + return QuarkResult.Companion.error(ex.getStackTrace().toString()); + } catch (Exception ex) { + return QuarkResult.errorSystem(ex.getStackTrace().toString()); } } diff --git a/bbssource_common/src/main/java/common/baseservice/Processor.java b/bbssource_common/src/main/java/common/baseservice/Processor.java index 337eb4f..a9048a2 100644 --- a/bbssource_common/src/main/java/common/baseservice/Processor.java +++ b/bbssource_common/src/main/java/common/baseservice/Processor.java @@ -1,9 +1,11 @@ package common.baseservice; +import common.dto.QuarkResult; + /** * Created by liudeyu on 2019/6/30. */ public interface Processor { - void process(); + QuarkResult process(); } diff --git a/bbssource_common/src/main/java/common/dto/QuarkResult.kt b/bbssource_common/src/main/java/common/dto/QuarkResult.kt index cab6d8c..d5f43c1 100644 --- a/bbssource_common/src/main/java/common/dto/QuarkResult.kt +++ b/bbssource_common/src/main/java/common/dto/QuarkResult.kt @@ -16,12 +16,19 @@ class QuarkResult() : Serializable { companion object { + @JvmStatic fun ok(data: Any): QuarkResult { val data = QuarkResult(HttpURLConnection.HTTP_OK, data) return data } + @JvmStatic fun error(errorMsg:String):QuarkResult{ - return QuarkResult(HttpURLConnection.HTTP_INTERNAL_ERROR,errorMsg) + return QuarkResult(HttpURLConnection.HTTP_BAD_REQUEST,errorMsg) + } + + @JvmStatic + fun errorSystem(errorMsg:String):QuarkResult{ + return QuarkResult(HttpURLConnection.HTTP_INTERNAL_ERROR,errorMsg); } } diff --git a/bbssource_common/src/test/java/testcommon/TestOne.java b/bbssource_common/src/test/java/testcommon/TestOne.java index 8204b5e..40aeee0 100644 --- a/bbssource_common/src/test/java/testcommon/TestOne.java +++ b/bbssource_common/src/test/java/testcommon/TestOne.java @@ -1,16 +1,9 @@ package testcommon; -import common.CommonApplication; import common.dao.UserDao; import common.entity.User; -import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.cache.annotation.EnableCaching; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringRunner; import java.util.List; diff --git a/quark-common/src/main/java/com/quark/common/dao/UserDao.java b/quark-common/src/main/java/com/quark/common/dao/UserDao.java index eef98c5..dbe9353 100644 --- a/quark-common/src/main/java/com/quark/common/dao/UserDao.java +++ b/quark-common/src/main/java/com/quark/common/dao/UserDao.java @@ -18,6 +18,6 @@ public interface UserDao extends JpaRepository ,JpaSpecificationEx User findByEmail(String email); @Query(value = "select * from quark_user u where DATE_SUB(CURDATE(), INTERVAL 3000 DAY) <=DATE(u.init_time) ORDER BY u.id DESC limit 12" ,nativeQuery = true) - List findNewUser(); + List findNewUser(); } diff --git a/quark-common/src/test/java/com/quark/common/CommonApplicationTest.java b/quark-common/src/test/java/com/quark/common/CommonApplicationTest.java index b10c2a5..25cda20 100644 --- a/quark-common/src/test/java/com/quark/common/CommonApplicationTest.java +++ b/quark-common/src/test/java/com/quark/common/CommonApplicationTest.java @@ -40,9 +40,7 @@ public class CommonApplicationTest { @Test public void TestDataSource(){ - Listusers= UserDao.findNewUser(); - users.forEach(user -> { - System.out.println(user.getUsername()); - }); + Listusers= UserDao.findNewUser(); + } } diff --git a/quark-rest/pom.xml b/quark-rest/pom.xml index 3d9f3e6..f144a2a 100644 --- a/quark-rest/pom.xml +++ b/quark-rest/pom.xml @@ -14,8 +14,13 @@ quark-rest war - + + ${java.version} + ${java.version} + + + com.quark quark-common @@ -58,4 +63,6 @@ spring-messaging + + \ No newline at end of file diff --git a/quark-rest/src/main/java/com/quark/rest/service/impl/RankServiceImpl.java b/quark-rest/src/main/java/com/quark/rest/service/impl/RankServiceImpl.java index b332742..87261ae 100644 --- a/quark-rest/src/main/java/com/quark/rest/service/impl/RankServiceImpl.java +++ b/quark-rest/src/main/java/com/quark/rest/service/impl/RankServiceImpl.java @@ -27,6 +27,6 @@ public List findPostsRank() { @Override public List findUserRank() { - return userDao.findNewUser(); + return userDao.findNewUser(); } } diff --git a/quark-rest/src/test/java/com/quark/rest/RestApplicationTest.java b/quark-rest/src/test/java/com/quark/rest/RestApplicationTest.java index 843cefe..0b1c462 100644 --- a/quark-rest/src/test/java/com/quark/rest/RestApplicationTest.java +++ b/quark-rest/src/test/java/com/quark/rest/RestApplicationTest.java @@ -61,6 +61,7 @@ public void testDataSource() { // redisService.deleteSet(REDIS_USERID_KEY,8); // System.out.println(redisService.setHasValue(REDIS_USERID_KEY,5)); // postsDao.findAll(); + System.out.println("say hello"); } } From 8f863699f861506550b575d2c4b7ffc7488728c4 Mon Sep 17 00:00:00 2001 From: liudeyu Date: Thu, 4 Jul 2019 11:41:14 +0800 Subject: [PATCH 16/17] =?UTF-8?q?=E9=9D=A0=EF=BC=8C=E8=B0=83=E4=B8=AAredis?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E6=B3=A8=E5=85=A5=EF=BC=8C=E8=B0=83=E4=BA=86?= =?UTF-8?q?=E4=B8=80=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs_restservice/pom.xml | 5 -- .../com/restservice/BBSRestApplication.java | 16 +++--- .../restservice/configure/RedisConfigure.java | 2 +- .../com/restservice/service/RedisService.java | 5 +- .../src/main/resources/application.properties | 55 ------------------- .../src/main/resources/resource.properties | 15 +++++ .../src/main/resources/rest.properties | 41 +++++++------- bbs_restservice/src/test/java/Test.java | 3 + 8 files changed, 50 insertions(+), 92 deletions(-) delete mode 100644 bbs_restservice/src/main/resources/application.properties create mode 100644 bbs_restservice/src/main/resources/resource.properties diff --git a/bbs_restservice/pom.xml b/bbs_restservice/pom.xml index 5288e1f..a3da33e 100644 --- a/bbs_restservice/pom.xml +++ b/bbs_restservice/pom.xml @@ -49,11 +49,6 @@ - - redis.clients - jedis - LATEST - org.springframework.boot diff --git a/bbs_restservice/src/main/java/com/restservice/BBSRestApplication.java b/bbs_restservice/src/main/java/com/restservice/BBSRestApplication.java index 0501851..8d9e486 100644 --- a/bbs_restservice/src/main/java/com/restservice/BBSRestApplication.java +++ b/bbs_restservice/src/main/java/com/restservice/BBSRestApplication.java @@ -20,14 +20,14 @@ public class BBSRestApplication { public static void main(String[] argv) { SpringApplication springApplication = new SpringApplication(BBSRestApplication.class); -// InputStream inputStream = BBSRestApplication.class.getClassLoader().getResourceAsStream("rest.properties"); -// Properties properties = new Properties(); -// try { -// properties.load(inputStream); -// springApplication.setDefaultProperties(properties); -// } catch (IOException e) { -// e.printStackTrace(); -// } + InputStream inputStream = BBSRestApplication.class.getClassLoader().getResourceAsStream("rest.properties"); + Properties properties = new Properties(); + try { + properties.load(inputStream); + springApplication.setDefaultProperties(properties); + } catch (IOException e) { + e.printStackTrace(); + } springApplication.run(argv); diff --git a/bbs_restservice/src/main/java/com/restservice/configure/RedisConfigure.java b/bbs_restservice/src/main/java/com/restservice/configure/RedisConfigure.java index 0ed9647..dca0b8e 100644 --- a/bbs_restservice/src/main/java/com/restservice/configure/RedisConfigure.java +++ b/bbs_restservice/src/main/java/com/restservice/configure/RedisConfigure.java @@ -55,7 +55,7 @@ public CacheManager cacheManager(RedisTemplate redisTemplate) { - @Bean + @Bean(name = "redis_custom") public RedisTemplate redisemplate(RedisConnectionFactory factory){ StringRedisTemplate stringRedisTemplate=new StringRedisTemplate(factory); Jackson2JsonRedisSerializer jackson2JsonRedisSerializer=new Jackson2JsonRedisSerializer(Object.class); diff --git a/bbs_restservice/src/main/java/com/restservice/service/RedisService.java b/bbs_restservice/src/main/java/com/restservice/service/RedisService.java index b65124c..a7d4510 100644 --- a/bbs_restservice/src/main/java/com/restservice/service/RedisService.java +++ b/bbs_restservice/src/main/java/com/restservice/service/RedisService.java @@ -6,6 +6,7 @@ import org.springframework.data.redis.core.ValueOperations; import org.springframework.stereotype.Service; +import javax.annotation.Resource; import java.util.concurrent.TimeUnit; /** @@ -14,8 +15,8 @@ @Service public class RedisService { - @Autowired - private RedisTemplate template; + @Resource(name="redis_custom") + private RedisTemplate template; /** diff --git a/bbs_restservice/src/main/resources/application.properties b/bbs_restservice/src/main/resources/application.properties deleted file mode 100644 index e6d5d43..0000000 --- a/bbs_restservice/src/main/resources/application.properties +++ /dev/null @@ -1,55 +0,0 @@ -server.port=8081 -logging.level.org.springframework.web=DEBUG - - -#redis -# REDIS (RedisProperties) -# Redis数据库索引(默认为0) -spring.redis.database=5 -# Redis服务器地址 -spring.redis.host=127.0.0.1 -# Redis服务器连接端口 -spring.redis.port=6379 -# Redis服务器连接密码(默认为空) -spring.redis.password=***** -# 连接池最大连接数(使用负值表示没有限制) -spring.redis.pool.max-active=8 -# 连接池最大阻塞等待时间(使用负值表示没有限制) -spring.redis.pool.max-wait=-1 -# 连接池中的最大空闲连接 -spring.redis.pool.max-idle=8 -# 连接池中的最小空闲连接 -spring.redis.pool.min-idle=0 -# 连接超时时间(毫秒) -spring.redis.timeout=10 - - -#encode -spring.http.encoding.charset=utf-8 -spring.http.encoding.force=true - -#Mysql配置 -spring.datasource.type=com.alibaba.druid.pool.DruidDataSource -spring.datasource.url=jdbc:mysql://127.0.0.1:3306/quarkCommunity?useUnicode=true&characterEncoding=UTF-8&useSSL=false -spring.datasource.username=ldy -spring.datasource.password=abcd1234 -spring.datasource.driver-class-name=com.mysql.jdbc.Driver - -#jpa配置 -spring.jpa.database = MYSQL -spring.jpa.show-sql = true -spring.jpa.hibernate.ddl-auto = update -spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy -spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect - -#datasource -spring.datasource.initialSize=5 -spring.datasource.minIdle=5 -spring.datasource.maxActive=20 -# 配置获取连接等待超时的时间 -spring.datasource.maxWait=60000 - - - - - diff --git a/bbs_restservice/src/main/resources/resource.properties b/bbs_restservice/src/main/resources/resource.properties new file mode 100644 index 0000000..d7b98e1 --- /dev/null +++ b/bbs_restservice/src/main/resources/resource.properties @@ -0,0 +1,15 @@ +#User_Redis_Key +REDIS_USER_KEY = quark:user: +REDIS_USER_TIME = 24 + +#Rank_Redis_Key +REDIS_RANK_POSTS = quark:rank:posts +REDIS_RANK_USERS = quark:rank:users + +#Userid_Redis_Key +REDIS_USERID_KEY = quark:uid + +#upload +UPLOAD_PATH=D:\\home\\images\\upload\\ +STATIC_URL=http://127.0.0.1/images/upload/ + diff --git a/bbs_restservice/src/main/resources/rest.properties b/bbs_restservice/src/main/resources/rest.properties index df3133f..a36aef8 100644 --- a/bbs_restservice/src/main/resources/rest.properties +++ b/bbs_restservice/src/main/resources/rest.properties @@ -1,25 +1,24 @@ -#Mysql配置 -spring.datasource.type=com.alibaba.druid.pool.DruidDataSource -spring.datasource.url=jdbc:mysql://127.0.0.1:3306/quarkCommunity?useUnicode=true&characterEncoding=UTF-8&useSSL=false -spring.datasource.username=ldy -spring.datasource.password=abcd1234 -spring.datasource.driver-class-name=com.mysql.jdbc.Driver - -#jpa配置 -spring.jpa.database = MYSQL -spring.jpa.show-sql = true -spring.jpa.hibernate.ddl-auto = update -spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy -spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect - -#datasource -spring.datasource.initialSize=5 -spring.datasource.minIdle=5 -spring.datasource.maxActive=20 -# 配置获取连接等待超时的时间 -spring.datasource.maxWait=60000 - +#port +server.port=8081 +#log +logging.level.org.springframework.web=DEBUG +#redis���� +spring.redis.host=127.0.0.1 +spring.redis.port=6379 +#spring.redis.password=root +spring.redis.pool.max-active=8 +spring.redis.pool.max-wait=-1 +spring.redis.pool.max-idle=8 +spring.redis.pool.min-idle=0 +spring.redis.timeout=0 +#�ļ��ϴ� +spring.http.multipart.max-file-size= 2MB +#�����޸� +spring.http.encoding.force=true +spring.http.encoding.charset=UTF-8 +spring.http.encoding.enabled=true +server.tomcat.uri-encoding=UTF-8 \ No newline at end of file diff --git a/bbs_restservice/src/test/java/Test.java b/bbs_restservice/src/test/java/Test.java index cf1df35..0fae382 100644 --- a/bbs_restservice/src/test/java/Test.java +++ b/bbs_restservice/src/test/java/Test.java @@ -2,6 +2,7 @@ import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.cache.annotation.EnableCaching; +import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit4.SpringRunner; /** @@ -10,6 +11,8 @@ @RunWith(SpringRunner.class) @EnableCaching @SpringBootTest(classes = BBSRestApplication.class) +@TestPropertySource(locations = {"classpath:rest.properties"}) + public class Test { @org.junit.Test From 639eb21822ca1f8ba39c82636a60448b4ed7f40b Mon Sep 17 00:00:00 2001 From: liudeyu Date: Tue, 9 Jul 2019 15:10:35 +0800 Subject: [PATCH 17/17] =?UTF-8?q?=E5=8A=A0=E5=87=A0=E4=B8=AAconfigure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs_restservice/pom.xml | 7 +++ .../com/restservice/configure/CorsFilter.java | 44 +++++++++++++++++++ .../restservice/configure/MyMvcAdapter.java | 18 ++++++++ .../configure/PropertiesConfigure.java | 19 ++++++++ .../src/main/resources/resource.properties | 5 --- bbs_restservice/src/test/java/Test.java | 30 +++++++++++-- .../src/main/resources/resource.properties | 1 + quark-rest/src/main/resources/rest.properties | 13 ++++-- .../com/quark/rest/RestApplicationTest.java | 44 +++++++++++++++++++ 9 files changed, 168 insertions(+), 13 deletions(-) create mode 100644 bbs_restservice/src/main/java/com/restservice/configure/CorsFilter.java create mode 100644 bbs_restservice/src/main/java/com/restservice/configure/MyMvcAdapter.java create mode 100644 bbs_restservice/src/main/java/com/restservice/configure/PropertiesConfigure.java diff --git a/bbs_restservice/pom.xml b/bbs_restservice/pom.xml index a3da33e..aea8ff6 100644 --- a/bbs_restservice/pom.xml +++ b/bbs_restservice/pom.xml @@ -67,6 +67,13 @@ springfox-swagger-ui + + + io.netty + netty-all + 4.1.37.Final + + diff --git a/bbs_restservice/src/main/java/com/restservice/configure/CorsFilter.java b/bbs_restservice/src/main/java/com/restservice/configure/CorsFilter.java new file mode 100644 index 0000000..27460c1 --- /dev/null +++ b/bbs_restservice/src/main/java/com/restservice/configure/CorsFilter.java @@ -0,0 +1,44 @@ +package com.restservice.configure; + +import io.netty.handler.codec.http.HttpResponse; +import io.netty.handler.codec.http.HttpResponseStatus; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; + +import javax.servlet.*; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * Created by liudeyu on 2019/7/9. + */ + +@Configuration +public class CorsFilter implements Filter { + + + @Override + public void init(FilterConfig filterConfig) throws ServletException { + + } + + @Override + public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { + if ((servletResponse instanceof HttpServletResponse)) { + HttpServletResponse httpServletResponse = (HttpServletResponse) servletResponse; + httpServletResponse.setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, "*"); + httpServletResponse.setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS, "GET, POST, PATCH, PUT, DELETE, OPTIONS"); + httpServletResponse.setHeader(HttpHeaders.ACCESS_CONTROL_MAX_AGE, 6 * 60+""); + httpServletResponse.setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_HEADERS, "X-Requested-With"); + + } + filterChain.doFilter(servletRequest, servletResponse); + } + + @Override + public void destroy() { + + } +} diff --git a/bbs_restservice/src/main/java/com/restservice/configure/MyMvcAdapter.java b/bbs_restservice/src/main/java/com/restservice/configure/MyMvcAdapter.java new file mode 100644 index 0000000..0c10363 --- /dev/null +++ b/bbs_restservice/src/main/java/com/restservice/configure/MyMvcAdapter.java @@ -0,0 +1,18 @@ +package com.restservice.configure; + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; + +/** + * Created by liudeyu on 2019/7/9. + */ +@Configuration +public class MyMvcAdapter extends WebMvcConfigurerAdapter{ + + @Override + public void addViewControllers(ViewControllerRegistry registry) { + super.addViewControllers(registry); + + } +} diff --git a/bbs_restservice/src/main/java/com/restservice/configure/PropertiesConfigure.java b/bbs_restservice/src/main/java/com/restservice/configure/PropertiesConfigure.java new file mode 100644 index 0000000..37fb17f --- /dev/null +++ b/bbs_restservice/src/main/java/com/restservice/configure/PropertiesConfigure.java @@ -0,0 +1,19 @@ +package com.restservice.configure; + +import org.springframework.boot.env.PropertySourcesLoader; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; +import org.springframework.test.context.ContextConfiguration; + +/** + * Created by liudeyu on 2019/7/4. + */ +@Configuration +@ContextConfiguration(locations = {"classpath:rest.properties"}) +public class PropertiesConfigure { + @Bean + public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() { + return new PropertySourcesPlaceholderConfigurer(); + } +} diff --git a/bbs_restservice/src/main/resources/resource.properties b/bbs_restservice/src/main/resources/resource.properties index d7b98e1..98e38e8 100644 --- a/bbs_restservice/src/main/resources/resource.properties +++ b/bbs_restservice/src/main/resources/resource.properties @@ -8,8 +8,3 @@ REDIS_RANK_USERS = quark:rank:users #Userid_Redis_Key REDIS_USERID_KEY = quark:uid - -#upload -UPLOAD_PATH=D:\\home\\images\\upload\\ -STATIC_URL=http://127.0.0.1/images/upload/ - diff --git a/bbs_restservice/src/test/java/Test.java b/bbs_restservice/src/test/java/Test.java index 0fae382..b111aca 100644 --- a/bbs_restservice/src/test/java/Test.java +++ b/bbs_restservice/src/test/java/Test.java @@ -1,5 +1,9 @@ import com.restservice.BBSRestApplication; +import com.restservice.service.RedisService; +import common.dao.UserDao; +import org.junit.Before; import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.cache.annotation.EnableCaching; import org.springframework.test.context.TestPropertySource; @@ -13,11 +17,29 @@ @SpringBootTest(classes = BBSRestApplication.class) @TestPropertySource(locations = {"classpath:rest.properties"}) -public class Test { - +public class Test { + + @Autowired + RedisService redisService; + + @Autowired + UserDao userDao; + + @Before + public void beforeConfigure() { + System.out.println("before configure"); + } + @org.junit.Test - public void sayHello(){ + public void sayHello() { System.out.println("hello"); } - + + + @org.junit.Test + public void saveValue() { + final String key = "apple"; + redisService.putDataInMap(key, "no way", 1); + System.out.println(redisService.getDataFromMap(key)); + } } diff --git a/quark-rest/src/main/resources/resource.properties b/quark-rest/src/main/resources/resource.properties index d7b98e1..916cdba 100644 --- a/quark-rest/src/main/resources/resource.properties +++ b/quark-rest/src/main/resources/resource.properties @@ -13,3 +13,4 @@ REDIS_USERID_KEY = quark:uid UPLOAD_PATH=D:\\home\\images\\upload\\ STATIC_URL=http://127.0.0.1/images/upload/ +server.httpurl="localhost:8081" diff --git a/quark-rest/src/main/resources/rest.properties b/quark-rest/src/main/resources/rest.properties index de5dfb7..3892b6c 100644 --- a/quark-rest/src/main/resources/rest.properties +++ b/quark-rest/src/main/resources/rest.properties @@ -1,10 +1,13 @@ #port server.port=8081 +#http url + + #log logging.level.org.springframework.web=DEBUG -#redis +#redis���� spring.redis.host=127.0.0.1 spring.redis.port=6379 #spring.redis.password=root @@ -14,11 +17,13 @@ spring.redis.pool.max-idle=8 spring.redis.pool.min-idle=0 spring.redis.timeout=0 -#ļϴ +#�ļ��ϴ� spring.http.multipart.max-file-size= 2MB -#޸ +#�����޸� spring.http.encoding.force=true spring.http.encoding.charset=UTF-8 spring.http.encoding.enabled=true -server.tomcat.uri-encoding=UTF-8 \ No newline at end of file +server.tomcat.uri-encoding=UTF-8 + + diff --git a/quark-rest/src/test/java/com/quark/rest/RestApplicationTest.java b/quark-rest/src/test/java/com/quark/rest/RestApplicationTest.java index 0b1c462..66cb31c 100644 --- a/quark-rest/src/test/java/com/quark/rest/RestApplicationTest.java +++ b/quark-rest/src/test/java/com/quark/rest/RestApplicationTest.java @@ -6,17 +6,30 @@ import com.quark.rest.service.RedisService; import com.quark.rest.service.ReplyService; import com.quark.rest.service.UserService; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.http.HttpMethod; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.web.servlet.*; +import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder; +import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; +import org.springframework.test.web.servlet.result.PrintingResultHandler; +import org.springframework.test.web.servlet.setup.DefaultMockMvcBuilder; +import org.springframework.test.web.servlet.setup.MockMvcBuilders; +import org.springframework.web.context.WebApplicationContext; import javax.sql.DataSource; +import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; + /** * Created by lhr on 17-7-31. * user.setUsername("lhr"); @@ -53,6 +66,21 @@ public class RestApplicationTest { @Value("${REDIS_USERID_KEY}") private String REDIS_USERID_KEY; + + + private MockMvc mockMvc; + + private Logger logger= LoggerFactory.getLogger(this.getClass()); + + @Autowired + WebApplicationContext context; + + @Before + public void beforeConfigure() { + mockMvc = MockMvcBuilders.webAppContextSetup(context).build(); + + } + @Test public void testDataSource() { // userService.updateUserPassword("2a8e48c8-9d09-4ef4-892c-b3436070297c","12345678","123456"); @@ -64,4 +92,20 @@ public void testDataSource() { System.out.println("say hello"); } + + @Test + public void testRestHeaders(){ + String userlogin="http://localhost:8081/user/login"; + RequestBuilder requestBuilder=MockMvcRequestBuilders.get(userlogin) + .param("name","jemmy") + .param("email","jemmy@oo.com"); + try { + mockMvc.perform(requestBuilder) + .andDo(print()); + } catch (Exception e) { + e.printStackTrace(); + } + + } + }