Compare commits

...

340 Commits

Author SHA1 Message Date
031398b625 Merge remote-tracking branch 'Gitee/4.3.x' into 4.3.x 2024-05-31 21:08:18 +08:00
976db9420e build: 修改版本号 2024-05-31 20:59:34 +08:00
e33db86081 Update README.md 2024-05-28 12:34:00 +08:00
xxy
a4861996b5 Merge pull request #131 from 201206030/develop_xxy
merge
2024-05-28 09:55:50 +08:00
48a70c2aca build: 修改版本号 2024-05-28 09:45:23 +08:00
ea5c0e8bd1 模版更新 2024-05-28 09:42:27 +08:00
b0c249cdca fix: 默认logo图片失效 2024-05-26 22:50:57 +08:00
730fcb4c76 fix: 默认logo图片失效 2024-05-26 22:46:46 +08:00
b976a00389 perf: UI优化 2024-05-26 22:31:26 +08:00
6d9b563583 fix: 文件上传大小限制 2024-05-25 22:05:03 +08:00
bfb7d6cc5c fix: i笔趣阁域名更换 2024-05-12 17:26:59 +08:00
9d4dc409c6 fix: URI编码 2024-03-03 11:10:46 +08:00
34d211afbf fix: 只推荐有内容的小说 2024-02-21 19:27:48 +08:00
2d218076c4 chore: 修改打包默认模版 2024-02-18 10:28:29 +08:00
674e4df84c chore: 模版更新 2024-02-07 14:59:31 +08:00
331f56d112 fix: 移动端首页在数据量小于10时报错 2024-02-07 14:58:36 +08:00
f494aae2c7 chore: 模版更新 2024-02-07 14:23:32 +08:00
2fc533f8ae fix(novel-crawl): 登录页样式问题 2024-02-05 21:12:41 +08:00
82758271e3 feat: 增加语音播放小说内容 2024-02-05 12:05:26 +08:00
4c82c2d720 perf: 优化支付宝支付流程 2024-02-04 12:25:26 +08:00
4665b5c4b9 fix: bug 2024-02-03 16:14:36 +08:00
7bbabb3492 fix: 修复充值页面的未登录跳转路径 2024-02-03 14:03:23 +08:00
d6093d8182 fix(novel-admin): 友情链接URL格式校验 2023-12-29 18:54:53 +08:00
f77792aa3c perf: 限制昵称长度并优化显示 2023-12-29 00:34:04 +08:00
c62da9bb3a fix: nickName、userPhoto 更新校验 2023-12-29 00:11:01 +08:00
8a63cff0b5 Update README.md 2023-10-31 08:24:54 +08:00
07bed12fa5 fix(mobile): 充值页标题 2023-10-30 14:17:03 +08:00
0d6e0ffb06 perf(mobile): 内容页优化
去掉小说内容前面的多余空格
2023-10-30 14:07:31 +08:00
e7005004bb perf(mobile): 登录/注册页优化 2023-10-30 14:01:39 +08:00
ff68cdd829 perf(mobile): 首页优化 2023-10-30 14:01:24 +08:00
b61dc4d0d5 build(Docker): 管理 Dockerfile 文件 2023-10-22 19:20:52 +08:00
98f1f804c3 chore(sql): 自动创建 novel_plus 数据库 2023-10-22 19:07:32 +08:00
5978d6cbcc build: 修改版本号 2023-10-21 21:21:54 +08:00
ef290bed9c fix: 书架列表时间格式化 2023-10-21 21:02:00 +08:00
5543e5aa57 perf: 设置网站 ico 图标 2023-10-15 20:30:11 +08:00
0332802fe5 feat(crawl): 账号退出 2023-10-15 19:13:07 +08:00
a55f456b3d perf: 更新爬虫管理系统主题颜色 2023-10-15 17:54:44 +08:00
f6d66e69fb Update README.md 2023-10-14 18:19:00 +08:00
96960789e1 fix(alipay): 修改默认支付宝支付成功跳转地址 2023-10-14 17:50:14 +08:00
1998dcd460 fix(alipay): 修复支付宝支付页面报错
沙箱环境自动升级到新版后,没有在代码中更换新版本的应用/网关/账号信息,也没有从左边栏沙箱工具中下载最新版本的沙箱支付宝APP安装使用。
2023-10-14 17:42:42 +08:00
a33d8f68a2 删除垃圾文件 2023-10-14 13:42:37 +08:00
30959da038 删除垃圾文件 2023-10-14 13:39:11 +08:00
5406783344 删除垃圾文件 2023-10-14 12:54:33 +08:00
d84345918b Update README.md 2023-10-14 10:32:46 +08:00
a5394cb426 Update README.md 2023-10-14 10:20:16 +08:00
2275b85752 chore: 模版更新 2023-10-14 10:16:41 +08:00
2062123edd perf(mobile): 去除手机网站底部空白间隙 2023-10-14 10:06:16 +08:00
255b3f8c4b feat(templates): 新增绿色主题模版,并设置为默认模版
和文档站点 docs.xxyopen.com 风格保持一致
2023-10-13 21:21:21 +08:00
00179359bd chore: 更新 Dockerfile 文件 2023-10-12 16:33:57 +08:00
6019ce11c7 build: 修改版本号 2023-10-12 10:02:50 +08:00
3e1c1f02e9 chore: 模版更新 2023-10-12 09:59:08 +08:00
98a5157623 feat: 支付宝手机网站支付 2023-10-12 09:49:03 +08:00
05d65c19a7 perf: 手机端页面优化 2023-10-12 09:42:28 +08:00
4c9f39ab19 feat: 手机端阅读历史页面适配 2023-10-12 09:28:29 +08:00
8bc05a1606 Merge remote-tracking branch 'Gitee/4.1.x' into develop_xxy 2023-10-12 09:03:32 +08:00
f9aad61b10 chore: 模版更新 2023-10-10 19:31:26 +08:00
8311681b23 perf(mobile): 加入书架按钮样式优化 2023-10-10 19:29:26 +08:00
4497dd1974 chore: 模版更新 2023-09-29 19:25:06 +08:00
44bf0cd693 fix: 修复作家专区小说封面更新问题 2023-09-29 19:23:12 +08:00
f333a2c084 perf: 优化小说推荐管理 2023-09-29 19:18:42 +08:00
bff5b0827e perf: 爬虫配置自定义登录页面 2023-06-09 19:25:42 +08:00
14f9205d76 docs: 修正小说内容保存配置的注释 2023-06-05 13:17:43 +08:00
cb2ff39b1e build: 移除 Elasticsearch 依赖 2023-05-28 21:51:07 +08:00
3eaa526093 fix: 修复CVE漏洞 2023-05-28 21:44:44 +08:00
04d7b45334 feat: 移除 FastDFS 模块 2023-05-28 19:14:21 +08:00
24c80e381c fix: 修改依赖组件漏洞 2023-05-28 18:43:05 +08:00
9fe51eab74 fix: 页面请求异常处理 2023-05-17 23:43:27 +08:00
e1c800d78f feat: 手机端用户中心优化 2023-05-14 07:05:36 +08:00
eb982b51f7 feat: 手机端充值页面适配 2023-05-14 06:58:42 +08:00
18f5fbf508 feat: 手机端我的书架页面适配 2023-05-13 23:40:54 +08:00
c63b4d617e feat: 手机端用户中心页面适配 2023-05-13 23:02:53 +08:00
4fb0d478f3 feat: 手机端注册页面适配 2023-05-13 19:57:19 +08:00
dabfb9d1e8 feat: 手机端登录页面适配 2023-05-13 15:15:42 +08:00
dce8a21c0d feat: 首页是否登录识别 2023-05-13 13:11:10 +08:00
d9ad02e3f5 fix(sql): 网站信息修改提示未授权
超级管理员增加网站信息修改权限
2023-05-08 15:52:02 +08:00
b02a2b3b2c build: 4.1.0 发布 2023-04-18 12:00:50 +08:00
f28c8a9c16 revert: 恢复误删文件
作家专区稿费收入报错
2023-04-18 11:34:26 +08:00
e44978617f feat: 后台会员反馈管理 2023-04-18 11:23:45 +08:00
aa2929a3cd feat: 后台小说推荐管理 2023-04-18 10:58:33 +08:00
281561c85b fix: 会员注册验证码 2023-04-18 09:17:30 +08:00
cab350dbb2 fix: 刷新首页新闻缓存 2023-04-18 08:58:30 +08:00
9ed465784a fix: 网站信息管理的权限问题 2023-04-17 10:55:20 +08:00
e2cfa5a788 Update README.md 2023-04-16 08:32:19 +08:00
6fb1e5cc99 chore: 模版更新 2023-04-15 08:37:17 +08:00
749fd1aeaa docs: 项目演示 2023-04-15 08:08:57 +08:00
8c3fb7f1ca build: 4.0.0 发布 2023-04-15 06:50:55 +08:00
c71eadef82 perf: 后台订单管理 2023-04-14 23:22:23 +08:00
3ffa75dc10 perf: 后台评论管理 2023-04-14 23:16:55 +08:00
8ddc6cc434 feat: 后台评论管理 2023-04-14 22:34:36 +08:00
5854536c70 fix: 代码生成数据表查询 2023-04-14 22:06:39 +08:00
a7d825cc54 fix: 后台模块查询过滤相同的行 2023-04-14 21:33:31 +08:00
687eb61846 feat: 后台小说删除 2023-04-14 21:09:37 +08:00
9f23f817b1 feat: 后台小说管理 2023-04-14 18:07:05 +08:00
0c59adf23b feat: 后台订单管理 2023-04-14 17:29:41 +08:00
57eca58b24 feat: 后台会员管理 2023-04-14 16:58:04 +08:00
c76df15a7f feat: 后台友情链接管理 2023-04-14 16:32:05 +08:00
3b0edd8e1f fix: sql 2023-04-14 14:58:38 +08:00
2c3b735d49 feat: 后台网站信息管理 2023-04-14 14:56:11 +08:00
b45b83fdb0 Update README.md 2023-04-14 10:51:42 +08:00
29d074ec18 refactor: 移除 Ehcache,默认缓存设置为 Redis 2023-04-14 10:40:54 +08:00
282bc7b707 refactor: 移除 RabbitMQ 和 Elasticsearch 相关功能 2023-04-14 10:10:09 +08:00
68b3458c30 Add favicon.ico 2023-01-11 19:19:05 +08:00
2f5002f673 Update README.md 2022-08-29 08:12:32 +08:00
d293d7bf91 Merge branch 'develop_xxy' of https://gitee.com/novel_dev_team/novel-plus into develop_xxy 2022-07-31 08:12:41 +08:00
a9080310a4 update template & sql 2022-07-31 08:04:43 +08:00
xxy
1f571f9b64 Update README.md 2022-07-26 17:22:25 +08:00
xxy
7be529fe4a Update README.md 2022-07-26 17:11:15 +08:00
xxy
2f62641b63 Update README.md 2022-07-24 14:53:27 +08:00
xxy
d962620814 Update README.md 2022-07-24 14:51:09 +08:00
xxy
7640d153ac Update README.md 2022-07-21 21:28:26 +08:00
xxy
3d9f52ffee Update README.md 2022-07-20 06:28:17 +08:00
xxy
0112af202b Update README.md 2022-07-20 06:24:29 +08:00
xxy
e3010ea81e Update README.md 2022-07-20 06:21:54 +08:00
xxy
05608d0316 Update README.md 2022-07-20 06:18:52 +08:00
xxy
4f6ec5aa0f Update README.md 2022-07-20 06:17:48 +08:00
xxy
01984f7137 Update README.md 2022-07-18 18:20:06 +08:00
xxy
617f6f50b0 Update README.md 2022-07-18 13:14:27 +08:00
xxy
e0686f079c Update README.md 2022-07-16 07:08:50 +08:00
xxy
5fb1717770 Update README.md 2022-07-15 22:49:11 +08:00
xxy
4bf495b6c0 Update README.md 2022-07-15 22:47:40 +08:00
028c200764 fix: 新笔趣阁规则移动到全量sql文件 2022-07-15 22:36:48 +08:00
xxy
472440ef7c Update README.md 2022-07-15 19:26:12 +08:00
xxy
5278b5fc39 Update README.md 2022-07-15 19:24:04 +08:00
xxy
9a0a79957b Update README.md 2022-07-15 19:19:49 +08:00
xxy
d93bf3dd4e Update README.md 2022-07-15 19:15:42 +08:00
xxy
09a4f39172 Update README.md 2022-07-15 19:15:11 +08:00
xxy
3abe7e22c9 Update README.md 2022-07-15 19:14:05 +08:00
xxy
5e1135268a Update README.md 2022-07-15 19:12:58 +08:00
xxy
54aeef7c80 Update README.md 2022-07-15 07:18:04 +08:00
xxy
027fbffb7f Update README.md 2022-07-15 06:20:04 +08:00
xxy
5d70e44021 Update README.md 2022-07-15 00:49:35 +08:00
607deaa82f build: v3.6.2 发布 2022-07-15 00:44:10 +08:00
b997367f1a Merge github.com:201206030/novel-plus into develop_xxy 2022-07-15 00:32:30 +08:00
3d3cbc22b6 feat: 增加 HTTP 代理配置,助力爬虫采集 2022-07-14 23:41:47 +08:00
ba272bd89a feat: 增加 HTTP 代理配置,助力爬虫采集 2022-07-14 22:14:11 +08:00
xxy
7d1b024c4d Update README.md 2022-07-14 17:48:10 +08:00
xxy
e732c0fdee Update README.md 2022-07-14 17:47:29 +08:00
xxy
78de1de846 Update README.md 2022-07-14 17:45:36 +08:00
0b728b9fe5 docs: 修改 sql 文件说明 2022-07-14 14:19:05 +08:00
ec3428c358 docs: 增加 sql 说明 2022-07-14 14:09:43 +08:00
xxy
3c322a9d0e Update README.md 2022-07-14 13:44:54 +08:00
xxy
cdceb3818d Update README.md 2022-07-14 13:40:23 +08:00
6fc2df9b5a docs: 更新源码安装教程 2022-07-14 11:34:25 +08:00
c45b81fbbf build: 优化打包 2022-07-14 09:49:36 +08:00
40a999f353 perf: 模版更新 2022-07-14 09:48:22 +08:00
547bf00f46 docs: update README.md 2022-05-22 21:43:47 +08:00
xxy
d6849bc5a2 update README.md. 2022-05-17 23:00:29 +00:00
xxy
dc654086f3 update README.md. 2022-05-17 03:22:26 +00:00
xxy
303cc2051f update README.md 2022-05-17 03:19:22 +00:00
fe90345f0b fix: 首页小说推荐数据渲染
顶部推荐栏重复渲染同一本小说
2022-05-01 10:29:09 +08:00
7ac4b62840 update 2022-04-27 19:48:47 +08:00
029cce959b update 2022-04-27 19:41:23 +08:00
7395cf63e5 add: 启动日志 2022-04-26 09:15:24 +08:00
906e7762c9 Merge github.com:201206030/novel-plus into develop_xxy 2022-01-17 21:03:39 +08:00
465e03a17b perf: 缓存预编译的Pattern对象 2022-01-17 20:58:57 +08:00
2a69a28a0c perf: 预加载IdWorker 2022-01-08 11:59:28 +08:00
c1eb7b8954 docs: 增加说明 2022-01-07 18:02:46 +08:00
16e381f384 chore(sh): 修改JVM启动参数
兼容低配置机器
2022-01-07 17:24:20 +08:00
094ac95428 build(pom): 打包时复制common模块配置文件到外部 2021-12-28 14:40:16 +08:00
96662fcb17 feat(crawl): 新增编辑规则和测试规则
合并mstaer分支的pull request #71
2021-12-24 17:38:23 +08:00
fecf03b3f5 fix: 升级mybatis版本,增加Optional支持 2021-12-24 11:35:59 +08:00
e7f702ece0 docs: 微信群说明 2021-12-23 10:27:05 +08:00
b2c67c4f15 build: 修改打包配置 2021-12-17 19:53:21 +08:00
6a385877ac Merge pull request #69 from a100488/feature/saw_fenbao
feat(打包改为分包): 打包改为分包
2021-12-17 16:45:13 +08:00
7cde6ebf61 feat(打包改为分包): 打包改为分包 2021-12-17 16:33:45 +08:00
78969f9fd1 fix: 修复单本小说采集即使没有采集到内容仍然标记状态为采集成功的问题 2021-12-17 10:20:59 +08:00
b2eb6686e9 build: 更新xxyopen依赖版本 2021-12-12 20:44:09 +08:00
c537f6fb20 docs: maven仓库配置说明 2021-12-11 20:56:11 +08:00
16e4c98a45 refactor: 引入xxy-common相关依赖 2021-12-11 18:30:22 +08:00
776083076c update 2021-11-11 14:28:05 +08:00
2bf945fe0e 样式调整 2021-11-08 19:55:03 +08:00
ede7aca66d 作家作品列表分页修复 2021-09-27 22:35:48 +08:00
396452b46e 3.6.1发布 2021-09-13 22:24:08 +08:00
fc2ea40c6a 实现小说内容多种存储方式(txt、db..)并存 2021-09-13 22:21:50 +08:00
bfe4d938fd 去除重复依赖 2021-09-11 22:07:14 +08:00
7f4728191a 修改配置项命名 2021-09-04 16:27:02 +08:00
80b393fdda v3.6.0发布 2021-08-17 21:14:15 +08:00
e7897c988a 更新文档 2021-08-17 20:00:53 +08:00
750c8dee02 增加小说内容TXT文本存储方案(一行配置切换) 2021-08-17 19:55:24 +08:00
cbfd0b049f 爬虫部分代码重构,准备适配TXT文本存储方案 2021-08-17 11:08:51 +08:00
7f0331e095 解决爬虫运行时的UnrecognizedPropertyException 2021-08-16 15:58:32 +08:00
3520200a87 部分代码重构 2021-08-16 15:42:56 +08:00
4939bcf418 模版更新 2021-08-09 19:46:32 +08:00
1cffbae495 增加新闻阅读数 2021-07-26 19:06:57 +08:00
b99b6ae4f2 新闻详情时间显示 2021-07-24 17:52:25 +08:00
2e2a58c84b Merge pull request #41 from 201206030/dependabot/maven/novel-admin/org.apache.shiro-shiro-spring-1.7.0
Bump shiro-spring from 1.3.2 to 1.7.0 in /novel-admin
2021-07-24 16:54:19 +08:00
4fe36a8f4f 部分爬虫代码优化 2021-07-24 15:51:54 +08:00
b5df86d5c7 perf(index.html): orange模版更新 2021-07-03 12:00:17 +08:00
9b3ba1d8c1 perf(index): 首页优化 2021-07-03 11:51:47 +08:00
c4db754d23 docs(readme): 更新官网地址 2021-06-10 09:42:07 +08:00
8d3ce53dba build(pom): v3.5.4发布 2021-06-01 23:14:35 +08:00
d32d9d8410 perf(html): 模版更新 2021-06-01 23:13:18 +08:00
05ae012e05 fix(yml): Public Key Retrieval is not allowed 2021-06-01 23:03:15 +08:00
b60a0c9b40 perf(监控): 设置druid监控信息登陆后查看 2021-06-01 22:49:23 +08:00
3efaf8ce5f perf(评论): 优化评论显示 2021-06-01 22:01:05 +08:00
ebc4210774 fix(章节更新): xss 2021-06-01 21:44:18 +08:00
655ec90906 fix(data submit): Xss攻击 2021-06-01 20:58:06 +08:00
f28dd867ef v3.5.3发布 2021-05-28 20:32:08 +08:00
8e6842a495 模版更新 2021-05-28 20:08:45 +08:00
928cb2417f 小说详情页优化 2021-05-28 20:04:52 +08:00
625694ba1e Merge branch 'release_3.5.3' into develop_xxy 2021-05-28 11:54:24 +08:00
d6c0337c09 首页SEO优化 2021-05-28 11:51:11 +08:00
689efc0807 style(novel-common/bean): ResultBean更新
代码格式化,去除多余分号
2021-05-16 10:54:25 +08:00
4540c3781e 模版更新 2021-05-16 09:49:35 +08:00
9d2c453bb0 图片上传流程优化 2021-05-16 09:47:23 +08:00
xxy
9de47ce697 update README.md. 2021-04-25 07:39:56 +08:00
c79974ff77 3.5.2发布 2021-04-24 10:46:59 +08:00
fb0098aef8 作家后台新增作品封片图片修改功能 2021-04-24 10:38:55 +08:00
e83494cb17 Bump shiro-spring from 1.3.2 to 1.7.0 in /novel-admin
Bumps shiro-spring from 1.3.2 to 1.7.0.

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-22 17:07:42 +00:00
419d7a971b 优化首页显示(修改周推小说数量) 2021-02-11 18:03:27 +08:00
83eda2a44d 模版更新 2021-02-11 12:25:04 +08:00
3182029bdd 文件压缩 2021-02-11 10:26:48 +08:00
19d4a9960d 使用图片懒加载优化首页加载速度 2021-02-11 09:36:03 +08:00
2603150b33 作家专区的跳转方式改为新标签页跳转 2021-02-11 08:31:27 +08:00
f5e440390b 修改404页面自动跳转首页的时间 2021-02-11 08:27:11 +08:00
91e525ec8e v3.5.1发布 2021-02-05 00:39:25 +08:00
83afb9e6e2 新增内置爬虫源i笔趣阁 2021-02-05 00:17:19 +08:00
19d4c6b778 修复部分分页接口的查询bug 2021-02-04 23:59:26 +08:00
d22200b8c7 文档update 2021-01-28 09:00:36 +08:00
43fe1150fd 文档update 2021-01-28 08:58:20 +08:00
65b65f874f 文档update 2021-01-28 08:46:56 +08:00
3b6bc859a5 文档update 2021-01-28 08:35:08 +08:00
cfc55a6c92 update 2021-01-28 08:33:05 +08:00
0a80c5662d update 2021-01-28 08:28:03 +08:00
02fd0d7e25 模版更新 2021-01-25 18:10:47 +08:00
521142a792 v3.5.1发布 2021-01-25 16:56:41 +08:00
c567e37423 v3.5.1发布 2021-01-25 14:56:05 +08:00
b5e0814eb4 小说内容页性能优化 2021-01-25 14:14:54 +08:00
ca6c2aec96 update 2021-01-24 14:07:14 +08:00
34859c839b update 2021-01-22 10:18:25 +08:00
039f9d9cf8 update 2021-01-21 21:03:08 +08:00
224829dd1f v3.5.0发布 2021-01-19 19:39:33 +08:00
1a5122209a 个人中心新增头像设置 2021-01-19 19:34:14 +08:00
48aff7cf37 个人中心新增头像设置 2021-01-19 19:32:32 +08:00
e673f9be9d 新增启动banner 2021-01-19 19:00:54 +08:00
20469bd669 增加生产环境配置 2021-01-19 18:53:47 +08:00
755300db3c update 2021-01-14 23:26:38 +08:00
a790f8042d update 2021-01-14 23:22:03 +08:00
d0db2021a6 v3.4.1发布 2021-01-10 17:55:48 +08:00
c403fc7496 更新orange主题手机端首尾章节跳转逻辑 2021-01-07 20:59:19 +08:00
e4927d7ac6 爬虫管理系统设置session默认超时时间为1天,解决由于编写爬虫规则时间过长导致的提交失败问题 2021-01-05 21:46:01 +08:00
a00a2141f2 爬虫管理系统设置session默认超时时间为1天,解决由于编写爬虫规则时间过长导致的提交失败问题 2021-01-05 21:45:04 +08:00
7cc7d8b541 v3.4.0发布 2021-01-04 10:28:01 +08:00
e4822979e2 elasticsearch升级到7.x,集成RestHighLevelClient客户端 2021-01-03 13:42:40 +08:00
ab741ec6bf v3.3.0发布 2020-12-28 12:06:19 +08:00
057c0646cd v3.3.0发布 2020-12-28 12:02:34 +08:00
57a9cd09ef v3.3.0发布 2020-12-28 11:06:27 +08:00
1a49e2a340 增加外部配置文件来配置网站信息 2020-12-28 10:58:38 +08:00
f8411c2337 v3.3.0发布 2020-12-28 09:34:22 +08:00
343a741c21 更新展示图片 2020-12-27 15:54:50 +08:00
f1a5fb4813 更新展示图片 2020-12-27 15:34:23 +08:00
0428356bd4 新增蓝色主题模版 2020-12-27 09:43:45 +08:00
c01097cd5f 更新v3.3.0的安装文档 2020-12-26 23:53:05 +08:00
7e650a0a04 修改版本号 2020-12-26 22:27:51 +08:00
45c59ecc37 前端新增深色主题模版 2020-12-26 22:16:58 +08:00
5e3962fef4 update 2020-12-26 20:10:11 +08:00
7f5035e369 update 2020-12-26 20:08:07 +08:00
44aad39847 update 2020-12-26 20:00:21 +08:00
6ad51908d5 文件夹结构调整,新增模版自定义功能 2020-12-26 19:13:07 +08:00
f03ab953d0 v3.2.0发布 2020-12-26 11:45:19 +08:00
5cc9dfa1bc v3.2.0发布 2020-12-26 11:42:09 +08:00
2fbda60617 修复jwt校验失败后的bug 2020-12-24 17:13:36 +08:00
39c19ac004 页面不存在则跳转到404页面 2020-12-24 16:54:37 +08:00
7494fe431a 页面不存在则跳转到404页面 2020-12-24 16:45:48 +08:00
c9f1500976 新增404页面,访问已删除的书页/目录页/内容页自动跳转到404页面 2020-12-24 16:26:21 +08:00
f61c252e71 爬虫代码优化 2020-12-24 01:30:00 +08:00
6fd183c2ae 爬虫代码优化 2020-12-24 01:22:19 +08:00
c3daaecaaa 爬虫代码优化 2020-12-24 01:17:52 +08:00
1b6cc8ccd5 爬虫代码优化 2020-12-24 00:10:19 +08:00
0a10504461 优化章节字数算法,优化爬虫代码 2020-12-23 23:48:34 +08:00
1046a7ffc1 后台数据校验优化 2020-12-22 23:12:22 +08:00
612555dbe6 更新QQ群 2020-12-22 09:35:24 +08:00
d5768e4011 后台首页gitee仓库地址更新 2020-12-21 17:51:54 +08:00
5982eb623f 更新文档 2020-12-16 09:53:39 +08:00
85ad5fa3b2 增加官网地址 2020-12-15 10:23:12 +08:00
bdc81f7676 更新安卓客户端 2020-12-13 10:09:42 +08:00
f31c86f362 修复手机端导航栏书架的点击问题 2020-12-13 09:33:59 +08:00
45d8902429 更新接口文档示例 2020-12-12 12:16:13 +08:00
ff9696bb7e 添加接口文档示例 2020-12-12 12:03:40 +08:00
cacebcaa33 小说章节列表接口排序字段新增默认值 2020-12-12 11:16:24 +08:00
355cb80458 restful api改造 2020-12-12 10:03:15 +08:00
a8c74d061c 修改gitee仓库地址 2020-12-11 13:40:35 +08:00
a713b66c1b 爬虫优化,兼容更多源站 2020-12-10 19:04:44 +08:00
e9d915c1fe 修改版本号 2020-12-10 13:39:57 +08:00
cd3520971d 修改版本号 2020-12-10 08:40:15 +08:00
dc4c9138ee novel-admin加入父工程管理 2020-12-09 18:24:23 +08:00
f830600c3e 爬虫优化,提升兼容性 2020-12-09 16:39:15 +08:00
154210719f 简化.gitignore 2020-12-09 08:48:27 +08:00
11e744e6a8 删掉不知道是啥文件 2020-12-07 16:11:20 +08:00
944ef912e2 修复后台管理首页因为数据库大小写敏感导致的报错 2020-12-07 16:06:46 +08:00
2ce51d5fc0 图片更新 2020-12-04 17:06:53 +08:00
2f4b671d84 修改版本号 2020-12-04 16:50:44 +08:00
6ffd8d90d7 样式优化 2020-12-04 16:43:12 +08:00
1e2b6f4103 样式优化 2020-12-04 16:21:33 +08:00
24c7175872 新增微信公众号 2020-12-03 08:38:06 +08:00
a6b009cc84 v3.0.1发布 2020-12-03 03:02:44 +08:00
04afa759a7 v3.0.1发布 2020-12-03 02:56:54 +08:00
1be39a0f13 手机端UI更新 2020-12-03 02:01:48 +08:00
2fd0349a80 v2.11.0发布 2020-12-02 11:42:59 +08:00
79fd85ab9b v2.11.0发布 2020-12-02 11:41:06 +08:00
0b22bbb111 文档更新 2020-12-01 12:15:56 +08:00
7f4d315f25 后台新闻模块开发完成 2020-12-01 12:14:25 +08:00
f7375c5779 release_v2.10.0发布 2020-12-01 06:02:41 +08:00
194461f729 修改版本号 2020-12-01 06:01:24 +08:00
6bf6b44493 文档更新 2020-12-01 05:55:15 +08:00
cffa00a54a 显示优化 2020-12-01 05:48:56 +08:00
b279763383 后台首页更 新,新增会员总数/作家总数/作品总数/交易总数统计,新增7日内会员新增/作家新增/作品新增/交易新增统计报表 2020-12-01 05:42:12 +08:00
cfe19854a5 v2.9.1发布 2020-12-01 03:05:09 +08:00
28cebad48d 后台管理系统修改密码长度5位以上,修复admin账号登录后无法修改密码的bug 2020-12-01 03:02:48 +08:00
68a1ece57c update 2020-11-27 21:14:45 +08:00
77645da2bd update readme 2020-11-23 08:48:11 +08:00
36376aa623 update readme 2020-11-23 08:44:27 +08:00
9e98665cca v2.9.0发布 2020-11-23 08:29:50 +08:00
9a19a33406 章节字数计算规则优化 2020-11-23 08:21:58 +08:00
a4f7042b87 更新sql 2020-11-22 18:06:01 +08:00
31aa3192fd 小说章节定价规则自定义 2020-11-22 17:15:20 +08:00
cd11854eff v2.8.0发布 2020-11-17 10:52:44 +08:00
85f5048fd9 v2.8.0发布 2020-11-17 10:49:59 +08:00
f625ee38e1 作家后台完善 2020-11-17 10:25:31 +08:00
2c3e346ea7 修复小说阅读的时候按键盘→会报错的bug 2020-11-12 12:03:45 +08:00
66093cb065 v2.7.1发布 2020-11-10 11:56:11 +08:00
beba6e5154 作家后台小说列表新增昨日订阅量统计 2020-11-09 18:18:27 +08:00
04d3aef82b 展示图更新 2020-11-09 15:10:30 +08:00
018daf8d37 修改上传提示图片 2020-11-09 14:53:18 +08:00
8e0f1f12a4 作者后台菜单栏图标修改 2020-11-09 14:11:02 +08:00
165c96cd48 v2.7.0发布 2020-11-06 08:01:07 +08:00
e343134ce2 手机端购买页面更新&版本号更改 2020-11-05 07:47:17 +08:00
a1adb2c7df 删除垃圾文件夹 2020-11-03 15:21:19 +08:00
81a82d8e72 展示图更新 2020-11-03 15:18:50 +08:00
1d33094bd7 展示图更新 2020-11-03 15:15:46 +08:00
4cccea5d75 作家专区新增稿费收入查询(订阅明细+稿费汇总) 2020-11-03 14:58:59 +08:00
fbfb68583f update 2020-11-03 09:01:33 +08:00
655957904b update 2020-11-03 08:55:32 +08:00
99e973091d 自动更新排除掉原创小说 2020-11-03 08:41:48 +08:00
5fdf618223 自动更新排除掉原创小说 2020-11-03 08:30:45 +08:00
03c4e6c54b v2.6.5发布 2020-11-03 07:41:38 +08:00
29527301cf front模块添加message配置文件,覆盖common模块的配置,方便打包后直接修改网站信息 2020-11-03 07:36:13 +08:00
29d03a7a22 通用header.html加入script参数 2020-11-03 07:24:13 +08:00
ad4199dc4e 添加示例网站 2020-11-03 06:57:46 +08:00
4f7f9af6a9 update readme 2020-11-03 06:54:52 +08:00
2042 changed files with 184371 additions and 22113 deletions

