diff --git a/README.md b/README.md index f040b538..96d1be66 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ novel-plus -- 父工程 ## 演示视频 -https://www.bilibili.com/video/BV1Zo4y187Mi +https://www.bilibili.com/video/BV18e41197xs ## 增值服务 diff --git a/doc/sql/20240512.sql b/doc/sql/20240512.sql new file mode 100644 index 00000000..b27af923 --- /dev/null +++ b/doc/sql/20240512.sql @@ -0,0 +1,3 @@ +update crawl_source +set crawl_rule = replace(crawl_rule, 'ibiquge.net', 'ibiquzw.org') +where id = 16; \ No newline at end of file diff --git a/doc/sql/novel_plus.sql b/doc/sql/novel_plus.sql index 31366e8c..dd7b73b9 100644 --- a/doc/sql/novel_plus.sql +++ b/doc/sql/novel_plus.sql @@ -1,5 +1,7 @@ -CREATE database if NOT EXISTS `novel_plus` default character set utf8mb4 collate utf8mb4_unicode_ci; -use `novel_plus`; +CREATE + database if NOT EXISTS `novel_plus` default character set utf8mb4 collate utf8mb4_unicode_ci; +use + `novel_plus`; SET NAMES utf8mb4; @@ -10,17 +12,19 @@ DROP TABLE IF EXISTS `author`; CREATE TABLE `author` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', - `user_id` bigint(20) DEFAULT NULL COMMENT '用户ID', + `user_id` bigint(20) DEFAULT NULL COMMENT '用户ID', `invite_code` varchar(20) DEFAULT NULL COMMENT '邀请码', `pen_name` varchar(20) DEFAULT NULL COMMENT '笔名', `tel_phone` varchar(20) DEFAULT NULL COMMENT '手机号码', `chat_account` varchar(50) DEFAULT NULL COMMENT 'QQ或微信账号', `email` varchar(50) DEFAULT NULL COMMENT '电子邮箱', - `work_direction` tinyint(4) DEFAULT NULL COMMENT '作品方向,0:男频,1:女频', - `status` tinyint(4) DEFAULT '0' COMMENT '0:正常,1:封禁', + `work_direction` tinyint(4) DEFAULT NULL COMMENT '作品方向,0:男频,1:女频', + `status` tinyint(4) DEFAULT '0' COMMENT '0:正常,1:封禁', `create_time` datetime DEFAULT NULL COMMENT '创建时间', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='作者表'; +) ENGINE = InnoDB + AUTO_INCREMENT = 3 + DEFAULT CHARSET = utf8mb4 COMMENT ='作者表'; -- ---------------------------- -- Records of author @@ -40,12 +44,14 @@ CREATE TABLE `author_code` `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `invite_code` varchar(100) DEFAULT NULL COMMENT '邀请码', `validity_time` datetime DEFAULT NULL COMMENT '有效时间', - `is_use` tinyint(1) DEFAULT '0' COMMENT '是否使用过,0:未使用,1:使用过', + `is_use` tinyint(1) DEFAULT '0' COMMENT '是否使用过,0:未使用,1:使用过', `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人ID', + `create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人ID', PRIMARY KEY (`id`), UNIQUE KEY `key_code` (`invite_code`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='作家邀请码表'; +) ENGINE = InnoDB + AUTO_INCREMENT = 6 + DEFAULT CHARSET = utf8mb4 COMMENT ='作家邀请码表'; -- ---------------------------- -- Records of author_code @@ -63,36 +69,38 @@ VALUES ('5', 'ww34343', '2020-05-21 00:00:00', '0', '2020-05-13 14:18:58', '1'); DROP TABLE IF EXISTS `book`; CREATE TABLE `book` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', - `work_direction` tinyint(1) DEFAULT NULL COMMENT '作品方向,0:男频,1:女频''', - `cat_id` int(11) DEFAULT NULL COMMENT '分类ID', - `cat_name` varchar(50) DEFAULT NULL COMMENT '分类名', + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', + `work_direction` tinyint(1) DEFAULT NULL COMMENT '作品方向,0:男频,1:女频''', + `cat_id` int(11) DEFAULT NULL COMMENT '分类ID', + `cat_name` varchar(50) DEFAULT NULL COMMENT '分类名', `pic_url` varchar(200) NOT NULL COMMENT '小说封面', `book_name` varchar(50) NOT NULL COMMENT '小说名', - `author_id` bigint(20) DEFAULT NULL COMMENT '作者id', + `author_id` bigint(20) DEFAULT NULL COMMENT '作者id', `author_name` varchar(50) NOT NULL COMMENT '作者名', `book_desc` varchar(2000) NOT NULL COMMENT '书籍描述', `score` float NOT NULL COMMENT '评分,预留字段', - `book_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '书籍状态,0:连载中,1:已完结', - `visit_count` bigint(20) DEFAULT '103' COMMENT '点击量', - `word_count` int(11) DEFAULT NULL COMMENT '总字数', - `comment_count` int(11) DEFAULT '0' COMMENT '评论数', - `last_index_id` bigint(20) DEFAULT NULL COMMENT '最新目录ID', - `last_index_name` varchar(50) DEFAULT NULL COMMENT '最新目录名', - `last_index_update_time` datetime DEFAULT NULL COMMENT '最新目录更新时间', - `is_vip` tinyint(1) DEFAULT '0' COMMENT '是否收费,1:收费,0:免费', - `status` tinyint(1) DEFAULT '0' COMMENT '状态,0:入库,1:上架', + `book_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '书籍状态,0:连载中,1:已完结', + `visit_count` bigint(20) DEFAULT '103' COMMENT '点击量', + `word_count` int(11) DEFAULT NULL COMMENT '总字数', + `comment_count` int(11) DEFAULT '0' COMMENT '评论数', + `last_index_id` bigint(20) DEFAULT NULL COMMENT '最新目录ID', + `last_index_name` varchar(50) DEFAULT NULL COMMENT '最新目录名', + `last_index_update_time` datetime DEFAULT NULL COMMENT '最新目录更新时间', + `is_vip` tinyint(1) DEFAULT '0' COMMENT '是否收费,1:收费,0:免费', + `status` tinyint(1) DEFAULT '0' COMMENT '状态,0:入库,1:上架', `update_time` datetime NOT NULL COMMENT '更新时间', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `crawl_source_id` int(11) DEFAULT NULL COMMENT '爬虫源站ID', - `crawl_book_id` varchar(32) DEFAULT NULL COMMENT '抓取的源站小说ID', - `crawl_last_time` datetime DEFAULT NULL COMMENT '最后一次的抓取时间', - `crawl_is_stop` tinyint(1) DEFAULT '0' COMMENT '是否已停止更新,0:未停止,1:已停止', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `crawl_source_id` int(11) DEFAULT NULL COMMENT '爬虫源站ID', + `crawl_book_id` varchar(32) DEFAULT NULL COMMENT '抓取的源站小说ID', + `crawl_last_time` datetime DEFAULT NULL COMMENT '最后一次的抓取时间', + `crawl_is_stop` tinyint(1) DEFAULT '0' COMMENT '是否已停止更新,0:未停止,1:已停止', PRIMARY KEY (`id`), - UNIQUE KEY `key_uq_bookName_authorName` (`book_name`,`author_name`) USING BTREE, - KEY `key_lastIndexUpdateTime` (`last_index_update_time`) USING BTREE, - KEY `key_createTime` (`create_time`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=1262260513468559361 DEFAULT CHARSET=utf8mb4 COMMENT='小说表'; + UNIQUE KEY `key_uq_bookName_authorName` (`book_name`, `author_name`) USING BTREE, + KEY `key_lastIndexUpdateTime` (`last_index_update_time`) USING BTREE, + KEY `key_createTime` (`create_time`) USING BTREE +) ENGINE = InnoDB + AUTO_INCREMENT = 1262260513468559361 + DEFAULT CHARSET = utf8mb4 COMMENT ='小说表'; -- ---------------------------- -- Records of book @@ -110,14 +118,16 @@ CREATE TABLE `book_author` `tel_phone` varchar(20) DEFAULT NULL COMMENT '手机号码', `chat_account` varchar(50) DEFAULT NULL COMMENT 'QQ或微信账号', `email` varchar(50) DEFAULT NULL COMMENT '电子邮箱', - `work_direction` tinyint(4) DEFAULT NULL COMMENT '作品方向,0:男频,1:女频', - `status` tinyint(4) DEFAULT NULL COMMENT '0:待审核,1:审核通过,正常,2:审核不通过', + `work_direction` tinyint(4) DEFAULT NULL COMMENT '作品方向,0:男频,1:女频', + `status` tinyint(4) DEFAULT NULL COMMENT '0:待审核,1:审核通过,正常,2:审核不通过', `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `create_user_id` bigint(20) DEFAULT NULL COMMENT '申请人ID', + `create_user_id` bigint(20) DEFAULT NULL COMMENT '申请人ID', `update_time` datetime DEFAULT NULL COMMENT '更新时间', - `update_user_id` bigint(20) DEFAULT NULL COMMENT '更新人ID', + `update_user_id` bigint(20) DEFAULT NULL COMMENT '更新人ID', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=1254957873655066625 DEFAULT CHARSET=utf8mb4 COMMENT='作者表'; +) ENGINE = InnoDB + AUTO_INCREMENT = 1254957873655066625 + DEFAULT CHARSET = utf8mb4 COMMENT ='作者表'; -- ---------------------------- -- Records of book_author @@ -129,16 +139,18 @@ CREATE TABLE `book_author` DROP TABLE IF EXISTS `book_category`; CREATE TABLE `book_category` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', - `work_direction` tinyint(1) DEFAULT NULL COMMENT '作品方向,0:男频,1:女频''', + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', + `work_direction` tinyint(1) DEFAULT NULL COMMENT '作品方向,0:男频,1:女频''', `name` varchar(20) NOT NULL COMMENT '分类名', - `sort` tinyint(4) NOT NULL DEFAULT '10' COMMENT '排序', - `create_user_id` bigint(20) DEFAULT NULL, - `create_time` datetime DEFAULT NULL, - `update_user_id` bigint(20) DEFAULT NULL, - `update_time` datetime DEFAULT NULL, + `sort` tinyint(4) NOT NULL DEFAULT '10' COMMENT '排序', + `create_user_id` bigint(20) DEFAULT NULL, + `create_time` datetime DEFAULT NULL, + `update_user_id` bigint(20) DEFAULT NULL, + `update_time` datetime DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COMMENT='小说类别表'; +) ENGINE = InnoDB + AUTO_INCREMENT = 8 + DEFAULT CHARSET = utf8mb4 COMMENT ='小说类别表'; -- ---------------------------- -- Records of book_category @@ -165,15 +177,17 @@ DROP TABLE IF EXISTS `book_comment`; CREATE TABLE `book_comment` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', - `book_id` bigint(20) DEFAULT NULL COMMENT '小说ID', + `book_id` bigint(20) DEFAULT NULL COMMENT '小说ID', `comment_content` varchar(512) DEFAULT NULL COMMENT '评价内容', - `reply_count` int(11) DEFAULT '0' COMMENT '回复数量', - `audit_status` tinyint(1) DEFAULT '0' COMMENT '审核状态,0:待审核,1:审核通过,2:审核不通过', + `reply_count` int(11) DEFAULT '0' COMMENT '回复数量', + `audit_status` tinyint(1) DEFAULT '0' COMMENT '审核状态,0:待审核,1:审核通过,2:审核不通过', `create_time` datetime DEFAULT NULL COMMENT '评价时间', - `create_user_id` bigint(20) DEFAULT NULL COMMENT '评价人', + `create_user_id` bigint(20) DEFAULT NULL COMMENT '评价人', PRIMARY KEY (`id`), - UNIQUE KEY `key_uq_bookid_userid` (`book_id`,`create_user_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COMMENT='小说评论表'; + UNIQUE KEY `key_uq_bookid_userid` (`book_id`, `create_user_id`) USING BTREE +) ENGINE = InnoDB + AUTO_INCREMENT = 13 + DEFAULT CHARSET = utf8mb4 COMMENT ='小说评论表'; -- ---------------------------- -- Records of book_comment @@ -190,13 +204,14 @@ DROP TABLE IF EXISTS `book_comment_reply`; CREATE TABLE `book_comment_reply` ( `id` bigint(20) NOT NULL COMMENT '主键', - `comment_id` bigint(20) DEFAULT NULL COMMENT '评论ID', + `comment_id` bigint(20) DEFAULT NULL COMMENT '评论ID', `reply_content` varchar(512) DEFAULT NULL COMMENT '回复内容', - `audit_status` tinyint(1) DEFAULT '0' COMMENT '审核状态,0:待审核,1:审核通过,2:审核不通过', + `audit_status` tinyint(1) DEFAULT '0' COMMENT '审核状态,0:待审核,1:审核通过,2:审核不通过', `create_time` datetime DEFAULT NULL COMMENT '回复用户ID', - `create_user_id` bigint(20) DEFAULT NULL COMMENT '回复时间', + `create_user_id` bigint(20) DEFAULT NULL COMMENT '回复时间', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='小说评论回复表'; +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='小说评论回复表'; -- ---------------------------- -- Records of book_comment_reply @@ -213,7 +228,9 @@ CREATE TABLE `book_content` `content` mediumtext COMMENT '小说章节内容', PRIMARY KEY (`id`), UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=3347665 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; +) ENGINE = InnoDB + AUTO_INCREMENT = 3347665 + DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表'; -- ---------------------------- -- Records of book_content @@ -227,17 +244,19 @@ CREATE TABLE `book_index` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `book_id` bigint(20) NOT NULL COMMENT '小说ID', - `index_num` int(11) NOT NULL COMMENT '目录号', + `index_num` int(11) NOT NULL COMMENT '目录号', `index_name` varchar(100) DEFAULT NULL COMMENT '目录名', - `word_count` int(11) DEFAULT NULL COMMENT '字数', - `is_vip` tinyint(4) DEFAULT '0' COMMENT '是否收费,1:收费,0:免费', + `word_count` int(11) DEFAULT NULL COMMENT '字数', + `is_vip` tinyint(4) DEFAULT '0' COMMENT '是否收费,1:收费,0:免费', `create_time` datetime DEFAULT NULL, `update_time` datetime DEFAULT NULL, PRIMARY KEY (`id`), - UNIQUE KEY `key_uq_bookId_indexNum` (`book_id`,`index_num`) USING BTREE, - KEY `key_bookId` (`book_id`) USING BTREE, - KEY `key_indexNum` (`index_num`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=1262260612777095169 DEFAULT CHARSET=utf8mb4 COMMENT='小说目录表'; + UNIQUE KEY `key_uq_bookId_indexNum` (`book_id`, `index_num`) USING BTREE, + KEY `key_bookId` (`book_id`) USING BTREE, + KEY `key_indexNum` (`index_num`) USING BTREE +) ENGINE = InnoDB + AUTO_INCREMENT = 1262260612777095169 + DEFAULT CHARSET = utf8mb4 COMMENT ='小说目录表'; -- ---------------------------- -- Records of book_index @@ -249,13 +268,15 @@ CREATE TABLE `book_index` DROP TABLE IF EXISTS `book_screen_bullet`; CREATE TABLE `book_screen_bullet` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', - `content_id` bigint(20) NOT NULL COMMENT '小说内容ID', + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', + `content_id` bigint(20) NOT NULL COMMENT '小说内容ID', `screen_bullet` varchar(512) NOT NULL COMMENT '小说弹幕内容', `create_time` datetime NOT NULL COMMENT '创建时间', PRIMARY KEY (`id`), - KEY `key_contentId` (`content_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8mb4 COMMENT='小说弹幕表'; + KEY `key_contentId` (`content_id`) USING BTREE +) ENGINE = InnoDB + AUTO_INCREMENT = 79 + DEFAULT CHARSET = utf8mb4 COMMENT ='小说弹幕表'; -- ---------------------------- -- Records of book_screen_bullet @@ -271,12 +292,14 @@ CREATE TABLE `book_setting` `book_id` bigint(20) DEFAULT NULL COMMENT '小说ID', `sort` tinyint(4) DEFAULT NULL COMMENT '排序号', `type` tinyint(1) DEFAULT NULL COMMENT '类型,0:轮播图,1:顶部小说栏设置,2:本周强推,3:热门推荐,4:精品推荐', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', `create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人ID', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', + `update_time` datetime DEFAULT NULL COMMENT '更新时间', `update_user_id` bigint(20) DEFAULT NULL COMMENT '更新人ID', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8mb4 COMMENT='首页小说设置表'; +) ENGINE = InnoDB + AUTO_INCREMENT = 64 + DEFAULT CHARSET = utf8mb4 COMMENT ='首页小说设置表'; -- ---------------------------- -- Records of book_setting @@ -353,14 +376,15 @@ DROP TABLE IF EXISTS `crawl_batch_task`; CREATE TABLE `crawl_batch_task` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', - `source_id` int(11) DEFAULT NULL COMMENT '爬虫源ID', - `crawl_count_success` int(11) DEFAULT NULL COMMENT '成功抓取数量', - `crawl_count_target` int(11) DEFAULT NULL COMMENT '目标抓取数量', + `source_id` int(11) DEFAULT NULL COMMENT '爬虫源ID', + `crawl_count_success` int(11) DEFAULT NULL COMMENT '成功抓取数量', + `crawl_count_target` int(11) DEFAULT NULL COMMENT '目标抓取数量', `task_status` tinyint(1) DEFAULT '1' COMMENT '任务状态,1:正在运行,0已停止', - `start_time` datetime DEFAULT NULL COMMENT '任务开始时间', - `end_time` datetime DEFAULT NULL COMMENT '任务结束时间', + `start_time` datetime DEFAULT NULL COMMENT '任务开始时间', + `end_time` datetime DEFAULT NULL COMMENT '任务结束时间', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='批量抓取任务表'; +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='批量抓取任务表'; -- ---------------------------- -- Records of crawl_batch_task @@ -373,13 +397,14 @@ DROP TABLE IF EXISTS `crawl_single_task`; CREATE TABLE `crawl_single_task` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', - `source_id` int(11) DEFAULT NULL COMMENT '爬虫源ID', + `source_id` int(11) DEFAULT NULL COMMENT '爬虫源ID', `source_book_id` varchar(255) DEFAULT NULL COMMENT '源站小说ID', - `task_status` tinyint(1) DEFAULT NULL COMMENT '任务状态,0:失败,1:成功,2;未执行', - `exc_count` tinyint(2) DEFAULT '0' COMMENT '已经执行次数,最多执行5次', + `task_status` tinyint(1) DEFAULT NULL COMMENT '任务状态,0:失败,1:成功,2;未执行', + `exc_count` tinyint(2) DEFAULT '0' COMMENT '已经执行次数,最多执行5次', `create_time` datetime DEFAULT NULL COMMENT '创建时间', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='抓取单本小说任务表'; +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='抓取单本小说任务表'; -- ---------------------------- -- Records of crawl_single_task @@ -394,11 +419,13 @@ CREATE TABLE `crawl_source` `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', `source_name` varchar(50) DEFAULT NULL COMMENT '源站名', `crawl_rule` text COMMENT '爬取规则(json串)', - `source_status` tinyint(1) DEFAULT '0' COMMENT '爬虫源状态,0:关闭,1:开启', + `source_status` tinyint(1) DEFAULT '0' COMMENT '爬虫源状态,0:关闭,1:开启', `create_time` datetime DEFAULT NULL COMMENT '创建时间', `update_time` datetime DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COMMENT='爬虫源表'; +) ENGINE = InnoDB + AUTO_INCREMENT = 5 + DEFAULT CHARSET = utf8mb4 COMMENT ='爬虫源表'; -- ---------------------------- -- Records of crawl_source @@ -426,17 +453,19 @@ VALUES ('5', '笔趣阁', DROP TABLE IF EXISTS `friend_link`; CREATE TABLE `friend_link` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', `link_name` varchar(50) NOT NULL COMMENT '链接名', `link_url` varchar(100) NOT NULL COMMENT '链接url', - `sort` tinyint(4) NOT NULL DEFAULT '11' COMMENT '排序号', - `is_open` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否开启,0:不开启,1:开启', - `create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人id', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_user_id` bigint(20) DEFAULT NULL COMMENT '更新者用户id', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', + `sort` tinyint(4) NOT NULL DEFAULT '11' COMMENT '排序号', + `is_open` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否开启,0:不开启,1:开启', + `create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人id', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `update_user_id` bigint(20) DEFAULT NULL COMMENT '更新者用户id', + `update_time` datetime DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB + AUTO_INCREMENT = 6 + DEFAULT CHARSET = utf8mb4; -- ---------------------------- -- Records of friend_link @@ -451,17 +480,19 @@ DROP TABLE IF EXISTS `news`; CREATE TABLE `news` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', - `cat_id` int(11) DEFAULT NULL COMMENT '类别ID', + `cat_id` int(11) DEFAULT NULL COMMENT '类别ID', `cat_name` varchar(50) DEFAULT NULL COMMENT '分类名', `source_name` varchar(50) DEFAULT NULL COMMENT '来源', `title` varchar(100) DEFAULT NULL COMMENT '标题', `content` text COMMENT '内容', `create_time` datetime DEFAULT NULL COMMENT '发布时间', - `create_user_id` bigint(20) DEFAULT NULL COMMENT '发布人ID', + `create_user_id` bigint(20) DEFAULT NULL COMMENT '发布人ID', `update_time` datetime DEFAULT NULL COMMENT '更新时间', - `update_user_id` bigint(20) DEFAULT NULL COMMENT '更新人ID', + `update_user_id` bigint(20) DEFAULT NULL COMMENT '更新人ID', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='新闻表'; +) ENGINE = InnoDB + AUTO_INCREMENT = 3 + DEFAULT CHARSET = utf8mb4 COMMENT ='新闻表'; -- ---------------------------- -- Records of news @@ -481,15 +512,17 @@ VALUES ('2', '3', '资讯', '全媒派公众号', 'AI小说悄然流行:人类 DROP TABLE IF EXISTS `news_category`; CREATE TABLE `news_category` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', `name` varchar(20) NOT NULL COMMENT '分类名', - `sort` tinyint(4) NOT NULL DEFAULT '10' COMMENT '排序', - `create_user_id` bigint(20) DEFAULT NULL, - `create_time` datetime DEFAULT NULL, - `update_user_id` bigint(20) DEFAULT NULL, - `update_time` datetime DEFAULT NULL, + `sort` tinyint(4) NOT NULL DEFAULT '10' COMMENT '排序', + `create_user_id` bigint(20) DEFAULT NULL, + `create_time` datetime DEFAULT NULL, + `update_user_id` bigint(20) DEFAULT NULL, + `update_time` datetime DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='新闻类别表'; +) ENGINE = InnoDB + AUTO_INCREMENT = 4 + DEFAULT CHARSET = utf8mb4 COMMENT ='新闻类别表'; -- ---------------------------- -- Records of news_category @@ -507,15 +540,17 @@ CREATE TABLE `order_pay` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `out_trade_no` bigint(20) NOT NULL COMMENT '商户订单号', - `trade_no` varchar(64) DEFAULT NULL COMMENT '支付宝/微信交易号', + `trade_no` varchar(64) DEFAULT NULL COMMENT '支付宝/微信交易号', `pay_channel` tinyint(1) NOT NULL DEFAULT '1' COMMENT '支付渠道,1:支付宝,2:微信', - `total_amount` int(11) NOT NULL COMMENT '交易金额(单位元)', + `total_amount` int(11) NOT NULL COMMENT '交易金额(单位元)', `user_id` bigint(20) NOT NULL COMMENT '支付用户ID', - `pay_status` tinyint(1) DEFAULT '2' COMMENT '支付状态:0:支付失败,1:支付成功,2:待支付', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', + `pay_status` tinyint(1) DEFAULT '2' COMMENT '支付状态:0:支付失败,1:支付成功,2:待支付', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `update_time` datetime DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COMMENT='充值订单'; +) ENGINE = InnoDB + AUTO_INCREMENT = 15 + DEFAULT CHARSET = utf8mb4 COMMENT ='充值订单'; -- ---------------------------- -- Records of order_pay @@ -534,11 +569,13 @@ CREATE TABLE `sys_data_perm` `crl_attr_name` varchar(50) DEFAULT NULL COMMENT '用户权限控制属性名', `crl_column_name` varchar(50) DEFAULT NULL COMMENT '数据表权限控制列名', `perm_code` varchar(50) DEFAULT NULL COMMENT '权限code,all_开头表示查看所有数据的权限,sup_开头表示查看下级数据的权限,own_开头表示查看本级数据的权限', - `order_num` int(11) DEFAULT NULL COMMENT '排序', + `order_num` int(11) DEFAULT NULL COMMENT '排序', `gmt_create` datetime DEFAULT NULL COMMENT '创建时间', `gmt_modified` datetime DEFAULT NULL COMMENT '修改时间', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=216 DEFAULT CHARSET=utf8 COMMENT='数据权限管理'; +) ENGINE = InnoDB + AUTO_INCREMENT = 216 + DEFAULT CHARSET = utf8 COMMENT ='数据权限管理'; -- ---------------------------- -- Records of sys_data_perm @@ -563,12 +600,14 @@ DROP TABLE IF EXISTS `sys_dept`; CREATE TABLE `sys_dept` ( `dept_id` bigint(20) NOT NULL AUTO_INCREMENT, - `parent_id` bigint(20) DEFAULT NULL COMMENT '上级部门ID,一级部门为0', + `parent_id` bigint(20) DEFAULT NULL COMMENT '上级部门ID,一级部门为0', `name` varchar(50) DEFAULT NULL COMMENT '部门名称', - `order_num` int(11) DEFAULT NULL COMMENT '排序', - `del_flag` tinyint(4) DEFAULT '0' COMMENT '是否删除 -1:已删除 0:正常', + `order_num` int(11) DEFAULT NULL COMMENT '排序', + `del_flag` tinyint(4) DEFAULT '0' COMMENT '是否删除 -1:已删除 0:正常', PRIMARY KEY (`dept_id`) -) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='部门管理'; +) ENGINE = InnoDB + AUTO_INCREMENT = 17 + DEFAULT CHARSET = utf8 COMMENT ='部门管理'; -- ---------------------------- -- Records of sys_dept @@ -594,18 +633,21 @@ CREATE TABLE `sys_dict` `type` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '类型', `description` varchar(100) COLLATE utf8_bin DEFAULT NULL COMMENT '描述', `sort` decimal(10, 0) DEFAULT NULL COMMENT '排序(升序)', - `parent_id` bigint(20) DEFAULT '0' COMMENT '父级编号', - `create_by` int(11) DEFAULT NULL COMMENT '创建者', + `parent_id` bigint(20) DEFAULT '0' COMMENT '父级编号', + `create_by` int(11) DEFAULT NULL COMMENT '创建者', `create_date` datetime DEFAULT NULL COMMENT '创建时间', - `update_by` bigint(20) DEFAULT NULL COMMENT '更新者', + `update_by` bigint(20) DEFAULT NULL COMMENT '更新者', `update_date` datetime DEFAULT NULL COMMENT '更新时间', `remarks` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '备注信息', `del_flag` char(1) COLLATE utf8_bin DEFAULT '0' COMMENT '删除标记', PRIMARY KEY (`id`), - KEY `sys_dict_value` (`value`), - KEY `sys_dict_label` (`name`), - KEY `sys_dict_del_flag` (`del_flag`) -) ENGINE=InnoDB AUTO_INCREMENT=142 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='字典表'; + KEY `sys_dict_value` (`value`), + KEY `sys_dict_label` (`name`), + KEY `sys_dict_del_flag` (`del_flag`) +) ENGINE = InnoDB + AUTO_INCREMENT = 142 + DEFAULT CHARSET = utf8 + COLLATE = utf8_bin COMMENT ='字典表'; -- ---------------------------- -- Records of sys_dict @@ -878,11 +920,13 @@ DROP TABLE IF EXISTS `sys_file`; CREATE TABLE `sys_file` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, - `type` int(11) DEFAULT NULL COMMENT '文件类型', + `type` int(11) DEFAULT NULL COMMENT '文件类型', `url` varchar(200) DEFAULT NULL COMMENT 'URL地址', `create_date` datetime DEFAULT NULL COMMENT '创建时间', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=183 DEFAULT CHARSET=utf8 COMMENT='文件上传'; +) ENGINE = InnoDB + AUTO_INCREMENT = 183 + DEFAULT CHARSET = utf8 COMMENT ='文件上传'; -- ---------------------------- -- Records of sys_file @@ -982,13 +1026,15 @@ CREATE TABLE `sys_gen_columns` `column_type` varchar(64) CHARACTER SET utf8 DEFAULT NULL COMMENT '列类型', `java_type` varchar(64) CHARACTER SET utf8 DEFAULT NULL COMMENT '映射java类型', `column_comment` varchar(1024) CHARACTER SET utf8 DEFAULT '' COMMENT '列注释', - `column_sort` tinyint(4) DEFAULT NULL COMMENT '列排序(升序)', + `column_sort` tinyint(4) DEFAULT NULL COMMENT '列排序(升序)', `column_label` varchar(64) DEFAULT NULL COMMENT '鍒楁爣绛惧悕', - `page_type` tinyint(4) DEFAULT '1' COMMENT '页面显示类型:1、文本框 2、下拉框 3、数值4、日期 5、文本域6、富文本 7、上传图片【单文件】 8、上传图片【多文件】9、上传文件【单文件】 10、上传文件【多文件】11、隐藏域 12、不显示', - `is_required` tinyint(1) DEFAULT NULL COMMENT '是否必填', + `page_type` tinyint(4) DEFAULT '1' COMMENT '页面显示类型:1、文本框 2、下拉框 3、数值4、日期 5、文本域6、富文本 7、上传图片【单文件】 8、上传图片【多文件】9、上传文件【单文件】 10、上传文件【多文件】11、隐藏域 12、不显示', + `is_required` tinyint(1) DEFAULT NULL COMMENT '是否必填', `dict_type` varchar(100) CHARACTER SET utf8 DEFAULT '' COMMENT '页面显示为下拉时使用,字典类型从字典表中取出', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=815 DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB + AUTO_INCREMENT = 815 + DEFAULT CHARSET = utf8mb4; -- ---------------------------- -- Records of sys_gen_columns @@ -1157,26 +1203,27 @@ VALUES ('814', 'author_code', 'create_user_id', 'bigint', 'Long', '创建人ID', DROP TABLE IF EXISTS `sys_gen_table`; CREATE TABLE `sys_gen_table` ( - `id` bigint(20) NOT NULL COMMENT '主键', + `id` bigint(20) NOT NULL COMMENT '主键', `table_name` varchar(64) NOT NULL COMMENT '表名', `class_name` varchar(100) NOT NULL COMMENT '实体类名称', `comments` varchar(500) NOT NULL COMMENT '表说明', - `category` tinyint(1) NOT NULL DEFAULT '0' COMMENT '分类:0:数据表,1:树表', - `package_name` varchar(500) DEFAULT NULL COMMENT '生成包路径', - `module_name` varchar(30) DEFAULT NULL COMMENT '生成模块名', - `sub_module_name` varchar(30) DEFAULT NULL COMMENT '生成子模块名', - `function_name` varchar(200) DEFAULT NULL COMMENT '生成功能名,用于类描述', - `function_name_simple` varchar(50) DEFAULT NULL COMMENT '生成功能名(简写),用于功能提示,如“保存xx成功”', - `author` varchar(50) DEFAULT NULL COMMENT '生成功能作者', - `src_dir` varchar(1000) DEFAULT NULL COMMENT 'src目录', - `options` varchar(1000) DEFAULT NULL COMMENT '其它生成选项', - `create_by` bigint(20) NOT NULL COMMENT '创建者', + `category` tinyint(1) NOT NULL DEFAULT '0' COMMENT '分类:0:数据表,1:树表', + `package_name` varchar(500) DEFAULT NULL COMMENT '生成包路径', + `module_name` varchar(30) DEFAULT NULL COMMENT '生成模块名', + `sub_module_name` varchar(30) DEFAULT NULL COMMENT '生成子模块名', + `function_name` varchar(200) DEFAULT NULL COMMENT '生成功能名,用于类描述', + `function_name_simple` varchar(50) DEFAULT NULL COMMENT '生成功能名(简写),用于功能提示,如“保存xx成功”', + `author` varchar(50) DEFAULT NULL COMMENT '生成功能作者', + `src_dir` varchar(1000) DEFAULT NULL COMMENT 'src目录', + `options` varchar(1000) DEFAULT NULL COMMENT '其它生成选项', + `create_by` bigint(20) NOT NULL COMMENT '创建者', `create_date` datetime NOT NULL COMMENT '创建时间', - `update_by` bigint(20) NOT NULL COMMENT '更新者', + `update_by` bigint(20) NOT NULL COMMENT '更新者', `update_date` datetime NOT NULL COMMENT '更新时间', - `remarks` varchar(500) DEFAULT NULL COMMENT '备注信息', + `remarks` varchar(500) DEFAULT NULL COMMENT '备注信息', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='代码生成表'; +) ENGINE = InnoDB + DEFAULT CHARSET = utf8 COMMENT ='代码生成表'; -- ---------------------------- -- Records of sys_gen_table @@ -1191,8 +1238,8 @@ VALUES ('1', '表名', '1', '1', '0', null, null, null, null, null, null, null, DROP TABLE IF EXISTS `sys_gen_table_column`; CREATE TABLE `sys_gen_table_column` ( - `id` bigint(20) NOT NULL COMMENT '主键', - `table_id` bigint(20) NOT NULL COMMENT '表id', + `id` bigint(20) NOT NULL COMMENT '主键', + `table_id` bigint(20) NOT NULL COMMENT '表id', `column_name` varchar(64) NOT NULL COMMENT '列名', `column_sort` decimal(10, 0) DEFAULT NULL COMMENT '列排序(升序)', `column_type` varchar(100) NOT NULL COMMENT '类型', @@ -1211,8 +1258,9 @@ CREATE TABLE `sys_gen_table_column` `show_type` varchar(200) DEFAULT NULL COMMENT '表单类型', `options` varchar(1000) DEFAULT NULL COMMENT '其它生成选项', PRIMARY KEY (`id`), - KEY `idx_gen_table_column_tn` (`table_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='代码生成表列'; + KEY `idx_gen_table_column_tn` (`table_id`) USING BTREE +) ENGINE = InnoDB + DEFAULT CHARSET = utf8 COMMENT ='代码生成表列'; -- ---------------------------- -- Records of sys_gen_table_column @@ -1225,16 +1273,18 @@ DROP TABLE IF EXISTS `sys_log`; CREATE TABLE `sys_log` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, - `user_id` bigint(20) DEFAULT NULL COMMENT '用户id', + `user_id` bigint(20) DEFAULT NULL COMMENT '用户id', `username` varchar(50) DEFAULT NULL COMMENT '用户名', `operation` varchar(50) DEFAULT NULL COMMENT '用户操作', - `time` int(11) DEFAULT NULL COMMENT '响应时间', + `time` int(11) DEFAULT NULL COMMENT '响应时间', `method` varchar(200) DEFAULT NULL COMMENT '请求方法', `params` varchar(5000) DEFAULT NULL COMMENT '请求参数', `ip` varchar(64) DEFAULT NULL COMMENT 'IP地址', `gmt_create` datetime DEFAULT NULL COMMENT '创建时间', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=1412 DEFAULT CHARSET=utf8 COMMENT='系统日志'; +) ENGINE = InnoDB + AUTO_INCREMENT = 1412 + DEFAULT CHARSET = utf8 COMMENT ='系统日志'; -- ---------------------------- @@ -1244,17 +1294,19 @@ DROP TABLE IF EXISTS `sys_menu`; CREATE TABLE `sys_menu` ( `menu_id` bigint(20) NOT NULL AUTO_INCREMENT, - `parent_id` bigint(20) DEFAULT NULL COMMENT '父菜单ID,一级菜单为0', + `parent_id` bigint(20) DEFAULT NULL COMMENT '父菜单ID,一级菜单为0', `name` varchar(50) DEFAULT NULL COMMENT '菜单名称', `url` varchar(200) DEFAULT NULL COMMENT '菜单URL', `perms` varchar(500) DEFAULT NULL COMMENT '授权(多个用逗号分隔,如:user:list,user:create)', - `type` int(11) DEFAULT NULL COMMENT '类型 0:目录 1:菜单 2:按钮', + `type` int(11) DEFAULT NULL COMMENT '类型 0:目录 1:菜单 2:按钮', `icon` varchar(50) DEFAULT NULL COMMENT '菜单图标', - `order_num` int(11) DEFAULT NULL COMMENT '排序', + `order_num` int(11) DEFAULT NULL COMMENT '排序', `gmt_create` datetime DEFAULT NULL COMMENT '创建时间', `gmt_modified` datetime DEFAULT NULL COMMENT '修改时间', PRIMARY KEY (`menu_id`) -) ENGINE=InnoDB AUTO_INCREMENT=234 DEFAULT CHARSET=utf8 COMMENT='菜单管理'; +) ENGINE = InnoDB + AUTO_INCREMENT = 234 + DEFAULT CHARSET = utf8 COMMENT ='菜单管理'; -- ---------------------------- -- Records of sys_menu @@ -1400,11 +1452,13 @@ CREATE TABLE `sys_role` `role_name` varchar(100) DEFAULT NULL COMMENT '角色名称', `role_sign` varchar(100) DEFAULT NULL COMMENT '角色标识', `remark` varchar(100) DEFAULT NULL COMMENT '备注', - `user_id_create` bigint(20) DEFAULT NULL COMMENT '创建用户id', + `user_id_create` bigint(20) DEFAULT NULL COMMENT '创建用户id', `gmt_create` datetime DEFAULT NULL COMMENT '创建时间', `gmt_modified` datetime DEFAULT NULL COMMENT '创建时间', PRIMARY KEY (`role_id`) -) ENGINE=InnoDB AUTO_INCREMENT=62 DEFAULT CHARSET=utf8 COMMENT='角色'; +) ENGINE = InnoDB + AUTO_INCREMENT = 62 + DEFAULT CHARSET = utf8 COMMENT ='角色'; -- ---------------------------- -- Records of sys_role @@ -1422,7 +1476,9 @@ CREATE TABLE `sys_role_data_perm` `role_id` bigint(20) DEFAULT NULL COMMENT '角色ID', `perm_id` bigint(20) DEFAULT NULL COMMENT '权限ID', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8 COMMENT='角色与数据权限对应关系'; +) ENGINE = InnoDB + AUTO_INCREMENT = 79 + DEFAULT CHARSET = utf8 COMMENT ='角色与数据权限对应关系'; -- ---------------------------- -- Records of sys_role_data_perm @@ -1460,7 +1516,9 @@ CREATE TABLE `sys_role_menu` `role_id` bigint(20) DEFAULT NULL COMMENT '角色ID', `menu_id` bigint(20) DEFAULT NULL COMMENT '菜单ID', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=4830 DEFAULT CHARSET=utf8 COMMENT='角色与菜单对应关系'; +) ENGINE = InnoDB + AUTO_INCREMENT = 4830 + DEFAULT CHARSET = utf8 COMMENT ='角色与菜单对应关系'; -- ---------------------------- -- Records of sys_role_menu @@ -2226,23 +2284,25 @@ CREATE TABLE `sys_user` `username` varchar(50) DEFAULT NULL COMMENT '用户名', `name` varchar(100) DEFAULT NULL, `password` varchar(50) DEFAULT NULL COMMENT '密码', - `dept_id` bigint(20) DEFAULT NULL, + `dept_id` bigint(20) DEFAULT NULL, `email` varchar(100) DEFAULT NULL COMMENT '邮箱', `mobile` varchar(100) DEFAULT NULL COMMENT '手机号', - `status` tinyint(4) DEFAULT NULL COMMENT '状态 0:禁用,1:正常', - `user_id_create` bigint(20) DEFAULT NULL COMMENT '创建用户id', + `status` tinyint(4) DEFAULT NULL COMMENT '状态 0:禁用,1:正常', + `user_id_create` bigint(20) DEFAULT NULL COMMENT '创建用户id', `gmt_create` datetime DEFAULT NULL COMMENT '创建时间', `gmt_modified` datetime DEFAULT NULL COMMENT '修改时间', - `sex` bigint(20) DEFAULT NULL COMMENT '性别', + `sex` bigint(20) DEFAULT NULL COMMENT '性别', `birth` datetime DEFAULT NULL COMMENT '出身日期', - `pic_id` bigint(20) DEFAULT NULL, + `pic_id` bigint(20) DEFAULT NULL, `live_address` varchar(500) DEFAULT NULL COMMENT '现居住地', `hobby` varchar(255) DEFAULT NULL COMMENT '爱好', `province` varchar(255) DEFAULT NULL COMMENT '省份', `city` varchar(255) DEFAULT NULL COMMENT '所在城市', `district` varchar(255) DEFAULT NULL COMMENT '所在地区', PRIMARY KEY (`user_id`) -) ENGINE=InnoDB AUTO_INCREMENT=139 DEFAULT CHARSET=utf8; +) ENGINE = InnoDB + AUTO_INCREMENT = 139 + DEFAULT CHARSET = utf8; -- ---------------------------- -- Records of sys_user @@ -2262,7 +2322,9 @@ CREATE TABLE `sys_user_role` `user_id` bigint(20) DEFAULT NULL COMMENT '用户ID', `role_id` bigint(20) DEFAULT NULL COMMENT '角色ID', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=137 DEFAULT CHARSET=utf8 COMMENT='用户与角色对应关系'; +) ENGINE = InnoDB + AUTO_INCREMENT = 137 + DEFAULT CHARSET = utf8 COMMENT ='用户与角色对应关系'; -- ---------------------------- -- Records of sys_user_role @@ -2342,19 +2404,21 @@ VALUES ('136', '138', '60'); DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `username` varchar(50) NOT NULL COMMENT '登录名', `password` varchar(100) NOT NULL COMMENT '登录密码', - `nick_name` varchar(50) DEFAULT NULL COMMENT '昵称', - `user_photo` varchar(100) DEFAULT NULL COMMENT '用户头像', - `user_sex` tinyint(1) DEFAULT NULL COMMENT '用户性别,0:男,1:女', - `account_balance` bigint(20) NOT NULL DEFAULT '0' COMMENT '账户余额', - `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '用户状态,0:正常', + `nick_name` varchar(50) DEFAULT NULL COMMENT '昵称', + `user_photo` varchar(100) DEFAULT NULL COMMENT '用户头像', + `user_sex` tinyint(1) DEFAULT NULL COMMENT '用户性别,0:男,1:女', + `account_balance` bigint(20) NOT NULL DEFAULT '0' COMMENT '账户余额', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '用户状态,0:正常', `create_time` datetime NOT NULL COMMENT '创建时间', `update_time` datetime NOT NULL COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `key_uq_username` (`username`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=1255664783722586113 DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB + AUTO_INCREMENT = 1255664783722586113 + DEFAULT CHARSET = utf8mb4; -- ---------------------------- -- Records of user @@ -2391,11 +2455,13 @@ CREATE TABLE `user_bookshelf` `user_id` bigint(20) NOT NULL COMMENT '用户ID', `book_id` bigint(20) NOT NULL COMMENT '小说ID', `pre_content_id` bigint(20) DEFAULT NULL COMMENT '上一次阅读的章节内容表ID', - `create_time` datetime DEFAULT NULL, - `update_time` datetime DEFAULT NULL, + `create_time` datetime DEFAULT NULL, + `update_time` datetime DEFAULT NULL, PRIMARY KEY (`id`), - UNIQUE KEY `key_uq_userid_bookid` (`user_id`,`book_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8mb4 COMMENT='用户书架表'; + UNIQUE KEY `key_uq_userid_bookid` (`user_id`, `book_id`) USING BTREE +) ENGINE = InnoDB + AUTO_INCREMENT = 42 + DEFAULT CHARSET = utf8mb4 COMMENT ='用户书架表'; -- ---------------------------- -- Records of user_bookshelf @@ -2420,15 +2486,17 @@ CREATE TABLE `user_buy_record` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `user_id` bigint(20) NOT NULL COMMENT '用户ID', - `book_id` bigint(20) DEFAULT NULL COMMENT '购买的小说ID', + `book_id` bigint(20) DEFAULT NULL COMMENT '购买的小说ID', `book_name` varchar(50) DEFAULT NULL COMMENT '购买的小说名', - `book_index_id` bigint(20) DEFAULT NULL COMMENT '购买的章节ID', + `book_index_id` bigint(20) DEFAULT NULL COMMENT '购买的章节ID', `book_index_name` varchar(100) DEFAULT NULL COMMENT '购买的章节名', - `buy_amount` int(11) DEFAULT NULL COMMENT '购买使用的屋币数量', + `buy_amount` int(11) DEFAULT NULL COMMENT '购买使用的屋币数量', `create_time` datetime DEFAULT NULL COMMENT '购买时间', PRIMARY KEY (`id`), - UNIQUE KEY `key_userId_indexId` (`user_id`,`book_index_id`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='用户消费记录表'; + UNIQUE KEY `key_userId_indexId` (`user_id`, `book_index_id`) +) ENGINE = InnoDB + AUTO_INCREMENT = 3 + DEFAULT CHARSET = utf8mb4 COMMENT ='用户消费记录表'; -- ---------------------------- -- Records of user_buy_record @@ -2447,11 +2515,13 @@ DROP TABLE IF EXISTS `user_feedback`; CREATE TABLE `user_feedback` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id', - `user_id` bigint(20) DEFAULT NULL COMMENT '用户id', + `user_id` bigint(20) DEFAULT NULL COMMENT '用户id', `content` varchar(512) DEFAULT NULL COMMENT '反馈内容', `create_time` datetime DEFAULT NULL COMMENT '反馈时间', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4; +) ENGINE = InnoDB + AUTO_INCREMENT = 9 + DEFAULT CHARSET = utf8mb4; -- ---------------------------- -- Records of user_feedback @@ -2469,11 +2539,13 @@ CREATE TABLE `user_read_history` `user_id` bigint(20) NOT NULL COMMENT '用户ID', `book_id` bigint(20) NOT NULL COMMENT '小说ID', `pre_content_id` bigint(20) DEFAULT NULL COMMENT '上一次阅读的章节内容表ID', - `create_time` datetime DEFAULT NULL, - `update_time` datetime DEFAULT NULL, + `create_time` datetime DEFAULT NULL, + `update_time` datetime DEFAULT NULL, PRIMARY KEY (`id`), - UNIQUE KEY `key_uq_userid_bookid` (`user_id`,`book_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=119 DEFAULT CHARSET=utf8mb4 COMMENT='用户阅读记录表'; + UNIQUE KEY `key_uq_userid_bookid` (`user_id`, `book_id`) USING BTREE +) ENGINE = InnoDB + AUTO_INCREMENT = 119 + DEFAULT CHARSET = utf8mb4 COMMENT ='用户阅读记录表'; -- ---------------------------- -- Records of user_read_history @@ -2539,7 +2611,9 @@ CREATE TABLE `book_content0` `content` mediumtext COMMENT '小说章节内容', PRIMARY KEY (`id`), UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=1155 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; +) ENGINE = InnoDB + AUTO_INCREMENT = 1155 + DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表'; -- ---------------------------- -- Table structure for book_content1 @@ -2552,7 +2626,9 @@ CREATE TABLE `book_content1` `content` mediumtext COMMENT '小说章节内容', PRIMARY KEY (`id`), UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=406 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; +) ENGINE = InnoDB + AUTO_INCREMENT = 406 + DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表'; -- ---------------------------- -- Table structure for book_content2 @@ -2565,7 +2641,9 @@ CREATE TABLE `book_content2` `content` mediumtext COMMENT '小说章节内容', PRIMARY KEY (`id`), UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=1222 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; +) ENGINE = InnoDB + AUTO_INCREMENT = 1222 + DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表'; -- ---------------------------- -- Table structure for book_content3 @@ -2578,7 +2656,9 @@ CREATE TABLE `book_content3` `content` mediumtext COMMENT '小说章节内容', PRIMARY KEY (`id`), UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=410 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; +) ENGINE = InnoDB + AUTO_INCREMENT = 410 + DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表'; -- ---------------------------- -- Table structure for book_content4 @@ -2591,7 +2671,9 @@ CREATE TABLE `book_content4` `content` mediumtext COMMENT '小说章节内容', PRIMARY KEY (`id`), UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=1188 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; +) ENGINE = InnoDB + AUTO_INCREMENT = 1188 + DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表'; -- ---------------------------- -- Table structure for book_content5 @@ -2604,7 +2686,9 @@ CREATE TABLE `book_content5` `content` mediumtext COMMENT '小说章节内容', PRIMARY KEY (`id`), UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=416 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; +) ENGINE = InnoDB + AUTO_INCREMENT = 416 + DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表'; -- ---------------------------- -- Table structure for book_content6 @@ -2617,7 +2701,9 @@ CREATE TABLE `book_content6` `content` mediumtext COMMENT '小说章节内容', PRIMARY KEY (`id`), UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=1180 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; +) ENGINE = InnoDB + AUTO_INCREMENT = 1180 + DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表'; -- ---------------------------- -- Table structure for book_content7 @@ -2630,7 +2716,9 @@ CREATE TABLE `book_content7` `content` mediumtext COMMENT '小说章节内容', PRIMARY KEY (`id`), UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=404 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; +) ENGINE = InnoDB + AUTO_INCREMENT = 404 + DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表'; -- ---------------------------- -- Table structure for book_content8 @@ -2643,7 +2731,9 @@ CREATE TABLE `book_content8` `content` mediumtext COMMENT '小说章节内容', PRIMARY KEY (`id`), UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=1134 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; +) ENGINE = InnoDB + AUTO_INCREMENT = 1134 + DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表'; -- ---------------------------- -- Table structure for book_content9 @@ -2656,24 +2746,28 @@ CREATE TABLE `book_content9` `content` mediumtext COMMENT '小说章节内容', PRIMARY KEY (`id`), UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=415 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表'; +) ENGINE = InnoDB + AUTO_INCREMENT = 415 + DEFAULT CHARSET = utf8mb4 COMMENT ='小说内容表'; DROP TABLE IF EXISTS `crawl_single_task`; CREATE TABLE `crawl_single_task` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', - `source_id` int(11) DEFAULT NULL COMMENT '爬虫源ID', + `source_id` int(11) DEFAULT NULL COMMENT '爬虫源ID', `source_name` varchar(50) DEFAULT NULL COMMENT '爬虫源名', `source_book_id` varchar(255) DEFAULT NULL COMMENT '源站小说ID', - `cat_id` int(11) DEFAULT NULL COMMENT '分类ID', + `cat_id` int(11) DEFAULT NULL COMMENT '分类ID', `book_name` varchar(50) DEFAULT NULL COMMENT '爬取的小说名', `author_name` varchar(50) DEFAULT NULL COMMENT '爬取的小说作者名', - `task_status` tinyint(1) DEFAULT '2' COMMENT '任务状态,0:失败,1:成功,2;未执行', - `exc_count` tinyint(2) DEFAULT '0' COMMENT '已经执行次数,最多执行5次', + `task_status` tinyint(1) DEFAULT '2' COMMENT '任务状态,0:失败,1:成功,2;未执行', + `exc_count` tinyint(2) DEFAULT '0' COMMENT '已经执行次数,最多执行5次', `create_time` datetime DEFAULT NULL COMMENT '创建时间', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COMMENT='抓取单本小说任务表'; +) ENGINE = InnoDB + AUTO_INCREMENT = 8 + DEFAULT CHARSET = utf8mb4 COMMENT ='抓取单本小说任务表'; -- ---------------------------- -- Records of crawl_single_task @@ -2697,13 +2791,14 @@ CREATE TABLE `author_income_detail` `user_id` bigint(20) NOT NULL COMMENT '用户ID', `author_id` bigint(20) NOT NULL COMMENT '作家ID', `book_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '作品ID,0表示全部作品', - `income_date` date NOT NULL COMMENT '收入日期', - `income_account` int(11) NOT NULL DEFAULT '0' COMMENT '订阅总额', - `income_count` int(11) NOT NULL DEFAULT '0' COMMENT '订阅次数', - `income_number` int(11) NOT NULL DEFAULT '0' COMMENT '订阅人数', - `create_time` datetime DEFAULT NULL, + `income_date` date NOT NULL COMMENT '收入日期', + `income_account` int(11) NOT NULL DEFAULT '0' COMMENT '订阅总额', + `income_count` int(11) NOT NULL DEFAULT '0' COMMENT '订阅次数', + `income_number` int(11) NOT NULL DEFAULT '0' COMMENT '订阅人数', + `create_time` datetime DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='稿费收入明细统计表'; +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='稿费收入明细统计表'; CREATE TABLE `author_income` ( @@ -2711,15 +2806,16 @@ CREATE TABLE `author_income` `user_id` bigint(20) NOT NULL COMMENT '用户ID', `author_id` bigint(20) NOT NULL COMMENT '作家ID', `book_id` bigint(20) NOT NULL COMMENT '作品ID', - `income_month` date NOT NULL COMMENT '收入月份', + `income_month` date NOT NULL COMMENT '收入月份', `pre_tax_income` bigint(20) NOT NULL DEFAULT '0' COMMENT '税前收入(分)', `after_tax_income` bigint(20) NOT NULL DEFAULT '0' COMMENT '税后收入(分)', `pay_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '支付状态,0:待支付,1:已支付', `confirm_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '稿费确认状态,0:待确认,1:已确认', - `detail` varchar(255) DEFAULT NULL COMMENT '详情', - `create_time` datetime DEFAULT NULL, + `detail` varchar(255) DEFAULT NULL COMMENT '详情', + `create_time` datetime DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='稿费收入统计表'; +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='稿费收入统计表'; alter table book @@ -2819,7 +2915,7 @@ alter table book_index CREATE TABLE `website_info` ( - id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', + id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', name varchar(50) NOT NULL COMMENT '网站名', domain varchar(50) NOT NULL COMMENT '网站域名', keyword varchar(50) NOT NULL COMMENT 'SEO关键词', @@ -2827,10 +2923,10 @@ CREATE TABLE `website_info` qq varchar(20) NOT NULL COMMENT '站长QQ', logo varchar(200) NOT NULL COMMENT '网站logo图片(默认)', logo_dark varchar(200) NOT NULL COMMENT '网站logo图片(深色)', - create_time datetime null comment '创建时间', - create_user_id bigint null comment '创建人ID', - update_time datetime null comment '更新时间', - update_user_id bigint null comment '更新人ID', + create_time datetime null comment '创建时间', + create_user_id bigint null comment '创建人ID', + update_time datetime null comment '更新时间', + update_user_id bigint null comment '更新人ID', PRIMARY KEY (`id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT ='网站信息表'; @@ -2998,4 +3094,15 @@ VALUES (1, 305); update website_info set logo = 'https://youdoc.gitee.io/resource/images/logo%20(1).png', logo_dark='https://youdoc.gitee.io/resource/images/logo%20(1).png' +where id = 1; + + + +update crawl_source +set crawl_rule = replace(crawl_rule, 'ibiquge.net', 'ibiquzw.org') +where id = 16; + +update website_info +set logo = '/images/logo.png', + logo_dark='/images/logo.png' where id = 1; \ No newline at end of file diff --git a/novel-admin/pom.xml b/novel-admin/pom.xml index 805e1540..bbf634fd 100644 --- a/novel-admin/pom.xml +++ b/novel-admin/pom.xml @@ -5,7 +5,7 @@ com.java2nb novel-admin - 4.3.0-RC1 + 4.3.0 jar novel-admin diff --git a/novel-admin/src/main/java/com/java2nb/novel/controller/FriendLinkController.java b/novel-admin/src/main/java/com/java2nb/novel/controller/FriendLinkController.java index a26a40aa..dd86893f 100644 --- a/novel-admin/src/main/java/com/java2nb/novel/controller/FriendLinkController.java +++ b/novel-admin/src/main/java/com/java2nb/novel/controller/FriendLinkController.java @@ -12,6 +12,7 @@ import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import java.util.List; @@ -83,7 +84,7 @@ String detail(@PathVariable("id") Integer id, Model model) { @ResponseBody @PostMapping("/save") @RequiresPermissions("novel:friendLink:add") - public R save(FriendLinkDO friendLink) { + public R save(@Validated FriendLinkDO friendLink) { if (friendLinkService.save(friendLink) > 0) { redisTemplate.delete(CacheKey.INDEX_LINK_KEY); return R.ok(); @@ -98,7 +99,7 @@ public R save(FriendLinkDO friendLink) { @ResponseBody @RequestMapping("/update") @RequiresPermissions("novel:friendLink:edit") - public R update(FriendLinkDO friendLink) { + public R update(@Validated FriendLinkDO friendLink) { friendLinkService.update(friendLink); redisTemplate.delete(CacheKey.INDEX_LINK_KEY); return R.ok(); diff --git a/novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java b/novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java index b0b9d730..d026566a 100644 --- a/novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java +++ b/novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java @@ -1,163 +1,175 @@ package com.java2nb.novel.domain; -import java.io.Serializable; - - -import java.math.BigDecimal; - import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.java2nb.common.jsonserializer.LongToStringSerializer; - - +import org.hibernate.validator.constraints.URL; import org.springframework.format.annotation.DateTimeFormat; -import java.util.Date; +import java.io.Serializable; +import java.util.Date; /** - * - * * @author xiongxy * @email 1179705413@qq.com * @date 2023-04-14 15:12:25 */ public class FriendLinkDO implements Serializable { - private static final long serialVersionUID = 1L; - - - //主键 - private Integer id; - //链接名 - private String linkName; - //链接url - private String linkUrl; - //排序号 - private Integer sort; - //是否开启,0:不开启,1:开启 - private Integer isOpen; - //创建人id - //java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值) - //所以通过序列化成字符串来解决 - @JsonSerialize(using = LongToStringSerializer.class) - private Long createUserId; - //创建时间 - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - //更新者用户id - //java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值) - //所以通过序列化成字符串来解决 - @JsonSerialize(using = LongToStringSerializer.class) - private Long updateUserId; - //更新时间 - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date updateTime; - - /** - * 设置:主键 - */ - public void setId(Integer id) { - this.id = id; - } - /** - * 获取:主键 - */ - public Integer getId() { - return id; - } - /** - * 设置:链接名 - */ - public void setLinkName(String linkName) { - this.linkName = linkName; - } - /** - * 获取:链接名 - */ - public String getLinkName() { - return linkName; - } - /** - * 设置:链接url - */ - public void setLinkUrl(String linkUrl) { - this.linkUrl = linkUrl; - } - /** - * 获取:链接url - */ - public String getLinkUrl() { - return linkUrl; - } - /** - * 设置:排序号 - */ - public void setSort(Integer sort) { - this.sort = sort; - } - /** - * 获取:排序号 - */ - public Integer getSort() { - return sort; - } - /** - * 设置:是否开启,0:不开启,1:开启 - */ - public void setIsOpen(Integer isOpen) { - this.isOpen = isOpen; - } - /** - * 获取:是否开启,0:不开启,1:开启 - */ - public Integer getIsOpen() { - return isOpen; - } - /** - * 设置:创建人id - */ - public void setCreateUserId(Long createUserId) { - this.createUserId = createUserId; - } - /** - * 获取:创建人id - */ - public Long getCreateUserId() { - return createUserId; - } - /** - * 设置:创建时间 - */ - public void setCreateTime(Date createTime) { - this.createTime = createTime; - } - /** - * 获取:创建时间 - */ - public Date getCreateTime() { - return createTime; - } - /** - * 设置:更新者用户id - */ - public void setUpdateUserId(Long updateUserId) { - this.updateUserId = updateUserId; - } - /** - * 获取:更新者用户id - */ - public Long getUpdateUserId() { - return updateUserId; - } - /** - * 设置:更新时间 - */ - public void setUpdateTime(Date updateTime) { - this.updateTime = updateTime; - } - /** - * 获取:更新时间 - */ - public Date getUpdateTime() { - return updateTime; - } + + private static final long serialVersionUID = 1L; + + + //主键 + private Integer id; + //链接名 + private String linkName; + //链接url + @URL + private String linkUrl; + //排序号 + private Integer sort; + //是否开启,0:不开启,1:开启 + private Integer isOpen; + //创建人id + //java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值) + //所以通过序列化成字符串来解决 + @JsonSerialize(using = LongToStringSerializer.class) + private Long createUserId; + //创建时间 + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + //更新者用户id + //java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值) + //所以通过序列化成字符串来解决 + @JsonSerialize(using = LongToStringSerializer.class) + private Long updateUserId; + //更新时间 + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + + /** + * 设置:主键 + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * 获取:主键 + */ + public Integer getId() { + return id; + } + + /** + * 设置:链接名 + */ + public void setLinkName(String linkName) { + this.linkName = linkName; + } + + /** + * 获取:链接名 + */ + public String getLinkName() { + return linkName; + } + + /** + * 设置:链接url + */ + public void setLinkUrl(String linkUrl) { + this.linkUrl = linkUrl; + } + + /** + * 获取:链接url + */ + public String getLinkUrl() { + return linkUrl; + } + + /** + * 设置:排序号 + */ + public void setSort(Integer sort) { + this.sort = sort; + } + + /** + * 获取:排序号 + */ + public Integer getSort() { + return sort; + } + + /** + * 设置:是否开启,0:不开启,1:开启 + */ + public void setIsOpen(Integer isOpen) { + this.isOpen = isOpen; + } + + /** + * 获取:是否开启,0:不开启,1:开启 + */ + public Integer getIsOpen() { + return isOpen; + } + + /** + * 设置:创建人id + */ + public void setCreateUserId(Long createUserId) { + this.createUserId = createUserId; + } + + /** + * 获取:创建人id + */ + public Long getCreateUserId() { + return createUserId; + } + + /** + * 设置:创建时间 + */ + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + /** + * 获取:创建时间 + */ + public Date getCreateTime() { + return createTime; + } + + /** + * 设置:更新者用户id + */ + public void setUpdateUserId(Long updateUserId) { + this.updateUserId = updateUserId; + } + + /** + * 获取:更新者用户id + */ + public Long getUpdateUserId() { + return updateUserId; + } + + /** + * 设置:更新时间 + */ + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + /** + * 获取:更新时间 + */ + public Date getUpdateTime() { + return updateTime; + } } diff --git a/novel-admin/src/main/resources/application.yml b/novel-admin/src/main/resources/application.yml index d4f6f896..7c2fd024 100644 --- a/novel-admin/src/main/resources/application.yml +++ b/novel-admin/src/main/resources/application.yml @@ -18,11 +18,12 @@ spring: profiles: active: dev - #上传文件的最大值(10M) + #上传文件的最大值(100M) servlet: multipart: - max-file-size: 10485760 - + max-file-size: 100MB + max-request-size: 100MB + devtools: restart: enabled: true diff --git a/novel-admin/src/main/resources/templates/novel/friendLink/add.html b/novel-admin/src/main/resources/templates/novel/friendLink/add.html index 66e3d11b..10096e12 100644 --- a/novel-admin/src/main/resources/templates/novel/friendLink/add.html +++ b/novel-admin/src/main/resources/templates/novel/friendLink/add.html @@ -23,7 +23,7 @@
+ type="url" required>
diff --git a/novel-admin/src/main/resources/templates/novel/friendLink/edit.html b/novel-admin/src/main/resources/templates/novel/friendLink/edit.html index cef908d9..f04ff493 100644 --- a/novel-admin/src/main/resources/templates/novel/friendLink/edit.html +++ b/novel-admin/src/main/resources/templates/novel/friendLink/edit.html @@ -26,7 +26,7 @@ + type="url" required>
diff --git a/novel-common/pom.xml b/novel-common/pom.xml index be0aaa95..0f7bde4b 100644 --- a/novel-common/pom.xml +++ b/novel-common/pom.xml @@ -5,7 +5,7 @@ novel com.java2nb - 4.3.0-RC1 + 4.3.0 4.0.0 diff --git a/novel-common/src/main/java/com/java2nb/novel/entity/User.java b/novel-common/src/main/java/com/java2nb/novel/entity/User.java index fd3805eb..a3a1d5a0 100644 --- a/novel-common/src/main/java/com/java2nb/novel/entity/User.java +++ b/novel-common/src/main/java/com/java2nb/novel/entity/User.java @@ -14,43 +14,48 @@ public class User { private Long id; - @NotBlank(groups = {AddGroup.class},message="手机号不能为空!") - @Pattern(groups = {AddGroup.class},regexp="^1[3|4|5|6|7|8|9][0-9]{9}$",message="手机号格式不正确!") + @NotBlank(groups = {AddGroup.class}, message = "手机号不能为空!") + @Pattern(groups = {AddGroup.class}, regexp = "^1[3|4|5|6|7|8|9][0-9]{9}$", message = "手机号格式不正确!") + @Null(groups = {UpdateGroup.class}) @Generated("org.mybatis.generator.api.MyBatisGenerator") private String username; - @NotBlank(groups = {AddGroup.class},message="密码不能为空!") + @NotBlank(groups = {AddGroup.class}, message = "密码不能为空!") @Null(groups = {UpdateGroup.class}) @Generated("org.mybatis.generator.api.MyBatisGenerator") private String password; @Null(groups = {AddGroup.class}) + @Pattern(groups = { + UpdateGroup.class}, regexp = "[\u4E00-\u9FA5A-Za-z0-9_]{1,11}", message = "昵称格式不正确!") @Generated("org.mybatis.generator.api.MyBatisGenerator") private String nickName; @Null(groups = {AddGroup.class}) + @Pattern(groups = { + UpdateGroup.class}, regexp = "^/localPic/\\d{4}/\\d{2}/\\d{2}/[A-Za-z0-9]+\\.(jpg|jpeg|swf|gif|png|JPG|JPEG|SWF|GIF|PNG)$", message = "只能上传图片格式的文件!") @Generated("org.mybatis.generator.api.MyBatisGenerator") private String userPhoto; @Null(groups = {AddGroup.class}) - @Min(value = 0,groups = {UpdateGroup.class}) - @Max(value = 1,groups = {UpdateGroup.class}) + @Min(value = 0, groups = {UpdateGroup.class}) + @Max(value = 1, groups = {UpdateGroup.class}) @Generated("org.mybatis.generator.api.MyBatisGenerator") private Byte userSex; - @Null(groups = {AddGroup.class,UpdateGroup.class}) + @Null(groups = {AddGroup.class, UpdateGroup.class}) @Generated("org.mybatis.generator.api.MyBatisGenerator") private Long accountBalance; - @Null(groups = {AddGroup.class,UpdateGroup.class}) + @Null(groups = {AddGroup.class, UpdateGroup.class}) @Generated("org.mybatis.generator.api.MyBatisGenerator") private Byte status; - @Null(groups = {AddGroup.class,UpdateGroup.class}) + @Null(groups = {AddGroup.class, UpdateGroup.class}) @Generated("org.mybatis.generator.api.MyBatisGenerator") private Date createTime; - @Null(groups = {AddGroup.class,UpdateGroup.class}) + @Null(groups = {AddGroup.class, UpdateGroup.class}) @Generated("org.mybatis.generator.api.MyBatisGenerator") private Date updateTime; diff --git a/novel-common/src/main/resources/application-common.yml b/novel-common/src/main/resources/application-common.yml index de4f9b5f..08d4b464 100644 --- a/novel-common/src/main/resources/application-common.yml +++ b/novel-common/src/main/resources/application-common.yml @@ -11,10 +11,11 @@ spring: generator: write-numbers-as-strings: true - #上传文件的最大值(1M) + #上传文件的最大值(100M) servlet: multipart: - max-file-size: 1048576 + max-file-size: 100MB + max-request-size: 100MB mybatis: configuration: diff --git a/novel-crawl/pom.xml b/novel-crawl/pom.xml index 2d774ca8..a3958f93 100644 --- a/novel-crawl/pom.xml +++ b/novel-crawl/pom.xml @@ -5,7 +5,7 @@ novel com.java2nb - 4.3.0-RC1 + 4.3.0 4.0.0 diff --git a/novel-crawl/src/main/resources/static/css/base.css b/novel-crawl/src/main/resources/static/css/base.css index 2a405a33..1246d574 100644 --- a/novel-crawl/src/main/resources/static/css/base.css +++ b/novel-crawl/src/main/resources/static/css/base.css @@ -331,7 +331,7 @@ input::-webkit-input-placeholder, textarea::-webkit-input-placeholder { } .logo { - width: 198px; + width: 160px; float: left; padding: 23px 130px 0 0; display: block diff --git a/novel-crawl/src/main/resources/templates/login.html b/novel-crawl/src/main/resources/templates/login.html index 5454e16a..decc2b00 100644 --- a/novel-crawl/src/main/resources/templates/login.html +++ b/novel-crawl/src/main/resources/templates/login.html @@ -6,9 +6,8 @@ 爬虫管理系统登录 - - + + @@ -210,6 +205,26 @@ 字体: + + + + + + + + + + + +

@@ -241,7 +256,7 @@
-

     +

@@ -300,8 +315,6 @@
此章为VIP章节,需要订阅后才能继续阅读
} }) - $("#content").css("min-height", ($(window).height() - 60) + "px"); - })(); @@ -352,7 +365,7 @@
此章为VIP章节,需要订阅后才能继续阅读
} else if (data.code == 1001) { //未登录 - location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); + location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href); } else { @@ -389,6 +402,79 @@
此章为VIP章节,需要订阅后才能继续阅读
} + console.log(speechSynthesis.getVoices()); + + $(window).on('beforeunload', function () { + if (speechSynthesis.speaking) { + speechSynthesis.cancel() + } + }); + + function speakChapter() { + console.log('speechSynthesis.paused', speechSynthesis.paused) + console.log('speechSynthesis.pending', speechSynthesis.pending) + console.log('speechSynthesis.speaking', speechSynthesis.speaking) + if (speechSynthesis.speaking && !speechSynthesis.paused) { + speechSynthesis.pause(); + return; + } + if (speechSynthesis.speaking && speechSynthesis.paused) { + speechSynthesis.resume(); + } + speak({ + 'text': $('#chaptercontent').text(), + 'speechRate': 0.5, + 'pitch': 1, + 'lang': 'zh-CN' + }, function () { + console.log('语音播放结束'); + }, function () { + console.log('语音开始播放'); + }); + + + } + + /** + * @description 文字转语音方法 + * @public + * @param { text, rate, lang, volume, pitch } object + * @param text 要合成的文字内容,字符串 + * @param speechRate 读取文字的语速 0.1~10 正常1 + * @param lang 读取文字时的语言 + * @param volume 读取时声音的音量 0~1 正常1 + * @param voice 读取文字的语音服务 + * @param pitch 读取时声音的音高 0~2 正常1 + * @returns SpeechSynthesisUtterance + */ + function speak({text, speechRate, lang, volume, pitch, voice}, endEvent, startEvent) { + if (!window.SpeechSynthesisUtterance) { + console.warn('当前浏览器不支持文字转语音服务') + return; + } + + if (!text) { + return; + } + + const speechUtterance = new SpeechSynthesisUtterance(); + speechUtterance.text = text; + speechUtterance.rate = speechRate || 1; + speechUtterance.lang = lang || 'zh-CN'; + speechUtterance.volume = volume || 1; + speechUtterance.pitch = pitch || 1; + speechUtterance.voice = voice || null; + speechUtterance.onend = function () { + endEvent && endEvent(); + }; + speechUtterance.onstart = function () { + startEvent && startEvent(); + }; + speechSynthesis.speak(speechUtterance); + + return speechUtterance; + } + diff --git a/novel-front/src/main/resources/templates/mobile/book/book_detail.html b/novel-front/src/main/resources/templates/mobile/book/book_detail.html index f45ad387..824d8636 100644 --- a/novel-front/src/main/resources/templates/mobile/book/book_detail.html +++ b/novel-front/src/main/resources/templates/mobile/book/book_detail.html @@ -274,7 +274,7 @@

} else if (data.code == 1001) { //未登录 - location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); + location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href); } else { layer.alert(data.msg); @@ -289,8 +289,6 @@

} - $("#content").css("min-height", ($(window).height() - 60) + "px"); - function downloadFile() { var fileUrl = '/book/download?bookId=' + $("#bookIdHidden").val() + '&bookName=' + $("#bookNamedHidden").val(); window.location.href = fileUrl; diff --git a/novel-front/src/main/resources/templates/mobile/book/book_index.html b/novel-front/src/main/resources/templates/mobile/book/book_index.html index 7f9de7b7..e9cd2c11 100644 --- a/novel-front/src/main/resources/templates/mobile/book/book_index.html +++ b/novel-front/src/main/resources/templates/mobile/book/book_index.html @@ -36,41 +36,43 @@

-
- -
- -
- - -
- -
- + +
+ +
+ + +
+ +
+ +
-
- -

-   ↓直达页面底部 -

+

+   ↓直达页面底部 +

-
-

- - -

+
+

+ + +

-
+
@@ -80,13 +82,14 @@
- + diff --git a/novel-front/src/main/resources/templates/mobile/index.html b/novel-front/src/main/resources/templates/mobile/index.html index 25e1aa88..0cc9db30 100644 --- a/novel-front/src/main/resources/templates/mobile/index.html +++ b/novel-front/src/main/resources/templates/mobile/index.html @@ -41,18 +41,16 @@ } .user_link { - position: relative; - display: inline-block; vertical-align: middle; - line-height: 50px; - padding: 0 5px; - color: #fff; + line-height: 40px; float: right; + color: #3eaf7c; + padding: 11px 12px 0; } .user_link a { - color: #fff; + color: #3eaf7c; } @@ -64,92 +62,39 @@ - - - - -
+
+
+
+ +
+ + +
-
+
-
+
@@ -263,7 +208,7 @@ if (data.code == 200) { var updateRankBooks = data.data; var updateRankBookHtml = ""; - for (var i = 0; i < 10; i++) { + for (var i = 0; i < updateRankBooks.length; i++) { var updateRankBook = updateRankBooks[i]; if (updateRankBook.bookDesc) { diff --git a/novel-front/src/main/resources/templates/mobile/pay/index.html b/novel-front/src/main/resources/templates/mobile/pay/index.html index 35e75bf7..befa955d 100644 --- a/novel-front/src/main/resources/templates/mobile/pay/index.html +++ b/novel-front/src/main/resources/templates/mobile/pay/index.html @@ -5,7 +5,7 @@ - + @@ -79,11 +79,6 @@ padding-bottom: 20px; } - #footer { - padding-top: 10px; - line-height: 43px; - } - @@ -170,7 +165,6 @@
选择充值金额
- \ No newline at end of file diff --git a/novel-front/src/main/resources/templates/mobile/user/read_history.html b/novel-front/src/main/resources/templates/mobile/user/read_history.html index 11a78db5..77365bfb 100644 --- a/novel-front/src/main/resources/templates/mobile/user/read_history.html +++ b/novel-front/src/main/resources/templates/mobile/user/read_history.html @@ -62,10 +62,6 @@ height: 180px; } - #footer { - padding-top: 10px; - line-height: 43px; - } @@ -113,7 +109,6 @@
- \ No newline at end of file diff --git a/novel-front/src/main/resources/templates/mobile/user/userinfo.html b/novel-front/src/main/resources/templates/mobile/user/userinfo.html index d471af57..38e97168 100644 --- a/novel-front/src/main/resources/templates/mobile/user/userinfo.html +++ b/novel-front/src/main/resources/templates/mobile/user/userinfo.html @@ -213,7 +213,6 @@ diff --git a/novel-front/src/main/resources/templates/user/comment.html b/novel-front/src/main/resources/templates/user/comment.html index 1c080cd3..449e5f5d 100644 --- a/novel-front/src/main/resources/templates/user/comment.html +++ b/novel-front/src/main/resources/templates/user/comment.html @@ -1,4 +1,5 @@ - + @@ -54,24 +55,24 @@

我的书评

$.ajax({ type: "get", url: "/user/listCommentByPage", - data: {'curr':curr,'limit':limit}, + data: {'curr': curr, 'limit': limit}, dataType: "json", success: function (data) { if (data.code == 200) { var commentList = data.data.list; if (commentList.length > 0) { - $("#bookCommentTotal").html("("+data.data.total+"条)"); + $("#bookCommentTotal").html("(" + data.data.total + "条)"); var commentListHtml = ""; for (var i = 0; i < commentList.length; i++) { var comment = commentList[i]; commentListHtml += ("
" + "
" + - "\"\"" + + "\"\"" + "见习
" + - "
    \t\t\t
  • "+(comment.createUserName.substr(0, 4) + "****" + comment.createUserName.substr(comment.createUserName.length - 3, 3))+"
  • " + - comment.commentContent+ + "
      \t\t\t
    • " + (comment.createUserName.substr(0, 4) + "****" + comment.createUserName.substr(comment.createUserName.length - 3, 3)) + "
    • " + + comment.commentContent + "
    • " + - ""+comment.createTime+"" + + "" + comment.createTime + "" + "(0)" + "
    • \t\t
    \t
"); } @@ -109,9 +110,9 @@

我的书评

} else if (data.code == 1001) { //未登录 - location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); + location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href); - }else { + } else { layer.alert(data.msg); } diff --git a/novel-front/src/main/resources/templates/user/favorites.html b/novel-front/src/main/resources/templates/user/favorites.html index 2f82588b..985bec02 100644 --- a/novel-front/src/main/resources/templates/user/favorites.html +++ b/novel-front/src/main/resources/templates/user/favorites.html @@ -1,11 +1,13 @@ - + - - - + + + @@ -29,7 +31,9 @@
@@ -56,7 +60,6 @@

我的书架

-
@@ -82,31 +85,31 @@

我的书架

0) { var bookShelfListHtml = ""; - for(var i=0;i\n" + + bookShelfListHtml += (" \n" + " \n" + - " ["+book.catName+"]\n" + + " [" + book.catName + "]\n" + " \n" + " \n" + - " \n" + - " "+book.bookName+"\n" + + " \n" + + " " + book.bookName + "\n" + " \n" + " \n" + - ""+book.lastIndexName+""+ + "" + book.lastIndexName + "" + " \n" + " \n" + - " "+book.lastIndexUpdateTime+"\n" + + " " + book.lastIndexUpdateTime + "\n" + " \n" + " \n" + - "继续阅读"+ + "继续阅读" + " \n" + " "); } @@ -144,9 +147,9 @@

我的书架

} else if (data.code == 1001) { //未登录 - location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); + location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href); } else { layer.alert(data.msg); diff --git a/novel-front/src/main/resources/templates/user/feedback_list.html b/novel-front/src/main/resources/templates/user/feedback_list.html index d61710db..193564d4 100644 --- a/novel-front/src/main/resources/templates/user/feedback_list.html +++ b/novel-front/src/main/resources/templates/user/feedback_list.html @@ -1,6 +1,5 @@ - - - + @@ -34,8 +33,6 @@

我的反馈

- -
@@ -61,7 +58,7 @@

我的反馈

$.ajax({ type: "get", url: "/user/listUserFeedBackByPage", - data: {'curr':curr,'limit':limit}, + data: {'curr': curr, 'limit': limit}, dataType: "json", success: function (data) { if (data.code == 200) { @@ -71,8 +68,8 @@

我的反馈

for (var i = 0; i < feedbackList.length; i++) { var feedback = feedbackList[i]; feedbackListHtml += ("
    \n" + - "
  • "+feedback.createTime+"
  • \n" + - "
  • "+feedback.content+"
  • \n" + + "
  • " + feedback.createTime + "
  • \n" + + "
  • " + feedback.content + "
  • \n" + "
"); } $("#feedbackList").html(feedbackListHtml); @@ -109,9 +106,9 @@

我的反馈

} else if (data.code == 1001) { //未登录 - location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); + location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href); - }else { + } else { layer.alert(data.msg); } diff --git a/novel-front/src/main/resources/templates/user/read_history.html b/novel-front/src/main/resources/templates/user/read_history.html index ba91b3ef..a0b063af 100644 --- a/novel-front/src/main/resources/templates/user/read_history.html +++ b/novel-front/src/main/resources/templates/user/read_history.html @@ -1,4 +1,5 @@ - + @@ -13,7 +14,9 @@
@@ -69,31 +72,31 @@

最近阅读 0) { var bookHistoryListHtml = ""; - for(var i=0;i\n" + + bookHistoryListHtml += ("

\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " "); } @@ -131,9 +134,9 @@

最近阅读
  • 我的昵称
  •  用户名只能包括汉字、英文字母、数字和下划线
  •   + @@ -24,13 +25,18 @@
    -
      -
    • 我的密码
    • -
    •  
    • -
    •  
    • -
    •  
    • -
    •  
    • -
    +
      +
    • 我的密码
    • +
    •  
    • +
    •  
    • +
    •  
    • +
    •  
    • +
    @@ -57,14 +63,14 @@ $("#LabErr").html("确认密码不能为空!"); return; } - if(newPassword1 !== newPassword2){ + if (newPassword1 !== newPassword2) { $("#LabErr").html("两次输入的新密码不匹配!"); return; } $.ajax({ type: "POST", url: "/user/updatePassword", - data: {'oldPassword':oldPassword,'newPassword1':newPassword1,'newPassword2':newPassword2}, + data: {'oldPassword': oldPassword, 'newPassword1': newPassword1, 'newPassword2': newPassword2}, dataType: "json", success: function (data) { if (data.code == 200) { @@ -72,7 +78,7 @@ } else if (data.code == 1001) { //未登录 - location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); + location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href); } else { $("#LabErr").html(data.msg); diff --git a/novel-front/src/main/resources/templates/user/set_sex.html b/novel-front/src/main/resources/templates/user/set_sex.html index bc90bb7e..9023ed8e 100644 --- a/novel-front/src/main/resources/templates/user/set_sex.html +++ b/novel-front/src/main/resources/templates/user/set_sex.html @@ -1,4 +1,5 @@ - + @@ -24,14 +25,16 @@
    -
      -
    • 我的性别 - - -
    • -
    •  
    • -
    •  
    • -
    +
      +
    • 我的性别 + + +
    • +
    •   +
    • +
    •  
    • +
    @@ -50,15 +53,14 @@ dataType: "json", success: function (data) { if (data.code == 200) { - if(data.data.userSex === '0'){ - $("input[name=sex]").eq(0).attr("checked",true); + if (data.data.userSex === '0') { + $("input[name=sex]").eq(0).attr("checked", true); } - } else if (data.code == 1001) { //未登录 - location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); + location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href); } else { layer.alert(data.msg); @@ -69,11 +71,12 @@ layer.alert('网络异常'); } }) + function updateSex() { $.ajax({ type: "POST", url: "/user/updateUserInfo", - data: {'userSex':$("input[name=sex]:checked").val()}, + data: {'userSex': $("input[name=sex]:checked").val()}, dataType: "json", success: function (data) { if (data.code == 200) { @@ -81,7 +84,7 @@ } else if (data.code == 1001) { //未登录 - location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); + location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href); } else { layer.alert(data.msg); diff --git a/novel-front/src/main/resources/templates/user/setup.html b/novel-front/src/main/resources/templates/user/setup.html index 0a94c66e..3077b338 100644 --- a/novel-front/src/main/resources/templates/user/setup.html +++ b/novel-front/src/main/resources/templates/user/setup.html @@ -1,4 +1,5 @@ - + @@ -25,10 +26,12 @@
      -
    • 我的头像 - - - +
    • 我的头像 + + + @@ -59,27 +62,26 @@ dataType: "json", success: function (data) { if (data.code == 200) { - if(data.data.userPhoto){ - $("#imgLogo").attr("src",data.data.userPhoto); + if (data.data.userPhoto) { + $("#imgLogo").attr("src", data.data.userPhoto); } - if(data.data.nickName){ - $("#my_name").html(data.data.nickName+"[修改]"); - }else{ - $("#my_name").html(data.data.username+"[修改]"); + if (data.data.nickName) { + $("#my_name").html(data.data.nickName + "[修改]"); + } else { + $("#my_name").html(data.data.username + "[修改]"); } - if(data.data.userSex === '0'){ + if (data.data.userSex === '0') { $("#my_sex").html("男[修改]"); - }else if(data.data.userSex === '1'){ + } else if (data.data.userSex === '1') { $("#my_sex").html("女[修改]"); - }else{ + } else { $("#my_sex").html("请选择"); } - } else if (data.code == 1001) { //未登录 - location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); + location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href); } else { layer.alert(data.msg); @@ -96,7 +98,7 @@ var file = $("#file0").val(); //文件名称 if (file != "") { - if(checkPicUpload($("#file0")[0])) { + if (checkPicUpload($("#file0")[0])) { $.ajaxFileUpload({ url: "/file/picUpload", //用于文件上传的服务器端请求地址 @@ -118,7 +120,7 @@ } else if (data.code == 1001) { //未登录 - location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); + location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href); } else { layer.alert(data.msg); @@ -143,7 +145,6 @@ } - } diff --git a/novel-front/src/main/resources/templates/user/userinfo.html b/novel-front/src/main/resources/templates/user/userinfo.html index e0c14965..033343ba 100644 --- a/novel-front/src/main/resources/templates/user/userinfo.html +++ b/novel-front/src/main/resources/templates/user/userinfo.html @@ -1,6 +1,5 @@ - - - + @@ -25,12 +24,14 @@
    - +

    -

    +

    @@ -87,12 +88,12 @@

    dataType: "json", success: function (data) { if (data.code == 200) { - if(data.data.userPhoto){ - $("#imgLogo").attr("src",data.data.userPhoto); + if (data.data.userPhoto) { + $("#imgLogo").attr("src", data.data.userPhoto); } - if(data.data.nickName){ + if (data.data.nickName) { $("#my_name").html(data.data.nickName); - }else{ + } else { $("#my_name").html(data.data.username); } @@ -100,7 +101,7 @@

    } else if (data.code == 1001) { //未登录 - location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); + location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href); } else { layer.alert(data.msg); @@ -115,7 +116,7 @@

    $.ajax({ type: "get", url: "/user/listBookShelfByPage", - data: {'limit':2}, + data: {'limit': 2}, dataType: "json", success: function (data) { if (data.code == 200) { @@ -126,7 +127,7 @@

    var book = bookShelfList[i]; bookShelfListHtml += ("

\n" + " \n" + " -
\n" + - " ["+book.catName+"]\n" + + " [" + book.catName + "]\n" + " \n" + - " \n" + - " "+book.bookName+"\n" + + " \n" + + " " + book.bookName + "\n" + " \n" + - ""+book.lastIndexName+""+ + "" + book.lastIndexName + "" + " \n" + - " "+book.lastIndexUpdateTime+"\n" + + " " + book.lastIndexUpdateTime + "\n" + " \n" + - "继续阅读"+ + "继续阅读" + "
\n" + - " [" + book.catName + "]\n" + + " [" + book.catName + "]\n" + " \n" + " \n" + diff --git a/pom.xml b/pom.xml index 4fd4126a..3aacc459 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.java2nb novel - 4.3.0-RC1 + 4.3.0 novel-common novel-front diff --git a/templates/green/html/author/author_income.html b/templates/green/html/author/author_income.html index 3e9cc3a8..8f4f25fa 100644 --- a/templates/green/html/author/author_income.html +++ b/templates/green/html/author/author_income.html @@ -1,5 +1,5 @@ - - + @@ -7,14 +7,15 @@ 作家管理系统-小说精品屋 - +
@@ -120,24 +122,24 @@

订阅明细 $.ajax({ type: "get", url: "/author/listIncomeMonthByPage", - data: {'curr':curr,'limit':limit}, + data: {'curr': curr, 'limit': limit}, dataType: "json", success: function (data) { if (data.code == 200) { var bookList = data.data.list; if (bookList.length > 0) { var bookListHtml = ""; - for(var i=0;i\n" + + bookListHtml += (" \n" + " \n" + - " "+book.incomeMonth+"\n" + + " " + book.incomeMonth + "\n" + " " - +book.preTaxIncome/100+"\n" + + + book.preTaxIncome / 100 + "\n" + " \n" + - " "+book.afterTaxIncome/100+"\n" + + " " + book.afterTaxIncome / 100 + "\n" + " \n" + - " "+(book.payStatus == 1 ? '已支付' : '待支付')+ + " " + (book.payStatus == 1 ? '已支付' : '待支付') + " \n" + " "); @@ -176,9 +178,9 @@

订阅明细 } else if (data.code == 1001) { //未登录 - location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); + location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href); - }else { + } else { layer.alert(data.msg); } @@ -191,12 +193,12 @@

订阅明细 } - function updateBookStatus(bookId,status) { + function updateBookStatus(bookId, status) { $.ajax({ type: "POST", url: "/author/updateBookStatus", - data: {'bookId':bookId,'status':status==0?1:0}, + data: {'bookId': bookId, 'status': status == 0 ? 1 : 0}, dataType: "json", success: function (data) { if (data.code == 200) { @@ -206,9 +208,9 @@

订阅明细 } else if (data.code == 1001) { //未登录 - location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); + location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href); - }else { + } else { layer.alert(data.msg); } @@ -219,9 +221,6 @@

订阅明细 }) - - - } diff --git a/templates/green/html/author/author_income_detail.html b/templates/green/html/author/author_income_detail.html index 9232f028..c33c497c 100644 --- a/templates/green/html/author/author_income_detail.html +++ b/templates/green/html/author/author_income_detail.html @@ -1,5 +1,5 @@ - - + @@ -7,14 +7,15 @@ 作家管理系统-小说精品屋 - +