25
.gitignore vendored
View File

@ -1,18 +1,7 @@
/.idea
/cachedata
/logs
/novel-common/target
/novel-front/target
/novel-front/*.iml
/novel-common/*.iml
/novel-mobile/target
/novel-mobile/*.iml
/novel-front/novel-front.iml
/novel-crawl/novel-crawl.iml
/novel-crawl/target
/novel-admin/target
/*.iml
/novel-admin/*.iml
.DS_Store
/novel-admin/cachedata
/novel-admin/logs
**/logs
**/.idea
**/cachedata
**/target
**/*.iml
**/.DS_Store

219
README.md
View File

@ -1,206 +1,95 @@
[![index]( https://s1.ax1x.com/2020/07/03/NOSA5q.jpg )]( https://cloud.tencent.com/act/cps/redirect?redirect=1052&cps_key=736e609d66e0ac4e57813316cec6fd0b&from=console )
[![index]( https://youdoc.github.io/img/tencent.jpg )]( https://cloud.tencent.com/act/cps/redirect?redirect=2446&cps_key=736e609d66e0ac4e57813316cec6fd0b&from=console )
# 小说精品屋-plus
<p align="center">
<a href='https://github.com/201206030/novel-plus'><img alt="Github stars" src="https://img.shields.io/github/stars/201206030/novel-plus?logo=github"></a>
<a href='https://github.com/201206030/novel-plus'><img alt="Github forks" src="https://img.shields.io/github/forks/201206030/novel-plus?logo=github"></a>
<a href='https://gitee.com/novel_dev_team/novel-plus'><img alt="Gitee stars" src="https://gitee.com/novel_dev_team/novel-plus/badge/star.svg?theme=gitee"></a>
<a href='https://gitee.com/novel_dev_team/novel-plus'><img alt="Gitee forks" src="https://gitee.com/novel_dev_team/novel-plus/badge/fork.svg?theme=gitee"></a>
<a href="https://github.com/201206030/novel-plus"><img src="https://visitor-badge.glitch.me/badge?page_id=201206030.novel-plus" alt="visitors"></a>
</p>
#### 新项目小说精品屋-微服务版
<p align="center">
👉 <a href='https://novel.xxyopen.com'>官网</a> | 👉 <a href='https://www.bilibili.com/video/BV1Zo4y187Mi'>项目演示</a> | 👉 <a href='https://docs.xxyopen.com/course/novelplus/1.html'>安装教程</a>
</p>
基于小说精品屋-plus构建的Spring Cloud 微服务小说门户平台
## 项目介绍
Gitee仓库地址 https://gitee.com/xiongxyang/novel-cloud
novel-plus 是一个多端PCWAP阅读功能完善的原创文学 CMS
系统由前台门户系统作家后台管理系统平台后台管理系统和爬虫管理系统等多个子系统构成包括小说推荐作品检索小说排行小说阅读小说评论会员中心作家专区等功能支持自定义多模版可拓展的多种小说内容存储方式内置数据库分表存储和
TXT 文本存储阅读主题切换多爬虫源自动采集和更新数据会员充值订阅模式新闻发布和实时统计报表
GitHub仓库地址 https://github.com/201206030/novel-cloud
## 项目地址
#### 演示地址
- 学习版[GitHub](https://github.com/201206030/novel) [码云](https://gitee.com/novel_dev_team/novel)
[保姆级教程](https://docs.xxyopen.com)
- **应用版**[GitHub](https://github.com/201206030/novel-plus) [码云](https://gitee.com/novel_dev_team/novel-plus)
- 微服务版[GitHub](https://github.com/201206030/novel-cloud) [码云](https://gitee.com/novel_dev_team/novel-cloud)
[点击前往](http://www.java2nb.com)(前台门户)
#### 前言
小说精品屋-plus致力于打造一个完整的商用小说门户平台使用前建议先阅读此文档
#### 项目介绍
[小说精品屋](https://github.com/201206030/fiction_house)是一个多平台web、安卓app、微信小程序、功能完善的小说弹幕网站包含精品小说专区、轻小说专区和漫画专区。包括小说/漫画分类、小说/漫画搜索、小说/漫画排行、完本小说/漫画、小说/漫画评分、小说/漫画在线阅读、小说/漫画书架、小说/漫画阅读记录、小说下载、小说弹幕、小说/漫画自动爬取、小说内容自动分享到微博、邮件自动推广、链接自动推送到百度搜索引擎等功能。包含电脑端、移动端、微信小程序等多个平台现已开源web端、安卓端、小程序端源码。
小说精品屋-plus是在小说精品屋的基础上重新进行了数据库设计代码重构和功能增强提升了程序整体的可读性和性能增加了很多商用特性主要升级如下
- [x] 数据库重新设计结构调整
- [x] 服务端代码重构MyBatis3升级为MyBatis3DynamicSql
- [x] 移动站与PC站站点分离浏览器自动识别跳转
- [x] PC站UI更新
- [x] 新闻模块
- [x] 排行榜
- [x] 小说评论模块
- [x] 阅读主题模块
- [x] 作家专区
- [x] 充值
- [x] 后台管理系统
- [x] 爬虫管理系统
#### 项目结构
## 项目结构
```
novel-plus -- 父工程
novel-common -- 通用模块
novel-front -- 前台门户系统
novel-crawl -- 爬虫管理系统
novel-admin -- 后台管理系统
novel-front -- 前台门户&作家后台
novel-crawl -- 爬虫
novel-admin -- 管理后台
templates -- 前端模版
```
#### 技术选型
## 技术选型
| 技术 | 说明
| -------------------- | ---------------------------
|---------------------| ---------------------------
| Spring Boot | Spring 应用快速开发脚手架
| MyBatis | 持久层 ORM 框架
| MyBatis Dynamic SQL | Mybatis 动态 sql
| PageHelper | MyBatis 分页插件
| MyBatis Generator | 持久层代码生成插件
| Sharding-Jdbc | 代码层分库分表中间件
| Sharding-JDBC | 代码层分库分表中间件
| JJWT | JWT 登录支持
| Spring Security | 安全框架
| Shiro | 安全框架
| Ehcache | Java进程内缓存框架(默认缓存)
| Redis | 分布式缓存(缓存替换方案默认关闭一行配置开启)
| ElasticSearch | 搜索引擎(搜索增强方案默认关闭一行配置开启)
| RabbitMq | 消息队列(流量削峰默认关闭一行配置开启)
| OSS | 阿里云对象存储服务(图片存储方式之一一行配置即可切换)
| FastDfs |开源轻量级分布式文件系统(图片存储方式之一一行配置即可切换)
| Redisson | 实现分布式锁
| Apache Shiro | 安全框架
| Redis | 缓存方案
| Aliyun OSS | 阿里云对象存储服务图片存储备选方案
| Lombok | 简化对象封装工具
| Docker | 应用容器引擎
| Mysql | 数据库服务
| MySQL | 数据库服务
| Thymeleaf | 模板引擎
| Layui | 前端UI
| Layui | 前端 UI 框架
## 项目截图
#### PC站截图
### 绿色主题模版
1. 首页
[![点击查看大图](https://www.xxyopen.com/images/green_novel.png)](https://www.xxyopen.com/images/green_novel.png)
[![点击查看大图](https://www.xxyopen.com/images/resource/os/novel-plus/green3.png)](https://www.xxyopen.com/images/resource/os/novel-plus/green3.png)
[![点击查看大图](https://www.xxyopen.com/images/resource/os/novel-plus/green2.png)](https://www.xxyopen.com/images/resource/os/novel-plus/green2.png)
![img](https://oscimg.oschina.net/oscnet/up-bbb1c7f72e183327bff754a9fa8bb75223e.png)
## 演示视频
2. 分类索引页
https://www.bilibili.com/video/BV18e41197xs
![img](https://oscimg.oschina.net/oscnet/up-d0b2e03129bfae47b8bb96a491b73d383c5.png)
## 增值服务
3. 搜索页
👉 [了解详情](https://novel.xxyopen.com/service.htm)
![img](https://gitee.com/xiongxyang/novel-plus/raw/release_v2.1.0/assets/QQ20200520-215756.png)
## 微信公众号
![img](https://oscimg.oschina.net/oscnet/up-ed5f689557718924acac76bc3ebca36afcb.png)
发布最新更新动态最新前端模版最新爬虫规则文档教程等
4. 排行榜
![](https://youdoc.github.io/img/qrcode_for_gh.jpg)
![img](https://oscimg.oschina.net/oscnet/up-78d5a68586cd92a86c669311f414508f922.png)
## 赞赏支持
5. 详情页
开源项目不易若此项目能得到你的青睐那么你可以赞赏支持作者持续开发与维护
![img](https://oscimg.oschina.net/oscnet/up-8be2495a2869f93626b0c9c1df6f329747a.png)
- 服务器的费用也是一笔开销
- 编写更完备的文档教程
- 发布更多前端模版和爬虫规则
- 一杯咖啡
6. 阅读页
![](https://s1.ax1x.com/2020/10/31/BUQJwq.png)
![img](https://oscimg.oschina.net/oscnet/up-517c84148d2db8e11717a8bbecc57fa1be7.png)
## 免责声明
7. 用户中心
![img](https://oscimg.oschina.net/oscnet/up-805a30e7a663a3fd5cb39a7ea26bc132a01.png)
8. 充值
![img](https://oscimg.oschina.net/oscnet/up-5a601b0b3af3224d0bebcfe12fc15075d34.png)
![img](https://oscimg.oschina.net/oscnet/up-face25d02c07b05b2ce954cc4bf4ee6a0cc.png)
9. 作家专区
![img](https://oscimg.oschina.net/oscnet/up-30766372cc7f56480ff1d7d55198204f6ea.png)
![img](https://oscimg.oschina.net/oscnet/up-9737995e465b86f3bee3211221f6c3b8a56.png)
10. 购买
![img](https://oscimg.oschina.net/oscnet/up-ce0f585efd82a9670335f118cf5897c85e9.png)
![img](https://oscimg.oschina.net/oscnet/up-f849960f4c1303fea77d26e64fc505a7180.png)
#### 手机站截图
1. 首页
![index](https://gitee.com/xiongxyang/novel-plus/raw/release_v2.1.0/assets/QQ%E5%9B%BE%E7%89%8720191018162208.jpg)
2. 小说详情页
![微信图片_20190904181558](https://gitee.com/xiongxyang/novel-plus/raw/release_v2.1.0/assets/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190904181558.png)
3. 目录页
![QQ图片20191018161901](https://gitee.com/xiongxyang/novel-plus/raw/release_v2.1.0/assets/QQ%E5%9B%BE%E7%89%8720191108022250.png)
4. 小说阅读页
![QQ图片20191018161901](https://gitee.com/xiongxyang/novel-plus/raw/release_v2.1.0/assets/QQ%E5%9B%BE%E7%89%8720191018161901.png)
#### 爬虫管理系统截图
![img](https://gitee.com/xiongxyang/novel-plus/raw/release_v2.1.2/assets/crawl_index.png)
#### 后台管理系统截图
![img](https://oscimg.oschina.net/oscnet/up-0552343538674a22a64819834100558f39b.png)
![img](https://oscimg.oschina.net/oscnet/up-faf5dda7320674c29a1772bc0c81d74762e.png)
#### 安装步骤
##### 数据库安装
1. 安装MySQL软件
2. 修改MySQL`max_allowed_packet `配置建议100M
3. 新建数据库设置编码为utf8mb4
4. 执行sql/novel_plus.sql脚本文件
##### 爬虫管理系统安装
1. 修改novel-common模块下application-dev.yml文件中的数据库的配置
2. 修改novel-crawl模块下application.yml文件中的管理员账号密码
3. 启动程序打开浏览器默认8081端口访问
4. 选择已有或新增爬虫源支持自定义爬虫规则点击`开启`按钮开始爬取小说数据
##### 前台小说门户安装
1. 修改novel-common模块下application-dev.yml文件中的数据库的配置
2. 启动程序打开浏览器默认8080端口访问
**喜欢此项目的可以给我的GitHub和Gitee加个Star支持一下 **
#### 其他安装教程
包安装教程[点击前往](https://my.oschina.net/java2nb/blog/4272630)
宝塔安装教程非官方[点击前往](https://www.daniao.org/9166.html)
docker安装教程[点击前往](https://my.oschina.net/java2nb/blog/4271989)
#### 代码仓库
Gitee仓库地址 https://gitee.com/xiongxyang/novel-plus
GitHub仓库地址 https://github.com/201206030/novel-plus
#### QQ交流群
![mini-code](./assets/小说精品屋开源项目交流群群聊二维码.png)
#### 捐赠支持
开源项目不易若此项目能得到你的青睐可以捐赠支持作者持续开发与维护
![mini-code](./assets/jk.png)
#### 备注
精品小说屋所有相关项目均已在开源中国公开感兴趣的可进入[开源中国](https://www.oschina.net/p/fiction_house)按关键字`精品小说屋`搜索。
[![index](https://s1.ax1x.com/2020/07/03/NOSuMF.jpg)](https://www.aliyun.com/minisite/goods?userCode=uf4nasee )
本项目提供的爬虫工具仅用于采集项目初期的测试数据请勿用于商业盈利 用户使用本系统从事任何违法违规的事情一切后果由用户自行承担作者不承担任何责任

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 461 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 360 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 929 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 764 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

27
doc/sql/20201103.sql Normal file
View File

@ -0,0 +1,27 @@
CREATE TABLE `author_income_detail` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`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,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='稿费收入明细统计表';
CREATE TABLE `author_income` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`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 '收入月份',
`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,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='稿费收入统计表';

1
doc/sql/20201109.sql Normal file
View File

@ -0,0 +1 @@
alter table book add column `yesterday_buy` int(11) DEFAULT '0' COMMENT '昨日订阅数' after comment_count;

1
doc/sql/20201122.sql Normal file
View File

@ -0,0 +1 @@
alter table book_index add column `book_price` int(3) DEFAULT 0 COMMENT '章节费用屋币' after `is_vip`;

32
doc/sql/20201201.sql Normal file
View File

@ -0,0 +1,32 @@
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (246, 241, '批量删除', NULL, 'novel:news:batchRemove', 2, NULL, 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (245, 241, '删除', NULL, 'novel:news:remove', 2, NULL, 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (244, 241, '修改', NULL, 'novel:news:edit', 2, NULL, 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (243, 241, '新增', NULL, 'novel:news:add', 2, NULL, 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (242, 241, '查看', NULL, 'novel:news:detail', 2, NULL, 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (241, 234, '新闻列表', 'novel/news', 'novel:news:news', 1, 'fa', 8, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (240, 235, '批量删除', NULL, 'novel:category:batchRemove', 2, NULL, 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (239, 235, '删除', NULL, 'novel:category:remove', 2, NULL, 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (238, 235, '修改', NULL, 'novel:category:edit', 2, NULL, 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (237, 235, '新增', NULL, 'novel:category:add', 2, NULL, 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (236, 235, '查看', NULL, 'novel:category:detail', 2, NULL, 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (235, 234, '类别管理', 'novel/category', 'novel:category:category', 1, 'fa', 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (234, 0, '新闻管理', '', '', 0, 'fa fa-newspaper-o', 8, NULL, NULL);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4889, 1, 246);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4890, 1, 245);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4891, 1, 244);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4892, 1, 243);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4893, 1, 242);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4899, 1, 241);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4894, 1, 240);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4895, 1, 239);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4896, 1, 238);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4897, 1, 237);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4898, 1, 236);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4900, 1, 235);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4888, 1, 234);
delete from sys_menu where menu_id = 202;

1
doc/sql/20210726.sql Normal file
View File

@ -0,0 +1 @@
alter table news add column `read_count` BIGINT NOT NULL DEFAULT '0' COMMENT '阅读量' after content;

3
doc/sql/20210913.sql Normal file
View File

@ -0,0 +1,3 @@
alter table book_index add column storage_type varchar(10) NOT NULL DEFAULT 'db' COMMENT '存储方式' after book_price ;

121
doc/sql/20230413.sql Normal file
View File

@ -0,0 +1,121 @@
CREATE TABLE `website_info`
(
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关键词',
description varchar(512) NOT NULL COMMENT '网站描述',
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',
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT ='网站信息表';
INSERT INTO website_info (id, name, domain, keyword, description, qq, logo, logo_dark, create_time, create_user_id,
update_time, update_user_id)
VALUES (1, '小说精品屋', 'www.xxyopen.com', '小说精品屋,小说,小说CMS,原创文学系统,开源小说系统,免费小说建站程序',
'小说精品屋是一个多端PCWAP阅读功能完善的原创文学CMS系统由前台门户系统作家后台管理系统平台后台管理系统爬虫管理系统等多个子系统构成支持会员充值订阅模式新闻发布和实时统计报表等功能新书自动入库老书自动更新',
'1179705413', 'https://youdoc.gitee.io/resource/images/logo/logo.png',
'https://youdoc.gitee.io/resource/images/logo/logo_white.png', null, null, null, null);
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num, gmt_create, gmt_modified)
VALUES (300, 0, '网站管理', '', '', 0, 'fa fa-television', 6, null, null);
INSERT
INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (301, 300, '网站信息', 'novel/websiteInfo', 'novel:websiteInfo:websiteInfo', '1', 'fa', '6');
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 300);
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 301);
INSERT INTO `sys_menu` (menu_id, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (310, 300, '友情链接', 'novel/friendLink', 'novel:friendLink:friendLink', '1', 'fa', '16');
INSERT INTO `sys_menu` (menu_id, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (311, 310, '查看', null, 'novel:friendLink:detail', '2', null, '6');
INSERT INTO `sys_menu` (menu_id, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (312, 310, '新增', null, 'novel:friendLink:add', '2', null, '6');
INSERT INTO `sys_menu` (menu_id, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (313, 310, '修改', null, 'novel:friendLink:edit', '2', null, '6');
INSERT INTO `sys_menu` (menu_id, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (314, 310, '删除', null, 'novel:friendLink:remove', '2', null, '6');
INSERT INTO `sys_menu` (menu_id, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (315, 310, '批量删除', null, 'novel:friendLink:batchRemove', '2', null, '6');
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 310);
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 311);
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 312);
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 313);
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 314);
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 315);
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num, gmt_create, gmt_modified)
VALUES (400, 0, '会员管理', '', '', 0, 'fa fa-vcard', 9, null, null);
INSERT
INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (401, 400, '会员列表', 'novel/user', 'novel:user:user', '1', 'fa', '6');
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 400);
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 401);
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num, gmt_create, gmt_modified)
VALUES (500, 0, '订单管理', '', '', 0, 'fa fa-money', 19, null, null);
INSERT
INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (501, 500, '订单列表', 'novel/pay', 'novel:pay:pay', '1', 'fa', '6');
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 500);
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 501);
INSERT INTO sys_menu (menu_id, parent_id, name, url, perms, type, icon, order_num, gmt_create, gmt_modified)
VALUES (600, 0, '小说管理', '', '', 0, 'fa fa-book', 15, null, null);
INSERT
INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (601, 600, '小说列表', 'novel/book', 'novel:book:book', '1', 'fa', '6');
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 600);
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 601);
INSERT INTO `sys_menu` (menu_id, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (602, 601, '删除', null, 'novel:book:remove', '2', null, '6');
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 602);
INSERT
INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (603, 600, '评论管理', 'novel/bookComment', 'novel:bookComment:bookComment', '1', 'fa', '10');
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 603);
INSERT INTO `sys_menu` (menu_id, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (604, 603, '删除', null, 'novel:bookComment:remove', '2', null, '6');
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 604);

51
doc/sql/20230418.sql Normal file
View File

@ -0,0 +1,51 @@
INSERT INTO sys_dict (name, value, type, description, sort, parent_id, create_by, create_date, update_by,
update_date, remarks, del_flag)
VALUES ('轮播图', '0', 'book_rec_type', '小说推荐类型', 0, null, null, null, null, null, '', null);
INSERT INTO sys_dict (name, value, type, description, sort, parent_id, create_by, create_date, update_by,
update_date, remarks, del_flag)
VALUES ('顶部小说栏', '1', 'book_rec_type', '小说推荐类型', 1, null, null, null, null, null, '', null);
INSERT INTO sys_dict (name, value, type, description, sort, parent_id, create_by, create_date, update_by,
update_date, remarks, del_flag)
VALUES ('本周强推', '2', 'book_rec_type', '小说推荐类型', 2, null, null, null, null, null, '', null);
INSERT INTO sys_dict (name, value, type, description, sort, parent_id, create_by, create_date, update_by,
update_date, remarks, del_flag)
VALUES ('热门推荐', '3', 'book_rec_type', '小说推荐类型', 3, null, null, null, null, null, '', null);
INSERT INTO sys_dict (name, value, type, description, sort, parent_id, create_by, create_date, update_by,
update_date, remarks, del_flag)
VALUES ('精品推荐', '4', 'book_rec_type', '小说推荐类型', 4, null, null, null, null, null, '', null);
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (320, '300', '小说推荐', 'novel/bookSetting', 'novel:bookSetting:bookSetting', '1', 'fa', '6');
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (321, '320', '查看', null, 'novel:bookSetting:detail', '2', null, '6');
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (322, '320', '新增', null, 'novel:bookSetting:add', '2', null, '6');
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (323, '320', '修改', null, 'novel:bookSetting:edit', '2', null, '6');
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (324, '320', '删除', null, 'novel:bookSetting:remove', '2', null, '6');
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (325, '320', '批量删除', null, 'novel:bookSetting:batchRemove', '2', null, '6');
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 320);
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 321);
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 322);
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 323);
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 324);
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 325);
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (410, '400', '会员反馈', 'novel/userFeedback', 'novel:userFeedback:userFeedback', '1', 'fa', '16');
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 410);

4
doc/sql/20230508.sql Normal file
View File

@ -0,0 +1,4 @@
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES (305, '301', '修改', null, 'novel:websiteInfo:edit', '2', null, '6');
INSERT INTO sys_role_menu (role_id, menu_id)
VALUES (1, 305);

3
doc/sql/20240512.sql Normal file
View File

@ -0,0 +1,3 @@
update crawl_source
set crawl_rule = replace(crawl_rule, 'ibiquge.net', 'ibiquzw.org')
where id = 16;

2
doc/sql/Dockerfile Normal file
View File

@ -0,0 +1,2 @@
FROM mysql:8.0
COPY novel_plus.sql /docker-entrypoint-initdb.d/init.sql

3108
doc/sql/novel_plus.sql Normal file

File diff suppressed because it is too large Load Diff

3
doc/sql/readme.md Normal file
View File

@ -0,0 +1,3 @@
1. novel_plus.sql 为全量 sql 文件yyyyMMdd.sql 为增量 sql 文件
2. 第一次安装只需要执行 novel_plus.sql 文件即可
3. 后续版本升级需要根据上次代码版本的时间执行该日期之后的增量 sql 文件简单来说就是 sql 文件夹中相较于上次多出来的 sql 文件

View File

@ -1,6 +0,0 @@
FROM java:8
ADD novel-admin-1.0.0.jar /root
ENV dburl=""
ENV username=""
ENV password=""
ENTRYPOINT ["sh","-c","java -Dspring.datasource.url=${dburl} -Dspring.datasource.username=${username} -Dspring.datasource.password=${password} -jar /root/novel-admin-1.0.0.jar"]

View File

@ -5,7 +5,7 @@
<groupId>com.java2nb</groupId>
<artifactId>novel-admin</artifactId>
<version>1.0.0</version>
<version>4.3.0</version>
<packaging>jar</packaging>
<name>novel-admin</name>
@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.1.RELEASE</version>
<version>2.1.18.RELEASE</version>
<relativePath/>
</parent>
@ -24,6 +24,8 @@
<java.version>1.8</java.version>
<velocity.version>1.7</velocity.version>
<activiti.version>5.22.0</activiti.version>
<sharding.jdbc.version>3.0.0</sharding.jdbc.version>
<jackson.version>2.15.1</jackson.version>
</properties>
<dependencies>
@ -62,12 +64,12 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.11</version>
<version>8.0.29</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.4.4</version>
<version>3.5.6</version>
</dependency>
<dependency>
@ -79,7 +81,7 @@
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.0.28</version>
<version>1.2.9</version>
</dependency>
<!--commons -->
<dependency>
@ -95,18 +97,18 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
<version>2.9.0</version>
</dependency>
<!--shiro -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
<version>1.3.2</version>
<version>1.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<version>1.3.2</version>
<version>1.11.0</version>
</dependency>
<!-- shiro ehcache -->
<dependency>
@ -118,7 +120,7 @@
<artifactId>ehcache-core</artifactId>
</exclusion>
</exclusions>
<version>1.4.0</version>
<version>1.11.0</version>
</dependency>
<dependency>
<groupId>com.github.theborakompanioni</groupId>
@ -129,7 +131,7 @@
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.31</version>
<version>1.2.83</version>
</dependency>
<!--velocity代码生成使用模板 -->
<dependency>
@ -195,14 +197,22 @@
<version>1.4</version>
</dependency>
<!-- ehchache -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
<groupId>io.shardingsphere</groupId>
<artifactId>sharding-jdbc-spring-boot-starter</artifactId>
<version>${sharding.jdbc.version}</version>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
<groupId>io.shardingsphere</groupId>
<artifactId>sharding-jdbc-spring-namespace</artifactId>
<version>${sharding.jdbc.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<!--war包部署需要-->
@ -224,17 +234,17 @@
<!--<scope>provided</scope>-->
<!--</dependency>-->
</dependencies>
<build>
<!-- <build>
<plugins>
<!--<plugin>
&lt;!&ndash;<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>true</executable>
</configuration>
</plugin>-->
<!--SpringBoot项目默认使用spring-boot-maven-plugin要打成被其他项目引用的jar包需要更换此插件-->
<!-- <plugin>
</plugin>&ndash;&gt;
&lt;!&ndash;SpringBoot项目默认使用spring-boot-maven-plugin要打成被其他项目引用的jar包需要更换此插件&ndash;&gt;
&lt;!&ndash; <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
@ -242,23 +252,82 @@
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>-->
</plugin>&ndash;&gt;
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>-->
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<!-- 文件夹 -->
<copy todir="${project.build.directory}/build/config" overwrite="true">
<fileset dir="${basedir}/src/main/build/config">
<include name="*.*"/>
</fileset>
</copy>
<copy file="${project.build.directory}/${project.artifactId}-${project.version}.jar"
tofile="${project.build.directory}/build/${project.artifactId}.jar"/>
<fixcrlf srcdir="${basedir}/src/main/build/scripts" eol="unix"/>
<copy todir="${project.build.directory}/build/bin">
<fileset dir="${basedir}/src/main/build/scripts">
<include name="*.sh"/>
<include name="*.txt"/>
<include name="*.bat"/>
</fileset>
</copy>
<zip destfile='${project.build.directory}/build/${project.artifactId}.zip'>
<zipfileset filemode="755" dir='${project.build.directory}/build/'/>
</zip>
<copy file="${basedir}/src/main/build/docker/Dockerfile"
tofile="${project.build.directory}/build/Dockerfile"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<!--<distributionManagement>
<repositories>
<repository>
<id>nexus_release</id>
<name>release</name>
<url>http://47.106.243.172:8081/nexus/content/repositories/releases/</url>
<id>ali</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<snapshotRepository>
<id>nexus_snapshots</id>
<name>snapshots</name>
<url>http://47.106.243.172:8081/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>-->
</repositories>
<pluginRepositories>
<pluginRepository>
<id>ali-plugin</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>

View File

@ -0,0 +1,20 @@
#端口号
server:
port: 8088
spring:
datasource:
url: jdbc:mysql://127.0.0.1:3306/novel_plus?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
username: root
password: test123456
redis:
host: 127.0.0.1
port: 6379
password: test123456
sharding:
jdbc:
datasource:
ds0:
jdbc-url: jdbc:mysql://localhost:3306/novel_plus?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
username: root
password: test123456

View File

@ -0,0 +1,9 @@
FROM openjdk:8
ADD novel-admin.jar /root
ENV dburl=""
ENV username=""
ENV password=""
ENV redishost = ""
ENV redisport = ""
ENV redispwd = ""
ENTRYPOINT ["sh","-c","java -Dspring.datasource.url=${dburl} -Dspring.datasource.username=${username} -Dspring.datasource.password=${password} -Dspring.redis.host=${redishost} -Dspring.redis.port=${redisport} -Dspring.redis.password=${redispwd} -jar /root/novel-admin.jar"]

View File

@ -0,0 +1,94 @@
#!/bin/sh
APP_NAME=novel-admin
JAR_NAME=$APP_NAME\.jar
#PID 代表是PID文件
PID=$APP_NAME\.pid
#使用说明,用来提示输入参数
usage() {
echo "Usage: ./novel-admin.sh [start|stop|restart|status]"
exit 1
}
#检查程序是否在运行
is_exist(){
pid=`ps -ef|grep $JAR_NAME|grep -v grep|awk '{print $2}' `
#如果不存在返回1存在返回0
if [ -z "${pid}" ]; then
return 1
else
return 0
fi
}
#启动方法
start(){
is_exist
if [ $? -eq "0" ]; then
echo ">>> 小说精品屋后台正在运行 PID = ${pid} <<<"
else
echo ">>> 小说精品屋后台开始启动 <<<"
nohup java -jar -Dspring.profiles.active=prod $JAR_NAME >/dev/null 2>&1 &
sleep 20
echo $! > $PID
echo ">>> 小说精品屋后台启动完成 PID = $! <<<"
status
fi
}
#停止方法
stop(){
#is_exist
pidf=$(cat $PID)
#echo "$pidf"
echo ">>> 小说精品屋后台 PID = $pidf 开始停止 <<<"
kill $pidf
rm -rf $PID
sleep 2
is_exist
if [ $? -eq "0" ]; then
echo ">>> 小说精品屋后台 PID = $pid 开始强制停止 <<<"
kill -9 $pid
sleep 2
status
else
status
fi
}
#输出运行状态
status(){
is_exist
if [ $? -eq "0" ]; then
echo ">>> 小说精品屋后台正在运行 PID = ${pid} <<<"
else
echo ">>> 小说精品屋后台没有运行 <<<"
fi
}
#重启
restart(){
stop
start
}
#根据输入参数,选择执行对应方法,不输入则执行使用说明
case "$1" in
"start")
start
;;
"stop")
stop
;;
"status")
status
;;
"restart")
restart
;;
*)
usage
;;
esac
exit 0

View File

@ -1,25 +1,37 @@
package com.java2nb;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.transaction.annotation.EnableTransactionManagement;
//关闭SpringSecurity的功能
@EnableAutoConfiguration(exclude = {
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class
})
import java.net.InetAddress;
@EnableTransactionManagement
@ServletComponentScan
@MapperScan("com.java2nb.*.dao")
@SpringBootApplication
@SpringBootApplication(exclude = {
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class
})
@EnableCaching
@Slf4j
public class AdminApplication {
public static void main(String[] args) {
SpringApplication.run(AdminApplication.class, args);
}
@Bean
public CommandLineRunner commandLineRunner(ApplicationContext ctx) {
return args -> {
log.info("项目启动啦,访问路径:{}", "http://" + InetAddress.getLocalHost().getHostAddress() + ":" + ctx.getEnvironment().getProperty("server.port"));
};
}
}

View File

@ -0,0 +1,73 @@
package com.java2nb.common.config;
/**
* @author 11797
*/
public interface CacheKey {
/**
* 首页小说设置
*/
String INDEX_BOOK_SETTINGS_KEY = "indexBookSettingsKey";
/**
* 首页新闻
*/
String INDEX_NEWS_KEY = "indexNewsKey";
/**
* 首页点击榜单
*/
String INDEX_CLICK_BANK_BOOK_KEY = "indexClickBankBookKey";
/**
* 首页友情链接
*/
String INDEX_LINK_KEY = "indexLinkKey";
/**
* 首页新书榜单
*/
String INDEX_NEW_BOOK_KEY = "indexNewBookKey";
/**
* 首页更新榜单
*/
String INDEX_UPDATE_BOOK_KEY = "indexUpdateBookKey";
/**
* 模板目录保存key
*/
String TEMPLATE_DIR_KEY = "templateDirKey";
;
/**
* 正在运行的爬虫线程存储KEY前缀
*/
String RUNNING_CRAWL_THREAD_KEY_PREFIX = "runningCrawlTreadDataKeyPrefix";
/**
* 上一次搜索引擎更新的时间
*/
String ES_LAST_UPDATE_TIME = "esLastUpdateTime";
/**
* 搜索引擎转换锁
*/
String ES_TRANS_LOCK = "esTransLock";
/**
* 上一次搜索引擎是否更新过小说点击量
*/
String ES_IS_UPDATE_VISIT = "esIsUpdateVisit";
/**
* 累积的小说点击量
*/
String BOOK_ADD_VISIT_COUNT = "bookAddVisitCount";
/**
* 测试爬虫规则缓存
*/
String BOOK_TEST_PARSE = "testParse";
}

View File

@ -1,6 +1,7 @@
package com.java2nb.common.config;
public class Constant {
//演示系统账户
public static String DEMO_ACCOUNT = "test";
//自动去除表前缀
@ -20,5 +21,7 @@ public class Constant {
public static String LOG_ERROR = "error";
public static final String UPLOAD_FILES_PREFIX = "/files/";
}

View File

@ -1,82 +0,0 @@
package com.java2nb.common.config;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
@Configuration
public class RedisConfig {
@Bean
@SuppressWarnings("all")
public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory factory) {
RedisTemplate<String, Object> template = new RedisTemplate<String, Object>();
template.setConnectionFactory(factory);
Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);
ObjectMapper om = new ObjectMapper();
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
jackson2JsonRedisSerializer.setObjectMapper(om);
StringRedisSerializer stringRedisSerializer = new StringRedisSerializer();
// key采用String的序列化方式
template.setKeySerializer(stringRedisSerializer);
// hash的key也采用String的序列化方式
template.setHashKeySerializer(stringRedisSerializer);
// value序列化方式采用jackson
template.setValueSerializer(jackson2JsonRedisSerializer);
// hash的value序列化方式采用jackson
template.setHashValueSerializer(jackson2JsonRedisSerializer);
template.afterPropertiesSet();
return template;
}
}

View File

@ -5,11 +5,8 @@ import com.java2nb.common.redis.shiro.RedisCacheManager;
import com.java2nb.common.redis.shiro.RedisManager;
import com.java2nb.common.redis.shiro.RedisSessionDAO;
import com.java2nb.system.shiro.UserRealm;
import net.sf.ehcache.CacheManager;
import org.apache.shiro.cache.ehcache.EhCacheManager;
import org.apache.shiro.mgt.SecurityManager;
import org.apache.shiro.session.SessionListener;
import org.apache.shiro.session.mgt.eis.MemorySessionDAO;
import org.apache.shiro.session.mgt.eis.SessionDAO;
import org.apache.shiro.spring.LifecycleBeanPostProcessor;
import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor;
@ -29,6 +26,7 @@ import java.util.LinkedHashMap;
*/
@Configuration
public class ShiroConfig {
@Value("${spring.redis.host}")
private String host;
@Value("${spring.redis.password}")
@ -38,9 +36,6 @@ public class ShiroConfig {
@Value("${spring.redis.timeout}")
private int timeout;
@Value("${spring.cache.type}")
private String cacheType ;
@Value("${server.session-timeout}")
private int tomcatTimeout;
@ -73,11 +68,11 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/js/**", "anon");
filterChainDefinitionMap.put("/fonts/**", "anon");
filterChainDefinitionMap.put("/img/**", "anon");
filterChainDefinitionMap.put("/favicon.ico", "anon");
filterChainDefinitionMap.put("/docs/**", "anon");
filterChainDefinitionMap.put("/layuimini/**", "anon");
filterChainDefinitionMap.put("/druid/**", "anon");
filterChainDefinitionMap.put("/upload/**", "anon");
filterChainDefinitionMap.put("/files/**", "anon");
filterChainDefinitionMap.put(Constant.UPLOAD_FILES_PREFIX + "**", "anon");
filterChainDefinitionMap.put("/logout", "logout");
filterChainDefinitionMap.put("/blog", "anon");
filterChainDefinitionMap.put("/blog/open/**", "anon");
@ -93,11 +88,7 @@ public class ShiroConfig {
//设置realm.
securityManager.setRealm(userRealm());
// 自定义缓存实现 使用redis
if (Constant.CACHE_TYPE_REDIS.equals(cacheType)) {
securityManager.setCacheManager(rediscacheManager());
} else {
securityManager.setCacheManager(ehCacheManager());
}
securityManager.setSessionManager(sessionManager());
return securityManager;
}
@ -109,8 +100,7 @@ public class ShiroConfig {
}
/**
* 开启shiro aop注解支持.
* 使用代理方式;所以需要开启代码支持;
* 开启shiro aop注解支持. 使用代理方式;所以需要开启代码支持;
*
* @param securityManager
* @return
@ -139,8 +129,7 @@ public class ShiroConfig {
}
/**
* cacheManager 缓存 redis实现
* 使用的是shiro-redis开源插件
* cacheManager 缓存 redis实现 使用的是shiro-redis开源插件
*
* @return
*/
@ -152,8 +141,7 @@ public class ShiroConfig {
/**
* RedisSessionDAO shiro sessionDao层的实现 通过redis
* 使用的是shiro-redis开源插件
* RedisSessionDAO shiro sessionDao层的实现 通过redis 使用的是shiro-redis开源插件
*/
@Bean
public RedisSessionDAO redisSessionDAO() {
@ -164,11 +152,7 @@ public class ShiroConfig {
@Bean
public SessionDAO sessionDAO() {
if (Constant.CACHE_TYPE_REDIS.equals(cacheType)) {
return redisSessionDAO();
} else {
return new MemorySessionDAO();
}
}
/**
@ -185,19 +169,4 @@ public class ShiroConfig {
return sessionManager;
}
@Bean
public EhCacheManager ehCacheManager() {
EhCacheManager em = new EhCacheManager();
em.setCacheManager(cacheManager());
return em;
}
@Bean("cacheManager2")
CacheManager cacheManager(){
return CacheManager.create();
}
}

View File

@ -7,11 +7,14 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
@Component
class WebConfigurer extends WebMvcConfigurerAdapter {
@Autowired
JnConfig jnConfig;
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/files/**").addResourceLocations("file:///"+ jnConfig.getUploadPath());
registry.addResourceHandler(Constant.UPLOAD_FILES_PREFIX + "**")
.addResourceLocations("file:///" + jnConfig.getUploadPath());
}
}

View File

@ -1,12 +1,10 @@
package com.java2nb.common.controller;
import com.java2nb.common.config.Constant;
import com.java2nb.common.config.JnConfig;
import com.java2nb.common.domain.FileDO;
import com.java2nb.common.service.FileService;
import com.java2nb.common.utils.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -14,7 +12,11 @@ import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.util.Date;
import java.util.HashMap;
@ -115,7 +117,8 @@ public class FileController extends BaseController {
if ("test".equals(getUsername())) {
return R.error(1, "演示系统不允许修改,完整体验请部署程序");
}
String fileName = jnConfig.getUploadPath() + sysFileService.get(id).getUrl().replace("/files/", "");
String fileName =
jnConfig.getUploadPath() + sysFileService.get(id).getUrl().replace(Constant.UPLOAD_FILES_PREFIX, "");
if (sysFileService.remove(id) > 0) {
boolean b = FileUtil.deleteFile(fileName);
if (!b) {
@ -155,7 +158,8 @@ public class FileController extends BaseController {
String fileName = file.getOriginalFilename();
String fileDir = year + "/" + month + "/" + day + "/";
fileName = FileUtil.renameToUUID(fileName);
FileDO sysFile = new FileDO(FileType.fileType(fileName), "/files/" + fileDir + fileName, date);
FileDO sysFile = new FileDO(FileType.fileType(fileName), Constant.UPLOAD_FILES_PREFIX + fileDir + fileName,
date);
try {
FileUtil.uploadFile(file.getBytes(), jnConfig.getUploadPath() + fileDir, fileName);
} catch (Exception e) {

View File

@ -1,28 +1,33 @@
package com.java2nb.common.dao;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
public interface GeneratorMapper {
@Select("select table_name tableName, engine, table_comment tableComment, create_time createTime from information_schema.tables"
+ " where table_schema = (select database()) and table_name like concat('%',#{tableName},'%')")
@Select(
"select table_name tableName, engine, table_comment tableComment, create_time createTime from information_schema.tables"
+ " where table_schema = 'novel_plus' and table_name like concat('%',#{tableName},'%')")
List<Map<String, Object>> list(@Param("tableName") String tableName);
@Select("select count(*) from information_schema.tables where table_schema = (select database())")
@Select("select count(*) from information_schema.tables where table_schema = 'novel_plus'")
int count(Map<String, Object> map);
@Select("select table_name tableName, engine, table_comment tableComment, create_time createTime from information_schema.tables \r\n"
+ " where table_schema = (select database()) and table_name = #{tableName}")
@Select(
"select table_name tableName, engine, table_comment tableComment, create_time createTime from information_schema.tables \r\n"
+ " where table_schema = 'novel_plus' and table_name = #{tableName}")
Map<String, String> get(String tableName);
@Select("select column_name columnName, data_type dataType, column_comment columnComment, column_key columnKey, extra from information_schema.columns\r\n"
+ " where table_name = #{tableName} and table_schema = (select database()) order by ordinal_position")
@Select(
"select column_name columnName, data_type dataType, column_comment columnComment, column_key columnKey, extra from information_schema.columns\r\n"
+ " where table_name = #{tableName} and table_schema = 'novel_plus' order by ordinal_position")
List<Map<String, String>> listColumns(String tableName);
@Select("select column_name columnName, data_type dataType, column_comment columnComment, column_key columnKey, extra from information_schema.columns\r\n"
+ " where table_name = #{tableName} and table_schema = (select database()) and column_key = 'PRI' limit 1")
@Select(
"select column_name columnName, data_type dataType, column_comment columnComment, column_key columnKey, extra from information_schema.columns\r\n"
+ " where table_name = #{tableName} and table_schema = 'novel_plus' and column_key = 'PRI' limit 1")
Map<String, String> getPriColumn(String tableName);
}

View File

@ -3,7 +3,7 @@ package com.java2nb.common.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;
/**
@ -14,6 +14,7 @@ import java.util.Date;
* @date 2019-09-29 18:28:07
*/
public class DictDO implements Serializable {
private static final long serialVersionUID = 1L;
//编号
@ -49,150 +50,175 @@ public class DictDO implements Serializable {
public void setId(Long id) {
this.id = id;
}
/**
* 获取:编号
*/
public Long getId() {
return id;
}
/**
* 设置:标签名
*/
public void setName(String name) {
this.name = name;
}
/**
* 获取:标签名
*/
public String getName() {
return name;
}
/**
* 设置:数据值
*/
public void setValue(String value) {
this.value = value;
}
/**
* 获取:数据值
*/
public String getValue() {
return value;
}
/**
* 设置:类型
*/
public void setType(String type) {
this.type = type;
}
/**
* 获取:类型
*/
public String getType() {
return type;
}
/**
* 设置:描述
*/
public void setDescription(String description) {
this.description = description;
}
/**
* 获取:描述
*/
public String getDescription() {
return description;
}
/**
* 设置:排序(升序)
*/
public void setSort(BigDecimal sort) {
this.sort = sort;
}
/**
* 获取:排序(升序)
*/
public BigDecimal getSort() {
return sort;
}
/**
* 设置:父级编号
*/
public void setParentId(Long parentId) {
this.parentId = parentId;
}
/**
* 获取:父级编号
*/
public Long getParentId() {
return parentId;
}
/**
* 设置:创建者
*/
public void setCreateBy(Integer createBy) {
this.createBy = createBy;
}
/**
* 获取:创建者
*/
public Integer getCreateBy() {
return createBy;
}
/**
* 设置:创建时间
*/
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
/**
* 获取:创建时间
*/
public Date getCreateDate() {
return createDate;
}
/**
* 设置:更新者
*/
public void setUpdateBy(Long updateBy) {
this.updateBy = updateBy;
}
/**
* 获取:更新者
*/
public Long getUpdateBy() {
return updateBy;
}
/**
* 设置:更新时间
*/
public void setUpdateDate(Date updateDate) {
this.updateDate = updateDate;
}
/**
* 获取:更新时间
*/
public Date getUpdateDate() {
return updateDate;
}
/**
* 设置:备注信息
*/
public void setRemarks(String remarks) {
this.remarks = remarks;
}
/**
* 获取:备注信息
*/
public String getRemarks() {
return remarks;
}
/**
* 设置:删除标记
*/
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
/**
* 获取:删除标记
*/
@ -218,4 +244,29 @@ public class DictDO implements Serializable {
", delFlag='" + delFlag + '\'' +
'}';
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DictDO dictDO = (DictDO) o;
return Objects.equals(id, dictDO.id) && Objects.equals(name, dictDO.name)
&& Objects.equals(value, dictDO.value) && Objects.equals(type, dictDO.type)
&& Objects.equals(description, dictDO.description) && Objects.equals(sort, dictDO.sort)
&& Objects.equals(parentId, dictDO.parentId) && Objects.equals(createBy, dictDO.createBy)
&& Objects.equals(createDate, dictDO.createDate) && Objects.equals(updateBy,
dictDO.updateBy) && Objects.equals(updateDate, dictDO.updateDate) && Objects.equals(remarks,
dictDO.remarks) && Objects.equals(delFlag, dictDO.delFlag);
}
@Override
public int hashCode() {
return Objects.hash(id, name, value, type, description, sort, parentId, createBy, createDate, updateBy,
updateDate,
remarks, delFlag);
}
}

View File

@ -1,5 +1,8 @@
package com.java2nb.common.service.impl;
import com.java2nb.common.dao.DictDao;
import com.java2nb.common.domain.DictDO;
import com.java2nb.common.service.DictService;
import com.java2nb.common.utils.StringUtils;
import com.java2nb.system.domain.UserDO;
import org.springframework.beans.factory.annotation.Autowired;
@ -9,14 +12,12 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import com.java2nb.common.dao.DictDao;
import com.java2nb.common.domain.DictDO;
import com.java2nb.common.service.DictService;
import java.util.stream.Collectors;
@Service
public class DictServiceImpl implements DictService {
@Autowired
private DictDao dictDao;
@ -58,7 +59,7 @@ public class DictServiceImpl implements DictService {
@Override
public List<DictDO> listType() {
return dictDao.listType();
return dictDao.listType().stream().distinct().collect(Collectors.toList());
}
@Override

View File

@ -1,26 +1,28 @@
package com.java2nb.common.service.impl;
import com.java2nb.common.config.Constant;
import com.java2nb.common.config.JnConfig;
import com.java2nb.common.dao.FileDao;
import com.java2nb.common.domain.FileDO;
import com.java2nb.common.service.FileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import java.io.File;
import java.util.List;
import java.util.Map;
import com.java2nb.common.dao.FileDao;
import com.java2nb.common.domain.FileDO;
import com.java2nb.common.service.FileService;
import org.springframework.util.StringUtils;
@Service
public class FileServiceImpl implements FileService {
@Autowired
private FileDao sysFileMapper;
@Autowired
private JnConfig jnConfig;
@Override
public FileDO get(Long id) {
return sysFileMapper.get(id);
@ -60,7 +62,7 @@ public class FileServiceImpl implements FileService {
public Boolean isExist(String url) {
Boolean isExist = false;
if (!StringUtils.isEmpty(url)) {
String filePath = url.replace("/files/", "");
String filePath = url.replace(Constant.UPLOAD_FILES_PREFIX, "");
filePath = jnConfig.getUploadPath() + filePath;
File file = new File(filePath);
if (file.exists()) {

View File

@ -1,10 +1,14 @@
package com.java2nb.common.utils;
import lombok.SneakyThrows;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
/**
* 日期处理
@ -91,4 +95,37 @@ public class DateUtils {
r += "";
return r;
}
/**
* 获取过去第几天的日期
*
* @param past
* @return
*/
@SneakyThrows
public static String getPastDate(int past,Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.set(Calendar.DATE, calendar.get(Calendar.DATE) - past);
Date today = calendar.getTime();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
return sdf.format(today);
}
/**
* 获取过去几天的日期集合
*
* @param past
* @return
*/
public static List<String> getDateList(int past,Date date) {
List<String> result = new ArrayList<>(past);
for(int i = past - 1 ; i > 0 ; i--){
result.add(getPastDate(i,date));
}
//今天的日期
result.add(new SimpleDateFormat("yyyy-MM-dd").format(date));
return result;
}
}

View File

@ -1,601 +0,0 @@
package com.java2nb.common.utils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
@Component
@Slf4j
public final class RedisUtil {
@Autowired
private RedisTemplate<String, Object> redisTemplate;
/**
* 指定缓存失效时间
*
* @param key 键
* @param time 时间(秒)
* @return
*/
public boolean expire(String key, long time) {
try {
if (time > 0) {
redisTemplate.expire(key, time, TimeUnit.SECONDS);
}
return true;
} catch (Exception e) {
log.error(e.getMessage(),e);
return false;
}
}
/**
* 根据key 获取过期时间
*
* @param key 键 不能为null
* @return 时间(秒) 返回0代表为永久有效
*/
public long getExpire(String key) {
return redisTemplate.getExpire(key, TimeUnit.SECONDS);
}
/**
* 判断key是否存在
*
* @param key 键
* @return true 存在 false不存在
*/
public boolean hasKey(String key) {
try {
return redisTemplate.hasKey(key);
} catch (Exception e) {
log.error(e.getMessage(),e);
return false;
}
}
/**
* 删除缓存
*
* @param key 可以传一个值 或多个
*/
public void del(String... key) {
if (key != null && key.length > 0) {
if (key.length == 1) {
redisTemplate.delete(key[0]);
} else {
redisTemplate.delete(CollectionUtils.arrayToList(key));
}
}
}
/**
* 普通缓存获取
*
* @param key 键
* @return 值
*/
public Object get(String key) {
return key == null ? null : redisTemplate.opsForValue().get(key);
}
/**
* 普通缓存放入
*
* @param key 键
* @param value 值
* @return true成功 false失败
*/
public boolean set(String key, Object value) {
try {
redisTemplate.opsForValue().set(key, value);
return true;
} catch (Exception e) {
log.error(e.getMessage(),e);
return false;
}
}
/**
* 普通缓存放入并设置时间
*
* @param key 键
* @param value 值
* @param time 时间(秒) time要大于0 如果time小于等于0 将设置无限期
* @return true成功 false 失败
*/
public boolean set(String key, Object value, long time) {
try {
if (time > 0) {
redisTemplate.opsForValue().set(key, value, time, TimeUnit.SECONDS);
} else {
set(key, value);
}
return true;
} catch (Exception e) {
log.error(e.getMessage(),e);
return false;
}
}
/**
* 递增
*
* @param key 键
* @param delta 要增加几(大于0)
* @return
*/
public long incr(String key, long delta) {
if (delta < 0) {
throw new RuntimeException("递增因子必须大于0");
}
return redisTemplate.opsForValue().increment(key, delta);
}
/**
* 递减
*
* @param key 键
* @param delta 要减少几(小于0)
* @return
*/
public long decr(String key, long delta) {
if (delta < 0) {
throw new RuntimeException("递减因子必须大于0");
}
return redisTemplate.opsForValue().increment(key, -delta);
}
// ================================Map=================================
/**
* HashGet
*
* @param key 键 不能为null
* @param item 项 不能为null
* @return 值
*/
public Object hget(String key, String item) {
return redisTemplate.opsForHash().get(key, item);
}
/**
* 获取hashKey对应的所有键值
*
* @param key 键
* @return 对应的多个键值
*/
public Map<Object, Object> hmget(String key) {
return redisTemplate.opsForHash().entries(key);
}
/**
* HashSet
*
* @param key 键
* @param map 对应多个键值
* @return true 成功 false 失败
*/
public boolean hmset(String key, Map<String, Object> map) {
try {
redisTemplate.opsForHash().putAll(key, map);
return true;
} catch (Exception e) {
log.error(e.getMessage(),e);
return false;
}
}
/**
* HashSet 并设置时间
*
* @param key 键
* @param map 对应多个键值
* @param time 时间(秒)
* @return true成功 false失败
*/
public boolean hmset(String key, Map<String, Object> map, long time) {
try {
redisTemplate.opsForHash().putAll(key, map);
if (time > 0) {
expire(key, time);
}
return true;
} catch (Exception e) {
log.error(e.getMessage(),e);
return false;
}
}
/**
* 向一张hash表中放入数据,如果不存在将创建
*
* @param key 键
* @param item 项
* @param value 值
* @return true 成功 false失败
*/
public boolean hset(String key, String item, Object value) {
try {
redisTemplate.opsForHash().put(key, item, value);
return true;
} catch (Exception e) {
log.error(e.getMessage(),e);
return false;
}
}
/**
* 向一张hash表中放入数据,如果不存在将创建
*
* @param key 键
* @param item 项
* @param value 值
* @param time 时间(秒) 注意:如果已存在的hash表有时间,这里将会替换原有的时间
* @return true 成功 false失败
*/
public boolean hset(String key, String item, Object value, long time) {
try {
redisTemplate.opsForHash().put(key, item, value);
if (time > 0) {
expire(key, time);
}
return true;
} catch (Exception e) {
log.error(e.getMessage(),e);
return false;
}
}
/**
* 删除hash表中的值
*
* @param key 键 不能为null
* @param item 项 可以使多个 不能为null
*/
public void hdel(String key, Object... item) {
redisTemplate.opsForHash().delete(key, item);
}
/**
* 判断hash表中是否有该项的值
*
* @param key 键 不能为null
* @param item 项 不能为null
* @return true 存在 false不存在
*/
public boolean hHasKey(String key, String item) {
return redisTemplate.opsForHash().hasKey(key, item);
}
/**
* hash递增 如果不存在,就会创建一个 并把新增后的值返回
*
* @param key 键
* @param item 项
* @param by 要增加几(大于0)
* @return
*/
public double hincr(String key, String item, double by) {
return redisTemplate.opsForHash().increment(key, item, by);
}
/**
* hash递减
*
* @param key 键
* @param item 项
* @param by 要减少记(小于0)
* @return
*/
public double hdecr(String key, String item, double by) {
return redisTemplate.opsForHash().increment(key, item, -by);
}
/**
* 根据key获取Set中的所有值
*
* @param key 键
* @return
*/
public Set<Object> sGet(String key) {
try {
return redisTemplate.opsForSet().members(key);
} catch (Exception e) {
log.error(e.getMessage(),e);
return null;
}
}
/**
* 根据value从一个set中查询,是否存在
*
* @param key 键
* @param value 值
* @return true 存在 false不存在
*/
public boolean sHasKey(String key, Object value) {
try {
return redisTemplate.opsForSet().isMember(key, value);
} catch (Exception e) {
log.error(e.getMessage(),e);
return false;
}
}
/**
* 将数据放入set缓存
*
* @param key 键
* @param values 值 可以是多个
* @return 成功个数
*/
public long sSet(String key, Object... values) {
try {
return redisTemplate.opsForSet().add(key, values);
} catch (Exception e) {
log.error(e.getMessage(),e);
return 0;
}
}
/**
* 将set数据放入缓存
*
* @param key 键
* @param time 时间(秒)
* @param values 值 可以是多个
* @return 成功个数
*/
public long sSetAndTime(String key, long time, Object... values) {
try {
Long count = redisTemplate.opsForSet().add(key, values);
if (time > 0)
expire(key, time);
return count;
} catch (Exception e) {
log.error(e.getMessage(),e);
return 0;
}
}
/**
* 获取set缓存的长度
*
* @param key 键
* @return
*/
public long sGetSetSize(String key) {
try {
return redisTemplate.opsForSet().size(key);
} catch (Exception e) {
log.error(e.getMessage(),e);
return 0;
}
}
/**
* 移除值为value的
*
* @param key 键
* @param values 值 可以是多个
* @return 移除的个数
*/
public long setRemove(String key, Object... values) {
try {
Long count = redisTemplate.opsForSet().remove(key, values);
return count;
} catch (Exception e) {
log.error(e.getMessage(),e);
return 0;
}
}
/**
* 获取list缓存的内容
*
* @param key 键
* @param start 开始
* @param end 结束 0 到 -代表所有值
* @return
*/
public List<Object> lGet(String key, long start, long end) {
try {
return redisTemplate.opsForList().range(key, start, end);
} catch (Exception e) {
log.error(e.getMessage(),e);
return null;
}
}
/**
* 获取list缓存的长度
*
* @param key 键
* @return
*/
public long lGetListSize(String key) {
try {
return redisTemplate.opsForList().size(key);
} catch (Exception e) {
log.error(e.getMessage(),e);
return 0;
}
}
/**
* 通过索引 获取list中的值
*
* @param key 键
* @param index 索引 index>=0时 0 表头, 第二个元素依次类推index<0时-,表尾,-倒数第二个元素,依次类推
* @return
*/
public Object lGetIndex(String key, long index) {
try {
return redisTemplate.opsForList().index(key, index);
} catch (Exception e) {
log.error(e.getMessage(),e);
return null;
}
}
/**
* 将list放入缓存
*
* @param key 键
* @param value 值
* @return
*/
public boolean lSet(String key, Object value) {
try {
redisTemplate.opsForList().rightPush(key, value);
return true;
} catch (Exception e) {
log.error(e.getMessage(),e);
return false;
}
}
/**
* 将list放入缓存
*
* @param key 键
* @param value 值
* @param time 时间(秒)
* @return
*/
public boolean lSet(String key, Object value, long time) {
try {
redisTemplate.opsForList().rightPush(key, value);
if (time > 0)
expire(key, time);
return true;
} catch (Exception e) {
log.error(e.getMessage(),e);
return false;
}
}
/**
* 将list放入缓存
*
* @param key 键
* @param value 值
* @return
*/
public boolean lSet(String key, List<Object> value) {
try {
redisTemplate.opsForList().rightPushAll(key, value);
return true;
} catch (Exception e) {
log.error(e.getMessage(),e);
return false;
}
}
/**
* 将list放入缓存
*
* @param key 键
* @param value 值
* @param time 时间(秒)
* @return
*/
public boolean lSet(String key, List<Object> value, long time) {
try {
redisTemplate.opsForList().rightPushAll(key, value);
if (time > 0)
expire(key, time);
return true;
} catch (Exception e) {
log.error(e.getMessage(),e);
return false;
}
}
/**
* 根据索引修改list中的某条数据
*
* @param key 键
* @param index 索引
* @param value 值
* @return
*/
public boolean lUpdateIndex(String key, long index, Object value) {
try {
redisTemplate.opsForList().set(key, index, value);
return true;
} catch (Exception e) {
log.error(e.getMessage(),e);
return false;
}
}
/**
* 移除N个值为value
*
* @param key 键
* @param count 移除多少个
* @param value 值
* @return 移除的个数
*/
public long lRemove(String key, long count, Object value) {
try {
Long remove = redisTemplate.opsForList().remove(key, count, value);
return remove;
} catch (Exception e) {
log.error(e.getMessage(),e);
return 0;
}
}
}

View File

@ -14,7 +14,7 @@ public class XssAndSqlHttpServletRequestWrapper extends HttpServletRequestWrappe
/**
* 假如有有html 代码是自己传来的 需要设定对应的name 不过滤
*/
private static final List<String> noFilterNames = Arrays.asList("attach","push_ip");
private static final List<String> noFilterNames = Arrays.asList("attach","push_ip","content");
public XssAndSqlHttpServletRequestWrapper(HttpServletRequest request) {
super(request);

View File

@ -0,0 +1,135 @@
package com.java2nb.novel.controller;
import java.util.List;
import java.util.Map;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import io.swagger.annotations.ApiOperation;
import com.java2nb.novel.domain.BookCommentDO;
import com.java2nb.novel.service.BookCommentService;
import com.java2nb.common.utils.PageBean;
import com.java2nb.common.utils.Query;
import com.java2nb.common.utils.R;
/**
* 小说评论表
*
* @author xiongxy
* @email 1179705413@qq.com
* @date 2023-04-14 21:59:28
*/
@Controller
@RequestMapping("/novel/bookComment")
public class BookCommentController {
@Autowired
private BookCommentService bookCommentService;
@GetMapping()
@RequiresPermissions("novel:bookComment:bookComment")
String BookComment() {
return "novel/bookComment/bookComment";
}
@ApiOperation(value = "获取小说评论表列表", notes = "获取小说评论表列表")
@ResponseBody
@GetMapping("/list")
@RequiresPermissions("novel:bookComment:bookComment")
public R list(@RequestParam Map<String, Object> params) {
//查询列表数据
Query query = new Query(params);
List<BookCommentDO> bookCommentList = bookCommentService.list(query);
int total = bookCommentService.count(query);
PageBean pageBean = new PageBean(bookCommentList, total);
return R.ok().put("data", pageBean);
}
@ApiOperation(value = "新增小说评论表页面", notes = "新增小说评论表页面")
@GetMapping("/add")
@RequiresPermissions("novel:bookComment:add")
String add() {
return "novel/bookComment/add";
}
@ApiOperation(value = "修改小说评论表页面", notes = "修改小说评论表页面")
@GetMapping("/edit/{id}")
@RequiresPermissions("novel:bookComment:edit")
String edit(@PathVariable("id") Long id, Model model) {
BookCommentDO bookComment = bookCommentService.get(id);
model.addAttribute("bookComment", bookComment);
return "novel/bookComment/edit";
}
@ApiOperation(value = "查看小说评论表页面", notes = "查看小说评论表页面")
@GetMapping("/detail/{id}")
@RequiresPermissions("novel:bookComment:detail")
String detail(@PathVariable("id") Long id, Model model) {
BookCommentDO bookComment = bookCommentService.get(id);
model.addAttribute("bookComment", bookComment);
return "novel/bookComment/detail";
}
/**
* 保存
*/
@ApiOperation(value = "新增小说评论表", notes = "新增小说评论表")
@ResponseBody
@PostMapping("/save")
@RequiresPermissions("novel:bookComment:add")
public R save( BookCommentDO bookComment) {
if (bookCommentService.save(bookComment) > 0) {
return R.ok();
}
return R.error();
}
/**
* 修改
*/
@ApiOperation(value = "修改小说评论表", notes = "修改小说评论表")
@ResponseBody
@RequestMapping("/update")
@RequiresPermissions("novel:bookComment:edit")
public R update( BookCommentDO bookComment) {
bookCommentService.update(bookComment);
return R.ok();
}
/**
* 删除
*/
@ApiOperation(value = "删除小说评论表", notes = "删除小说评论表")
@PostMapping("/remove")
@ResponseBody
@RequiresPermissions("novel:bookComment:remove")
public R remove( Long id) {
if (bookCommentService.remove(id) > 0) {
return R.ok();
}
return R.error();
}
/**
* 删除
*/
@ApiOperation(value = "批量删除小说评论表", notes = "批量删除小说评论表")
@PostMapping("/batchRemove")
@ResponseBody
@RequiresPermissions("novel:bookComment:batchRemove")
public R remove(@RequestParam("ids[]") Long[] ids) {
bookCommentService.batchRemove(ids);
return R.ok();
}
}

View File

@ -0,0 +1,135 @@
package com.java2nb.novel.controller;
import java.util.List;
import java.util.Map;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import io.swagger.annotations.ApiOperation;
import com.java2nb.novel.domain.BookContentDO;
import com.java2nb.novel.service.BookContentService;
import com.java2nb.common.utils.PageBean;
import com.java2nb.common.utils.Query;
import com.java2nb.common.utils.R;
/**
* 小说内容表
*
* @author xiongxy
* @email 1179705413@qq.com
* @date 2023-04-14 19:52:06
*/
@Controller
@RequestMapping("/novel/bookContent")
public class BookContentController {
@Autowired
private BookContentService bookContentService;
@GetMapping()
@RequiresPermissions("novel:bookContent:bookContent")
String BookContent() {
return "novel/bookContent/bookContent";
}
@ApiOperation(value = "获取小说内容表列表", notes = "获取小说内容表列表")
@ResponseBody
@GetMapping("/list")
@RequiresPermissions("novel:bookContent:bookContent")
public R list(@RequestParam Map<String, Object> params) {
//查询列表数据
Query query = new Query(params);
List<BookContentDO> bookContentList = bookContentService.list(query);
int total = bookContentService.count(query);
PageBean pageBean = new PageBean(bookContentList, total);
return R.ok().put("data", pageBean);
}
@ApiOperation(value = "新增小说内容表页面", notes = "新增小说内容表页面")
@GetMapping("/add")
@RequiresPermissions("novel:bookContent:add")
String add() {
return "novel/bookContent/add";
}
@ApiOperation(value = "修改小说内容表页面", notes = "修改小说内容表页面")
@GetMapping("/edit/{id}")
@RequiresPermissions("novel:bookContent:edit")
String edit(@PathVariable("id") Long id, Model model) {
BookContentDO bookContent = bookContentService.get(id);
model.addAttribute("bookContent", bookContent);
return "novel/bookContent/edit";
}
@ApiOperation(value = "查看小说内容表页面", notes = "查看小说内容表页面")
@GetMapping("/detail/{id}")
@RequiresPermissions("novel:bookContent:detail")
String detail(@PathVariable("id") Long id, Model model) {
BookContentDO bookContent = bookContentService.get(id);
model.addAttribute("bookContent", bookContent);
return "novel/bookContent/detail";
}
/**
* 保存
*/
@ApiOperation(value = "新增小说内容表", notes = "新增小说内容表")
@ResponseBody
@PostMapping("/save")
@RequiresPermissions("novel:bookContent:add")
public R save( BookContentDO bookContent) {
if (bookContentService.save(bookContent) > 0) {
return R.ok();
}
return R.error();
}
/**
* 修改
*/
@ApiOperation(value = "修改小说内容表", notes = "修改小说内容表")
@ResponseBody
@RequestMapping("/update")
@RequiresPermissions("novel:bookContent:edit")
public R update( BookContentDO bookContent) {
bookContentService.update(bookContent);
return R.ok();
}
/**
* 删除
*/
@ApiOperation(value = "删除小说内容表", notes = "删除小说内容表")
@PostMapping("/remove")
@ResponseBody
@RequiresPermissions("novel:bookContent:remove")
public R remove( Long id) {
if (bookContentService.remove(id) > 0) {
return R.ok();
}
return R.error();
}
/**
* 删除
*/
@ApiOperation(value = "批量删除小说内容表", notes = "批量删除小说内容表")
@PostMapping("/batchRemove")
@ResponseBody
@RequiresPermissions("novel:bookContent:batchRemove")
public R remove(@RequestParam("ids[]") Long[] ids) {
bookContentService.batchRemove(ids);
return R.ok();
}
}

View File

@ -0,0 +1,135 @@
package com.java2nb.novel.controller;
import java.util.List;
import java.util.Map;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import io.swagger.annotations.ApiOperation;
import com.java2nb.novel.domain.BookDO;
import com.java2nb.novel.service.BookService;
import com.java2nb.common.utils.PageBean;
import com.java2nb.common.utils.Query;
import com.java2nb.common.utils.R;
/**
* 小说表
*
* @author xiongxy
* @email 1179705413@qq.com
* @date 2020-12-01 03:49:46
*/
@Controller
@RequestMapping("/novel/book")
public class BookController {
@Autowired
private BookService bookService;
@GetMapping()
@RequiresPermissions("novel:book:book")
String Book() {
return "novel/book/book";
}
@ApiOperation(value = "获取小说表列表", notes = "获取小说表列表")
@ResponseBody
@GetMapping("/list")
@RequiresPermissions("novel:book:book")
public R list(@RequestParam Map<String, Object> params) {
//查询列表数据
Query query = new Query(params);
List<BookDO> bookList = bookService.list(query);
int total = bookService.count(query);
PageBean pageBean = new PageBean(bookList, total);
return R.ok().put("data", pageBean);
}
@ApiOperation(value = "新增小说表页面", notes = "新增小说表页面")
@GetMapping("/add")
@RequiresPermissions("novel:book:add")
String add() {
return "novel/book/add";
}
@ApiOperation(value = "修改小说表页面", notes = "修改小说表页面")
@GetMapping("/edit/{id}")
@RequiresPermissions("novel:book:edit")
String edit(@PathVariable("id") Long id, Model model) {
BookDO book = bookService.get(id);
model.addAttribute("book", book);
return "novel/book/edit";
}
@ApiOperation(value = "查看小说表页面", notes = "查看小说表页面")
@GetMapping("/detail/{id}")
@RequiresPermissions("novel:book:detail")
String detail(@PathVariable("id") Long id, Model model) {
BookDO book = bookService.get(id);
model.addAttribute("book", book);
return "novel/book/detail";
}
/**
* 保存
*/
@ApiOperation(value = "新增小说表", notes = "新增小说表")
@ResponseBody
@PostMapping("/save")
@RequiresPermissions("novel:book:add")
public R save( BookDO book) {
if (bookService.save(book) > 0) {
return R.ok();
}
return R.error();
}
/**
* 修改
*/
@ApiOperation(value = "修改小说表", notes = "修改小说表")
@ResponseBody
@RequestMapping("/update")
@RequiresPermissions("novel:book:edit")
public R update( BookDO book) {
bookService.update(book);
return R.ok();
}
/**
* 删除
*/
@ApiOperation(value = "删除小说表", notes = "删除小说表")
@PostMapping("/remove")
@ResponseBody
@RequiresPermissions("novel:book:remove")
public R remove( Long id) {
if (bookService.remove(id) > 0) {
return R.ok();
}
return R.error();
}
/**
* 删除
*/
@ApiOperation(value = "批量删除小说表", notes = "批量删除小说表")
@PostMapping("/batchRemove")
@ResponseBody
@RequiresPermissions("novel:book:batchRemove")
public R remove(@RequestParam("ids[]") Long[] ids) {
bookService.batchRemove(ids);
return R.ok();
}
}

View File

@ -0,0 +1,135 @@
package com.java2nb.novel.controller;
import java.util.List;
import java.util.Map;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import io.swagger.annotations.ApiOperation;
import com.java2nb.novel.domain.BookIndexDO;
import com.java2nb.novel.service.BookIndexService;
import com.java2nb.common.utils.PageBean;
import com.java2nb.common.utils.Query;
import com.java2nb.common.utils.R;
/**
* 小说目录表
*
* @author xiongxy
* @email 1179705413@qq.com
* @date 2023-04-14 19:51:54
*/
@Controller
@RequestMapping("/novel/bookIndex")
public class BookIndexController {
@Autowired
private BookIndexService bookIndexService;
@GetMapping()
@RequiresPermissions("novel:bookIndex:bookIndex")
String BookIndex() {
return "novel/bookIndex/bookIndex";
}
@ApiOperation(value = "获取小说目录表列表", notes = "获取小说目录表列表")
@ResponseBody
@GetMapping("/list")
@RequiresPermissions("novel:bookIndex:bookIndex")
public R list(@RequestParam Map<String, Object> params) {
//查询列表数据
Query query = new Query(params);
List<BookIndexDO> bookIndexList = bookIndexService.list(query);
int total = bookIndexService.count(query);
PageBean pageBean = new PageBean(bookIndexList, total);
return R.ok().put("data", pageBean);
}
@ApiOperation(value = "新增小说目录表页面", notes = "新增小说目录表页面")
@GetMapping("/add")
@RequiresPermissions("novel:bookIndex:add")
String add() {
return "novel/bookIndex/add";
}
@ApiOperation(value = "修改小说目录表页面", notes = "修改小说目录表页面")
@GetMapping("/edit/{id}")
@RequiresPermissions("novel:bookIndex:edit")
String edit(@PathVariable("id") Long id, Model model) {
BookIndexDO bookIndex = bookIndexService.get(id);
model.addAttribute("bookIndex", bookIndex);
return "novel/bookIndex/edit";
}
@ApiOperation(value = "查看小说目录表页面", notes = "查看小说目录表页面")
@GetMapping("/detail/{id}")
@RequiresPermissions("novel:bookIndex:detail")
String detail(@PathVariable("id") Long id, Model model) {
BookIndexDO bookIndex = bookIndexService.get(id);
model.addAttribute("bookIndex", bookIndex);
return "novel/bookIndex/detail";
}
/**
* 保存
*/
@ApiOperation(value = "新增小说目录表", notes = "新增小说目录表")
@ResponseBody
@PostMapping("/save")
@RequiresPermissions("novel:bookIndex:add")
public R save( BookIndexDO bookIndex) {
if (bookIndexService.save(bookIndex) > 0) {
return R.ok();
}
return R.error();
}
/**
* 修改
*/
@ApiOperation(value = "修改小说目录表", notes = "修改小说目录表")
@ResponseBody
@RequestMapping("/update")
@RequiresPermissions("novel:bookIndex:edit")
public R update( BookIndexDO bookIndex) {
bookIndexService.update(bookIndex);
return R.ok();
}
/**
* 删除
*/
@ApiOperation(value = "删除小说目录表", notes = "删除小说目录表")
@PostMapping("/remove")
@ResponseBody
@RequiresPermissions("novel:bookIndex:remove")
public R remove( Long id) {
if (bookIndexService.remove(id) > 0) {
return R.ok();
}
return R.error();
}
/**
* 删除
*/
@ApiOperation(value = "批量删除小说目录表", notes = "批量删除小说目录表")
@PostMapping("/batchRemove")
@ResponseBody
@RequiresPermissions("novel:bookIndex:batchRemove")
public R remove(@RequestParam("ids[]") Long[] ids) {
bookIndexService.batchRemove(ids);
return R.ok();
}
}

Some files were not shown because too many files have changed in this diff Show More