mirror of
https://github.com/201206030/novel-plus.git
synced 2025-07-01 15:26:37 +00:00
Compare commits
288 Commits
Author | SHA1 | Date | |
---|---|---|---|
5d70e44021 | |||
607deaa82f | |||
b997367f1a | |||
3d3cbc22b6 | |||
ba272bd89a | |||
7d1b024c4d | |||
e732c0fdee | |||
78de1de846 | |||
0b728b9fe5 | |||
ec3428c358 | |||
3c322a9d0e | |||
cdceb3818d | |||
6fc2df9b5a | |||
c45b81fbbf | |||
40a999f353 | |||
547bf00f46 | |||
d6849bc5a2 | |||
dc654086f3 | |||
303cc2051f | |||
fe90345f0b | |||
7ac4b62840 | |||
029cce959b | |||
7395cf63e5 | |||
906e7762c9 | |||
465e03a17b | |||
2a69a28a0c | |||
c1eb7b8954 | |||
16e381f384 | |||
094ac95428 | |||
96662fcb17 | |||
fecf03b3f5 | |||
e7f702ece0 | |||
b2c67c4f15 | |||
6a385877ac | |||
7cde6ebf61 | |||
78969f9fd1 | |||
b2eb6686e9 | |||
c537f6fb20 | |||
16e4c98a45 | |||
776083076c | |||
2bf945fe0e | |||
ede7aca66d | |||
396452b46e | |||
fc2ea40c6a | |||
bfe4d938fd | |||
7f4728191a | |||
80b393fdda | |||
e7897c988a | |||
750c8dee02 | |||
cbfd0b049f | |||
7f0331e095 | |||
3520200a87 | |||
4939bcf418 | |||
1cffbae495 | |||
b99b6ae4f2 | |||
2e2a58c84b | |||
4fe36a8f4f | |||
b5df86d5c7 | |||
9b3ba1d8c1 | |||
c4db754d23 | |||
8d3ce53dba | |||
d32d9d8410 | |||
05ae012e05 | |||
b60a0c9b40 | |||
3efaf8ce5f | |||
ebc4210774 | |||
655ec90906 | |||
f28dd867ef | |||
8e6842a495 | |||
928cb2417f | |||
625694ba1e | |||
d6c0337c09 | |||
689efc0807 | |||
4540c3781e | |||
9d2c453bb0 | |||
9de47ce697 | |||
c79974ff77 | |||
fb0098aef8 | |||
e83494cb17 | |||
419d7a971b | |||
83eda2a44d | |||
3182029bdd | |||
19d4a9960d | |||
2603150b33 | |||
f5e440390b | |||
91e525ec8e | |||
83afb9e6e2 | |||
19d4c6b778 | |||
d22200b8c7 | |||
43fe1150fd | |||
65b65f874f | |||
3b6bc859a5 | |||
cfc55a6c92 | |||
0a80c5662d | |||
02fd0d7e25 | |||
521142a792 | |||
c567e37423 | |||
b5e0814eb4 | |||
ca6c2aec96 | |||
34859c839b | |||
039f9d9cf8 | |||
224829dd1f | |||
1a5122209a | |||
48aff7cf37 | |||
e673f9be9d | |||
20469bd669 | |||
755300db3c | |||
a790f8042d | |||
d0db2021a6 | |||
c403fc7496 | |||
e4927d7ac6 | |||
a00a2141f2 | |||
7cc7d8b541 | |||
e4822979e2 | |||
ab741ec6bf | |||
057c0646cd | |||
57a9cd09ef | |||
1a49e2a340 | |||
f8411c2337 | |||
343a741c21 | |||
f1a5fb4813 | |||
0428356bd4 | |||
c01097cd5f | |||
7e650a0a04 | |||
45c59ecc37 | |||
5e3962fef4 | |||
7f5035e369 | |||
44aad39847 | |||
6ad51908d5 | |||
f03ab953d0 | |||
5cc9dfa1bc | |||
2fbda60617 | |||
39c19ac004 | |||
7494fe431a | |||
c9f1500976 | |||
f61c252e71 | |||
6fd183c2ae | |||
c3daaecaaa | |||
1b6cc8ccd5 | |||
0a10504461 | |||
1046a7ffc1 | |||
612555dbe6 | |||
d5768e4011 | |||
5982eb623f | |||
85ad5fa3b2 | |||
bdc81f7676 | |||
f31c86f362 | |||
45d8902429 | |||
ff9696bb7e | |||
cacebcaa33 | |||
355cb80458 | |||
a8c74d061c | |||
a713b66c1b | |||
e9d915c1fe | |||
cd3520971d | |||
dc4c9138ee | |||
f830600c3e | |||
154210719f | |||
11e744e6a8 | |||
944ef912e2 | |||
2ce51d5fc0 | |||
2f4b671d84 | |||
6ffd8d90d7 | |||
1e2b6f4103 | |||
24c7175872 | |||
a6b009cc84 | |||
04afa759a7 | |||
1be39a0f13 | |||
2fd0349a80 | |||
79fd85ab9b | |||
0b22bbb111 | |||
7f4d315f25 | |||
f7375c5779 | |||
194461f729 | |||
6bf6b44493 | |||
cffa00a54a | |||
b279763383 | |||
cfe19854a5 | |||
28cebad48d | |||
68a1ece57c | |||
77645da2bd | |||
36376aa623 | |||
9e98665cca | |||
9a19a33406 | |||
a4f7042b87 | |||
31aa3192fd | |||
cd11854eff | |||
85f5048fd9 | |||
f625ee38e1 | |||
2c3e346ea7 | |||
66093cb065 | |||
beba6e5154 | |||
04d3aef82b | |||
018daf8d37 | |||
8e0f1f12a4 | |||
165c96cd48 | |||
e343134ce2 | |||
a1adb2c7df | |||
81a82d8e72 | |||
1d33094bd7 | |||
4cccea5d75 | |||
fbfb68583f | |||
655957904b | |||
99e973091d | |||
5fdf618223 | |||
03c4e6c54b | |||
29527301cf | |||
29d03a7a22 | |||
ad4199dc4e | |||
4f7f9af6a9 | |||
ee2a0f514f | |||
70f04bd37c | |||
9d621edaec | |||
56c0a81c1b | |||
6b3b88c147 | |||
894ee67f56 | |||
a88891b72f | |||
5c7724c813 | |||
79c9f3e0f1 | |||
575142f9f3 | |||
83c2460c83 | |||
c7642ac2ef | |||
5af570a514 | |||
0d96ff81b6 | |||
7733cf1e3f | |||
c9c714e71e | |||
3cbb6bf3fb | |||
750e234f60 | |||
c1d485c42b | |||
0e2e6229cd | |||
f8a669eb01 | |||
6d56399d0f | |||
1a0c1f864b | |||
b193aca288 | |||
7a6d7a4442 | |||
5505840b6e | |||
8eb3048b91 | |||
1b138c2aad | |||
f5e2dbaa6b | |||
b6cb9aaedc | |||
f9f1e474ec | |||
06bf848e99 | |||
6e171d20ed | |||
c62acc288e | |||
9975faed01 | |||
8fde3a3725 | |||
430504ee28 | |||
16447c60ec | |||
be7cbe2d6f | |||
8f1ed88b07 | |||
9b9851e7ab | |||
a55edf0408 | |||
856c4c0667 | |||
e4dd5bcb71 | |||
5dbddbdd96 | |||
73be43e1c5 | |||
ce2a3b4647 | |||
68abdeca93 | |||
0b505a3922 | |||
353cb8c536 | |||
e1e1310b9e | |||
4c42ac0d29 | |||
d025d3d514 | |||
a0fb8e481a | |||
80b933db8d | |||
87a060280a | |||
9c78f400dc | |||
c2cdf73893 | |||
a13ea78c3f | |||
0144b77983 | |||
07b9ffde96 | |||
002a0723f7 | |||
8a628f081f | |||
4aa6b82143 | |||
c80b02caf0 | |||
5e16119880 | |||
231b94f1da | |||
92ce982899 | |||
8c2e43c04f | |||
f553d23fb9 | |||
9773b73475 | |||
5543b905cd | |||
e273906441 | |||
83dc04c50b | |||
b4f5b18e93 | |||
fe80c21812 | |||
4c2a7f12c1 | |||
e24e87b546 |
22
.gitignore
vendored
22
.gitignore
vendored
@ -1,15 +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
|
||||
**/logs
|
||||
**/.idea
|
||||
**/cachedata
|
||||
**/target
|
||||
**/*.iml
|
||||
**/.DS_Store
|
||||
|
||||
|
310
README.md
310
README.md
@ -1,142 +1,288 @@
|
||||
[](https://cloud.tencent.com/act/cps/redirect?redirect=1052&cps_key=736e609d66e0ac4e57813316cec6fd0b&from=console)
|
||||
[]( https://www.kuaidaili.com/?ref=mdpz65syhqup )
|
||||
|
||||
# 小说精品屋-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>
|
||||
|
||||
#### 官网
|
||||
|
||||
https://201206030.github.io
|
||||
|
||||
#### 学习版
|
||||
|
||||
[基于 Spring Boot 3 + Vue 3 开发的前后端分离学习型小说项目](https://github.com/201206030/novel)
|
||||
|
||||
#### 微服务版
|
||||
|
||||
[Github](https://github.com/201206030/novel-cloud) | [码云](https://gitee.com/novel_dev_team/novel-cloud)
|
||||
|
||||
#### 演示地址
|
||||
|
||||
[点击前往](http://www.java2nb.com)(前台门户)
|
||||
|
||||
#### 前言
|
||||
|
||||
小说精品屋-plus致力于打造一个完整的商用小说门户平台,使用前建议先阅读此文档。
|
||||
[点击前往](http://47.106.243.172:8888/)
|
||||
|
||||
#### 项目介绍
|
||||
|
||||
[小说精品屋](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 是一个多端(PC、WAP)阅读,功能完善的原创文学 CMS
|
||||
系统。由前台门户系统、作家后台管理系统、平台后台管理系统和爬虫管理系统等多个子系统构成,包括小说推荐、作品检索、小说排行、小说阅读、小说评论、会员中心、作家专区等功能,支持自定义多模版、可拓展的多种小说内容存储方式(内置数据库分表存储和
|
||||
TXT 文本存储)、阅读主题切换、多爬虫源自动采集和更新数据、会员充值、订阅模式、新闻发布和实时统计报表。
|
||||
|
||||
#### 项目结构
|
||||
|
||||
```
|
||||
novel-plus -- 父工程
|
||||
├── novel-common -- 通用模块
|
||||
├── novel-front -- 前台门户系统
|
||||
├── novel-crawl -- 爬虫管理系统
|
||||
└── novel-admin -- 后台管理系统
|
||||
├── novel-front -- 前台门户&作家后台管理子系统(可拆分)
|
||||
├── novel-crawl -- 爬虫管理子系统
|
||||
├── novel-admin -- 平台后台管理子系统
|
||||
└── templates -- 前端模版
|
||||
```
|
||||
|
||||
#### 技术选型
|
||||
Springboot+Mybatis+Mysql+Ehcache+Thymeleaf+Layui
|
||||
|
||||
#### PC站截图
|
||||
| 技术 | 说明
|
||||
|---------------------| ---------------------------
|
||||
| Spring Boot | Spring 应用快速开发脚手架
|
||||
| MyBatis | 持久层 ORM 框架
|
||||
| MyBatis Dynamic SQL | Mybatis 动态 sql
|
||||
| PageHelper | MyBatis 分页插件
|
||||
| MyBatisGenerator | 持久层代码生成插件
|
||||
| Sharding-Jdbc | 代码层分库分表中间件
|
||||
| JJWT | JWT 登录支持
|
||||
| SpringSecurity | 安全框架
|
||||
| Shiro | 安全框架
|
||||
| Ehcache | Java 进程内缓存框架(默认缓存)
|
||||
| Redis | 分布式缓存(缓存替换方案,默认关闭,一行配置开启)
|
||||
| Elasticsearch | 搜索引擎(搜索增强方案,默认关闭,一行配置开启)
|
||||
| RabbitMQ | 消息队列(流量削峰,默认关闭,一行配置开启)
|
||||
| Aliyun OSS | 阿里云对象存储服务(图片存储方式之一,一行配置即可切换)
|
||||
| FastDFS | 开源轻量级分布式文件系统(图片存储方式之一,一行配置即可切换)
|
||||
| Redisson | 实现分布式锁
|
||||
| Lombok | 简化对象封装工具
|
||||
| Docker | 应用容器引擎
|
||||
| MySQL | 数据库服务
|
||||
| Thymeleaf | 模板引擎
|
||||
| Layui | 前端 UI 框架
|
||||
|
||||
#### 橙色主题模版截图
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
#### 手机站截图
|
||||
##### PC站截图
|
||||
|
||||
1. 首页
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
2. 分类索引页
|
||||
|
||||
2. 小说详情页
|
||||

|
||||
|
||||

|
||||
3. 搜索页
|
||||
|
||||
|
||||

|
||||
|
||||
3. 目录页
|
||||

|
||||
|
||||

|
||||
4. 排行榜
|
||||
|
||||

|
||||
|
||||
5. 详情页
|
||||
|
||||

|
||||
|
||||
6. 阅读页
|
||||
|
||||

|
||||
|
||||
7. 用户中心
|
||||
|
||||

|
||||
|
||||
8. 充值
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
9. 作家专区
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
10. 购买
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
##### 手机站截图
|
||||
|
||||
1. 首页
|
||||
|
||||
<img src="https://s3.ax1x.com/2020/12/27/r5447n.jpg" alt="index" width="300" />
|
||||
|
||||
2. 小说列表页
|
||||
|
||||
<img src="https://s3.ax1x.com/2020/12/27/r55xKg.jpg" alt="微信图片_20190904181558" width="300" />
|
||||
|
||||
3. 小说详情页
|
||||
|
||||
<img src="https://s3.ax1x.com/2020/12/28/roZWOf.jpg" alt="QQ图片20191018161901" width="300" />
|
||||
|
||||
4. 小说阅读页
|
||||
|
||||

|
||||
<img src="https://s3.ax1x.com/2020/12/27/r55Stx.jpg" alt="QQ图片20191018161901" width="300" />
|
||||
|
||||
|
||||
##### 爬虫管理系统截图
|
||||
|
||||
#### 爬虫管理系统截图
|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
##### 后台管理系统截图
|
||||
|
||||

|
||||
|
||||
#### 安装步骤
|
||||

|
||||
|
||||
##### 数据库安装:
|
||||

|
||||
|
||||
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. 选择已有或新增爬虫源(支持自定义爬虫规则),点击`开启`按钮,开始爬取小说数据。
|
||||
##### PC站截图
|
||||
|
||||
##### 前台小说门户安装:
|
||||
1. 首页
|
||||
|
||||
1. 修改novel-common模块下application-dev.yml文件中的数据库的配置。
|
||||
2. 启动程序,打开浏览器,默认8080端口访问。
|
||||

|
||||
|
||||
**喜欢此项目的可以给我的GitHub和Gitee加个Star支持一下 。**
|
||||
##### 手机站截图
|
||||
|
||||
#### 其他安装教程
|
||||
1. 首页
|
||||
|
||||
包安装教程:[点击前往](https://my.oschina.net/java2nb/blog/4272630)
|
||||

|
||||
|
||||
宝塔安装教程(非官方):[点击前往](https://www.daniao.org/9166.html)
|
||||
4. 小说详情页
|
||||
|
||||
docker安装教程:[点击前往](https://my.oschina.net/java2nb/blog/4271989)
|
||||

|
||||
|
||||
5. 目录页
|
||||
|
||||

|
||||
|
||||
5. 小说阅读页
|
||||
|
||||

|
||||
|
||||
#### 蓝色主题模版截图(更新中)
|
||||
|
||||

|
||||
|
||||
#### 源码安装教程
|
||||
|
||||
- JDK 安装
|
||||
|
||||
建议[安装 JDK 8](https://docs.oracle.com/javase/8/docs/technotes/guides/install/linux_jdk.html)
|
||||
|
||||
- MySQL 安装:
|
||||
|
||||
1. [安装 MySQL 服务](https://dev.mysql.com/doc/refman/8.0/en/linux-installation.html)
|
||||
2. 修改 MySQL`max_allowed_packet `配置(建议 100 M)
|
||||
3. 新建数据库,设置编码为 utf8mb4
|
||||
4. 执行 doc/sql/novel_plus.sql 脚本文件
|
||||
|
||||
- Maven 安装
|
||||
|
||||
[安装 Apache Maven](https://maven.apache.org/install.html)
|
||||
|
||||
- 源码打包
|
||||
|
||||
novel-plus 根目录下执行打包命令`mvn clean package -Dmaven.test.skip`
|
||||
|
||||
- 爬虫安装
|
||||
|
||||
1. 上传 novel-crawl/target/build/novel-crawl.zip 压缩包到 Linux 服务器的 novel-crawl 目录
|
||||
2. 使用`unzip novel-crawl.zip`命令解压 novel-crawl.zip
|
||||
3. 修改 `config/application-common-prod.yml` 文件中的数据库配置
|
||||
4. 修改 `config/application-common-prod.yml` 文件中的管理员账号密码
|
||||
5. 根据需要[设置爬虫的代理IP](https://github.com/201206030/novel-plus/wiki/%E7%88%AC%E8%99%AB%E7%A8%8B%E5%BA%8F-HTTP-%E4%BB%A3%E7%90%86%E8%AE%BE%E7%BD%AE)
|
||||
6. novel-crawl 目录下使用`bin/novel-crawl.sh start`命令启动爬虫程序
|
||||
7. 打开浏览器,默认`8083`端口访问
|
||||
8. 选择已有或新增爬虫源(支持自定义爬虫规则),点击`开启`按钮,开始采集小说数据
|
||||
9. novel-crawl 目录下使用`bin/novel-crawl.sh stop`命令停止爬虫程序
|
||||
10. novel-crawl 目录下使用`bin/novel-crawl.sh restart`命令重启爬虫程序
|
||||
11. novel-crawl 目录下使用`bin/novel-crawl.sh status`命令查看爬虫程序的运行状态
|
||||
|
||||
- 前台安装
|
||||
|
||||
1. 上传 novel-front/target/build/novel-front.zip 压缩包到 Linux 服务器的 novel-front 目录
|
||||
2. 使用`unzip novel-front.zip`命令解压 novel-front.zip
|
||||
3. 修改 `config/application-common-prod.yml` 文件中的数据库配置
|
||||
4. 修改 `config/application-website.yml` 配置文件中的网站信息
|
||||
5. novel-front 目录下使用`bin/novel-front.sh start`命令启动前台程序
|
||||
6. 打开浏览器,默认`8085`端口访问
|
||||
7. novel-front 目录下使用`bin/novel-front.sh stop`命令停止前台程序
|
||||
8. novel-front 目录下使用`bin/novel-front.sh restart`命令重启前台程序
|
||||
9. novel-front 目录下使用`bin/novel-front.sh status`命令查看前台程序的运行状态
|
||||
|
||||
- 后台安装
|
||||
|
||||
1. 上传 novel-admin/target/build/novel-admin.zip 压缩包到 Linux 服务器的 novel-admin 目录
|
||||
2. 使用`unzip novel-admin.zip`命令解压 novel-admin.zip
|
||||
3. 修改 `config/application-prod.yml` 文件中的数据库配置
|
||||
4. novel-admin 目录下使用`bin/novel-admin.sh start`命令启动后台程序
|
||||
5. 打开浏览器,默认`8088`端口访问
|
||||
6. novel-admin 目录下使用`bin/novel-admin.sh stop`命令停止后台程序
|
||||
7. novel-admin 目录下使用`bin/novel-admin.sh restart`命令重启后台程序
|
||||
8. novel-admin 目录下使用`bin/novel-admin.sh status`命令查看后台程序的运行状态
|
||||
|
||||
**注:部分环境(如新版 Mac OS 系统)获取不到主机 IP,需要手动修改 hosts 文件,增加 IP-主机名(通过 hostname 命令查看主机名)的映射。**
|
||||
|
||||
#### 代码仓库
|
||||
|
||||
Gitee仓库地址: https://gitee.com/xiongxyang/novel-plus
|
||||
Github 仓库地址: https://github.com/201206030/novel-plus
|
||||
|
||||
GitHub仓库地址: https://github.com/201206030/novel-plus
|
||||
Gitee 仓库地址: https://gitee.com/novel_dev_team/novel-plus
|
||||
|
||||
#### QQ交流群
|
||||
#### QQ 交流群
|
||||
|
||||

|
||||
[点击前往官网查看](https://xiongxyang.gitee.io/service.htm)
|
||||
|
||||
#### 捐赠支持
|
||||
#### 微信交流群
|
||||
|
||||
开源项目不易,若此项目能得到你的青睐,可以捐赠支持作者持续开发与维护。
|
||||
微信群二维码会过期,所以每周在公众号更新一次,请关注公众号“**xxyopen**”回复关键词“**微信群**”获取。
|
||||
|
||||

|
||||
问问题的三要素
|
||||
|
||||
#### 备注
|
||||
1. 说明背景,使用了哪个模块,要做什么?
|
||||
|
||||
精品小说屋所有相关项目均已在开源中国公开,感兴趣的可进入[开源中国](https://www.oschina.net/p/fiction_house)按关键字`精品小说屋`搜索。
|
||||
2. 怎么输入或操作的得到了什么结果? 截图,日志
|
||||
|
||||
[](https://www.aliyun.com/minisite/goods?userCode=uf4nasee )
|
||||
3. 哪里不明白或有什么疑问 ?
|
||||
|
||||
#### 微信公众号(发布最新更新资讯、最新前端模版、最新爬虫规则、技术文档等)
|
||||
|
||||

|
||||
|
||||
#### 赞赏支持
|
||||
|
||||
开源项目不易,若此项目能得到你的青睐,那么你可以赞赏支持作者持续开发与维护。
|
||||
|
||||
- 服务器的费用也是一笔开销
|
||||
- 为用户提供更好的开发环境
|
||||
- 一杯咖啡
|
||||
|
||||

|
||||
|
||||
#### 免责声明
|
||||
|
||||
本项目提供的爬虫工具仅用于采集项目初期的测试数据,请勿用于商业盈利。 用户使用本系统从事任何违法违规的事情,一切后果由用户自行承担,作者不承担任何责任。
|
||||
|
BIN
assets/QQ20200520-215756.png
Normal file
BIN
assets/QQ20200520-215756.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 105 KiB |
Binary file not shown.
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 62 KiB |
Binary file not shown.
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 185 KiB |
116
doc/api/api.md
Normal file
116
doc/api/api.md
Normal file
@ -0,0 +1,116 @@
|
||||
|
||||
<h1 class="curproject-name"> 小说精品屋-plus </h1>
|
||||
小说精品屋-plus接口
|
||||
|
||||
|
||||
# 作家模块
|
||||
|
||||
## 小说章节分页列表查询接口
|
||||
<a id=小说章节分页列表查询接口> </a>
|
||||
### 基本信息
|
||||
|
||||
**Path:** /book/queryIndexList
|
||||
|
||||
**Method:** GET
|
||||
|
||||
**接口描述:**
|
||||
<p>作家后台章节管理页面需要请求该接口获取小说章节分页列表信息</p>
|
||||
|
||||
|
||||
### 请求参数
|
||||
**Query**
|
||||
|
||||
| 参数名称 | 是否必须 | 示例 | 备注 |
|
||||
| ------------ | ------------ | ------------ | ------------ |
|
||||
| bookId | 是 | 1334337530296893441 | 小说ID |
|
||||
| curr | 否 | 1 | 查询页码,默认1 |
|
||||
| limit | 否 | 5 | 分页大小,默认5 |
|
||||
|
||||
### 返回数据
|
||||
|
||||
<table>
|
||||
<thead class="ant-table-thead">
|
||||
<tr>
|
||||
<th key=name>名称</th><th key=type>类型</th><th key=required>是否必须</th><th key=default>默认值</th><th key=desc>备注</th><th key=sub>其他信息</th>
|
||||
</tr>
|
||||
</thead><tbody className="ant-table-tbody"><tr key=0-0><td key=0><span style="padding-left: 0px"><span style="color: #8c8a8a"></span> code</span></td><td key=1><span>number</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">响应状态吗,200表示成功</span></td><td key=5></td></tr><tr key=0-1><td key=0><span style="padding-left: 0px"><span style="color: #8c8a8a"></span> msg</span></td><td key=1><span>string</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">响应信息</span></td><td key=5></td></tr><tr key=0-2><td key=0><span style="padding-left: 0px"><span style="color: #8c8a8a"></span> data</span></td><td key=1><span>object</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">响应数据</span></td><td key=5></td></tr><tr key=0-2-0><td key=0><span style="padding-left: 20px"><span style="color: #8c8a8a">├─</span> total</span></td><td key=1><span>number</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">总数量</span></td><td key=5></td></tr><tr key=0-2-1><td key=0><span style="padding-left: 20px"><span style="color: #8c8a8a">├─</span> list</span></td><td key=1><span>object []</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">章节数据集合</span></td><td key=5><p key=3><span style="font-weight: '700'">item 类型: </span><span>object</span></p></td></tr><tr key=0-2-1-0><td key=0><span style="padding-left: 40px"><span style="color: #8c8a8a">├─</span> id</span></td><td key=1><span>string</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">章节ID</span></td><td key=5></td></tr><tr key=0-2-1-1><td key=0><span style="padding-left: 40px"><span style="color: #8c8a8a">├─</span> bookId</span></td><td key=1><span>string</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">小说ID</span></td><td key=5></td></tr><tr key=0-2-1-2><td key=0><span style="padding-left: 40px"><span style="color: #8c8a8a">├─</span> indexName</span></td><td key=1><span>string</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">章节名</span></td><td key=5></td></tr><tr key=0-2-1-3><td key=0><span style="padding-left: 40px"><span style="color: #8c8a8a">├─</span> isVip</span></td><td key=1><span>number</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">是否收费,1:收费,0:免费</span></td><td key=5></td></tr><tr key=0-2-1-4><td key=0><span style="padding-left: 40px"><span style="color: #8c8a8a">├─</span> updateTime</span></td><td key=1><span>string</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">更新时间</span></td><td key=5></td></tr><tr key=0-2-2><td key=0><span style="padding-left: 20px"><span style="color: #8c8a8a">├─</span> pageNum</span></td><td key=1><span>number</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">页码</span></td><td key=5></td></tr><tr key=0-2-3><td key=0><span style="padding-left: 20px"><span style="color: #8c8a8a">├─</span> pageSize</span></td><td key=1><span>number</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">分页大小</span></td><td key=5></td></tr><tr key=0-2-4><td key=0><span style="padding-left: 20px"><span style="color: #8c8a8a">├─</span> size</span></td><td key=1><span>number</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">当前页数量</span></td><td key=5></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## 小说章节删除接口
|
||||
<a id=小说章节删除接口> </a>
|
||||
### 基本信息
|
||||
|
||||
**Path:** /author/deleteIndex/{indexId}
|
||||
|
||||
**Method:** DELETE
|
||||
|
||||
**接口描述:**
|
||||
<p>作家后台章节管理页面点击删除按钮请求该接口删除小说章节内容</p>
|
||||
|
||||
|
||||
### 请求参数
|
||||
**Headers**
|
||||
|
||||
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
|
||||
| ------------ | ------------ | ------------ | ------------ | ------------ |
|
||||
| Content-Type | application/x-www-form-urlencoded | 是 | | |
|
||||
| Authorization | | 是 | eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE2MDgzNDg0NzksInN1YiI6IntcImlkXCI6MTI1NTA2MDMyODMyMjAyNzUyMCxcInVzZXJuYW1lXCI6XCIxMzU2MDQyMTMyNFwiLFwibmlja05hbWVcIjpcIjEzNTYwNDIxMzI0XCJ9IiwiY3JlYXRlZCI6MTYwNzc0MzY3OTkxM30.0qhwis_zPb6t8wGNejMhDZ2iHCL9Tgh2UHd1gcQBCp8t6RW3ggSwtfo4l_RgMT_v8jOkLW91GzTVWlNnTE6LCA | 认证JWT,请求登录接口成功后返回 |
|
||||
**路径参数**
|
||||
|
||||
| 参数名称 | 示例 | 备注 |
|
||||
| ------------ | ------------ | ------------ |
|
||||
| indexId | 1337603246936645632 | 章节ID |
|
||||
|
||||
### 返回数据
|
||||
|
||||
<table>
|
||||
<thead class="ant-table-thead">
|
||||
<tr>
|
||||
<th key=name>名称</th><th key=type>类型</th><th key=required>是否必须</th><th key=default>默认值</th><th key=desc>备注</th><th key=sub>其他信息</th>
|
||||
</tr>
|
||||
</thead><tbody className="ant-table-tbody"><tr key=0-0><td key=0><span style="padding-left: 0px"><span style="color: #8c8a8a"></span> code</span></td><td key=1><span>number</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">响应状态吗,200表示成功</span></td><td key=5></td></tr><tr key=0-1><td key=0><span style="padding-left: 0px"><span style="color: #8c8a8a"></span> msg</span></td><td key=1><span>string</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">响应信息</span></td><td key=5></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## 小说章节发布接口
|
||||
<a id=小说章节发布接口> </a>
|
||||
### 基本信息
|
||||
|
||||
**Path:** /author/addBookContent
|
||||
|
||||
**Method:** POST
|
||||
|
||||
**接口描述:**
|
||||
<p>作家后台章节发布页面点击提交按钮请求该接口新增小说章节内容</p>
|
||||
|
||||
|
||||
### 请求参数
|
||||
**Headers**
|
||||
|
||||
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
|
||||
| ------------ | ------------ | ------------ | ------------ | ------------ |
|
||||
| Content-Type | application/x-www-form-urlencoded | 是 | | |
|
||||
| Authorization | | 是 | eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE2MDgzNDg0NzksInN1YiI6IntcImlkXCI6MTI1NTA2MDMyODMyMjAyNzUyMCxcInVzZXJuYW1lXCI6XCIxMzU2MDQyMTMyNFwiLFwibmlja05hbWVcIjpcIjEzNTYwNDIxMzI0XCJ9IiwiY3JlYXRlZCI6MTYwNzc0MzY3OTkxM30.0qhwis_zPb6t8wGNejMhDZ2iHCL9Tgh2UHd1gcQBCp8t6RW3ggSwtfo4l_RgMT_v8jOkLW91GzTVWlNnTE6LCA | 认证JWT,请求登录接口成功后返回 |
|
||||
**Body**
|
||||
|
||||
| 参数名称 | 参数类型 | 是否必须 | 示例 | 备注 |
|
||||
| ------------ | ------------ | ------------ | ------------ | ------------ |
|
||||
| bookId | text | 是 | 1334337530296893441 | 小说ID |
|
||||
| indexName | text | 是 | 第六章未婚妻(下) | 章节名 |
|
||||
| content | text | 是 | 开始之时,李七夜还是生疏无比,那怕他对于刀术的所有奥义了然于胸,但是,他出刀之时依然会颤抖,无法达到妙及巅毫的要求。 | 章节内容 |
|
||||
| isVip | text | 是 | 1 | 是否收费,1:收费,0:免费 |
|
||||
|
||||
|
||||
|
||||
### 返回数据
|
||||
|
||||
<table>
|
||||
<thead class="ant-table-thead">
|
||||
<tr>
|
||||
<th key=name>名称</th><th key=type>类型</th><th key=required>是否必须</th><th key=default>默认值</th><th key=desc>备注</th><th key=sub>其他信息</th>
|
||||
</tr>
|
||||
</thead><tbody className="ant-table-tbody"><tr key=0-0><td key=0><span style="padding-left: 0px"><span style="color: #8c8a8a"></span> code</span></td><td key=1><span>number</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">响应状态吗,200表示成功</span></td><td key=5></td></tr><tr key=0-1><td key=0><span style="padding-left: 0px"><span style="color: #8c8a8a"></span> msg</span></td><td key=1><span>string</span></td><td key=2>必须</td><td key=3></td><td key=4><span style="white-space: pre-wrap">响应信息</span></td><td key=5></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
82
doc/es/index_create.txt
Normal file
82
doc/es/index_create.txt
Normal file
@ -0,0 +1,82 @@
|
||||
PUT /novel
|
||||
{
|
||||
"mappings" : {
|
||||
"book" : {
|
||||
"properties" : {
|
||||
"id" : {
|
||||
"type" : "long"
|
||||
},
|
||||
"authorId" : {
|
||||
"type" : "long"
|
||||
},
|
||||
"authorName" : {
|
||||
"type" : "text",
|
||||
"analyzer": "ik_smart",
|
||||
"boost": 1.9
|
||||
},
|
||||
|
||||
"bookName" : {
|
||||
"type" : "text",
|
||||
"analyzer": "ik_smart",
|
||||
"boost": 2
|
||||
},
|
||||
|
||||
"bookDesc" : {
|
||||
"type" : "text",
|
||||
"analyzer": "ik_smart",
|
||||
"boost": 0.1
|
||||
},
|
||||
|
||||
"bookStatus" : {
|
||||
"type" : "short"
|
||||
},
|
||||
|
||||
"catId" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
|
||||
"catName" : {
|
||||
"type" : "text",
|
||||
"analyzer": "ik_smart",
|
||||
"boost": 1.0
|
||||
},
|
||||
|
||||
"lastIndexId" : {
|
||||
"type" : "long"
|
||||
},
|
||||
|
||||
"lastIndexName" : {
|
||||
"type" : "text",
|
||||
"analyzer": "ik_smart",
|
||||
"boost": 0.1
|
||||
},
|
||||
|
||||
"lastIndexUpdateTime" : {
|
||||
"type": "keyword"
|
||||
},
|
||||
|
||||
"picUrl" : {
|
||||
"type" : "keyword"
|
||||
},
|
||||
|
||||
"score" : {
|
||||
"type" : "float"
|
||||
},
|
||||
|
||||
"wordCount" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
|
||||
"workDirection" : {
|
||||
"type" : "short"
|
||||
},
|
||||
|
||||
"visitCount" : {
|
||||
"type": "long"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
87
doc/sql/20200513.sql
Normal file
87
doc/sql/20200513.sql
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
Navicat MySQL Data Transfer
|
||||
|
||||
Source Server : localhost
|
||||
Source Server Version : 50624
|
||||
Source Host : localhost:3306
|
||||
Source Database : novel_plus
|
||||
|
||||
Target Server Type : MYSQL
|
||||
Target Server Version : 50624
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 2020-05-13 21:42:20
|
||||
*/
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for author
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `author`;
|
||||
CREATE TABLE `author` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
|
||||
`invite_code` varchar(20) DEFAULT NULL COMMENT '邀请码',
|
||||
`pen_name` varchar(20) DEFAULT NULL COMMENT '笔名',
|
||||
`tel_phone` varchar(20) DEFAULT NULL COMMENT '手机号码',
|
||||
`chat_account` varchar(50) DEFAULT NULL COMMENT 'QQ或微信账号',
|
||||
`email` varchar(50) DEFAULT NULL COMMENT '电子邮箱',
|
||||
`work_direction` tinyint(4) DEFAULT NULL COMMENT '作品方向,0:男频,1:女频',
|
||||
`status` tinyint(4) DEFAULT '0' COMMENT '0:正常,1:封禁',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='作者表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of author
|
||||
-- ----------------------------
|
||||
INSERT INTO `author` VALUES ('1', null, 'reerer', 'abc', '13560487656', '23484388', '23484388@qq.com', '0', '0', null);
|
||||
INSERT INTO `author` VALUES ('2', '1255060328322027520', 'rwrr445554', '梦入神机', '13560421324', '1179705413', 'reerer@qq.com', '0', '0', '2020-05-13 14:01:31');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for author_code
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `author_code`;
|
||||
CREATE TABLE `author_code` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`invite_code` varchar(100) DEFAULT NULL COMMENT '邀请码',
|
||||
`validity_time` datetime DEFAULT NULL COMMENT '有效时间',
|
||||
`is_use` tinyint(1) DEFAULT '0' COMMENT '是否使用过,0:未使用,1:使用过',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人ID',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `key_code` (`invite_code`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='作家邀请码表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of author_code
|
||||
-- ----------------------------
|
||||
INSERT INTO `author_code` VALUES ('3', 'reerer', '2020-05-27 22:43:45', '1', '2020-05-13 11:40:56', '1');
|
||||
INSERT INTO `author_code` VALUES ('4', '123456', '2020-05-28 00:00:00', '0', '2020-05-13 14:09:55', '1');
|
||||
INSERT INTO `author_code` VALUES ('5', 'ww34343', '2020-05-21 00:00:00', '0', '2020-05-13 14:18:58', '1');
|
||||
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for user_buy_record
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `user_buy_record`;
|
||||
CREATE TABLE `user_buy_record` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
|
||||
`book_id` bigint(20) DEFAULT NULL COMMENT '购买的小说ID',
|
||||
`book_name` varchar(50) DEFAULT NULL COMMENT '购买的小说名',
|
||||
`book_index_id` bigint(20) DEFAULT NULL COMMENT '购买的章节ID',
|
||||
`book_index_name` varchar(100) DEFAULT NULL COMMENT '购买的章节名',
|
||||
`buy_amount` int(11) DEFAULT NULL COMMENT '购买使用的屋币数量',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '购买时间',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `key_userId_indexId` (`user_id`,`book_index_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='用户消费记录表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of user_buy_record
|
||||
-- ----------------------------
|
||||
INSERT INTO `user_buy_record` VALUES ('1', '1255060328322027520', '1260400284744613890', '我是一只消消乐2', '1260522024606953472', '第三章', '10', '2020-05-13 21:29:09');
|
||||
INSERT INTO `user_buy_record` VALUES ('2', '1255060328322027520', '1260400284744613890', '我是一只消消乐2', '1260564410687107072', '第四章', '10', '2020-05-13 21:40:38');
|
3
doc/sql/20200518.sql
Normal file
3
doc/sql/20200518.sql
Normal file
@ -0,0 +1,3 @@
|
||||
INSERT INTO `crawl_source` (`id`, `source_name`, `crawl_rule`, `source_status`, `create_time`, `update_time`) VALUES ('4', '书趣阁', '{\r\n \"bookListUrl\": \"http://m.shuquge.com/sort/{catId}/0_{page}.html\",\r\n \"catIdRule\": {\r\n \"catId1\": \"1\",\r\n \"catId2\": \"2\",\r\n \"catId3\": \"3\",\r\n \"catId4\": \"4\",\r\n \"catId5\": \"7\",\r\n \"catId6\": \"6\",\r\n \"catId7\": \"8\"\r\n },\r\n \"bookIdPatten\": \"href=\\\"/s/(\\\\d+)\\\\.html\\\"\",\r\n \"pagePatten\": \"第(\\\\d+)/\\\\d+页\",\r\n \"totalPagePatten\": \"第\\\\d+/(\\\\d+)页\",\r\n \"bookDetailUrl\": \"http://m.shuquge.com/s/{bookId}.html\",\r\n \"bookNamePatten\": \"<a\\\\s+href=\\\"/s/\\\\d+\\\\.html\\\"><h2>([^/]+)</h2></a>\",\r\n \"authorNamePatten\": \"<p>作者:([^/]+)</p>\",\r\n \"picUrlPatten\": \"src=\\\"(http://www.shuquge.com/files/article/image/\\\\d+/\\\\d+/\\\\d+s\\\\.jpg)\\\"\",\r\n \"statusPatten\": \"<p>状态:([^/]+)</p>\",\r\n \"bookStatusRule\": {\r\n \"连载中\": 0,\r\n \"完本\": 1\r\n },\r\n \"descStart\": \"<div class=\\\"intro_info\\\">\",\r\n \"descEnd\": \"最新章节推荐地址\",\r\n \"bookIndexUrl\": \"http://www.shuquge.com/txt/{bookId}/index.html\",\r\n \"bookIndexStart\": \"》正文\",\r\n \"indexIdPatten\": \"<dd><a\\\\s+href=\\\"(\\\\d+)\\\\.html\\\">[^/]+</a></dd>\",\r\n \"indexNamePatten\": \"<dd><a\\\\s+href=\\\"\\\\d+\\\\.html\\\">([^/]+)</a></dd>\",\r\n \"bookContentUrl\": \"http://www.shuquge.com/txt/{bookId}/{indexId}.html\",\r\n \"contentStart\": \"<div id=\\\"content\\\" class=\\\"showtxt\\\">\",\r\n \"contentEnd\": \"http://www.shuquge.com\"\r\n}', '1', '2020-05-18 12:02:34', '2020-05-18 12:02:34');
|
||||
INSERT INTO `crawl_source` (`id`, `source_name`, `crawl_rule`, `source_status`, `create_time`, `update_time`) VALUES ('5', '笔趣阁', '{\"bookListUrl\":\"http://m.mcmssc.com/xclass/{catId}/{page}.html\",\"catIdRule\":{\"catId1\":\"1\",\"catId2\":\"2\",\"catId3\":\"3\",\"catId4\":\"4\",\"catId5\":\"5\",\"catId6\":\"6\",\"catId7\":\"7\"},\"bookIdPatten\":\"href=\\\"/(\\\\d+_\\\\d+)/\\\"\",\"pagePatten\":\"class=\\\"page_txt\\\"\\\\s+value=\\\"(\\\\d+)/\\\\d+\\\"\\\\s+size=\",\"totalPagePatten\":\"class=\\\"page_txt\\\"\\\\s+value=\\\"\\\\d+/(\\\\d+)\\\"\\\\s+size=\",\"bookDetailUrl\":\"http://m.mcmssc.com/{bookId}/\",\"bookNamePatten\":\"<span\\\\s+class=\\\"title\\\">([^/]+)</span>\",\"authorNamePatten\":\"<a\\\\s+href=\\\"/author/\\\\d+/\\\">([^/]+)</a>\",\"picUrlPatten\":\"<img\\\\s+src=\\\"([^>]+)\\\"\\\\s+onerror=\",\"picUrlPrefix\":\"http://m.mcmssc.com/\",\"statusPatten\":\">状态:([^/]+)<\",\"bookStatusRule\":{\"连载\":0,\"全本\":1},\"visitCountPatten\":\">点击:(\\\\d+)<\",\"descStart\":\"<p class=\\\"review\\\">\",\"descEnd\":\"</p>\",\"bookIndexUrl\":\"http://m.mcmssc.com/{bookId}/all.html\",\"indexIdPatten\":\"<a\\\\s+href=\\\"/\\\\d+_\\\\d+/(\\\\d+)\\\\.html\\\">[^/]+</a>\",\"indexNamePatten\":\"<a\\\\s+href=\\\"/\\\\d+_\\\\d+/\\\\d+\\\\.html\\\">([^/]+)</a>\",\"bookContentUrl\":\"http://www.mcmssc.com/{bookId}/{indexId}.html\",\"contentStart\":\"</p>\",\"contentEnd\":\"<div align=\\\"center\\\">\"}', '1', '2020-05-18 15:57:41', '2020-05-18 15:57:41');
|
||||
UPDATE `crawl_source` SET `source_name` = '书趣阁', `crawl_rule` = '{\n \"bookListUrl\": \"http://m.shuquge.com/sort/{catId}/0_{page}.html\",\n \"catIdRule\": {\n \"catId1\": \"1\",\n \"catId2\": \"2\",\n \"catId3\": \"3\",\n \"catId4\": \"4\",\n \"catId5\": \"7\",\n \"catId6\": \"6\",\n \"catId7\": \"8\"\n },\n \"bookIdPatten\": \"href=\\\"/s/(\\\\d+)\\\\.html\\\"\",\n \"pagePatten\": \"第(\\\\d+)/\\\\d+页\",\n \"totalPagePatten\": \"第\\\\d+/(\\\\d+)页\",\n \"bookDetailUrl\": \"http://m.shuquge.com/s/{bookId}.html\",\n \"bookNamePatten\": \"<a\\\\s+href=\\\"/s/\\\\d+\\\\.html\\\"><h2>([^/]+)</h2></a>\",\n \"authorNamePatten\": \"<p>作者:([^/]+)</p>\",\n \"picUrlPatten\": \"src=\\\"(http://www.shuquge.com/files/article/image/\\\\d+/\\\\d+/\\\\d+s\\\\.jpg)\\\"\",\n \"statusPatten\": \"<p>状态:([^/]+)</p>\",\n \"bookStatusRule\": {\n \"连载中\": 0,\n \"完本\": 1\n },\n \"descStart\": \"<div class=\\\"intro_info\\\">\",\n \"descEnd\": \"最新章节推荐地址\",\n \"bookIndexUrl\": \"http://www.shuquge.com/txt/{bookId}/index.html\",\n \"bookIndexStart\": \"<dt>《\",\n \"indexIdPatten\": \"<dd><a\\\\s+href=\\\"(\\\\d+)\\\\.html\\\">[^/]+</a></dd>\",\n \"indexNamePatten\": \"<dd><a\\\\s+href=\\\"\\\\d+\\\\.html\\\">([^/]+)</a></dd>\",\n \"bookContentUrl\": \"http://www.shuquge.com/txt/{bookId}/{indexId}.html\",\n \"contentStart\": \"<div id=\\\"content\\\" class=\\\"showtxt\\\">\",\n \"contentEnd\": \"http://www.shuquge.com\"\n}', `source_status` = 1, `create_time` = '2020-05-18 12:02:34', `update_time` = '2020-05-18 12:02:34' WHERE `id` = 4;
|
2
doc/sql/20200608.sql
Normal file
2
doc/sql/20200608.sql
Normal file
@ -0,0 +1,2 @@
|
||||
INSERT INTO `crawl_source` (`id`, `source_name`, `crawl_rule`, `source_status`, `create_time`, `update_time`) VALUES
|
||||
(6, '新笔趣阁', '{\n \"bookListUrl\": \"http://www.xbiquge.la/fenlei/{catId}_{page}.html\",\n \"catIdRule\": {\n \"catId1\": \"1\",\n \"catId2\": \"2\",\n \"catId3\": \"3\",\n \"catId4\": \"4\",\n \"catId5\": \"6\",\n \"catId6\": \"5\"\n },\n \"bookIdPatten\": \"<a\\\\s+href=\\\"http://www.xbiquge.la/(\\\\d+/\\\\d+)/\\\"\\\\s+target=\\\"_blank\\\">\",\n \"pagePatten\": \"<em\\\\s+id=\\\"pagestats\\\">(\\\\d+)/\\\\d+</em>\",\n \"totalPagePatten\": \"<em\\\\s+id=\\\"pagestats\\\">\\\\d+/(\\\\d+)</em>\",\n \"bookDetailUrl\": \"http://www.xbiquge.la/{bookId}/\",\n \"bookNamePatten\": \"<h1>([^/]+)</h1>\",\n \"authorNamePatten\": \"者:([^/]+)</p>\",\n \"picUrlPatten\": \"src=\\\"(http://www.xbiquge.la/files/article/image/\\\\d+/\\\\d+/\\\\d+s\\\\.jpg)\\\"\",\n \"bookStatusRule\": {},\n \"descStart\": \"<div id=\\\"intro\\\">\",\n \"descEnd\": \"</div>\",\n \"upadateTimePatten\": \"<p>最后更新:(\\\\d+-\\\\d+-\\\\d+\\\\s\\\\d+:\\\\d+:\\\\d+)</p>\",\n \"upadateTimeFormatPatten\": \"yyyy-MM-dd HH:mm:ss\",\n \"bookIndexUrl\": \"http://www.xbiquge.la/{bookId}/\",\n \"indexIdPatten\": \"<a\\\\s+href=\'/\\\\d+/\\\\d+/(\\\\d+)\\\\.html\'\\\\s+>[^/]+</a>\",\n \"indexNamePatten\": \"<a\\\\s+href=\'/\\\\d+/\\\\d+/\\\\d+\\\\.html\'\\\\s+>([^/]+)</a>\",\n \"bookContentUrl\": \"http://www.xbiquge.la/{bookId}/{indexId}.html\",\n \"contentStart\": \"<div id=\\\"content\\\">\",\n \"contentEnd\": \"<p>\"\n}', 0, '2020-05-23 22:46:58', '2020-05-23 22:46:58');
|
40
doc/sql/20200615.sql
Normal file
40
doc/sql/20200615.sql
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
Navicat MySQL Data Transfer
|
||||
|
||||
Source Server : localhost
|
||||
Source Server Version : 50725
|
||||
Source Host : localhost:3306
|
||||
Source Database : novel_plus
|
||||
|
||||
Target Server Type : MYSQL
|
||||
Target Server Version : 50725
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 2020-06-15 15:06:55
|
||||
*/
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for crawl_single_task
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `crawl_single_task`;
|
||||
CREATE TABLE `crawl_single_task` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`source_id` int(11) DEFAULT NULL COMMENT '爬虫源ID',
|
||||
`source_name` varchar(50) DEFAULT NULL COMMENT '爬虫源名',
|
||||
`source_book_id` varchar(255) DEFAULT NULL COMMENT '源站小说ID',
|
||||
`cat_id` int(11) DEFAULT NULL COMMENT '分类ID',
|
||||
`book_name` varchar(50) DEFAULT NULL COMMENT '爬取的小说名',
|
||||
`author_name` varchar(50) DEFAULT NULL COMMENT '爬取的小说作者名',
|
||||
`task_status` tinyint(1) DEFAULT '2' COMMENT '任务状态,0:失败,1:成功,2;未执行',
|
||||
`exc_count` tinyint(2) DEFAULT '0' COMMENT '已经执行次数,最多执行5次',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COMMENT='抓取单本小说任务表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of crawl_single_task
|
||||
-- ----------------------------
|
||||
INSERT INTO `crawl_single_task` VALUES ('6', '2', '百书斋', '1', '1', '1', '1', '0', '5', '2020-06-15 14:36:07');
|
||||
INSERT INTO `crawl_single_task` VALUES ('7', '5', '笔趣阁', '108_108291', '1', '衍天志之不朽仙', '白衣少年丶', '1', '1', '2020-06-15 14:46:08');
|
27
doc/sql/20201103.sql
Normal file
27
doc/sql/20201103.sql
Normal 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
1
doc/sql/20201109.sql
Normal 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
1
doc/sql/20201122.sql
Normal 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
32
doc/sql/20201201.sql
Normal 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
1
doc/sql/20210726.sql
Normal 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
3
doc/sql/20210913.sql
Normal file
@ -0,0 +1,3 @@
|
||||
alter table book_index add column storage_type varchar(10) NOT NULL DEFAULT 'db' COMMENT '存储方式' after book_price ;
|
||||
|
||||
|
@ -2,19 +2,65 @@
|
||||
Navicat MySQL Data Transfer
|
||||
|
||||
Source Server : localhost
|
||||
Source Server Version : 50624
|
||||
Source Server Version : 50725
|
||||
Source Host : localhost:3306
|
||||
Source Database : novel_biz
|
||||
Source Database : novel_plus
|
||||
|
||||
Target Server Type : MYSQL
|
||||
Target Server Version : 50624
|
||||
Target Server Version : 50725
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 2020-05-02 10:53:04
|
||||
Date: 2020-05-18 13:59:04
|
||||
*/
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for author
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `author`;
|
||||
CREATE TABLE `author` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`user_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
|
||||
`invite_code` varchar(20) DEFAULT NULL COMMENT '邀请码',
|
||||
`pen_name` varchar(20) DEFAULT NULL COMMENT '笔名',
|
||||
`tel_phone` varchar(20) DEFAULT NULL COMMENT '手机号码',
|
||||
`chat_account` varchar(50) DEFAULT NULL COMMENT 'QQ或微信账号',
|
||||
`email` varchar(50) DEFAULT NULL COMMENT '电子邮箱',
|
||||
`work_direction` tinyint(4) DEFAULT NULL COMMENT '作品方向,0:男频,1:女频',
|
||||
`status` tinyint(4) DEFAULT '0' COMMENT '0:正常,1:封禁',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='作者表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of author
|
||||
-- ----------------------------
|
||||
INSERT INTO `author` VALUES ('1', null, 'reerer', 'abc', '13560487656', '23484388', '23484388@qq.com', '0', '0', null);
|
||||
INSERT INTO `author` VALUES ('2', '1255060328322027520', 'rwrr445554', '梦入神机', '13560421324', '1179705413', 'reerer@qq.com', '0', '0', '2020-05-13 14:01:31');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for author_code
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `author_code`;
|
||||
CREATE TABLE `author_code` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`invite_code` varchar(100) DEFAULT NULL COMMENT '邀请码',
|
||||
`validity_time` datetime DEFAULT NULL COMMENT '有效时间',
|
||||
`is_use` tinyint(1) DEFAULT '0' COMMENT '是否使用过,0:未使用,1:使用过',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人ID',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `key_code` (`invite_code`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='作家邀请码表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of author_code
|
||||
-- ----------------------------
|
||||
INSERT INTO `author_code` VALUES ('3', 'reerer', '2020-05-27 22:43:45', '1', '2020-05-13 11:40:56', '1');
|
||||
INSERT INTO `author_code` VALUES ('4', '123456', '2020-05-28 00:00:00', '0', '2020-05-13 14:09:55', '1');
|
||||
INSERT INTO `author_code` VALUES ('5', 'ww34343', '2020-05-21 00:00:00', '0', '2020-05-13 14:18:58', '1');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for book
|
||||
-- ----------------------------
|
||||
@ -49,7 +95,7 @@ CREATE TABLE `book` (
|
||||
UNIQUE KEY `key_uq_bookName_authorName` (`book_name`,`author_name`) USING BTREE,
|
||||
KEY `key_lastIndexUpdateTime` (`last_index_update_time`) USING BTREE,
|
||||
KEY `key_createTime` (`create_time`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1256127379949019137 DEFAULT CHARSET=utf8mb4 COMMENT='小说表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1262260513468559361 DEFAULT CHARSET=utf8mb4 COMMENT='小说表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of book
|
||||
@ -156,7 +202,7 @@ CREATE TABLE `book_content` (
|
||||
`content` mediumtext COMMENT '小说章节内容',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3342428 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3347665 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of book_content
|
||||
@ -179,7 +225,7 @@ CREATE TABLE `book_index` (
|
||||
UNIQUE KEY `key_uq_bookId_indexNum` (`book_id`,`index_num`) USING BTREE,
|
||||
KEY `key_bookId` (`book_id`) USING BTREE,
|
||||
KEY `key_indexNum` (`index_num`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1256373101432717313 DEFAULT CHARSET=utf8mb4 COMMENT='小说目录表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1262260612777095169 DEFAULT CHARSET=utf8mb4 COMMENT='小说目录表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of book_index
|
||||
@ -303,13 +349,15 @@ CREATE TABLE `crawl_source` (
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='爬虫源表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COMMENT='爬虫源表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of crawl_source
|
||||
-- ----------------------------
|
||||
INSERT INTO `crawl_source` VALUES ('2', '百书斋', '{\r\n \"bookListUrl\": \"https://m.baishuzhai.com/blhb/{catId}/{page}.html\",\r\n \"catIdRule\": {\r\n \"catId1\": \"1\",\r\n \"catId2\": \"2\",\r\n \"catId3\": \"3\",\r\n \"catId4\": \"4\",\r\n \"catId5\": \"5\",\r\n \"catId6\": \"6\",\r\n \"catId7\": \"7\"\r\n },\r\n \"bookIdPatten\": \"href=\\\"/ibook/(\\\\d+/\\\\d+)/\\\"\",\r\n \"pagePatten\": \"value=\\\"(\\\\d+)/\\\\d+\\\"\",\r\n \"totalPagePatten\": \"value=\\\"\\\\d+/(\\\\d+)\\\"\",\r\n \"bookDetailUrl\": \"https://m.baishuzhai.com/ibook/{bookId}/\",\r\n \"bookNamePatten\": \"<span class=\\\"title\\\">([^/]+)</span>\",\r\n \"authorNamePatten\": \">作者:([^/]+)<\",\r\n \"picUrlPatten\": \"<img src=\\\"([^>]+)\\\"\\\\s+onerror=\\\"this.src=\",\r\n \"statusPatten\": \"状态:([^/]+)</li>\",\r\n \"bookStatusRule\": {\r\n \"连载\": 0,\r\n \"完成\": 1\r\n },\r\n \"scorePatten\": \"<em>([^<]+)</em>\",\r\n \"descStart\": \"<p class=\\\"review\\\">\",\r\n \"descEnd\": \"</p>\",\r\n \"upadateTimePatten\": \"更新:(\\\\d+-\\\\d+-\\\\d+)</li>\",\r\n \"upadateTimeFormatPatten\": \"yy-MM-dd\",\r\n \"bookIndexUrl\": \"https://m.baishuzhai.com/ibook/{bookId}/all.html\",\r\n \"indexIdPatten\": \"<a\\\\s+style=\\\"\\\"\\\\s+href=\\\"/ibook/\\\\d+/\\\\d+/(\\\\d+)\\\\.html\\\">[^/]+</a>\",\r\n \"indexNamePatten\": \"<a\\\\s+style=\\\"\\\"\\\\s+href=\\\"/ibook/\\\\d+/\\\\d+/\\\\d+\\\\.html\\\">([^/]+)</a>\",\r\n \"bookContentUrl\": \"https://baishuzhai.com/ibook/{bookId}/{indexId}.html\",\r\n \"contentStart\": \"id=\\\"content\\\">\",\r\n \"contentEnd\": \"<script>\"\r\n}', '0', '2020-05-01 14:22:50', '2020-05-01 14:22:50');
|
||||
INSERT INTO `crawl_source` VALUES ('3', '书包网', '{\r\n \"bookListUrl\": \"https://www.bookbao8.com/booklist-p_{page}-c_{catId}-t_0-o_0.html\",\r\n \"catIdRule\": {\r\n \"catId1\": \"5\",\r\n \"catId2\": \"4\",\r\n \"catId3\": \"8\",\r\n \"catId4\": \"9\",\r\n \"catId5\": \"3\",\r\n \"catId6\": \"7\"\r\n },\r\n \"bookIdPatten\": \"href=\\\"/book/(\\\\d+/\\\\d+/id_[^.]+).html\\\"\",\r\n \"pagePatten\": \"<span\\\\s+class=\\\"current\\\">([^<]+)</span>\",\r\n \"totalPagePatten\": \"/共(\\\\d+)页\",\r\n \"bookDetailUrl\": \"https://www.bookbao8.com/book/{bookId}.html\",\r\n \"bookNamePatten\": \"<div\\\\s+id=\\\"info\\\">\\\\s*<h1>([^<]+)</h1>\",\r\n \"authorNamePatten\": \"<p>作者:<a\\\\s+href=\\\"/Search/[^\\\"]+\\\"\\\\s+target=\\\"_blank\\\">([^<]+)</a></p>\",\r\n \"picUrlPatten\": \"<div\\\\s+id=\\\"fmimg\\\">\\\\s*<img\\\\s+alt=\\\"[^\\\"]+\\\"\\\\s+src=\\\"([^\\\"]+)\\\"\",\r\n \"statusPatten\": \"<p>状态:([^<]+)</p>\",\r\n \"bookStatusRule\": {\r\n \"连载中\": 0,\r\n \"已完结\": 1\r\n },\r\n \"visitCountPatten\": \"<em\\\\s+id=\\\"hits\\\">(\\\\d+)</em>\",\r\n \"descStart\": \"<div class=\\\"infocontent\\\">\",\r\n \"descEnd\": \"</div>\",\r\n \"upadateTimePatten\": \"<p>更新时间:(\\\\d+-\\\\d+-\\\\d+\\\\s\\\\d+:\\\\d+:\\\\d+)</p>\",\r\n \"upadateTimeFormatPatten\": \"yyyy-MM-dd HH:mm:ss\",\r\n \"bookIndexUrl\": \"https://www.bookbao8.com/book/{bookId}.html\",\r\n \"indexIdPatten\": \"<li>\\\\s*<a\\\\s+href=\\\"/views/\\\\d+/\\\\d+/id_[^_]+_(\\\\d+).html\\\"\\\\s+target=\\\"_blank\\\">\",\r\n \"indexNamePatten\": \"<li>\\\\s*<a\\\\s+href=\\\"/views/\\\\d+/\\\\d+/id_[^_]+_\\\\d+.html\\\"\\\\s+target=\\\"_blank\\\">([^<]+)</a>\",\r\n \"bookContentUrl\": \"https://www.bookbao8.com/views/{bookId}_{indexId}.html\",\r\n \"contentStart\": \"<dd id=\\\"contents\\\">\",\r\n \"contentEnd\": \"</dd>\"\r\n}', '0', '2020-05-04 17:42:22', '2020-05-04 17:42:22');
|
||||
INSERT INTO `crawl_source` VALUES ('4', '书趣阁', '{\r\n \"bookListUrl\": \"http://m.shuquge.com/sort/{catId}/0_{page}.html\",\r\n \"catIdRule\": {\r\n \"catId1\": \"1\",\r\n \"catId2\": \"2\",\r\n \"catId3\": \"3\",\r\n \"catId4\": \"4\",\r\n \"catId5\": \"7\",\r\n \"catId6\": \"6\",\r\n \"catId7\": \"8\"\r\n },\r\n \"bookIdPatten\": \"href=\\\"/s/(\\\\d+)\\\\.html\\\"\",\r\n \"pagePatten\": \"第(\\\\d+)/\\\\d+页\",\r\n \"totalPagePatten\": \"第\\\\d+/(\\\\d+)页\",\r\n \"bookDetailUrl\": \"http://m.shuquge.com/s/{bookId}.html\",\r\n \"bookNamePatten\": \"<a\\\\s+href=\\\"/s/\\\\d+\\\\.html\\\"><h2>([^/]+)</h2></a>\",\r\n \"authorNamePatten\": \"<p>作者:([^/]+)</p>\",\r\n \"picUrlPatten\": \"src=\\\"(http://www.shuquge.com/files/article/image/\\\\d+/\\\\d+/\\\\d+s\\\\.jpg)\\\"\",\r\n \"statusPatten\": \"<p>状态:([^/]+)</p>\",\r\n \"bookStatusRule\": {\r\n \"连载中\": 0,\r\n \"完本\": 1\r\n },\r\n \"descStart\": \"<div class=\\\"intro_info\\\">\",\r\n \"descEnd\": \"最新章节推荐地址\",\r\n \"bookIndexUrl\": \"http://www.shuquge.com/txt/{bookId}/index.html\",\r\n \"bookIndexStart\": \"》正文\",\r\n \"indexIdPatten\": \"<dd><a\\\\s+href=\\\"(\\\\d+)\\\\.html\\\">[^/]+</a></dd>\",\r\n \"indexNamePatten\": \"<dd><a\\\\s+href=\\\"\\\\d+\\\\.html\\\">([^/]+)</a></dd>\",\r\n \"bookContentUrl\": \"http://www.shuquge.com/txt/{bookId}/{indexId}.html\",\r\n \"contentStart\": \"<div id=\\\"content\\\" class=\\\"showtxt\\\">\",\r\n \"contentEnd\": \"http://www.shuquge.com\"\r\n}', '1', '2020-05-18 12:02:34', '2020-05-18 12:02:34');
|
||||
INSERT INTO `crawl_source` (`id`, `source_name`, `crawl_rule`, `source_status`, `create_time`, `update_time`) VALUES ('5', '笔趣阁', '{\"bookListUrl\":\"http://m.mcmssc.com/xclass/{catId}/{page}.html\",\"catIdRule\":{\"catId1\":\"1\",\"catId2\":\"2\",\"catId3\":\"3\",\"catId4\":\"4\",\"catId5\":\"5\",\"catId6\":\"6\",\"catId7\":\"7\"},\"bookIdPatten\":\"href=\\\"/(\\\\d+_\\\\d+)/\\\"\",\"pagePatten\":\"class=\\\"page_txt\\\"\\\\s+value=\\\"(\\\\d+)/\\\\d+\\\"\\\\s+size=\",\"totalPagePatten\":\"class=\\\"page_txt\\\"\\\\s+value=\\\"\\\\d+/(\\\\d+)\\\"\\\\s+size=\",\"bookDetailUrl\":\"http://m.mcmssc.com/{bookId}/\",\"bookNamePatten\":\"<span\\\\s+class=\\\"title\\\">([^/]+)</span>\",\"authorNamePatten\":\"<a\\\\s+href=\\\"/author/\\\\d+/\\\">([^/]+)</a>\",\"picUrlPatten\":\"<img\\\\s+src=\\\"([^>]+)\\\"\\\\s+onerror=\",\"picUrlPrefix\":\"http://m.mcmssc.com/\",\"statusPatten\":\">状态:([^/]+)<\",\"bookStatusRule\":{\"连载\":0,\"全本\":1},\"visitCountPatten\":\">点击:(\\\\d+)<\",\"descStart\":\"<p class=\\\"review\\\">\",\"descEnd\":\"</p>\",\"bookIndexUrl\":\"http://m.mcmssc.com/{bookId}/all.html\",\"indexIdPatten\":\"<a\\\\s+href=\\\"/\\\\d+_\\\\d+/(\\\\d+)\\\\.html\\\">[^/]+</a>\",\"indexNamePatten\":\"<a\\\\s+href=\\\"/\\\\d+_\\\\d+/\\\\d+\\\\.html\\\">([^/]+)</a>\",\"bookContentUrl\":\"http://www.mcmssc.com/{bookId}/{indexId}.html\",\"contentStart\":\"</p>\",\"contentEnd\":\"<div align=\\\"center\\\">\"}', '1', '2020-05-18 15:57:41', '2020-05-18 15:57:41');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for friend_link
|
||||
@ -378,6 +426,27 @@ CREATE TABLE `news_category` (
|
||||
INSERT INTO `news_category` VALUES ('1', '招募', '10', null, null, null, null);
|
||||
INSERT INTO `news_category` VALUES ('3', '公告', '11', null, null, null, null);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for order_pay
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `order_pay`;
|
||||
CREATE TABLE `order_pay` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`out_trade_no` bigint(20) NOT NULL COMMENT '商户订单号',
|
||||
`trade_no` varchar(64) DEFAULT NULL COMMENT '支付宝/微信交易号',
|
||||
`pay_channel` tinyint(1) NOT NULL DEFAULT '1' COMMENT '支付渠道,1:支付宝,2:微信',
|
||||
`total_amount` int(11) NOT NULL COMMENT '交易金额(单位元)',
|
||||
`user_id` bigint(20) NOT NULL COMMENT '支付用户ID',
|
||||
`pay_status` tinyint(1) DEFAULT '2' COMMENT '支付状态:0:支付失败,1:支付成功,2:待支付',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COMMENT='充值订单';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of order_pay
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_data_perm
|
||||
-- ----------------------------
|
||||
@ -422,13 +491,6 @@ CREATE TABLE `sys_dept` (
|
||||
-- ----------------------------
|
||||
-- Records of sys_dept
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_dept` VALUES ('6', '0', '研发部', '1', '1');
|
||||
INSERT INTO `sys_dept` VALUES ('7', '6', '研發一部', '1', '1');
|
||||
INSERT INTO `sys_dept` VALUES ('8', '6', '研发二部', '2', '1');
|
||||
INSERT INTO `sys_dept` VALUES ('9', '0', '销售部', '2', '1');
|
||||
INSERT INTO `sys_dept` VALUES ('10', '9', '销售一部', '1', '1');
|
||||
INSERT INTO `sys_dept` VALUES ('11', '0', '产品部', '3', '1');
|
||||
INSERT INTO `sys_dept` VALUES ('12', '11', '产品一部', '1', '1');
|
||||
INSERT INTO `sys_dept` VALUES ('13', '0', '测试部', '5', '1');
|
||||
INSERT INTO `sys_dept` VALUES ('14', '13', '测试一部', '1', '1');
|
||||
INSERT INTO `sys_dept` VALUES ('15', '13', '测试二部', '2', '1');
|
||||
@ -456,7 +518,7 @@ CREATE TABLE `sys_dict` (
|
||||
KEY `sys_dict_value` (`value`),
|
||||
KEY `sys_dict_label` (`name`),
|
||||
KEY `sys_dict_del_flag` (`del_flag`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=140 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='字典表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=142 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='字典表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_dict
|
||||
@ -589,6 +651,8 @@ INSERT INTO `sys_dict` VALUES ('136', '富文本', '6', 'page_type', '页面显
|
||||
INSERT INTO `sys_dict` VALUES ('137', '上传图片【单文件】', '7', 'page_type', '页面显示类型', '7', null, null, null, null, null, '', null);
|
||||
INSERT INTO `sys_dict` VALUES ('138', '隐藏域', '11', 'page_type', '页面显示类型', '11', null, null, null, null, null, '', null);
|
||||
INSERT INTO `sys_dict` VALUES ('139', '不显示', '12', 'page_type', '页面显示类型', '12', null, null, null, null, null, '', null);
|
||||
INSERT INTO `sys_dict` VALUES ('140', '男频', '0', 'work_direction', '作品方向', '0', null, null, null, null, null, '', null);
|
||||
INSERT INTO `sys_dict` VALUES ('141', '女频', '1', 'work_direction', '作品方向', '1', null, null, null, null, null, '', null);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_file
|
||||
@ -664,7 +728,7 @@ CREATE TABLE `sys_gen_columns` (
|
||||
`is_required` tinyint(1) DEFAULT NULL COMMENT '是否必填',
|
||||
`dict_type` varchar(100) CHARACTER SET utf8 DEFAULT '' COMMENT '页面显示为下拉时使用,字典类型从字典表中取出',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=801 DEFAULT CHARSET=utf8mb4;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=815 DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_gen_columns
|
||||
@ -728,6 +792,20 @@ INSERT INTO `sys_gen_columns` VALUES ('797', 'fb_order', 'push_time', 'datetime'
|
||||
INSERT INTO `sys_gen_columns` VALUES ('798', 'fb_order', 'push_ip', 'varchar', 'String', '推送IP', '31', '推送IP', '6', '0', 'del_flag');
|
||||
INSERT INTO `sys_gen_columns` VALUES ('799', 'fb_order', 'mcht_id', 'bigint', 'BigDecimal', '商户id', '90', '商户id', '3', '0', 'theme');
|
||||
INSERT INTO `sys_gen_columns` VALUES ('800', 'fb_order', 'sn', 'char', 'String', 'QR编号', '100', 'QR编号', '1', '0', 'del_flag');
|
||||
INSERT INTO `sys_gen_columns` VALUES ('801', 'author', 'user_id', 'bigint', 'Long', '用户ID', '2', '用户ID', '1', '0', null);
|
||||
INSERT INTO `sys_gen_columns` VALUES ('802', 'author', 'invite_code', 'varchar', 'String', '邀请码', '3', '邀请码', '1', '0', null);
|
||||
INSERT INTO `sys_gen_columns` VALUES ('803', 'author', 'pen_name', 'varchar', 'String', '笔名', '4', '笔名', '1', '0', null);
|
||||
INSERT INTO `sys_gen_columns` VALUES ('804', 'author', 'tel_phone', 'varchar', 'String', '手机号码', '5', '手机号码', '1', '0', null);
|
||||
INSERT INTO `sys_gen_columns` VALUES ('805', 'author', 'chat_account', 'varchar', 'String', 'QQ或微信账号', '6', 'QQ或微信账号', '1', '0', null);
|
||||
INSERT INTO `sys_gen_columns` VALUES ('806', 'author', 'email', 'varchar', 'String', '电子邮箱', '7', '电子邮箱', '1', '0', null);
|
||||
INSERT INTO `sys_gen_columns` VALUES ('807', 'author', 'work_direction', 'tinyint', 'Integer', '作品方向,0:男频,1:女频', '8', '作品方向,0:男频,1:女频', '2', '0', 'work_direction');
|
||||
INSERT INTO `sys_gen_columns` VALUES ('808', 'author', 'status', 'tinyint', 'Integer', '0:正常,1:封禁', '10', '0:正常,1:封禁', '1', '0', null);
|
||||
INSERT INTO `sys_gen_columns` VALUES ('809', 'author', 'create_time', 'datetime', 'Date', '创建时间', '9', '入驻时间', '4', '0', null);
|
||||
INSERT INTO `sys_gen_columns` VALUES ('810', 'author_code', 'invite_code', 'varchar', 'String', '邀请码', '2', '邀请码', '1', '1', null);
|
||||
INSERT INTO `sys_gen_columns` VALUES ('811', 'author_code', 'validity_time', 'datetime', 'Date', '有效时间', '3', '有效时间', '4', '1', null);
|
||||
INSERT INTO `sys_gen_columns` VALUES ('812', 'author_code', 'is_use', 'tinyint', 'Integer', '是否使用过,0:未使用,1:使用过', '4', '是否使用过,0:未使用,1:使用过', '1', '0', null);
|
||||
INSERT INTO `sys_gen_columns` VALUES ('813', 'author_code', 'create_time', 'datetime', 'Date', '创建时间', '5', '创建时间', '4', '0', null);
|
||||
INSERT INTO `sys_gen_columns` VALUES ('814', 'author_code', 'create_user_id', 'bigint', 'Long', '创建人ID', '6', '创建人ID', '1', '0', null);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_gen_table
|
||||
@ -807,11 +885,8 @@ CREATE TABLE `sys_log` (
|
||||
`ip` varchar(64) DEFAULT NULL COMMENT 'IP地址',
|
||||
`gmt_create` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1369 DEFAULT CHARSET=utf8 COMMENT='系统日志';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1412 DEFAULT CHARSET=utf8 COMMENT='系统日志';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_log
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_menu
|
||||
@ -829,7 +904,7 @@ CREATE TABLE `sys_menu` (
|
||||
`gmt_create` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`gmt_modified` datetime DEFAULT NULL COMMENT '修改时间',
|
||||
PRIMARY KEY (`menu_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=215 DEFAULT CHARSET=utf8 COMMENT='菜单管理';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=234 DEFAULT CHARSET=utf8 COMMENT='菜单管理';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_menu
|
||||
@ -886,6 +961,19 @@ INSERT INTO `sys_menu` VALUES ('211', '209', '新增', null, 'system:dataPerm:ad
|
||||
INSERT INTO `sys_menu` VALUES ('212', '209', '修改', null, 'system:dataPerm:edit', '2', null, '6', null, null);
|
||||
INSERT INTO `sys_menu` VALUES ('213', '209', '删除', null, 'system:dataPerm:remove', '2', null, '6', null, null);
|
||||
INSERT INTO `sys_menu` VALUES ('214', '209', '批量删除', null, 'system:dataPerm:batchRemove', '2', null, '6', null, null);
|
||||
INSERT INTO `sys_menu` VALUES ('221', '0', '作家管理', '', '', '0', 'fa fa-user-o', '10', null, null);
|
||||
INSERT INTO `sys_menu` VALUES ('222', '221', '作者列表', 'novel/author', 'novel:author:author', '1', 'fa', '6', null, null);
|
||||
INSERT INTO `sys_menu` VALUES ('223', '222', '查看', null, 'novel:author:detail', '2', null, '6', null, null);
|
||||
INSERT INTO `sys_menu` VALUES ('224', '222', '新增', null, 'novel:author:add', '2', null, '6', null, null);
|
||||
INSERT INTO `sys_menu` VALUES ('225', '222', '修改', null, 'novel:author:edit', '2', null, '6', null, null);
|
||||
INSERT INTO `sys_menu` VALUES ('226', '222', '删除', null, 'novel:author:remove', '2', null, '6', null, null);
|
||||
INSERT INTO `sys_menu` VALUES ('227', '222', '批量删除', null, 'novel:author:batchRemove', '2', null, '6', null, null);
|
||||
INSERT INTO `sys_menu` VALUES ('228', '221', '邀请码管理', 'novel/authorCode', 'novel:authorCode:authorCode', '1', 'fa', '3', null, null);
|
||||
INSERT INTO `sys_menu` VALUES ('229', '228', '查看', null, 'novel:authorCode:detail', '2', null, '6', null, null);
|
||||
INSERT INTO `sys_menu` VALUES ('230', '228', '新增', null, 'novel:authorCode:add', '2', null, '6', null, null);
|
||||
INSERT INTO `sys_menu` VALUES ('231', '228', '修改', null, 'novel:authorCode:edit', '2', null, '6', null, null);
|
||||
INSERT INTO `sys_menu` VALUES ('232', '228', '删除', null, 'novel:authorCode:remove', '2', null, '6', null, null);
|
||||
INSERT INTO `sys_menu` VALUES ('233', '228', '批量删除', null, 'novel:authorCode:batchRemove', '2', null, '6', null, null);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_role
|
||||
@ -906,9 +994,6 @@ CREATE TABLE `sys_role` (
|
||||
-- Records of sys_role
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_role` VALUES ('1', '超级用户角色', 'admin', '拥有最高权限', '2', '2017-08-12 00:43:52', '2017-08-12 19:14:59');
|
||||
INSERT INTO `sys_role` VALUES ('59', '普通用户', null, '基本用户权限', null, null, null);
|
||||
INSERT INTO `sys_role` VALUES ('60', '测试', null, '<div>', null, null, null);
|
||||
INSERT INTO `sys_role` VALUES ('61', 'test', null, '测试', null, null, null);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_role_data_perm
|
||||
@ -919,22 +1004,22 @@ CREATE TABLE `sys_role_data_perm` (
|
||||
`role_id` bigint(20) DEFAULT NULL COMMENT '角色ID',
|
||||
`perm_id` bigint(20) DEFAULT NULL COMMENT '权限ID',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8 COMMENT='角色与数据权限对应关系';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8 COMMENT='角色与数据权限对应关系';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_role_data_perm
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_role_data_perm` VALUES ('49', '1', '214');
|
||||
INSERT INTO `sys_role_data_perm` VALUES ('50', '1', '213');
|
||||
INSERT INTO `sys_role_data_perm` VALUES ('51', '1', '212');
|
||||
INSERT INTO `sys_role_data_perm` VALUES ('52', '1', '211');
|
||||
INSERT INTO `sys_role_data_perm` VALUES ('53', '1', '210');
|
||||
INSERT INTO `sys_role_data_perm` VALUES ('54', '1', '1199168630769283072');
|
||||
INSERT INTO `sys_role_data_perm` VALUES ('55', '1', '-1');
|
||||
INSERT INTO `sys_role_data_perm` VALUES ('56', '1', '1199168630454710272');
|
||||
INSERT INTO `sys_role_data_perm` VALUES ('60', '60', '211');
|
||||
INSERT INTO `sys_role_data_perm` VALUES ('61', '60', '-1');
|
||||
INSERT INTO `sys_role_data_perm` VALUES ('62', '60', '1199170283966787584');
|
||||
INSERT INTO `sys_role_data_perm` VALUES ('71', '1', '214');
|
||||
INSERT INTO `sys_role_data_perm` VALUES ('72', '1', '213');
|
||||
INSERT INTO `sys_role_data_perm` VALUES ('73', '1', '212');
|
||||
INSERT INTO `sys_role_data_perm` VALUES ('74', '1', '211');
|
||||
INSERT INTO `sys_role_data_perm` VALUES ('75', '1', '210');
|
||||
INSERT INTO `sys_role_data_perm` VALUES ('76', '1', '1260412100929482752');
|
||||
INSERT INTO `sys_role_data_perm` VALUES ('77', '1', '-1');
|
||||
INSERT INTO `sys_role_data_perm` VALUES ('78', '1', '1260412099998347264');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_role_menu
|
||||
@ -945,7 +1030,7 @@ CREATE TABLE `sys_role_menu` (
|
||||
`role_id` bigint(20) DEFAULT NULL COMMENT '角色ID',
|
||||
`menu_id` bigint(20) DEFAULT NULL COMMENT '菜单ID',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4704 DEFAULT CHARSET=utf8 COMMENT='角色与菜单对应关系';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4830 DEFAULT CHARSET=utf8 COMMENT='角色与菜单对应关系';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sys_role_menu
|
||||
@ -1166,59 +1251,6 @@ INSERT INTO `sys_role_menu` VALUES ('3280', '59', '3');
|
||||
INSERT INTO `sys_role_menu` VALUES ('3281', '59', '78');
|
||||
INSERT INTO `sys_role_menu` VALUES ('3282', '59', '1');
|
||||
INSERT INTO `sys_role_menu` VALUES ('3283', '59', '-1');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4505', '1', '208');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4506', '1', '207');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4507', '1', '206');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4508', '1', '205');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4509', '1', '204');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4510', '1', '92');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4511', '1', '57');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4512', '1', '30');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4513', '1', '29');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4514', '1', '28');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4515', '1', '104');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4516', '1', '48');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4517', '1', '214');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4518', '1', '213');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4519', '1', '212');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4520', '1', '211');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4521', '1', '210');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4522', '1', '76');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4523', '1', '75');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4524', '1', '74');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4525', '1', '62');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4526', '1', '56');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4527', '1', '55');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4528', '1', '15');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4529', '1', '26');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4530', '1', '25');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4531', '1', '24');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4532', '1', '14');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4533', '1', '13');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4534', '1', '12');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4535', '1', '61');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4536', '1', '22');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4537', '1', '21');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4538', '1', '20');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4539', '1', '83');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4540', '1', '81');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4541', '1', '80');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4542', '1', '79');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4543', '1', '71');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4544', '1', '203');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4545', '1', '202');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4546', '1', '27');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4547', '1', '91');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4548', '1', '77');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4549', '1', '209');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4550', '1', '73');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4551', '1', '7');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4552', '1', '6');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4553', '1', '2');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4554', '1', '3');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4555', '1', '78');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4556', '1', '1');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4557', '1', '-1');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4611', '61', '208');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4612', '61', '207');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4613', '61', '206');
|
||||
@ -1312,6 +1344,72 @@ INSERT INTO `sys_role_menu` VALUES ('4700', '60', '78');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4701', '60', '1');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4702', '60', '-1');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4703', '60', '3');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4764', '1', '227');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4765', '1', '226');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4766', '1', '225');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4767', '1', '224');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4768', '1', '223');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4769', '1', '208');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4770', '1', '207');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4771', '1', '206');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4772', '1', '205');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4773', '1', '204');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4774', '1', '92');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4775', '1', '57');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4776', '1', '30');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4777', '1', '29');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4778', '1', '28');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4779', '1', '104');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4780', '1', '48');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4781', '1', '214');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4782', '1', '213');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4783', '1', '212');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4784', '1', '211');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4785', '1', '210');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4786', '1', '76');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4787', '1', '75');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4788', '1', '74');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4789', '1', '62');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4790', '1', '56');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4791', '1', '55');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4792', '1', '15');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4793', '1', '26');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4794', '1', '25');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4795', '1', '24');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4796', '1', '14');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4797', '1', '13');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4798', '1', '12');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4799', '1', '61');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4800', '1', '22');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4801', '1', '21');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4802', '1', '20');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4803', '1', '83');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4804', '1', '81');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4805', '1', '80');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4806', '1', '79');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4807', '1', '71');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4808', '1', '222');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4809', '1', '203');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4810', '1', '202');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4811', '1', '27');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4812', '1', '91');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4813', '1', '77');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4814', '1', '209');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4815', '1', '73');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4816', '1', '7');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4817', '1', '6');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4818', '1', '2');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4819', '1', '3');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4820', '1', '78');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4821', '1', '1');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4822', '1', '228');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4823', '1', '233');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4824', '1', '232');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4825', '1', '231');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4826', '1', '230');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4827', '1', '229');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4828', '1', '221');
|
||||
INSERT INTO `sys_role_menu` VALUES ('4829', '1', '-1');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_user
|
||||
@ -1343,19 +1441,7 @@ CREATE TABLE `sys_user` (
|
||||
-- ----------------------------
|
||||
-- Records of sys_user
|
||||
-- ----------------------------
|
||||
INSERT INTO `sys_user` VALUES ('1', 'admin', '超级管理员', 'd633268afedf209e1e4ea0f5f43228a8', '6', 'admin@example.com', '17699999999', '1', '1', '2017-08-15 21:40:39', '2017-08-15 21:41:00', '96', '2017-12-14 00:00:00', '148', 'ccc', '122;121;', '北京市', '北京市市辖区', '东城区');
|
||||
INSERT INTO `sys_user` VALUES ('2', 'test', '临时用户', 'd0af8fa1272ef5a152d9e27763eea293', '6', 'test@bootdo.com', null, '1', '1', '2017-08-14 13:43:05', '2017-08-14 21:15:36', null, null, null, null, null, null, null, null);
|
||||
INSERT INTO `sys_user` VALUES ('36', 'ldh', '刘德华', 'bfd9394475754fbe45866eba97738c36', '7', 'ldh@bootdo.com', null, '1', null, null, null, null, null, null, null, null, null, null, null);
|
||||
INSERT INTO `sys_user` VALUES ('123', 'zxy', '张学友', '35174ba93f5fe7267f1fb3c1bf903781', '6', 'zxy@bootdo', null, '0', null, null, null, null, null, null, null, null, null, null, null);
|
||||
INSERT INTO `sys_user` VALUES ('124', 'wyf', '吴亦凡', 'e179e6f687bbd57b9d7efc4746c8090a', '6', 'wyf@bootdo.com', null, '1', null, null, null, null, null, null, null, null, null, null, null);
|
||||
INSERT INTO `sys_user` VALUES ('130', 'lh', '鹿晗', '7924710cd673f68967cde70e188bb097', '9', 'lh@bootdo.com', null, '1', null, null, null, null, null, null, null, null, null, null, null);
|
||||
INSERT INTO `sys_user` VALUES ('131', 'lhc', '令狐冲', 'd515538e17ecb570ba40344b5618f5d4', '6', 'lhc@bootdo.com', null, '0', null, null, null, null, null, null, null, null, null, null, null);
|
||||
INSERT INTO `sys_user` VALUES ('132', 'lyf', '刘亦菲', '7fdb1d9008f45950c1620ba0864e5fbd', '13', 'lyf@bootdo.com', null, '1', null, null, null, null, null, null, null, null, null, null, null);
|
||||
INSERT INTO `sys_user` VALUES ('134', 'lyh', '李彦宏', 'dc26092b3244d9d432863f2738180e19', '8', 'lyh@bootdo.com', null, '1', null, null, null, null, null, null, null, null, null, null, null);
|
||||
INSERT INTO `sys_user` VALUES ('135', 'wjl', '王健林', '3967697dfced162cf6a34080259b83aa', '6', 'wjl@bootod.com', null, '1', null, null, null, null, null, null, null, null, null, null, null);
|
||||
INSERT INTO `sys_user` VALUES ('136', 'gdg', '郭德纲', '3bb1bda86bc02bf6478cd91e42135d2f', '9', 'gdg@bootdo.com', null, '1', null, null, null, null, null, null, null, null, null, null, null);
|
||||
INSERT INTO `sys_user` VALUES ('137', 'test2', 'test2', '649169898e69272c0e5bc899baf1e904', null, '1179705413@qq.com', null, '1', null, null, null, null, null, null, null, null, null, null, null);
|
||||
INSERT INTO `sys_user` VALUES ('138', 'test3', 'test3', '4428f69c806f51128f3974f948a2f272', '16', '1179705413@qq.com', null, '1', null, null, null, null, null, null, null, null, null, null, null);
|
||||
INSERT INTO `sys_user` VALUES ('1', 'admin', '超级管理员', 'd633268afedf209e1e4ea0f5f43228a8', '14', 'admin@example.com', '17699999999', '1', '1', '2017-08-15 21:40:39', '2017-08-15 21:41:00', '96', '2017-12-14 00:00:00', '148', 'ccc', '122;121;', '北京市', '北京市市辖区', '东城区');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_user_role
|
||||
@ -1460,6 +1546,29 @@ INSERT INTO `user_bookshelf` VALUES ('39', '1255060328322027520', '1254681071191
|
||||
INSERT INTO `user_bookshelf` VALUES ('40', '1255060328322027520', '1254676970567565312', '3264258', '2020-04-30 09:57:18', '2020-04-30 19:19:11');
|
||||
INSERT INTO `user_bookshelf` VALUES ('41', '1255060328322027520', '1254675594315759616', '1254675594496114688', '2020-04-30 18:37:18', null);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for user_buy_record
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `user_buy_record`;
|
||||
CREATE TABLE `user_buy_record` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
|
||||
`book_id` bigint(20) DEFAULT NULL COMMENT '购买的小说ID',
|
||||
`book_name` varchar(50) DEFAULT NULL COMMENT '购买的小说名',
|
||||
`book_index_id` bigint(20) DEFAULT NULL COMMENT '购买的章节ID',
|
||||
`book_index_name` varchar(100) DEFAULT NULL COMMENT '购买的章节名',
|
||||
`buy_amount` int(11) DEFAULT NULL COMMENT '购买使用的屋币数量',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '购买时间',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `key_userId_indexId` (`user_id`,`book_index_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='用户消费记录表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of user_buy_record
|
||||
-- ----------------------------
|
||||
INSERT INTO `user_buy_record` VALUES ('1', '1255060328322027520', '1260400284744613890', '我是一只消消乐2', '1260522024606953472', '第三章', '10', '2020-05-13 21:29:09');
|
||||
INSERT INTO `user_buy_record` VALUES ('2', '1255060328322027520', '1260400284744613890', '我是一只消消乐2', '1260564410687107072', '第四章', '10', '2020-05-13 21:40:38');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for user_feedback
|
||||
-- ----------------------------
|
||||
@ -1513,3 +1622,225 @@ INSERT INTO `user_read_history` VALUES ('111', '1255060328322027520', '125495762
|
||||
INSERT INTO `user_read_history` VALUES ('113', '1255060328322027520', '1254676970567565312', '3264258', '2020-04-30 19:19:11', '2020-04-30 19:19:11');
|
||||
INSERT INTO `user_read_history` VALUES ('117', '1255060328322027520', '1254946661743603712', '1254946914001629184', '2020-04-30 19:37:09', '2020-04-30 19:37:09');
|
||||
INSERT INTO `user_read_history` VALUES ('118', '1255060328322027520', '1254957312633352192', '3335449', '2020-04-30 19:37:36', '2020-04-30 19:37:36');
|
||||
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `book_content0`;
|
||||
CREATE TABLE `book_content0` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`index_id` bigint(20) DEFAULT NULL COMMENT '目录ID',
|
||||
`content` mediumtext COMMENT '小说章节内容',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1155 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for book_content1
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `book_content1`;
|
||||
CREATE TABLE `book_content1` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`index_id` bigint(20) DEFAULT NULL COMMENT '目录ID',
|
||||
`content` mediumtext COMMENT '小说章节内容',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=406 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for book_content2
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `book_content2`;
|
||||
CREATE TABLE `book_content2` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`index_id` bigint(20) DEFAULT NULL COMMENT '目录ID',
|
||||
`content` mediumtext COMMENT '小说章节内容',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1222 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for book_content3
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `book_content3`;
|
||||
CREATE TABLE `book_content3` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`index_id` bigint(20) DEFAULT NULL COMMENT '目录ID',
|
||||
`content` mediumtext COMMENT '小说章节内容',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=410 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for book_content4
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `book_content4`;
|
||||
CREATE TABLE `book_content4` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`index_id` bigint(20) DEFAULT NULL COMMENT '目录ID',
|
||||
`content` mediumtext COMMENT '小说章节内容',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1188 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for book_content5
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `book_content5`;
|
||||
CREATE TABLE `book_content5` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`index_id` bigint(20) DEFAULT NULL COMMENT '目录ID',
|
||||
`content` mediumtext COMMENT '小说章节内容',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=416 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for book_content6
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `book_content6`;
|
||||
CREATE TABLE `book_content6` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`index_id` bigint(20) DEFAULT NULL COMMENT '目录ID',
|
||||
`content` mediumtext COMMENT '小说章节内容',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1180 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for book_content7
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `book_content7`;
|
||||
CREATE TABLE `book_content7` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`index_id` bigint(20) DEFAULT NULL COMMENT '目录ID',
|
||||
`content` mediumtext COMMENT '小说章节内容',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=404 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for book_content8
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `book_content8`;
|
||||
CREATE TABLE `book_content8` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`index_id` bigint(20) DEFAULT NULL COMMENT '目录ID',
|
||||
`content` mediumtext COMMENT '小说章节内容',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1134 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for book_content9
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `book_content9`;
|
||||
CREATE TABLE `book_content9` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`index_id` bigint(20) DEFAULT NULL COMMENT '目录ID',
|
||||
`content` mediumtext COMMENT '小说章节内容',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `key_uq_indexId` (`index_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=415 DEFAULT CHARSET=utf8mb4 COMMENT='小说内容表';
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `crawl_single_task`;
|
||||
CREATE TABLE `crawl_single_task` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`source_id` int(11) DEFAULT NULL COMMENT '爬虫源ID',
|
||||
`source_name` varchar(50) DEFAULT NULL COMMENT '爬虫源名',
|
||||
`source_book_id` varchar(255) DEFAULT NULL COMMENT '源站小说ID',
|
||||
`cat_id` int(11) DEFAULT NULL COMMENT '分类ID',
|
||||
`book_name` varchar(50) DEFAULT NULL COMMENT '爬取的小说名',
|
||||
`author_name` varchar(50) DEFAULT NULL COMMENT '爬取的小说作者名',
|
||||
`task_status` tinyint(1) DEFAULT '2' COMMENT '任务状态,0:失败,1:成功,2;未执行',
|
||||
`exc_count` tinyint(2) DEFAULT '0' COMMENT '已经执行次数,最多执行5次',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COMMENT='抓取单本小说任务表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of crawl_single_task
|
||||
-- ----------------------------
|
||||
INSERT INTO `crawl_single_task` VALUES ('6', '2', '百书斋', '1', '1', '1', '1', '0', '5', '2020-06-15 14:36:07');
|
||||
INSERT INTO `crawl_single_task` VALUES ('7', '5', '笔趣阁', '108_108291', '1', '衍天志之不朽仙', '白衣少年丶', '1', '1', '2020-06-15 14:46:08');
|
||||
UPDATE `crawl_source` SET `source_name` = '书趣阁', `crawl_rule` = '{\n \"bookListUrl\": \"http://m.shuquge.com/sort/{catId}/0_{page}.html\",\n \"catIdRule\": {\n \"catId1\": \"1\",\n \"catId2\": \"2\",\n \"catId3\": \"3\",\n \"catId4\": \"4\",\n \"catId5\": \"7\",\n \"catId6\": \"6\",\n \"catId7\": \"8\"\n },\n \"bookIdPatten\": \"href=\\\"/s/(\\\\d+)\\\\.html\\\"\",\n \"pagePatten\": \"第(\\\\d+)/\\\\d+页\",\n \"totalPagePatten\": \"第\\\\d+/(\\\\d+)页\",\n \"bookDetailUrl\": \"http://m.shuquge.com/s/{bookId}.html\",\n \"bookNamePatten\": \"<a\\\\s+href=\\\"/s/\\\\d+\\\\.html\\\"><h2>([^/]+)</h2></a>\",\n \"authorNamePatten\": \"<p>作者:([^/]+)</p>\",\n \"picUrlPatten\": \"src=\\\"(http://www.shuquge.com/files/article/image/\\\\d+/\\\\d+/\\\\d+s\\\\.jpg)\\\"\",\n \"statusPatten\": \"<p>状态:([^/]+)</p>\",\n \"bookStatusRule\": {\n \"连载中\": 0,\n \"完本\": 1\n },\n \"descStart\": \"<div class=\\\"intro_info\\\">\",\n \"descEnd\": \"最新章节推荐地址\",\n \"bookIndexUrl\": \"http://www.shuquge.com/txt/{bookId}/index.html\",\n \"bookIndexStart\": \"<dt>《\",\n \"indexIdPatten\": \"<dd><a\\\\s+href=\\\"(\\\\d+)\\\\.html\\\">[^/]+</a></dd>\",\n \"indexNamePatten\": \"<dd><a\\\\s+href=\\\"\\\\d+\\\\.html\\\">([^/]+)</a></dd>\",\n \"bookContentUrl\": \"http://www.shuquge.com/txt/{bookId}/{indexId}.html\",\n \"contentStart\": \"<div id=\\\"content\\\" class=\\\"showtxt\\\">\",\n \"contentEnd\": \"http://www.shuquge.com\"\n}', `source_status` = 1, `create_time` = '2020-05-18 12:02:34', `update_time` = '2020-05-18 12:02:34' WHERE `id` = 4;
|
||||
|
||||
INSERT INTO `friend_link` ( `link_name`, `link_url`, `sort`, `is_open`, `create_user_id`, `create_time`, `update_user_id`, `update_time`) VALUES
|
||||
('小羊影视', 'http://video.java2nb.com/', 11, 1, NULL, NULL, NULL, NULL),
|
||||
('官方论坛', 'http://bbs.java2nb.com', 21, 1, NULL, NULL, NULL, NULL);
|
||||
|
||||
|
||||
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='稿费收入统计表';
|
||||
|
||||
|
||||
alter table book add column `yesterday_buy` int(11) DEFAULT '0' COMMENT '昨日订阅数' after comment_count;
|
||||
|
||||
alter table book_index add column `book_price` int(3) DEFAULT 0 COMMENT '章节费用(屋币)' after `is_vip`;
|
||||
|
||||
|
||||
|
||||
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;
|
||||
|
||||
INSERT INTO crawl_source(`id`, `source_name`, `crawl_rule`, `source_status`, `create_time`, `update_time`) VALUES (16, 'i笔趣阁', '{\"bookListUrl\":\"http://m.ibiquge.net/xclass/{catId}/{page}.html\",\"catIdRule\":{\"catId1\":\"1\",\"catId2\":\"2\",\"catId3\":\"3\",\"catId4\":\"4\",\"catId5\":\"6\",\"catId6\":\"5\",\"catId7\":\"7\"},\"bookIdPatten\":\"href=\\\"/(\\\\d+_\\\\d+)/\\\"\",\"pagePatten\":\"value=\\\"(\\\\d+)/\\\\d+\\\"\",\"totalPagePatten\":\"value=\\\"\\\\d+/(\\\\d+)\\\"\",\"bookDetailUrl\":\"http://m.ibiquge.net/{bookId}/\",\"bookNamePatten\":\"<span class=\\\"title\\\">([^/]+)</span>\",\"authorNamePatten\":\"<a href=\\\"/author/\\\\d+/\\\">([^/]+)</a>\",\"picUrlPatten\":\"<img src=\\\"([^>]+)\\\"\\\\s+onerror=\\\"this.src=\",\"picUrlPrefix\":\"http://m.ibiquge.net\",\"statusPatten\":\">状态:([^/]+)</li>\",\"bookStatusRule\":{\"连载\":0,\"完结\":1},\"visitCountPatten\":\">点击:(\\\\d+)</li>\",\"descStart\":\"<p class=\\\"review\\\">\",\"descEnd\":\"</p>\",\"bookIndexUrl\":\"http://www.ibiquge.net/{bookId}/\",\"bookIndexStart\":\"正文</dt>\",\"indexIdPatten\":\"<a\\\\s+style=\\\"\\\"\\\\s+href=\\\"/\\\\d+_\\\\d+/(\\\\d+)\\\\.html\\\">[^/]+</a>\",\"indexNamePatten\":\"<a\\\\s+style=\\\"\\\"\\\\s+href=\\\"/\\\\d+_\\\\d+/\\\\d+\\\\.html\\\">([^/]+)</a>\",\"bookContentUrl\":\"http://www.ibiquge.net/{bookId}/{indexId}.html\",\"contentStart\":\"</p>\",\"contentEnd\":\"<div align=\\\"center\\\">\"}', 0, '2021-02-04 21:31:23', '2021-02-04 21:31:23');
|
||||
|
||||
alter table news add column `read_count` BIGINT NOT NULL DEFAULT '0' COMMENT '阅读量' after content;
|
||||
|
||||
|
||||
alter table book_index add column storage_type varchar(10) NOT NULL DEFAULT 'db' COMMENT '存储方式' after book_price ;
|
3
doc/sql/readme.md
Normal file
3
doc/sql/readme.md
Normal file
@ -0,0 +1,3 @@
|
||||
1. novel_plus.sql 为全量 sql 文件,yyyyMMdd.sql 为增量 sql 文件
|
||||
2. 第一次安装只需要执行 novel_plus.sql 文件即可
|
||||
3. 后续版本升级需要根据上次代码版本的时间,执行该日期之后的增量 sql 文件(简单来说就是 sql 文件夹中相较于上次多出来的 sql 文件)
|
6
novel-admin/Dockerfile
Normal file
6
novel-admin/Dockerfile
Normal file
@ -0,0 +1,6 @@
|
||||
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"]
|
@ -1,5 +0,0 @@
|
||||
2020-05-13 21:52:00,972 INFO (StartupInfoLogger.java:50)- Starting TestDemo on USER-20180729KA with PID 3532 (started by Administrator in E:\baseprojectparent\novel-plus\novel-admin)
|
||||
2020-05-13 21:52:01,113 DEBUG (StartupInfoLogger.java:53)- Running with Spring Boot v2.0.1.RELEASE, Spring v5.0.5.RELEASE
|
||||
2020-05-13 21:52:01,131 INFO (SpringApplication.java:663)- The following profiles are active: dev
|
||||
2020-05-13 21:52:54,469 DEBUG (ApplicationContextRegister.java:29)- ApplicationContext registed-->org.springframework.web.context.support.GenericWebApplicationContext@5b529706: startup date [Wed May 13 21:52:01 CST 2020]; root of context hierarchy
|
||||
2020-05-13 21:53:49,622 INFO (StartupInfoLogger.java:59)- Started TestDemo in 114.268 seconds (JVM running for 124.957)
|
@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>com.java2nb</groupId>
|
||||
<artifactId>novel-admin</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<version>3.6.2</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>novel-admin</name>
|
||||
@ -106,7 +106,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-spring</artifactId>
|
||||
<version>1.3.2</version>
|
||||
<version>1.7.0</version>
|
||||
</dependency>
|
||||
<!-- shiro ehcache -->
|
||||
<dependency>
|
||||
@ -137,10 +137,6 @@
|
||||
<artifactId>velocity</artifactId>
|
||||
<version>1.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-cache</artifactId>
|
||||
</dependency>
|
||||
<!--<dependency>-->
|
||||
<!--<groupId>org.springframework.boot</groupId>-->
|
||||
<!--<artifactId>spring-boot-starter-data-redis</artifactId>-->
|
||||
@ -228,29 +224,73 @@
|
||||
<!--<scope>provided</scope>-->
|
||||
<!--</dependency>-->
|
||||
</dependencies>
|
||||
<!-- <build>
|
||||
<plugins>
|
||||
<!–<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>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>–>
|
||||
<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>
|
||||
<configuration>
|
||||
<executable>true</executable>
|
||||
</configuration>
|
||||
</plugin>-->
|
||||
<!--SpringBoot项目默认使用spring-boot-maven-plugin,要打成被其他项目引用的jar包,需要更换此插件-->
|
||||
<!-- <plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>-->
|
||||
<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>
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<!--<distributionManagement>
|
||||
|
10
novel-admin/src/main/build/config/application-prod.yml
Normal file
10
novel-admin/src/main/build/config/application-prod.yml
Normal file
@ -0,0 +1,10 @@
|
||||
#端口号
|
||||
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
|
||||
|
||||
|
94
novel-admin/src/main/build/scripts/novel-admin.sh
Normal file
94
novel-admin/src/main/build/scripts/novel-admin.sh
Normal 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
|
@ -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"));
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -75,7 +75,6 @@ public class ShiroConfig {
|
||||
filterChainDefinitionMap.put("/img/**", "anon");
|
||||
filterChainDefinitionMap.put("/docs/**", "anon");
|
||||
filterChainDefinitionMap.put("/layuimini/**", "anon");
|
||||
filterChainDefinitionMap.put("/druid/**", "anon");
|
||||
filterChainDefinitionMap.put("/upload/**", "anon");
|
||||
filterChainDefinitionMap.put("/files/**", "anon");
|
||||
filterChainDefinitionMap.put("/logout", "logout");
|
||||
|
@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
@ -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.CategoryDO;
|
||||
import com.java2nb.novel.service.CategoryService;
|
||||
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 10:03:41
|
||||
*/
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/novel/category")
|
||||
public class CategoryController {
|
||||
@Autowired
|
||||
private CategoryService categoryService;
|
||||
|
||||
@GetMapping()
|
||||
@RequiresPermissions("novel:category:category")
|
||||
String Category() {
|
||||
return "novel/category/category";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取新闻类别表列表", notes = "获取新闻类别表列表")
|
||||
@ResponseBody
|
||||
@GetMapping("/list")
|
||||
@RequiresPermissions("novel:category:category")
|
||||
public R list(@RequestParam Map<String, Object> params) {
|
||||
//查询列表数据
|
||||
Query query = new Query(params);
|
||||
List<CategoryDO> categoryList = categoryService.list(query);
|
||||
int total = categoryService.count(query);
|
||||
PageBean pageBean = new PageBean(categoryList, total);
|
||||
return R.ok().put("data", pageBean);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新增新闻类别表页面", notes = "新增新闻类别表页面")
|
||||
@GetMapping("/add")
|
||||
@RequiresPermissions("novel:category:add")
|
||||
String add() {
|
||||
return "novel/category/add";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改新闻类别表页面", notes = "修改新闻类别表页面")
|
||||
@GetMapping("/edit/{id}")
|
||||
@RequiresPermissions("novel:category:edit")
|
||||
String edit(@PathVariable("id") Integer id, Model model) {
|
||||
CategoryDO category = categoryService.get(id);
|
||||
model.addAttribute("category", category);
|
||||
return "novel/category/edit";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查看新闻类别表页面", notes = "查看新闻类别表页面")
|
||||
@GetMapping("/detail/{id}")
|
||||
@RequiresPermissions("novel:category:detail")
|
||||
String detail(@PathVariable("id") Integer id, Model model) {
|
||||
CategoryDO category = categoryService.get(id);
|
||||
model.addAttribute("category", category);
|
||||
return "novel/category/detail";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@ApiOperation(value = "新增新闻类别表", notes = "新增新闻类别表")
|
||||
@ResponseBody
|
||||
@PostMapping("/save")
|
||||
@RequiresPermissions("novel:category:add")
|
||||
public R save( CategoryDO category) {
|
||||
if (categoryService.save(category) > 0) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@ApiOperation(value = "修改新闻类别表", notes = "修改新闻类别表")
|
||||
@ResponseBody
|
||||
@RequestMapping("/update")
|
||||
@RequiresPermissions("novel:category:edit")
|
||||
public R update( CategoryDO category) {
|
||||
categoryService.update(category);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@ApiOperation(value = "删除新闻类别表", notes = "删除新闻类别表")
|
||||
@PostMapping("/remove")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("novel:category:remove")
|
||||
public R remove( Integer id) {
|
||||
if (categoryService.remove(id) > 0) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@ApiOperation(value = "批量删除新闻类别表", notes = "批量删除新闻类别表")
|
||||
@PostMapping("/batchRemove")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("novel:category:batchRemove")
|
||||
public R remove(@RequestParam("ids[]") Integer[] ids) {
|
||||
categoryService.batchRemove(ids);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -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.NewsDO;
|
||||
import com.java2nb.novel.service.NewsService;
|
||||
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 10:05:51
|
||||
*/
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/novel/news")
|
||||
public class NewsController {
|
||||
@Autowired
|
||||
private NewsService newsService;
|
||||
|
||||
@GetMapping()
|
||||
@RequiresPermissions("novel:news:news")
|
||||
String News() {
|
||||
return "novel/news/news";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取新闻表列表", notes = "获取新闻表列表")
|
||||
@ResponseBody
|
||||
@GetMapping("/list")
|
||||
@RequiresPermissions("novel:news:news")
|
||||
public R list(@RequestParam Map<String, Object> params) {
|
||||
//查询列表数据
|
||||
Query query = new Query(params);
|
||||
List<NewsDO> newsList = newsService.list(query);
|
||||
int total = newsService.count(query);
|
||||
PageBean pageBean = new PageBean(newsList, total);
|
||||
return R.ok().put("data", pageBean);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新增新闻表页面", notes = "新增新闻表页面")
|
||||
@GetMapping("/add")
|
||||
@RequiresPermissions("novel:news:add")
|
||||
String add() {
|
||||
return "novel/news/add";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改新闻表页面", notes = "修改新闻表页面")
|
||||
@GetMapping("/edit/{id}")
|
||||
@RequiresPermissions("novel:news:edit")
|
||||
String edit(@PathVariable("id") Long id, Model model) {
|
||||
NewsDO news = newsService.get(id);
|
||||
model.addAttribute("news", news);
|
||||
return "novel/news/edit";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查看新闻表页面", notes = "查看新闻表页面")
|
||||
@GetMapping("/detail/{id}")
|
||||
@RequiresPermissions("novel:news:detail")
|
||||
String detail(@PathVariable("id") Long id, Model model) {
|
||||
NewsDO news = newsService.get(id);
|
||||
model.addAttribute("news", news);
|
||||
return "novel/news/detail";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@ApiOperation(value = "新增新闻表", notes = "新增新闻表")
|
||||
@ResponseBody
|
||||
@PostMapping("/save")
|
||||
@RequiresPermissions("novel:news:add")
|
||||
public R save( NewsDO news) {
|
||||
if (newsService.save(news) > 0) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@ApiOperation(value = "修改新闻表", notes = "修改新闻表")
|
||||
@ResponseBody
|
||||
@RequestMapping("/update")
|
||||
@RequiresPermissions("novel:news:edit")
|
||||
public R update( NewsDO news) {
|
||||
newsService.update(news);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@ApiOperation(value = "删除新闻表", notes = "删除新闻表")
|
||||
@PostMapping("/remove")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("novel:news:remove")
|
||||
public R remove( Long id) {
|
||||
if (newsService.remove(id) > 0) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@ApiOperation(value = "批量删除新闻表", notes = "批量删除新闻表")
|
||||
@PostMapping("/batchRemove")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("novel:news:batchRemove")
|
||||
public R remove(@RequestParam("ids[]") Long[] ids) {
|
||||
newsService.batchRemove(ids);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -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.PayDO;
|
||||
import com.java2nb.novel.service.PayService;
|
||||
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:57
|
||||
*/
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/novel/pay")
|
||||
public class PayController {
|
||||
@Autowired
|
||||
private PayService payService;
|
||||
|
||||
@GetMapping()
|
||||
@RequiresPermissions("novel:pay:pay")
|
||||
String Pay() {
|
||||
return "novel/pay/pay";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取充值订单列表", notes = "获取充值订单列表")
|
||||
@ResponseBody
|
||||
@GetMapping("/list")
|
||||
@RequiresPermissions("novel:pay:pay")
|
||||
public R list(@RequestParam Map<String, Object> params) {
|
||||
//查询列表数据
|
||||
Query query = new Query(params);
|
||||
List<PayDO> payList = payService.list(query);
|
||||
int total = payService.count(query);
|
||||
PageBean pageBean = new PageBean(payList, total);
|
||||
return R.ok().put("data", pageBean);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新增充值订单页面", notes = "新增充值订单页面")
|
||||
@GetMapping("/add")
|
||||
@RequiresPermissions("novel:pay:add")
|
||||
String add() {
|
||||
return "novel/pay/add";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改充值订单页面", notes = "修改充值订单页面")
|
||||
@GetMapping("/edit/{id}")
|
||||
@RequiresPermissions("novel:pay:edit")
|
||||
String edit(@PathVariable("id") Long id, Model model) {
|
||||
PayDO pay = payService.get(id);
|
||||
model.addAttribute("pay", pay);
|
||||
return "novel/pay/edit";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查看充值订单页面", notes = "查看充值订单页面")
|
||||
@GetMapping("/detail/{id}")
|
||||
@RequiresPermissions("novel:pay:detail")
|
||||
String detail(@PathVariable("id") Long id, Model model) {
|
||||
PayDO pay = payService.get(id);
|
||||
model.addAttribute("pay", pay);
|
||||
return "novel/pay/detail";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@ApiOperation(value = "新增充值订单", notes = "新增充值订单")
|
||||
@ResponseBody
|
||||
@PostMapping("/save")
|
||||
@RequiresPermissions("novel:pay:add")
|
||||
public R save( PayDO pay) {
|
||||
if (payService.save(pay) > 0) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@ApiOperation(value = "修改充值订单", notes = "修改充值订单")
|
||||
@ResponseBody
|
||||
@RequestMapping("/update")
|
||||
@RequiresPermissions("novel:pay:edit")
|
||||
public R update( PayDO pay) {
|
||||
payService.update(pay);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@ApiOperation(value = "删除充值订单", notes = "删除充值订单")
|
||||
@PostMapping("/remove")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("novel:pay:remove")
|
||||
public R remove( Long id) {
|
||||
if (payService.remove(id) > 0) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@ApiOperation(value = "批量删除充值订单", notes = "批量删除充值订单")
|
||||
@PostMapping("/batchRemove")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("novel:pay:batchRemove")
|
||||
public R remove(@RequestParam("ids[]") Long[] ids) {
|
||||
payService.batchRemove(ids);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package com.java2nb.novel.controller;
|
||||
|
||||
import com.java2nb.common.utils.DateUtils;
|
||||
import com.java2nb.common.utils.R;
|
||||
import com.java2nb.novel.service.AuthorService;
|
||||
import com.java2nb.novel.service.BookService;
|
||||
import com.java2nb.novel.service.PayService;
|
||||
import com.java2nb.novel.service.UserService;
|
||||
import lombok.SneakyThrows;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 统计
|
||||
*
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-12-01 03:40:12
|
||||
*/
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/novel/stat")
|
||||
public class StatController {
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@Autowired
|
||||
private AuthorService authorService;
|
||||
|
||||
@Autowired
|
||||
private BookService bookService;
|
||||
|
||||
@Autowired
|
||||
private PayService orderPayService;
|
||||
|
||||
|
||||
@ResponseBody
|
||||
@GetMapping("/countSta")
|
||||
public R countUser() {
|
||||
Map map = new HashMap<>(0);
|
||||
int userCount = userService.count(map);
|
||||
int authorCount = authorService.count(map);
|
||||
int bookCount = bookService.count(map);
|
||||
int orderCount = orderPayService.count(map);
|
||||
return R.ok().put("userCount",userCount)
|
||||
.put("authorCount",authorCount)
|
||||
.put("bookCount",bookCount)
|
||||
.put("orderCount",orderCount);
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@GetMapping("/tableSta")
|
||||
@SneakyThrows
|
||||
public R tableSta() {
|
||||
Date currentDate = new Date();
|
||||
List<String> dateList = DateUtils.getDateList(7,currentDate);
|
||||
Date minDate = new SimpleDateFormat("yyyy-MM-dd").parse(dateList.get(0));
|
||||
Map<Object,Object> userTableSta = userService.tableSta(minDate);
|
||||
Map<Object,Object> bookTableSta = bookService.tableSta(minDate);
|
||||
Map<Object,Object> authorTableSta = authorService.tableSta(minDate);
|
||||
Map<Object,Object> orderTableSta = orderPayService.tableSta(minDate);
|
||||
return R.ok().put("dateList",dateList)
|
||||
.put("userTableSta",userTableSta)
|
||||
.put("bookTableSta",bookTableSta)
|
||||
.put("authorTableSta",authorTableSta)
|
||||
.put("orderTableSta",orderTableSta)
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -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.UserDO;
|
||||
import com.java2nb.novel.service.UserService;
|
||||
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:08
|
||||
*/
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/novel/user")
|
||||
public class UserController {
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@GetMapping()
|
||||
@RequiresPermissions("novel:user:user")
|
||||
String User() {
|
||||
return "novel/user/user";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取列表", notes = "获取列表")
|
||||
@ResponseBody
|
||||
@GetMapping("/list")
|
||||
@RequiresPermissions("novel:user:user")
|
||||
public R list(@RequestParam Map<String, Object> params) {
|
||||
//查询列表数据
|
||||
Query query = new Query(params);
|
||||
List<UserDO> userList = userService.list(query);
|
||||
int total = userService.count(query);
|
||||
PageBean pageBean = new PageBean(userList, total);
|
||||
return R.ok().put("data", pageBean);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新增页面", notes = "新增页面")
|
||||
@GetMapping("/add")
|
||||
@RequiresPermissions("novel:user:add")
|
||||
String add() {
|
||||
return "novel/user/add";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改页面", notes = "修改页面")
|
||||
@GetMapping("/edit/{id}")
|
||||
@RequiresPermissions("novel:user:edit")
|
||||
String edit(@PathVariable("id") Long id, Model model) {
|
||||
UserDO user = userService.get(id);
|
||||
model.addAttribute("user", user);
|
||||
return "novel/user/edit";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查看页面", notes = "查看页面")
|
||||
@GetMapping("/detail/{id}")
|
||||
@RequiresPermissions("novel:user:detail")
|
||||
String detail(@PathVariable("id") Long id, Model model) {
|
||||
UserDO user = userService.get(id);
|
||||
model.addAttribute("user", user);
|
||||
return "novel/user/detail";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@ApiOperation(value = "新增", notes = "新增")
|
||||
@ResponseBody
|
||||
@PostMapping("/save")
|
||||
@RequiresPermissions("novel:user:add")
|
||||
public R save( UserDO user) {
|
||||
if (userService.save(user) > 0) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@ApiOperation(value = "修改", notes = "修改")
|
||||
@ResponseBody
|
||||
@RequestMapping("/update")
|
||||
@RequiresPermissions("novel:user:edit")
|
||||
public R update( UserDO user) {
|
||||
userService.update(user);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@ApiOperation(value = "删除", notes = "删除")
|
||||
@PostMapping("/remove")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("novel:user:remove")
|
||||
public R remove( Long id) {
|
||||
if (userService.remove(id) > 0) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@ApiOperation(value = "批量删除", notes = "批量删除")
|
||||
@PostMapping("/batchRemove")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("novel:user:batchRemove")
|
||||
public R remove(@RequestParam("ids[]") Long[] ids) {
|
||||
userService.batchRemove(ids);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -2,6 +2,7 @@ package com.java2nb.novel.dao;
|
||||
|
||||
import com.java2nb.novel.domain.AuthorDO;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -29,4 +30,6 @@ public interface AuthorDao {
|
||||
int remove(Long id);
|
||||
|
||||
int batchRemove(Long[] ids);
|
||||
|
||||
List<Map<Object, Object>> tableSta(Date minDate);
|
||||
}
|
||||
|
35
novel-admin/src/main/java/com/java2nb/novel/dao/BookDao.java
Normal file
35
novel-admin/src/main/java/com/java2nb/novel/dao/BookDao.java
Normal file
@ -0,0 +1,35 @@
|
||||
package com.java2nb.novel.dao;
|
||||
|
||||
import com.java2nb.novel.domain.BookDO;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 小说表
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-12-01 03:49:46
|
||||
*/
|
||||
@Mapper
|
||||
public interface BookDao {
|
||||
|
||||
BookDO get(Long id);
|
||||
|
||||
List<BookDO> list(Map<String,Object> map);
|
||||
|
||||
int count(Map<String,Object> map);
|
||||
|
||||
int save(BookDO book);
|
||||
|
||||
int update(BookDO book);
|
||||
|
||||
int remove(Long id);
|
||||
|
||||
int batchRemove(Long[] ids);
|
||||
|
||||
List<Map<Object, Object>> tableSta(Date minDate);
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.java2nb.novel.dao;
|
||||
|
||||
import com.java2nb.novel.domain.CategoryDO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 新闻类别表
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-12-01 10:03:41
|
||||
*/
|
||||
@Mapper
|
||||
public interface CategoryDao {
|
||||
|
||||
CategoryDO get(Integer id);
|
||||
|
||||
List<CategoryDO> list(Map<String,Object> map);
|
||||
|
||||
int count(Map<String,Object> map);
|
||||
|
||||
int save(CategoryDO category);
|
||||
|
||||
int update(CategoryDO category);
|
||||
|
||||
int remove(Integer id);
|
||||
|
||||
int batchRemove(Integer[] ids);
|
||||
}
|
32
novel-admin/src/main/java/com/java2nb/novel/dao/NewsDao.java
Normal file
32
novel-admin/src/main/java/com/java2nb/novel/dao/NewsDao.java
Normal file
@ -0,0 +1,32 @@
|
||||
package com.java2nb.novel.dao;
|
||||
|
||||
import com.java2nb.novel.domain.NewsDO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 新闻表
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-12-01 10:05:51
|
||||
*/
|
||||
@Mapper
|
||||
public interface NewsDao {
|
||||
|
||||
NewsDO get(Long id);
|
||||
|
||||
List<NewsDO> list(Map<String,Object> map);
|
||||
|
||||
int count(Map<String,Object> map);
|
||||
|
||||
int save(NewsDO news);
|
||||
|
||||
int update(NewsDO news);
|
||||
|
||||
int remove(Long id);
|
||||
|
||||
int batchRemove(Long[] ids);
|
||||
}
|
35
novel-admin/src/main/java/com/java2nb/novel/dao/PayDao.java
Normal file
35
novel-admin/src/main/java/com/java2nb/novel/dao/PayDao.java
Normal file
@ -0,0 +1,35 @@
|
||||
package com.java2nb.novel.dao;
|
||||
|
||||
import com.java2nb.novel.domain.PayDO;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 充值订单
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-12-01 03:49:57
|
||||
*/
|
||||
@Mapper
|
||||
public interface PayDao {
|
||||
|
||||
PayDO get(Long id);
|
||||
|
||||
List<PayDO> list(Map<String,Object> map);
|
||||
|
||||
int count(Map<String,Object> map);
|
||||
|
||||
int save(PayDO pay);
|
||||
|
||||
int update(PayDO pay);
|
||||
|
||||
int remove(Long id);
|
||||
|
||||
int batchRemove(Long[] ids);
|
||||
|
||||
List<Map<Object, Object>> tableSta(Date minDate);
|
||||
}
|
35
novel-admin/src/main/java/com/java2nb/novel/dao/UserDao.java
Normal file
35
novel-admin/src/main/java/com/java2nb/novel/dao/UserDao.java
Normal file
@ -0,0 +1,35 @@
|
||||
package com.java2nb.novel.dao;
|
||||
|
||||
import com.java2nb.novel.domain.UserDO;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-12-01 03:49:08
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserDao {
|
||||
|
||||
UserDO get(Long id);
|
||||
|
||||
List<UserDO> list(Map<String,Object> map);
|
||||
|
||||
int count(Map<String,Object> map);
|
||||
|
||||
int save(UserDO user);
|
||||
|
||||
int update(UserDO user);
|
||||
|
||||
int remove(Long id);
|
||||
|
||||
int batchRemove(Long[] ids);
|
||||
|
||||
List<Map<Object, Object>> tableSta(Date minDate);
|
||||
}
|
493
novel-admin/src/main/java/com/java2nb/novel/domain/BookDO.java
Normal file
493
novel-admin/src/main/java/com/java2nb/novel/domain/BookDO.java
Normal file
@ -0,0 +1,493 @@
|
||||
package com.java2nb.novel.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.java2nb.common.jsonserializer.LongToStringSerializer;
|
||||
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 小说表
|
||||
*
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-12-01 03:49:46
|
||||
*/
|
||||
public class BookDO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
//主键
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long id;
|
||||
//作品方向,0:男频,1:女频'
|
||||
private Integer workDirection;
|
||||
//分类ID
|
||||
private Integer catId;
|
||||
//分类名
|
||||
private String catName;
|
||||
//子分类ID
|
||||
private Integer catChildId;
|
||||
//子分类名
|
||||
private String catChildName;
|
||||
//小说封面
|
||||
private String picUrl;
|
||||
//小说名
|
||||
private String bookName;
|
||||
//男主角姓名
|
||||
private String heroName;
|
||||
//女主角姓名
|
||||
private String ladyName;
|
||||
//作品风格,0:甜宠,1:虐恋,2:其他
|
||||
private Integer bookStyle;
|
||||
//作品标签
|
||||
private String bookLabel;
|
||||
//作者id
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long authorId;
|
||||
//作者名
|
||||
private String authorName;
|
||||
//书籍描述
|
||||
private String bookDesc;
|
||||
//评分,预留字段
|
||||
private Float score;
|
||||
//书籍状态,0:连载中,1:已完结
|
||||
private Integer bookStatus;
|
||||
//点击量
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long visitCount;
|
||||
//总字数
|
||||
private Integer wordCount;
|
||||
//评论数
|
||||
private Integer commentCount;
|
||||
//昨日订阅数
|
||||
private Integer yesterdayBuy;
|
||||
//最新目录ID
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long lastIndexId;
|
||||
//最新目录名
|
||||
private String lastIndexName;
|
||||
//最新目录更新时间
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date lastIndexUpdateTime;
|
||||
//是否收费,1:收费,0:免费
|
||||
private Integer isVip;
|
||||
//状态,0:入库,1:上架
|
||||
private Integer status;
|
||||
//更新时间
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
//创建时间
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
//爬虫源站ID
|
||||
private Integer crawlSourceId;
|
||||
//抓取的源站小说ID
|
||||
private String crawlBookId;
|
||||
//最后一次的抓取时间
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date crawlLastTime;
|
||||
//是否已停止更新,0:未停止,1:已停止
|
||||
private Integer crawlIsStop;
|
||||
|
||||
/**
|
||||
* 设置:主键
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
/**
|
||||
* 获取:主键
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
* 设置:作品方向,0:男频,1:女频'
|
||||
*/
|
||||
public void setWorkDirection(Integer workDirection) {
|
||||
this.workDirection = workDirection;
|
||||
}
|
||||
/**
|
||||
* 获取:作品方向,0:男频,1:女频'
|
||||
*/
|
||||
public Integer getWorkDirection() {
|
||||
return workDirection;
|
||||
}
|
||||
/**
|
||||
* 设置:分类ID
|
||||
*/
|
||||
public void setCatId(Integer catId) {
|
||||
this.catId = catId;
|
||||
}
|
||||
/**
|
||||
* 获取:分类ID
|
||||
*/
|
||||
public Integer getCatId() {
|
||||
return catId;
|
||||
}
|
||||
/**
|
||||
* 设置:分类名
|
||||
*/
|
||||
public void setCatName(String catName) {
|
||||
this.catName = catName;
|
||||
}
|
||||
/**
|
||||
* 获取:分类名
|
||||
*/
|
||||
public String getCatName() {
|
||||
return catName;
|
||||
}
|
||||
/**
|
||||
* 设置:子分类ID
|
||||
*/
|
||||
public void setCatChildId(Integer catChildId) {
|
||||
this.catChildId = catChildId;
|
||||
}
|
||||
/**
|
||||
* 获取:子分类ID
|
||||
*/
|
||||
public Integer getCatChildId() {
|
||||
return catChildId;
|
||||
}
|
||||
/**
|
||||
* 设置:子分类名
|
||||
*/
|
||||
public void setCatChildName(String catChildName) {
|
||||
this.catChildName = catChildName;
|
||||
}
|
||||
/**
|
||||
* 获取:子分类名
|
||||
*/
|
||||
public String getCatChildName() {
|
||||
return catChildName;
|
||||
}
|
||||
/**
|
||||
* 设置:小说封面
|
||||
*/
|
||||
public void setPicUrl(String picUrl) {
|
||||
this.picUrl = picUrl;
|
||||
}
|
||||
/**
|
||||
* 获取:小说封面
|
||||
*/
|
||||
public String getPicUrl() {
|
||||
return picUrl;
|
||||
}
|
||||
/**
|
||||
* 设置:小说名
|
||||
*/
|
||||
public void setBookName(String bookName) {
|
||||
this.bookName = bookName;
|
||||
}
|
||||
/**
|
||||
* 获取:小说名
|
||||
*/
|
||||
public String getBookName() {
|
||||
return bookName;
|
||||
}
|
||||
/**
|
||||
* 设置:男主角姓名
|
||||
*/
|
||||
public void setHeroName(String heroName) {
|
||||
this.heroName = heroName;
|
||||
}
|
||||
/**
|
||||
* 获取:男主角姓名
|
||||
*/
|
||||
public String getHeroName() {
|
||||
return heroName;
|
||||
}
|
||||
/**
|
||||
* 设置:女主角姓名
|
||||
*/
|
||||
public void setLadyName(String ladyName) {
|
||||
this.ladyName = ladyName;
|
||||
}
|
||||
/**
|
||||
* 获取:女主角姓名
|
||||
*/
|
||||
public String getLadyName() {
|
||||
return ladyName;
|
||||
}
|
||||
/**
|
||||
* 设置:作品风格,0:甜宠,1:虐恋,2:其他
|
||||
*/
|
||||
public void setBookStyle(Integer bookStyle) {
|
||||
this.bookStyle = bookStyle;
|
||||
}
|
||||
/**
|
||||
* 获取:作品风格,0:甜宠,1:虐恋,2:其他
|
||||
*/
|
||||
public Integer getBookStyle() {
|
||||
return bookStyle;
|
||||
}
|
||||
/**
|
||||
* 设置:作品标签
|
||||
*/
|
||||
public void setBookLabel(String bookLabel) {
|
||||
this.bookLabel = bookLabel;
|
||||
}
|
||||
/**
|
||||
* 获取:作品标签
|
||||
*/
|
||||
public String getBookLabel() {
|
||||
return bookLabel;
|
||||
}
|
||||
/**
|
||||
* 设置:作者id
|
||||
*/
|
||||
public void setAuthorId(Long authorId) {
|
||||
this.authorId = authorId;
|
||||
}
|
||||
/**
|
||||
* 获取:作者id
|
||||
*/
|
||||
public Long getAuthorId() {
|
||||
return authorId;
|
||||
}
|
||||
/**
|
||||
* 设置:作者名
|
||||
*/
|
||||
public void setAuthorName(String authorName) {
|
||||
this.authorName = authorName;
|
||||
}
|
||||
/**
|
||||
* 获取:作者名
|
||||
*/
|
||||
public String getAuthorName() {
|
||||
return authorName;
|
||||
}
|
||||
/**
|
||||
* 设置:书籍描述
|
||||
*/
|
||||
public void setBookDesc(String bookDesc) {
|
||||
this.bookDesc = bookDesc;
|
||||
}
|
||||
/**
|
||||
* 获取:书籍描述
|
||||
*/
|
||||
public String getBookDesc() {
|
||||
return bookDesc;
|
||||
}
|
||||
/**
|
||||
* 设置:评分,预留字段
|
||||
*/
|
||||
public void setScore(Float score) {
|
||||
this.score = score;
|
||||
}
|
||||
/**
|
||||
* 获取:评分,预留字段
|
||||
*/
|
||||
public Float getScore() {
|
||||
return score;
|
||||
}
|
||||
/**
|
||||
* 设置:书籍状态,0:连载中,1:已完结
|
||||
*/
|
||||
public void setBookStatus(Integer bookStatus) {
|
||||
this.bookStatus = bookStatus;
|
||||
}
|
||||
/**
|
||||
* 获取:书籍状态,0:连载中,1:已完结
|
||||
*/
|
||||
public Integer getBookStatus() {
|
||||
return bookStatus;
|
||||
}
|
||||
/**
|
||||
* 设置:点击量
|
||||
*/
|
||||
public void setVisitCount(Long visitCount) {
|
||||
this.visitCount = visitCount;
|
||||
}
|
||||
/**
|
||||
* 获取:点击量
|
||||
*/
|
||||
public Long getVisitCount() {
|
||||
return visitCount;
|
||||
}
|
||||
/**
|
||||
* 设置:总字数
|
||||
*/
|
||||
public void setWordCount(Integer wordCount) {
|
||||
this.wordCount = wordCount;
|
||||
}
|
||||
/**
|
||||
* 获取:总字数
|
||||
*/
|
||||
public Integer getWordCount() {
|
||||
return wordCount;
|
||||
}
|
||||
/**
|
||||
* 设置:评论数
|
||||
*/
|
||||
public void setCommentCount(Integer commentCount) {
|
||||
this.commentCount = commentCount;
|
||||
}
|
||||
/**
|
||||
* 获取:评论数
|
||||
*/
|
||||
public Integer getCommentCount() {
|
||||
return commentCount;
|
||||
}
|
||||
/**
|
||||
* 设置:昨日订阅数
|
||||
*/
|
||||
public void setYesterdayBuy(Integer yesterdayBuy) {
|
||||
this.yesterdayBuy = yesterdayBuy;
|
||||
}
|
||||
/**
|
||||
* 获取:昨日订阅数
|
||||
*/
|
||||
public Integer getYesterdayBuy() {
|
||||
return yesterdayBuy;
|
||||
}
|
||||
/**
|
||||
* 设置:最新目录ID
|
||||
*/
|
||||
public void setLastIndexId(Long lastIndexId) {
|
||||
this.lastIndexId = lastIndexId;
|
||||
}
|
||||
/**
|
||||
* 获取:最新目录ID
|
||||
*/
|
||||
public Long getLastIndexId() {
|
||||
return lastIndexId;
|
||||
}
|
||||
/**
|
||||
* 设置:最新目录名
|
||||
*/
|
||||
public void setLastIndexName(String lastIndexName) {
|
||||
this.lastIndexName = lastIndexName;
|
||||
}
|
||||
/**
|
||||
* 获取:最新目录名
|
||||
*/
|
||||
public String getLastIndexName() {
|
||||
return lastIndexName;
|
||||
}
|
||||
/**
|
||||
* 设置:最新目录更新时间
|
||||
*/
|
||||
public void setLastIndexUpdateTime(Date lastIndexUpdateTime) {
|
||||
this.lastIndexUpdateTime = lastIndexUpdateTime;
|
||||
}
|
||||
/**
|
||||
* 获取:最新目录更新时间
|
||||
*/
|
||||
public Date getLastIndexUpdateTime() {
|
||||
return lastIndexUpdateTime;
|
||||
}
|
||||
/**
|
||||
* 设置:是否收费,1:收费,0:免费
|
||||
*/
|
||||
public void setIsVip(Integer isVip) {
|
||||
this.isVip = isVip;
|
||||
}
|
||||
/**
|
||||
* 获取:是否收费,1:收费,0:免费
|
||||
*/
|
||||
public Integer getIsVip() {
|
||||
return isVip;
|
||||
}
|
||||
/**
|
||||
* 设置:状态,0:入库,1:上架
|
||||
*/
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
/**
|
||||
* 获取:状态,0:入库,1:上架
|
||||
*/
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
/**
|
||||
* 设置:更新时间
|
||||
*/
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
/**
|
||||
* 获取:更新时间
|
||||
*/
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
/**
|
||||
* 设置:创建时间
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
/**
|
||||
* 获取:创建时间
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
/**
|
||||
* 设置:爬虫源站ID
|
||||
*/
|
||||
public void setCrawlSourceId(Integer crawlSourceId) {
|
||||
this.crawlSourceId = crawlSourceId;
|
||||
}
|
||||
/**
|
||||
* 获取:爬虫源站ID
|
||||
*/
|
||||
public Integer getCrawlSourceId() {
|
||||
return crawlSourceId;
|
||||
}
|
||||
/**
|
||||
* 设置:抓取的源站小说ID
|
||||
*/
|
||||
public void setCrawlBookId(String crawlBookId) {
|
||||
this.crawlBookId = crawlBookId;
|
||||
}
|
||||
/**
|
||||
* 获取:抓取的源站小说ID
|
||||
*/
|
||||
public String getCrawlBookId() {
|
||||
return crawlBookId;
|
||||
}
|
||||
/**
|
||||
* 设置:最后一次的抓取时间
|
||||
*/
|
||||
public void setCrawlLastTime(Date crawlLastTime) {
|
||||
this.crawlLastTime = crawlLastTime;
|
||||
}
|
||||
/**
|
||||
* 获取:最后一次的抓取时间
|
||||
*/
|
||||
public Date getCrawlLastTime() {
|
||||
return crawlLastTime;
|
||||
}
|
||||
/**
|
||||
* 设置:是否已停止更新,0:未停止,1:已停止
|
||||
*/
|
||||
public void setCrawlIsStop(Integer crawlIsStop) {
|
||||
this.crawlIsStop = crawlIsStop;
|
||||
}
|
||||
/**
|
||||
* 获取:是否已停止更新,0:未停止,1:已停止
|
||||
*/
|
||||
public Integer getCrawlIsStop() {
|
||||
return crawlIsStop;
|
||||
}
|
||||
}
|
@ -0,0 +1,135 @@
|
||||
package com.java2nb.novel.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.java2nb.common.jsonserializer.LongToStringSerializer;
|
||||
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新闻类别表
|
||||
*
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-12-01 10:03:41
|
||||
*/
|
||||
public class CategoryDO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
//主键
|
||||
private Integer id;
|
||||
//分类名
|
||||
private String name;
|
||||
//排序
|
||||
private Integer sort;
|
||||
//
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long createUserId;
|
||||
//
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
//
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long updateUserId;
|
||||
//
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 设置:主键
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
/**
|
||||
* 获取:主键
|
||||
*/
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
* 设置:分类名
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
/**
|
||||
* 获取:分类名
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
/**
|
||||
* 设置:排序
|
||||
*/
|
||||
public void setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
/**
|
||||
* 获取:排序
|
||||
*/
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
/**
|
||||
* 设置:
|
||||
*/
|
||||
public void setCreateUserId(Long createUserId) {
|
||||
this.createUserId = createUserId;
|
||||
}
|
||||
/**
|
||||
* 获取:
|
||||
*/
|
||||
public Long getCreateUserId() {
|
||||
return createUserId;
|
||||
}
|
||||
/**
|
||||
* 设置:
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
/**
|
||||
* 获取:
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
/**
|
||||
* 设置:
|
||||
*/
|
||||
public void setUpdateUserId(Long updateUserId) {
|
||||
this.updateUserId = updateUserId;
|
||||
}
|
||||
/**
|
||||
* 获取:
|
||||
*/
|
||||
public Long getUpdateUserId() {
|
||||
return updateUserId;
|
||||
}
|
||||
/**
|
||||
* 设置:
|
||||
*/
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
/**
|
||||
* 获取:
|
||||
*/
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
}
|
180
novel-admin/src/main/java/com/java2nb/novel/domain/NewsDO.java
Normal file
180
novel-admin/src/main/java/com/java2nb/novel/domain/NewsDO.java
Normal file
@ -0,0 +1,180 @@
|
||||
package com.java2nb.novel.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.java2nb.common.jsonserializer.LongToStringSerializer;
|
||||
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新闻表
|
||||
*
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-12-01 10:05:51
|
||||
*/
|
||||
public class NewsDO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
//主键
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long id;
|
||||
//类别ID
|
||||
private Integer catId;
|
||||
//分类名
|
||||
private String catName;
|
||||
//来源
|
||||
private String sourceName;
|
||||
//标题
|
||||
private String title;
|
||||
//内容
|
||||
private String content;
|
||||
//发布时间
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
//发布人ID
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long createUserId;
|
||||
//更新时间
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
//更新人ID
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long updateUserId;
|
||||
|
||||
/**
|
||||
* 设置:主键
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
/**
|
||||
* 获取:主键
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
* 设置:类别ID
|
||||
*/
|
||||
public void setCatId(Integer catId) {
|
||||
this.catId = catId;
|
||||
}
|
||||
/**
|
||||
* 获取:类别ID
|
||||
*/
|
||||
public Integer getCatId() {
|
||||
return catId;
|
||||
}
|
||||
/**
|
||||
* 设置:分类名
|
||||
*/
|
||||
public void setCatName(String catName) {
|
||||
this.catName = catName;
|
||||
}
|
||||
/**
|
||||
* 获取:分类名
|
||||
*/
|
||||
public String getCatName() {
|
||||
return catName;
|
||||
}
|
||||
/**
|
||||
* 设置:来源
|
||||
*/
|
||||
public void setSourceName(String sourceName) {
|
||||
this.sourceName = sourceName;
|
||||
}
|
||||
/**
|
||||
* 获取:来源
|
||||
*/
|
||||
public String getSourceName() {
|
||||
return sourceName;
|
||||
}
|
||||
/**
|
||||
* 设置:标题
|
||||
*/
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
/**
|
||||
* 获取:标题
|
||||
*/
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
/**
|
||||
* 设置:内容
|
||||
*/
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
/**
|
||||
* 获取:内容
|
||||
*/
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
/**
|
||||
* 设置:发布时间
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
/**
|
||||
* 获取:发布时间
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
/**
|
||||
* 设置:发布人ID
|
||||
*/
|
||||
public void setCreateUserId(Long createUserId) {
|
||||
this.createUserId = createUserId;
|
||||
}
|
||||
/**
|
||||
* 获取:发布人ID
|
||||
*/
|
||||
public Long getCreateUserId() {
|
||||
return createUserId;
|
||||
}
|
||||
/**
|
||||
* 设置:更新时间
|
||||
*/
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
/**
|
||||
* 获取:更新时间
|
||||
*/
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
/**
|
||||
* 设置:更新人ID
|
||||
*/
|
||||
public void setUpdateUserId(Long updateUserId) {
|
||||
this.updateUserId = updateUserId;
|
||||
}
|
||||
/**
|
||||
* 获取:更新人ID
|
||||
*/
|
||||
public Long getUpdateUserId() {
|
||||
return updateUserId;
|
||||
}
|
||||
}
|
166
novel-admin/src/main/java/com/java2nb/novel/domain/PayDO.java
Normal file
166
novel-admin/src/main/java/com/java2nb/novel/domain/PayDO.java
Normal file
@ -0,0 +1,166 @@
|
||||
package com.java2nb.novel.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.java2nb.common.jsonserializer.LongToStringSerializer;
|
||||
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 充值订单
|
||||
*
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-12-01 03:49:57
|
||||
*/
|
||||
public class PayDO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
//主键
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long id;
|
||||
//保留
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long outTradeNo;
|
||||
//订单号
|
||||
private String tradeNo;
|
||||
//保留
|
||||
private Integer payChannel;
|
||||
//交易香蕉币
|
||||
private Integer totalAmount;
|
||||
//支付用户ID
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long userId;
|
||||
//支付状态:0:支付失败,1:支付成功,2:待支付
|
||||
private Integer payStatus;
|
||||
//创建时间
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
//更新时间
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 设置:主键
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
/**
|
||||
* 获取:主键
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
* 设置:保留
|
||||
*/
|
||||
public void setOutTradeNo(Long outTradeNo) {
|
||||
this.outTradeNo = outTradeNo;
|
||||
}
|
||||
/**
|
||||
* 获取:保留
|
||||
*/
|
||||
public Long getOutTradeNo() {
|
||||
return outTradeNo;
|
||||
}
|
||||
/**
|
||||
* 设置:订单号
|
||||
*/
|
||||
public void setTradeNo(String tradeNo) {
|
||||
this.tradeNo = tradeNo;
|
||||
}
|
||||
/**
|
||||
* 获取:订单号
|
||||
*/
|
||||
public String getTradeNo() {
|
||||
return tradeNo;
|
||||
}
|
||||
/**
|
||||
* 设置:保留
|
||||
*/
|
||||
public void setPayChannel(Integer payChannel) {
|
||||
this.payChannel = payChannel;
|
||||
}
|
||||
/**
|
||||
* 获取:保留
|
||||
*/
|
||||
public Integer getPayChannel() {
|
||||
return payChannel;
|
||||
}
|
||||
/**
|
||||
* 设置:交易香蕉币
|
||||
*/
|
||||
public void setTotalAmount(Integer totalAmount) {
|
||||
this.totalAmount = totalAmount;
|
||||
}
|
||||
/**
|
||||
* 获取:交易香蕉币
|
||||
*/
|
||||
public Integer getTotalAmount() {
|
||||
return totalAmount;
|
||||
}
|
||||
/**
|
||||
* 设置:支付用户ID
|
||||
*/
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
/**
|
||||
* 获取:支付用户ID
|
||||
*/
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
/**
|
||||
* 设置:支付状态:0:支付失败,1:支付成功,2:待支付
|
||||
*/
|
||||
public void setPayStatus(Integer payStatus) {
|
||||
this.payStatus = payStatus;
|
||||
}
|
||||
/**
|
||||
* 获取:支付状态:0:支付失败,1:支付成功,2:待支付
|
||||
*/
|
||||
public Integer getPayStatus() {
|
||||
return payStatus;
|
||||
}
|
||||
/**
|
||||
* 设置:创建时间
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
/**
|
||||
* 获取:创建时间
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
/**
|
||||
* 设置:更新时间
|
||||
*/
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
/**
|
||||
* 获取:更新时间
|
||||
*/
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
}
|
177
novel-admin/src/main/java/com/java2nb/novel/domain/UserDO.java
Normal file
177
novel-admin/src/main/java/com/java2nb/novel/domain/UserDO.java
Normal file
@ -0,0 +1,177 @@
|
||||
package com.java2nb.novel.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.java2nb.common.jsonserializer.LongToStringSerializer;
|
||||
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-12-01 03:49:08
|
||||
*/
|
||||
public class UserDO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
//主键
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long id;
|
||||
//登录名
|
||||
private String username;
|
||||
//登录密码
|
||||
private String password;
|
||||
//昵称
|
||||
private String nickName;
|
||||
//用户头像
|
||||
private String userPhoto;
|
||||
//用户性别,0:男,1:女
|
||||
private Integer userSex;
|
||||
//账户余额
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long accountBalance;
|
||||
//用户状态,0:正常
|
||||
private Integer status;
|
||||
//创建时间
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
//更新时间
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 设置:主键
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
/**
|
||||
* 获取:主键
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
* 设置:登录名
|
||||
*/
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
/**
|
||||
* 获取:登录名
|
||||
*/
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
/**
|
||||
* 设置:登录密码
|
||||
*/
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
/**
|
||||
* 获取:登录密码
|
||||
*/
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
/**
|
||||
* 设置:昵称
|
||||
*/
|
||||
public void setNickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
}
|
||||
/**
|
||||
* 获取:昵称
|
||||
*/
|
||||
public String getNickName() {
|
||||
return nickName;
|
||||
}
|
||||
/**
|
||||
* 设置:用户头像
|
||||
*/
|
||||
public void setUserPhoto(String userPhoto) {
|
||||
this.userPhoto = userPhoto;
|
||||
}
|
||||
/**
|
||||
* 获取:用户头像
|
||||
*/
|
||||
public String getUserPhoto() {
|
||||
return userPhoto;
|
||||
}
|
||||
/**
|
||||
* 设置:用户性别,0:男,1:女
|
||||
*/
|
||||
public void setUserSex(Integer userSex) {
|
||||
this.userSex = userSex;
|
||||
}
|
||||
/**
|
||||
* 获取:用户性别,0:男,1:女
|
||||
*/
|
||||
public Integer getUserSex() {
|
||||
return userSex;
|
||||
}
|
||||
/**
|
||||
* 设置:账户余额
|
||||
*/
|
||||
public void setAccountBalance(Long accountBalance) {
|
||||
this.accountBalance = accountBalance;
|
||||
}
|
||||
/**
|
||||
* 获取:账户余额
|
||||
*/
|
||||
public Long getAccountBalance() {
|
||||
return accountBalance;
|
||||
}
|
||||
/**
|
||||
* 设置:用户状态,0:正常
|
||||
*/
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
/**
|
||||
* 获取:用户状态,0:正常
|
||||
*/
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
/**
|
||||
* 设置:创建时间
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
/**
|
||||
* 获取:创建时间
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
/**
|
||||
* 设置:更新时间
|
||||
*/
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
/**
|
||||
* 获取:更新时间
|
||||
*/
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
}
|
@ -2,6 +2,7 @@ package com.java2nb.novel.service;
|
||||
|
||||
import com.java2nb.novel.domain.AuthorDO;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -27,4 +28,6 @@ public interface AuthorService {
|
||||
int remove(Long id);
|
||||
|
||||
int batchRemove(Long[] ids);
|
||||
|
||||
Map<Object, Object> tableSta(Date minDate);
|
||||
}
|
||||
|
@ -0,0 +1,33 @@
|
||||
package com.java2nb.novel.service;
|
||||
|
||||
import com.java2nb.novel.domain.BookDO;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 小说表
|
||||
*
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-12-01 03:49:46
|
||||
*/
|
||||
public interface BookService {
|
||||
|
||||
BookDO get(Long id);
|
||||
|
||||
List<BookDO> list(Map<String, Object> map);
|
||||
|
||||
int count(Map<String, Object> map);
|
||||
|
||||
int save(BookDO book);
|
||||
|
||||
int update(BookDO book);
|
||||
|
||||
int remove(Long id);
|
||||
|
||||
int batchRemove(Long[] ids);
|
||||
|
||||
Map<Object, Object> tableSta(Date minDate);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.java2nb.novel.service;
|
||||
|
||||
import com.java2nb.novel.domain.CategoryDO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 新闻类别表
|
||||
*
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-12-01 10:03:41
|
||||
*/
|
||||
public interface CategoryService {
|
||||
|
||||
CategoryDO get(Integer id);
|
||||
|
||||
List<CategoryDO> list(Map<String, Object> map);
|
||||
|
||||
int count(Map<String, Object> map);
|
||||
|
||||
int save(CategoryDO category);
|
||||
|
||||
int update(CategoryDO category);
|
||||
|
||||
int remove(Integer id);
|
||||
|
||||
int batchRemove(Integer[] ids);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.java2nb.novel.service;
|
||||
|
||||
import com.java2nb.novel.domain.NewsDO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 新闻表
|
||||
*
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-12-01 10:05:51
|
||||
*/
|
||||
public interface NewsService {
|
||||
|
||||
NewsDO get(Long id);
|
||||
|
||||
List<NewsDO> list(Map<String, Object> map);
|
||||
|
||||
int count(Map<String, Object> map);
|
||||
|
||||
int save(NewsDO news);
|
||||
|
||||
int update(NewsDO news);
|
||||
|
||||
int remove(Long id);
|
||||
|
||||
int batchRemove(Long[] ids);
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.java2nb.novel.service;
|
||||
|
||||
import com.java2nb.novel.domain.PayDO;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 充值订单
|
||||
*
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-12-01 03:49:57
|
||||
*/
|
||||
public interface PayService {
|
||||
|
||||
PayDO get(Long id);
|
||||
|
||||
List<PayDO> list(Map<String, Object> map);
|
||||
|
||||
int count(Map<String, Object> map);
|
||||
|
||||
int save(PayDO pay);
|
||||
|
||||
int update(PayDO pay);
|
||||
|
||||
int remove(Long id);
|
||||
|
||||
int batchRemove(Long[] ids);
|
||||
|
||||
Map<Object, Object> tableSta(Date minDate);
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.java2nb.novel.service;
|
||||
|
||||
import com.java2nb.novel.domain.UserDO;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2020-12-01 03:49:08
|
||||
*/
|
||||
public interface UserService {
|
||||
|
||||
UserDO get(Long id);
|
||||
|
||||
List<UserDO> list(Map<String, Object> map);
|
||||
|
||||
int count(Map<String, Object> map);
|
||||
|
||||
int save(UserDO user);
|
||||
|
||||
int update(UserDO user);
|
||||
|
||||
int remove(Long id);
|
||||
|
||||
int batchRemove(Long[] ids);
|
||||
|
||||
Map<Object, Object> tableSta(Date minDate);
|
||||
}
|
@ -3,8 +3,10 @@ package com.java2nb.novel.service.impl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.java2nb.novel.dao.AuthorDao;
|
||||
import com.java2nb.novel.domain.AuthorDO;
|
||||
@ -51,5 +53,14 @@ public class AuthorServiceImpl implements AuthorService {
|
||||
public int batchRemove(Long[] ids){
|
||||
return authorDao.batchRemove(ids);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Map<Object, Object> tableSta(Date minDate) {
|
||||
List<Map<Object, Object>> maps = authorDao.tableSta(minDate);
|
||||
|
||||
return maps.stream().collect(Collectors.toMap(x -> x.get("staDate"), x -> x.get("authorCount")));
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,65 @@
|
||||
package com.java2nb.novel.service.impl;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.java2nb.novel.dao.BookDao;
|
||||
import com.java2nb.novel.domain.BookDO;
|
||||
import com.java2nb.novel.service.BookService;
|
||||
|
||||
|
||||
|
||||
@Service
|
||||
public class BookServiceImpl implements BookService {
|
||||
@Autowired
|
||||
private BookDao bookDao;
|
||||
|
||||
@Override
|
||||
public BookDO get(Long id){
|
||||
return bookDao.get(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BookDO> list(Map<String, Object> map){
|
||||
return bookDao.list(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int count(Map<String, Object> map){
|
||||
return bookDao.count(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int save(BookDO book){
|
||||
return bookDao.save(book);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(BookDO book){
|
||||
return bookDao.update(book);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int remove(Long id){
|
||||
return bookDao.remove(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchRemove(Long[] ids){
|
||||
return bookDao.batchRemove(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Object, Object> tableSta(Date minDate) {
|
||||
List<Map<Object, Object>> maps = bookDao.tableSta(minDate);
|
||||
|
||||
return maps.stream().collect(Collectors.toMap(x -> x.get("staDate"), x -> x.get("bookCount")));
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.java2nb.novel.service.impl;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.java2nb.novel.dao.CategoryDao;
|
||||
import com.java2nb.novel.domain.CategoryDO;
|
||||
import com.java2nb.novel.service.CategoryService;
|
||||
|
||||
|
||||
|
||||
@Service
|
||||
public class CategoryServiceImpl implements CategoryService {
|
||||
@Autowired
|
||||
private CategoryDao categoryDao;
|
||||
|
||||
@Override
|
||||
public CategoryDO get(Integer id){
|
||||
return categoryDao.get(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CategoryDO> list(Map<String, Object> map){
|
||||
return categoryDao.list(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int count(Map<String, Object> map){
|
||||
return categoryDao.count(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int save(CategoryDO category){
|
||||
category.setCreateTime(new Date());
|
||||
return categoryDao.save(category);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(CategoryDO category){
|
||||
category.setUpdateTime(new Date());
|
||||
return categoryDao.update(category);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int remove(Integer id){
|
||||
return categoryDao.remove(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchRemove(Integer[] ids){
|
||||
return categoryDao.batchRemove(ids);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.java2nb.novel.service.impl;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.java2nb.novel.dao.NewsDao;
|
||||
import com.java2nb.novel.domain.NewsDO;
|
||||
import com.java2nb.novel.service.NewsService;
|
||||
|
||||
|
||||
|
||||
@Service
|
||||
public class NewsServiceImpl implements NewsService {
|
||||
@Autowired
|
||||
private NewsDao newsDao;
|
||||
|
||||
@Override
|
||||
public NewsDO get(Long id){
|
||||
return newsDao.get(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NewsDO> list(Map<String, Object> map){
|
||||
return newsDao.list(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int count(Map<String, Object> map){
|
||||
return newsDao.count(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int save(NewsDO news){
|
||||
news.setCreateTime(new Date());
|
||||
return newsDao.save(news);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(NewsDO news){
|
||||
news.setUpdateTime(new Date());
|
||||
return newsDao.update(news);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int remove(Long id){
|
||||
return newsDao.remove(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchRemove(Long[] ids){
|
||||
return newsDao.batchRemove(ids);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
package com.java2nb.novel.service.impl;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.java2nb.novel.dao.PayDao;
|
||||
import com.java2nb.novel.domain.PayDO;
|
||||
import com.java2nb.novel.service.PayService;
|
||||
|
||||
|
||||
|
||||
@Service
|
||||
public class PayServiceImpl implements PayService {
|
||||
@Autowired
|
||||
private PayDao payDao;
|
||||
|
||||
@Override
|
||||
public PayDO get(Long id){
|
||||
return payDao.get(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PayDO> list(Map<String, Object> map){
|
||||
return payDao.list(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int count(Map<String, Object> map){
|
||||
return payDao.count(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int save(PayDO pay){
|
||||
return payDao.save(pay);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(PayDO pay){
|
||||
return payDao.update(pay);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int remove(Long id){
|
||||
return payDao.remove(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchRemove(Long[] ids){
|
||||
return payDao.batchRemove(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Object, Object> tableSta(Date minDate) {
|
||||
List<Map<Object, Object>> maps = payDao.tableSta(minDate);
|
||||
|
||||
return maps.stream().collect(Collectors.toMap(x -> x.get("staDate"), x -> x.get("orderCount")));
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.java2nb.novel.service.impl;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.java2nb.novel.dao.UserDao;
|
||||
import com.java2nb.novel.domain.UserDO;
|
||||
import com.java2nb.novel.service.UserService;
|
||||
|
||||
|
||||
|
||||
@Service
|
||||
public class UserServiceImpl implements UserService {
|
||||
@Autowired
|
||||
private UserDao userDao;
|
||||
|
||||
@Override
|
||||
public UserDO get(Long id){
|
||||
return userDao.get(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserDO> list(Map<String, Object> map){
|
||||
return userDao.list(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int count(Map<String, Object> map){
|
||||
return userDao.count(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int save(UserDO user){
|
||||
return userDao.save(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(UserDO user){
|
||||
return userDao.update(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int remove(Long id){
|
||||
return userDao.remove(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchRemove(Long[] ids){
|
||||
return userDao.batchRemove(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Object, Object> tableSta(Date minDate) {
|
||||
|
||||
List<Map<Object, Object>> maps = userDao.tableSta(minDate);
|
||||
|
||||
return maps.stream().collect(Collectors.toMap(x -> x.get("staDate"), x -> x.get("userCount")));
|
||||
}
|
||||
|
||||
}
|
@ -10,7 +10,7 @@ import com.java2nb.system.domain.DeptDO;
|
||||
import com.java2nb.system.domain.RoleDO;
|
||||
import com.java2nb.system.domain.UserDO;
|
||||
import com.java2nb.system.service.RoleService;
|
||||
import com.java2nb.system.service.UserService;
|
||||
import com.java2nb.system.service.SysUserService;
|
||||
import com.java2nb.system.vo.UserVO;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@ -27,10 +27,10 @@ import java.util.Map;
|
||||
|
||||
@RequestMapping("/sys/user")
|
||||
@Controller
|
||||
public class UserController extends BaseController {
|
||||
public class SysUserController extends BaseController {
|
||||
private String prefix="system/user" ;
|
||||
@Autowired
|
||||
UserService userService;
|
||||
SysUserService userService;
|
||||
@Autowired
|
||||
RoleService roleService;
|
||||
@Autowired
|
@ -15,7 +15,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
* @date 2019-10-03 09:45:11
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserDao {
|
||||
public interface SysUserDao {
|
||||
|
||||
UserDO get(Long userId);
|
||||
|
@ -13,7 +13,7 @@ import com.java2nb.system.domain.UserDO;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@Service
|
||||
public interface UserService {
|
||||
public interface SysUserService {
|
||||
UserDO get(Long id);
|
||||
|
||||
List<UserDO> list(Map<String, Object> map);
|
@ -8,8 +8,6 @@ import java.util.Objects;
|
||||
import com.java2nb.system.dao.*;
|
||||
import com.java2nb.system.domain.RoleDataPermDO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@ -30,7 +28,7 @@ public class RoleServiceImpl implements RoleService {
|
||||
@Autowired
|
||||
RoleMenuDao roleMenuMapper;
|
||||
@Autowired
|
||||
UserDao userMapper;
|
||||
SysUserDao userMapper;
|
||||
@Autowired
|
||||
UserRoleDao userRoleMapper;
|
||||
@Autowired
|
||||
|
@ -19,21 +19,21 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.java2nb.common.domain.Tree;
|
||||
import com.java2nb.system.dao.DeptDao;
|
||||
import com.java2nb.system.dao.UserDao;
|
||||
import com.java2nb.system.dao.SysUserDao;
|
||||
import com.java2nb.system.dao.UserRoleDao;
|
||||
import com.java2nb.system.domain.DeptDO;
|
||||
import com.java2nb.system.domain.UserDO;
|
||||
import com.java2nb.system.domain.UserRoleDO;
|
||||
import com.java2nb.system.service.UserService;
|
||||
import com.java2nb.system.service.SysUserService;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
@Transactional
|
||||
@Service
|
||||
public class UserServiceImpl implements UserService {
|
||||
public class SysUserServiceImpl implements SysUserService {
|
||||
@Autowired
|
||||
UserDao userMapper;
|
||||
SysUserDao userMapper;
|
||||
@Autowired
|
||||
UserRoleDao userRoleMapper;
|
||||
@Autowired
|
||||
@ -44,7 +44,7 @@ public class UserServiceImpl implements UserService {
|
||||
private JnConfig jnConfig;
|
||||
@Autowired
|
||||
DeptService deptService;
|
||||
private static final Logger logger = LoggerFactory.getLogger(UserService.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(SysUserService.class);
|
||||
|
||||
@Override
|
||||
// @Cacheable(value = "user",key = "#id")
|
@ -6,7 +6,6 @@ import com.java2nb.common.config.ApplicationContextRegister;
|
||||
import com.java2nb.system.dao.DataPermDao;
|
||||
import com.java2nb.system.dao.DeptDao;
|
||||
import com.java2nb.system.domain.DataPermDO;
|
||||
import com.java2nb.system.domain.UserToken;
|
||||
import org.apache.shiro.authc.AuthenticationException;
|
||||
import org.apache.shiro.authc.AuthenticationInfo;
|
||||
import org.apache.shiro.authc.AuthenticationToken;
|
||||
@ -18,10 +17,9 @@ import org.apache.shiro.authz.AuthorizationInfo;
|
||||
import org.apache.shiro.authz.SimpleAuthorizationInfo;
|
||||
import org.apache.shiro.realm.AuthorizingRealm;
|
||||
import org.apache.shiro.subject.PrincipalCollection;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import com.java2nb.common.utils.ShiroUtils;
|
||||
import com.java2nb.system.dao.UserDao;
|
||||
import com.java2nb.system.dao.SysUserDao;
|
||||
import com.java2nb.system.domain.UserDO;
|
||||
import com.java2nb.system.service.MenuService;
|
||||
|
||||
@ -48,7 +46,7 @@ public class UserRealm extends AuthorizingRealm {
|
||||
map.put("username", username);
|
||||
String password = new String((char[]) token.getCredentials());
|
||||
|
||||
UserDao userMapper = ApplicationContextRegister.getBean(UserDao.class);
|
||||
SysUserDao userMapper = ApplicationContextRegister.getBean(SysUserDao.class);
|
||||
// 查询用户信息
|
||||
UserDO user = userMapper.list(map).get(0);
|
||||
|
||||
|
@ -1,135 +0,0 @@
|
||||
package com.java2nb.test.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.test.domain.OrderDO;
|
||||
import com.java2nb.test.service.OrderService;
|
||||
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 2019-11-25 11:57:16
|
||||
*/
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/test/order")
|
||||
public class OrderController {
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
@GetMapping()
|
||||
@RequiresPermissions("test:order:order")
|
||||
String Order() {
|
||||
return "test/order/order";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取付呗-订单信息表列表", notes = "获取付呗-订单信息表列表")
|
||||
@ResponseBody
|
||||
@GetMapping("/list")
|
||||
@RequiresPermissions("test:order:order")
|
||||
public R list(@RequestParam Map<String, Object> params) {
|
||||
//查询列表数据
|
||||
Query query = new Query(params);
|
||||
List<OrderDO> orderList = orderService.list(query);
|
||||
int total = orderService.count(query);
|
||||
PageBean pageBean = new PageBean(orderList, total);
|
||||
return R.ok().put("data", pageBean);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新增付呗-订单信息表页面", notes = "新增付呗-订单信息表页面")
|
||||
@GetMapping("/add")
|
||||
@RequiresPermissions("test:order:add")
|
||||
String add() {
|
||||
return "test/order/add";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改付呗-订单信息表页面", notes = "修改付呗-订单信息表页面")
|
||||
@GetMapping("/edit/{id}")
|
||||
@RequiresPermissions("test:order:edit")
|
||||
String edit(@PathVariable("id") Long id, Model model) {
|
||||
OrderDO order = orderService.get(id);
|
||||
model.addAttribute("order", order);
|
||||
return "test/order/edit";
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查看付呗-订单信息表页面", notes = "查看付呗-订单信息表页面")
|
||||
@GetMapping("/detail/{id}")
|
||||
@RequiresPermissions("test:order:detail")
|
||||
String detail(@PathVariable("id") Long id, Model model) {
|
||||
OrderDO order = orderService.get(id);
|
||||
model.addAttribute("order", order);
|
||||
return "test/order/detail";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@ApiOperation(value = "新增付呗-订单信息表", notes = "新增付呗-订单信息表")
|
||||
@ResponseBody
|
||||
@PostMapping("/save")
|
||||
@RequiresPermissions("test:order:add")
|
||||
public R save( OrderDO order) {
|
||||
if (orderService.save(order) > 0) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@ApiOperation(value = "修改付呗-订单信息表", notes = "修改付呗-订单信息表")
|
||||
@ResponseBody
|
||||
@RequestMapping("/update")
|
||||
@RequiresPermissions("test:order:edit")
|
||||
public R update( OrderDO order) {
|
||||
orderService.update(order);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@ApiOperation(value = "删除付呗-订单信息表", notes = "删除付呗-订单信息表")
|
||||
@PostMapping("/remove")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("test:order:remove")
|
||||
public R remove( Long id) {
|
||||
if (orderService.remove(id) > 0) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@ApiOperation(value = "批量删除付呗-订单信息表", notes = "批量删除付呗-订单信息表")
|
||||
@PostMapping("/batchRemove")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("test:order:batchRemove")
|
||||
public R remove(@RequestParam("ids[]") Long[] ids) {
|
||||
orderService.batchRemove(ids);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.java2nb.test.dao;
|
||||
|
||||
import com.java2nb.test.domain.OrderDO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 付呗-订单信息表
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2019-11-25 11:57:16
|
||||
*/
|
||||
@Mapper
|
||||
public interface OrderDao {
|
||||
|
||||
OrderDO get(Long id);
|
||||
|
||||
List<OrderDO> list(Map<String,Object> map);
|
||||
|
||||
int count(Map<String,Object> map);
|
||||
|
||||
int save(OrderDO order);
|
||||
|
||||
int update(OrderDO order);
|
||||
|
||||
int remove(Long id);
|
||||
|
||||
int batchRemove(Long[] ids);
|
||||
}
|
@ -1,475 +0,0 @@
|
||||
package com.java2nb.test.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.java2nb.common.jsonserializer.LongToStringSerializer;
|
||||
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 付呗-订单信息表
|
||||
*
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2019-11-25 11:57:16
|
||||
*/
|
||||
public class OrderDO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
//主键
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long id;
|
||||
//付呗商户号
|
||||
private String fbMerchantCode;
|
||||
//第三方商户的订单号
|
||||
private String merchantOrderSn;
|
||||
//付呗订单号
|
||||
private String orderSn;
|
||||
//平台方订单号
|
||||
private String platformOrderNo;
|
||||
//商户单号
|
||||
private String tradeNo;
|
||||
//订单状态,1:未支付,2:支付成功,3:支付失败,4:支付取消
|
||||
private Integer orderState;
|
||||
//蜂鸟优惠卷抵扣
|
||||
private Double fnCoupon;
|
||||
//红包抵扣
|
||||
private BigDecimal redPacket;
|
||||
//实收金额(元)
|
||||
private BigDecimal totalFee;
|
||||
//订单金额
|
||||
private BigDecimal orderPrice;
|
||||
//手续费(元)
|
||||
private BigDecimal fee;
|
||||
//对商品或交易的描述
|
||||
private String body;
|
||||
//附加数据
|
||||
private String attach;
|
||||
//付呗系统的门店id
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long storeId;
|
||||
//付呗系统的收银员id
|
||||
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||
//所以通过序列化成字符串来解决
|
||||
@JsonSerialize(using = LongToStringSerializer.class)
|
||||
private Long cashierId;
|
||||
//设备终端号
|
||||
private String deviceNo;
|
||||
//微信顾客支付授权的“open_id”或者支付宝顾客的“buyer_user_id”
|
||||
private String userId;
|
||||
//支付宝顾客的账号
|
||||
private String userLogonId;
|
||||
//交易成功的时间
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date payTime;
|
||||
//支付通道:1微信、2支付宝、3银联
|
||||
private Integer payChannel;
|
||||
//免充值代金券金额(元)
|
||||
private BigDecimal noCashCouponFee;
|
||||
//预充值代金券金额(元)
|
||||
private BigDecimal cashCouponFee;
|
||||
//顾客实际支付金额(元)
|
||||
private BigDecimal cashFee;
|
||||
//签名
|
||||
private String sign;
|
||||
//其它选项
|
||||
private String options;
|
||||
//创建时间
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
//推送时间
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date pushTime;
|
||||
//推送IP
|
||||
private String pushIp;
|
||||
//商户id
|
||||
private BigDecimal mchtId;
|
||||
//QR编号
|
||||
private String sn;
|
||||
|
||||
/**
|
||||
* 设置:主键
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
/**
|
||||
* 获取:主键
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
* 设置:付呗商户号
|
||||
*/
|
||||
public void setFbMerchantCode(String fbMerchantCode) {
|
||||
this.fbMerchantCode = fbMerchantCode;
|
||||
}
|
||||
/**
|
||||
* 获取:付呗商户号
|
||||
*/
|
||||
public String getFbMerchantCode() {
|
||||
return fbMerchantCode;
|
||||
}
|
||||
/**
|
||||
* 设置:第三方商户的订单号
|
||||
*/
|
||||
public void setMerchantOrderSn(String merchantOrderSn) {
|
||||
this.merchantOrderSn = merchantOrderSn;
|
||||
}
|
||||
/**
|
||||
* 获取:第三方商户的订单号
|
||||
*/
|
||||
public String getMerchantOrderSn() {
|
||||
return merchantOrderSn;
|
||||
}
|
||||
/**
|
||||
* 设置:付呗订单号
|
||||
*/
|
||||
public void setOrderSn(String orderSn) {
|
||||
this.orderSn = orderSn;
|
||||
}
|
||||
/**
|
||||
* 获取:付呗订单号
|
||||
*/
|
||||
public String getOrderSn() {
|
||||
return orderSn;
|
||||
}
|
||||
/**
|
||||
* 设置:平台方订单号
|
||||
*/
|
||||
public void setPlatformOrderNo(String platformOrderNo) {
|
||||
this.platformOrderNo = platformOrderNo;
|
||||
}
|
||||
/**
|
||||
* 获取:平台方订单号
|
||||
*/
|
||||
public String getPlatformOrderNo() {
|
||||
return platformOrderNo;
|
||||
}
|
||||
/**
|
||||
* 设置:商户单号
|
||||
*/
|
||||
public void setTradeNo(String tradeNo) {
|
||||
this.tradeNo = tradeNo;
|
||||
}
|
||||
/**
|
||||
* 获取:商户单号
|
||||
*/
|
||||
public String getTradeNo() {
|
||||
return tradeNo;
|
||||
}
|
||||
/**
|
||||
* 设置:订单状态,1:未支付,2:支付成功,3:支付失败,4:支付取消
|
||||
*/
|
||||
public void setOrderState(Integer orderState) {
|
||||
this.orderState = orderState;
|
||||
}
|
||||
/**
|
||||
* 获取:订单状态,1:未支付,2:支付成功,3:支付失败,4:支付取消
|
||||
*/
|
||||
public Integer getOrderState() {
|
||||
return orderState;
|
||||
}
|
||||
/**
|
||||
* 设置:蜂鸟优惠卷抵扣
|
||||
*/
|
||||
public void setFnCoupon(Double fnCoupon) {
|
||||
this.fnCoupon = fnCoupon;
|
||||
}
|
||||
/**
|
||||
* 获取:蜂鸟优惠卷抵扣
|
||||
*/
|
||||
public Double getFnCoupon() {
|
||||
return fnCoupon;
|
||||
}
|
||||
/**
|
||||
* 设置:红包抵扣
|
||||
*/
|
||||
public void setRedPacket(BigDecimal redPacket) {
|
||||
this.redPacket = redPacket;
|
||||
}
|
||||
/**
|
||||
* 获取:红包抵扣
|
||||
*/
|
||||
public BigDecimal getRedPacket() {
|
||||
return redPacket;
|
||||
}
|
||||
/**
|
||||
* 设置:实收金额(元)
|
||||
*/
|
||||
public void setTotalFee(BigDecimal totalFee) {
|
||||
this.totalFee = totalFee;
|
||||
}
|
||||
/**
|
||||
* 获取:实收金额(元)
|
||||
*/
|
||||
public BigDecimal getTotalFee() {
|
||||
return totalFee;
|
||||
}
|
||||
/**
|
||||
* 设置:订单金额
|
||||
*/
|
||||
public void setOrderPrice(BigDecimal orderPrice) {
|
||||
this.orderPrice = orderPrice;
|
||||
}
|
||||
/**
|
||||
* 获取:订单金额
|
||||
*/
|
||||
public BigDecimal getOrderPrice() {
|
||||
return orderPrice;
|
||||
}
|
||||
/**
|
||||
* 设置:手续费(元)
|
||||
*/
|
||||
public void setFee(BigDecimal fee) {
|
||||
this.fee = fee;
|
||||
}
|
||||
/**
|
||||
* 获取:手续费(元)
|
||||
*/
|
||||
public BigDecimal getFee() {
|
||||
return fee;
|
||||
}
|
||||
/**
|
||||
* 设置:对商品或交易的描述
|
||||
*/
|
||||
public void setBody(String body) {
|
||||
this.body = body;
|
||||
}
|
||||
/**
|
||||
* 获取:对商品或交易的描述
|
||||
*/
|
||||
public String getBody() {
|
||||
return body;
|
||||
}
|
||||
/**
|
||||
* 设置:附加数据
|
||||
*/
|
||||
public void setAttach(String attach) {
|
||||
this.attach = attach;
|
||||
}
|
||||
/**
|
||||
* 获取:附加数据
|
||||
*/
|
||||
public String getAttach() {
|
||||
return attach;
|
||||
}
|
||||
/**
|
||||
* 设置:付呗系统的门店id
|
||||
*/
|
||||
public void setStoreId(Long storeId) {
|
||||
this.storeId = storeId;
|
||||
}
|
||||
/**
|
||||
* 获取:付呗系统的门店id
|
||||
*/
|
||||
public Long getStoreId() {
|
||||
return storeId;
|
||||
}
|
||||
/**
|
||||
* 设置:付呗系统的收银员id
|
||||
*/
|
||||
public void setCashierId(Long cashierId) {
|
||||
this.cashierId = cashierId;
|
||||
}
|
||||
/**
|
||||
* 获取:付呗系统的收银员id
|
||||
*/
|
||||
public Long getCashierId() {
|
||||
return cashierId;
|
||||
}
|
||||
/**
|
||||
* 设置:设备终端号
|
||||
*/
|
||||
public void setDeviceNo(String deviceNo) {
|
||||
this.deviceNo = deviceNo;
|
||||
}
|
||||
/**
|
||||
* 获取:设备终端号
|
||||
*/
|
||||
public String getDeviceNo() {
|
||||
return deviceNo;
|
||||
}
|
||||
/**
|
||||
* 设置:微信顾客支付授权的“open_id”或者支付宝顾客的“buyer_user_id”
|
||||
*/
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
/**
|
||||
* 获取:微信顾客支付授权的“open_id”或者支付宝顾客的“buyer_user_id”
|
||||
*/
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
/**
|
||||
* 设置:支付宝顾客的账号
|
||||
*/
|
||||
public void setUserLogonId(String userLogonId) {
|
||||
this.userLogonId = userLogonId;
|
||||
}
|
||||
/**
|
||||
* 获取:支付宝顾客的账号
|
||||
*/
|
||||
public String getUserLogonId() {
|
||||
return userLogonId;
|
||||
}
|
||||
/**
|
||||
* 设置:交易成功的时间
|
||||
*/
|
||||
public void setPayTime(Date payTime) {
|
||||
this.payTime = payTime;
|
||||
}
|
||||
/**
|
||||
* 获取:交易成功的时间
|
||||
*/
|
||||
public Date getPayTime() {
|
||||
return payTime;
|
||||
}
|
||||
/**
|
||||
* 设置:支付通道:1微信、2支付宝、3银联
|
||||
*/
|
||||
public void setPayChannel(Integer payChannel) {
|
||||
this.payChannel = payChannel;
|
||||
}
|
||||
/**
|
||||
* 获取:支付通道:1微信、2支付宝、3银联
|
||||
*/
|
||||
public Integer getPayChannel() {
|
||||
return payChannel;
|
||||
}
|
||||
/**
|
||||
* 设置:免充值代金券金额(元)
|
||||
*/
|
||||
public void setNoCashCouponFee(BigDecimal noCashCouponFee) {
|
||||
this.noCashCouponFee = noCashCouponFee;
|
||||
}
|
||||
/**
|
||||
* 获取:免充值代金券金额(元)
|
||||
*/
|
||||
public BigDecimal getNoCashCouponFee() {
|
||||
return noCashCouponFee;
|
||||
}
|
||||
/**
|
||||
* 设置:预充值代金券金额(元)
|
||||
*/
|
||||
public void setCashCouponFee(BigDecimal cashCouponFee) {
|
||||
this.cashCouponFee = cashCouponFee;
|
||||
}
|
||||
/**
|
||||
* 获取:预充值代金券金额(元)
|
||||
*/
|
||||
public BigDecimal getCashCouponFee() {
|
||||
return cashCouponFee;
|
||||
}
|
||||
/**
|
||||
* 设置:顾客实际支付金额(元)
|
||||
*/
|
||||
public void setCashFee(BigDecimal cashFee) {
|
||||
this.cashFee = cashFee;
|
||||
}
|
||||
/**
|
||||
* 获取:顾客实际支付金额(元)
|
||||
*/
|
||||
public BigDecimal getCashFee() {
|
||||
return cashFee;
|
||||
}
|
||||
/**
|
||||
* 设置:签名
|
||||
*/
|
||||
public void setSign(String sign) {
|
||||
this.sign = sign;
|
||||
}
|
||||
/**
|
||||
* 获取:签名
|
||||
*/
|
||||
public String getSign() {
|
||||
return sign;
|
||||
}
|
||||
/**
|
||||
* 设置:其它选项
|
||||
*/
|
||||
public void setOptions(String options) {
|
||||
this.options = options;
|
||||
}
|
||||
/**
|
||||
* 获取:其它选项
|
||||
*/
|
||||
public String getOptions() {
|
||||
return options;
|
||||
}
|
||||
/**
|
||||
* 设置:创建时间
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
/**
|
||||
* 获取:创建时间
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
/**
|
||||
* 设置:推送时间
|
||||
*/
|
||||
public void setPushTime(Date pushTime) {
|
||||
this.pushTime = pushTime;
|
||||
}
|
||||
/**
|
||||
* 获取:推送时间
|
||||
*/
|
||||
public Date getPushTime() {
|
||||
return pushTime;
|
||||
}
|
||||
/**
|
||||
* 设置:推送IP
|
||||
*/
|
||||
public void setPushIp(String pushIp) {
|
||||
this.pushIp = pushIp;
|
||||
}
|
||||
/**
|
||||
* 获取:推送IP
|
||||
*/
|
||||
public String getPushIp() {
|
||||
return pushIp;
|
||||
}
|
||||
/**
|
||||
* 设置:商户id
|
||||
*/
|
||||
public void setMchtId(BigDecimal mchtId) {
|
||||
this.mchtId = mchtId;
|
||||
}
|
||||
/**
|
||||
* 获取:商户id
|
||||
*/
|
||||
public BigDecimal getMchtId() {
|
||||
return mchtId;
|
||||
}
|
||||
/**
|
||||
* 设置:QR编号
|
||||
*/
|
||||
public void setSn(String sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
/**
|
||||
* 获取:QR编号
|
||||
*/
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
package com.java2nb.test.service;
|
||||
|
||||
import com.java2nb.test.domain.OrderDO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 付呗-订单信息表
|
||||
*
|
||||
* @author xiongxy
|
||||
* @email 1179705413@qq.com
|
||||
* @date 2019-11-25 11:57:16
|
||||
*/
|
||||
public interface OrderService {
|
||||
|
||||
OrderDO get(Long id);
|
||||
|
||||
List<OrderDO> list(Map<String, Object> map);
|
||||
|
||||
int count(Map<String, Object> map);
|
||||
|
||||
int save(OrderDO order);
|
||||
|
||||
int update(OrderDO order);
|
||||
|
||||
int remove(Long id);
|
||||
|
||||
int batchRemove(Long[] ids);
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
package com.java2nb.test.service.impl;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.java2nb.test.dao.OrderDao;
|
||||
import com.java2nb.test.domain.OrderDO;
|
||||
import com.java2nb.test.service.OrderService;
|
||||
|
||||
|
||||
|
||||
@Service
|
||||
public class OrderServiceImpl implements OrderService {
|
||||
@Autowired
|
||||
private OrderDao orderDao;
|
||||
|
||||
@Override
|
||||
public OrderDO get(Long id){
|
||||
return orderDao.get(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderDO> list(Map<String, Object> map){
|
||||
return orderDao.list(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int count(Map<String, Object> map){
|
||||
return orderDao.count(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int save(OrderDO order){
|
||||
return orderDao.save(order);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(OrderDO order){
|
||||
return orderDao.update(order);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int remove(Long id){
|
||||
return orderDao.remove(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchRemove(Long[] ids){
|
||||
return orderDao.batchRemove(ids);
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
java2nb:
|
||||
uploadPath: c:/var/java2nb/uploaded_files/
|
||||
uploadPath: /var/pic/
|
||||
username: admin
|
||||
password: 111111
|
||||
logging:
|
||||
@ -9,10 +9,10 @@ logging:
|
||||
spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/novel_plus?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password:
|
||||
password: test123456
|
||||
#password:
|
||||
initialSize: 1
|
||||
minIdle: 3
|
||||
|
@ -1,16 +1,19 @@
|
||||
java2nb:
|
||||
uploadPath: /var/java2nb/uploaded_files/
|
||||
uploadPath: /var/pic/
|
||||
username: admin
|
||||
password: 111111
|
||||
logging:
|
||||
level:
|
||||
root: error
|
||||
com.java2nb: info
|
||||
com.java2nb: error
|
||||
spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/java2nb?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
username: java2nb
|
||||
password: java2nb1019
|
||||
url: jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: test123456
|
||||
#password:
|
||||
initialSize: 1
|
||||
minIdle: 3
|
||||
maxActive: 20
|
||||
@ -34,18 +37,18 @@ spring:
|
||||
# 合并多个DruidDataSource的监控数据
|
||||
#useGlobalDataSourceStat: true
|
||||
redis:
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
password:
|
||||
# 连接超时时间(毫秒)
|
||||
timeout: 10000
|
||||
jedis:
|
||||
pool:
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 8
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 10
|
||||
# 连接池最大连接数(使用负值表示没有限制)
|
||||
max-active: 100
|
||||
# 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
password: test
|
||||
# 连接超时时间(毫秒)
|
||||
timeout: 10000
|
||||
jedis:
|
||||
pool:
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 8
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 10
|
||||
# 连接池最大连接数(使用负值表示没有限制)
|
||||
max-active: 100
|
||||
# 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1
|
@ -36,3 +36,7 @@ mybatis:
|
||||
typeAliasesPackage: com.java2nb.**.domain
|
||||
#[弃用]配置缓存和session存储方式,默认ehcache,可选redis,[弃用]调整至 spring cache type【shiro.用户,权限,session,spring.cache通用】
|
||||
#[弃用]cacheType: ehcache
|
||||
|
||||
|
||||
logging:
|
||||
config: classpath:logback-boot.xml
|
||||
|
@ -1,6 +1,15 @@
|
||||
__ ________ ___.
|
||||
|__|____ ___ _______ \_____ \ ____\_ |__
|
||||
| \__ \\ \/ /\__ \ / ____/ / \| __ \
|
||||
| |/ __ \\ / / __ \_/ \| | \ \_\ \
|
||||
/\__| (____ /\_/ (____ /\_______ \___| /___ /
|
||||
\______| \/ \/ \/ \/ \/
|
||||
${AnsiColor.CYAN}
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
${AnsiColor.RED}
|
||||
|| / | / /
|
||||
|| / | / / ___ // ___ ___ _ __
|
||||
|| / /||/ / //___) ) // // ) ) // ) ) // ) ) ) )
|
||||
||/ / | / // // // // / / // / / / /
|
||||
| / | / ((____ // ((____ ((___/ / // / / / / 小说精品屋欢迎您!!!
|
||||
|
||||
-------Powered By XXY
|
||||
${AnsiColor.CYAN}
|
||||
--------------------------------------------------------------------------------
|
||||
${AnsiColor.BRIGHT_YELLOW}
|
||||
::: Spring-Boot ${spring-boot.formatted-version} :::
|
@ -24,7 +24,7 @@
|
||||
<!-- RollingFileAppender:滚动记录文件,先将日志记录到指定文件,当符合某个条件时,将日志记录到其他文件 -->
|
||||
<!-- 以下的大概意思是:1.先按日期存日志,日期变了,将前一天的日志文件名重命名为XXX%日期%索引,新的日志仍然是demo.log -->
|
||||
<!-- 2.如果日期没有发生变化,但是当前日志的文件大小超过1KB时,对当前日志进行分割 重命名 -->
|
||||
<appender name="debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
|
||||
<File>logs/debug.log</File>
|
||||
<!-- rollingPolicy:当发生滚动时,决定 RollingFileAppender 的行为,涉及文件移动和重命名。 -->
|
||||
@ -52,11 +52,13 @@
|
||||
<!-- 控制台输出日志级别 -->
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
<appender-ref ref="FILE" />
|
||||
</root>
|
||||
<!-- 指定项目中某个包,当有日志操作行为时的日志记录级别 -->
|
||||
<!-- com.maijinjie.springboot 为根包,也就是只要是发生在这个根包下面的所有日志操作行为的权限都是DEBUG -->
|
||||
<!-- 级别依次为【从高到低】:FATAL > ERROR > WARN > INFO > DEBUG > TRACE -->
|
||||
<logger name="com.java2nb" level="DEBUG">
|
||||
<appender-ref ref="debug" />
|
||||
<logger name="com.java2nb" level="DEBUG" additivity="false">
|
||||
<appender-ref ref="STDOUT" />
|
||||
<appender-ref ref="FILE" />
|
||||
</logger>
|
||||
</configuration>
|
@ -133,4 +133,18 @@
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="tableSta" resultType="map">
|
||||
SELECT
|
||||
DATE_FORMAT( create_time, "%Y-%m-%d" ) AS staDate,
|
||||
COUNT( 1 ) authorCount
|
||||
FROM
|
||||
author
|
||||
WHERE
|
||||
create_time >= #{minDate}
|
||||
GROUP BY
|
||||
DATE_FORMAT( create_time, "%Y-%m-%d" )
|
||||
ORDER BY
|
||||
staDate
|
||||
</select>
|
||||
|
||||
</mapper>
|
306
novel-admin/src/main/resources/mybatis/novel/BookMapper.xml
Normal file
306
novel-admin/src/main/resources/mybatis/novel/BookMapper.xml
Normal file
@ -0,0 +1,306 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.java2nb.novel.dao.BookDao">
|
||||
|
||||
<select id="get" resultType="com.java2nb.novel.domain.BookDO">
|
||||
select `id`,`work_direction`,`cat_id`,`cat_name`,`cat_child_id`,`cat_child_name`,`pic_url`,`book_name`,`hero_name`,`lady_name`,`book_style`,`book_label`,`author_id`,`author_name`,`book_desc`,`score`,`book_status`,`visit_count`,`word_count`,`comment_count`,`yesterday_buy`,`last_index_id`,`last_index_name`,`last_index_update_time`,`is_vip`,`status`,`update_time`,`create_time`,`crawl_source_id`,`crawl_book_id`,`crawl_last_time`,`crawl_is_stop` from book where id = #{value}
|
||||
</select>
|
||||
|
||||
<select id="list" resultType="com.java2nb.novel.domain.BookDO">
|
||||
select `id`,`work_direction`,`cat_id`,`cat_name`,`cat_child_id`,`cat_child_name`,`pic_url`,`book_name`,`hero_name`,`lady_name`,`book_style`,`book_label`,`author_id`,`author_name`,`book_desc`,`score`,`book_status`,`visit_count`,`word_count`,`comment_count`,`yesterday_buy`,`last_index_id`,`last_index_name`,`last_index_update_time`,`is_vip`,`status`,`update_time`,`create_time`,`crawl_source_id`,`crawl_book_id`,`crawl_last_time`,`crawl_is_stop` from book
|
||||
<where>
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="workDirection != null and workDirection != ''"> and work_direction = #{workDirection} </if>
|
||||
<if test="catId != null and catId != ''"> and cat_id = #{catId} </if>
|
||||
<if test="catName != null and catName != ''"> and cat_name = #{catName} </if>
|
||||
<if test="catChildId != null and catChildId != ''"> and cat_child_id = #{catChildId} </if>
|
||||
<if test="catChildName != null and catChildName != ''"> and cat_child_name = #{catChildName} </if>
|
||||
<if test="picUrl != null and picUrl != ''"> and pic_url = #{picUrl} </if>
|
||||
<if test="bookName != null and bookName != ''"> and book_name = #{bookName} </if>
|
||||
<if test="heroName != null and heroName != ''"> and hero_name = #{heroName} </if>
|
||||
<if test="ladyName != null and ladyName != ''"> and lady_name = #{ladyName} </if>
|
||||
<if test="bookStyle != null and bookStyle != ''"> and book_style = #{bookStyle} </if>
|
||||
<if test="bookLabel != null and bookLabel != ''"> and book_label = #{bookLabel} </if>
|
||||
<if test="authorId != null and authorId != ''"> and author_id = #{authorId} </if>
|
||||
<if test="authorName != null and authorName != ''"> and author_name = #{authorName} </if>
|
||||
<if test="bookDesc != null and bookDesc != ''"> and book_desc = #{bookDesc} </if>
|
||||
<if test="score != null and score != ''"> and score = #{score} </if>
|
||||
<if test="bookStatus != null and bookStatus != ''"> and book_status = #{bookStatus} </if>
|
||||
<if test="visitCount != null and visitCount != ''"> and visit_count = #{visitCount} </if>
|
||||
<if test="wordCount != null and wordCount != ''"> and word_count = #{wordCount} </if>
|
||||
<if test="commentCount != null and commentCount != ''"> and comment_count = #{commentCount} </if>
|
||||
<if test="yesterdayBuy != null and yesterdayBuy != ''"> and yesterday_buy = #{yesterdayBuy} </if>
|
||||
<if test="lastIndexId != null and lastIndexId != ''"> and last_index_id = #{lastIndexId} </if>
|
||||
<if test="lastIndexName != null and lastIndexName != ''"> and last_index_name = #{lastIndexName} </if>
|
||||
<if test="lastIndexUpdateTime != null and lastIndexUpdateTime != ''"> and last_index_update_time = #{lastIndexUpdateTime} </if>
|
||||
<if test="isVip != null and isVip != ''"> and is_vip = #{isVip} </if>
|
||||
<if test="status != null and status != ''"> and status = #{status} </if>
|
||||
<if test="updateTime != null and updateTime != ''"> and update_time = #{updateTime} </if>
|
||||
<if test="createTime != null and createTime != ''"> and create_time = #{createTime} </if>
|
||||
<if test="crawlSourceId != null and crawlSourceId != ''"> and crawl_source_id = #{crawlSourceId} </if>
|
||||
<if test="crawlBookId != null and crawlBookId != ''"> and crawl_book_id = #{crawlBookId} </if>
|
||||
<if test="crawlLastTime != null and crawlLastTime != ''"> and crawl_last_time = #{crawlLastTime} </if>
|
||||
<if test="crawlIsStop != null and crawlIsStop != ''"> and crawl_is_stop = #{crawlIsStop} </if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="sort != null and sort.trim() != ''">
|
||||
order by ${sort} ${order}
|
||||
</when>
|
||||
<otherwise>
|
||||
order by id desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="offset != null and limit != null">
|
||||
limit #{offset}, #{limit}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="count" resultType="int">
|
||||
select count(*) from book
|
||||
<where>
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="workDirection != null and workDirection != ''"> and work_direction = #{workDirection} </if>
|
||||
<if test="catId != null and catId != ''"> and cat_id = #{catId} </if>
|
||||
<if test="catName != null and catName != ''"> and cat_name = #{catName} </if>
|
||||
<if test="catChildId != null and catChildId != ''"> and cat_child_id = #{catChildId} </if>
|
||||
<if test="catChildName != null and catChildName != ''"> and cat_child_name = #{catChildName} </if>
|
||||
<if test="picUrl != null and picUrl != ''"> and pic_url = #{picUrl} </if>
|
||||
<if test="bookName != null and bookName != ''"> and book_name = #{bookName} </if>
|
||||
<if test="heroName != null and heroName != ''"> and hero_name = #{heroName} </if>
|
||||
<if test="ladyName != null and ladyName != ''"> and lady_name = #{ladyName} </if>
|
||||
<if test="bookStyle != null and bookStyle != ''"> and book_style = #{bookStyle} </if>
|
||||
<if test="bookLabel != null and bookLabel != ''"> and book_label = #{bookLabel} </if>
|
||||
<if test="authorId != null and authorId != ''"> and author_id = #{authorId} </if>
|
||||
<if test="authorName != null and authorName != ''"> and author_name = #{authorName} </if>
|
||||
<if test="bookDesc != null and bookDesc != ''"> and book_desc = #{bookDesc} </if>
|
||||
<if test="score != null and score != ''"> and score = #{score} </if>
|
||||
<if test="bookStatus != null and bookStatus != ''"> and book_status = #{bookStatus} </if>
|
||||
<if test="visitCount != null and visitCount != ''"> and visit_count = #{visitCount} </if>
|
||||
<if test="wordCount != null and wordCount != ''"> and word_count = #{wordCount} </if>
|
||||
<if test="commentCount != null and commentCount != ''"> and comment_count = #{commentCount} </if>
|
||||
<if test="yesterdayBuy != null and yesterdayBuy != ''"> and yesterday_buy = #{yesterdayBuy} </if>
|
||||
<if test="lastIndexId != null and lastIndexId != ''"> and last_index_id = #{lastIndexId} </if>
|
||||
<if test="lastIndexName != null and lastIndexName != ''"> and last_index_name = #{lastIndexName} </if>
|
||||
<if test="lastIndexUpdateTime != null and lastIndexUpdateTime != ''"> and last_index_update_time = #{lastIndexUpdateTime} </if>
|
||||
<if test="isVip != null and isVip != ''"> and is_vip = #{isVip} </if>
|
||||
<if test="status != null and status != ''"> and status = #{status} </if>
|
||||
<if test="updateTime != null and updateTime != ''"> and update_time = #{updateTime} </if>
|
||||
<if test="createTime != null and createTime != ''"> and create_time = #{createTime} </if>
|
||||
<if test="crawlSourceId != null and crawlSourceId != ''"> and crawl_source_id = #{crawlSourceId} </if>
|
||||
<if test="crawlBookId != null and crawlBookId != ''"> and crawl_book_id = #{crawlBookId} </if>
|
||||
<if test="crawlLastTime != null and crawlLastTime != ''"> and crawl_last_time = #{crawlLastTime} </if>
|
||||
<if test="crawlIsStop != null and crawlIsStop != ''"> and crawl_is_stop = #{crawlIsStop} </if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="save" parameterType="com.java2nb.novel.domain.BookDO">
|
||||
insert into book
|
||||
(
|
||||
`id`,
|
||||
`work_direction`,
|
||||
`cat_id`,
|
||||
`cat_name`,
|
||||
`cat_child_id`,
|
||||
`cat_child_name`,
|
||||
`pic_url`,
|
||||
`book_name`,
|
||||
`hero_name`,
|
||||
`lady_name`,
|
||||
`book_style`,
|
||||
`book_label`,
|
||||
`author_id`,
|
||||
`author_name`,
|
||||
`book_desc`,
|
||||
`score`,
|
||||
`book_status`,
|
||||
`visit_count`,
|
||||
`word_count`,
|
||||
`comment_count`,
|
||||
`yesterday_buy`,
|
||||
`last_index_id`,
|
||||
`last_index_name`,
|
||||
`last_index_update_time`,
|
||||
`is_vip`,
|
||||
`status`,
|
||||
`update_time`,
|
||||
`create_time`,
|
||||
`crawl_source_id`,
|
||||
`crawl_book_id`,
|
||||
`crawl_last_time`,
|
||||
`crawl_is_stop`
|
||||
)
|
||||
values
|
||||
(
|
||||
#{id},
|
||||
#{workDirection},
|
||||
#{catId},
|
||||
#{catName},
|
||||
#{catChildId},
|
||||
#{catChildName},
|
||||
#{picUrl},
|
||||
#{bookName},
|
||||
#{heroName},
|
||||
#{ladyName},
|
||||
#{bookStyle},
|
||||
#{bookLabel},
|
||||
#{authorId},
|
||||
#{authorName},
|
||||
#{bookDesc},
|
||||
#{score},
|
||||
#{bookStatus},
|
||||
#{visitCount},
|
||||
#{wordCount},
|
||||
#{commentCount},
|
||||
#{yesterdayBuy},
|
||||
#{lastIndexId},
|
||||
#{lastIndexName},
|
||||
#{lastIndexUpdateTime},
|
||||
#{isVip},
|
||||
#{status},
|
||||
#{updateTime},
|
||||
#{createTime},
|
||||
#{crawlSourceId},
|
||||
#{crawlBookId},
|
||||
#{crawlLastTime},
|
||||
#{crawlIsStop}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="saveSelective" parameterType="com.java2nb.novel.domain.BookDO">
|
||||
insert into book
|
||||
(
|
||||
<if test="id != null"> `id`, </if>
|
||||
<if test="workDirection != null"> `work_direction`, </if>
|
||||
<if test="catId != null"> `cat_id`, </if>
|
||||
<if test="catName != null"> `cat_name`, </if>
|
||||
<if test="catChildId != null"> `cat_child_id`, </if>
|
||||
<if test="catChildName != null"> `cat_child_name`, </if>
|
||||
<if test="picUrl != null"> `pic_url`, </if>
|
||||
<if test="bookName != null"> `book_name`, </if>
|
||||
<if test="heroName != null"> `hero_name`, </if>
|
||||
<if test="ladyName != null"> `lady_name`, </if>
|
||||
<if test="bookStyle != null"> `book_style`, </if>
|
||||
<if test="bookLabel != null"> `book_label`, </if>
|
||||
<if test="authorId != null"> `author_id`, </if>
|
||||
<if test="authorName != null"> `author_name`, </if>
|
||||
<if test="bookDesc != null"> `book_desc`, </if>
|
||||
<if test="score != null"> `score`, </if>
|
||||
<if test="bookStatus != null"> `book_status`, </if>
|
||||
<if test="visitCount != null"> `visit_count`, </if>
|
||||
<if test="wordCount != null"> `word_count`, </if>
|
||||
<if test="commentCount != null"> `comment_count`, </if>
|
||||
<if test="yesterdayBuy != null"> `yesterday_buy`, </if>
|
||||
<if test="lastIndexId != null"> `last_index_id`, </if>
|
||||
<if test="lastIndexName != null"> `last_index_name`, </if>
|
||||
<if test="lastIndexUpdateTime != null"> `last_index_update_time`, </if>
|
||||
<if test="isVip != null"> `is_vip`, </if>
|
||||
<if test="status != null"> `status`, </if>
|
||||
<if test="updateTime != null"> `update_time`, </if>
|
||||
<if test="createTime != null"> `create_time`, </if>
|
||||
<if test="crawlSourceId != null"> `crawl_source_id`, </if>
|
||||
<if test="crawlBookId != null"> `crawl_book_id`, </if>
|
||||
<if test="crawlLastTime != null"> `crawl_last_time`, </if>
|
||||
<if test="crawlIsStop != null"> `crawl_is_stop` </if>
|
||||
)
|
||||
values
|
||||
(
|
||||
<if test="id != null"> #{id}, </if>
|
||||
<if test="workDirection != null"> #{workDirection}, </if>
|
||||
<if test="catId != null"> #{catId}, </if>
|
||||
<if test="catName != null"> #{catName}, </if>
|
||||
<if test="catChildId != null"> #{catChildId}, </if>
|
||||
<if test="catChildName != null"> #{catChildName}, </if>
|
||||
<if test="picUrl != null"> #{picUrl}, </if>
|
||||
<if test="bookName != null"> #{bookName}, </if>
|
||||
<if test="heroName != null"> #{heroName}, </if>
|
||||
<if test="ladyName != null"> #{ladyName}, </if>
|
||||
<if test="bookStyle != null"> #{bookStyle}, </if>
|
||||
<if test="bookLabel != null"> #{bookLabel}, </if>
|
||||
<if test="authorId != null"> #{authorId}, </if>
|
||||
<if test="authorName != null"> #{authorName}, </if>
|
||||
<if test="bookDesc != null"> #{bookDesc}, </if>
|
||||
<if test="score != null"> #{score}, </if>
|
||||
<if test="bookStatus != null"> #{bookStatus}, </if>
|
||||
<if test="visitCount != null"> #{visitCount}, </if>
|
||||
<if test="wordCount != null"> #{wordCount}, </if>
|
||||
<if test="commentCount != null"> #{commentCount}, </if>
|
||||
<if test="yesterdayBuy != null"> #{yesterdayBuy}, </if>
|
||||
<if test="lastIndexId != null"> #{lastIndexId}, </if>
|
||||
<if test="lastIndexName != null"> #{lastIndexName}, </if>
|
||||
<if test="lastIndexUpdateTime != null"> #{lastIndexUpdateTime}, </if>
|
||||
<if test="isVip != null"> #{isVip}, </if>
|
||||
<if test="status != null"> #{status}, </if>
|
||||
<if test="updateTime != null"> #{updateTime}, </if>
|
||||
<if test="createTime != null"> #{createTime}, </if>
|
||||
<if test="crawlSourceId != null"> #{crawlSourceId}, </if>
|
||||
<if test="crawlBookId != null"> #{crawlBookId}, </if>
|
||||
<if test="crawlLastTime != null"> #{crawlLastTime}, </if>
|
||||
<if test="crawlIsStop != null"> #{crawlIsStop} </if>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.java2nb.novel.domain.BookDO">
|
||||
update book
|
||||
<set>
|
||||
<if test="workDirection != null">`work_direction` = #{workDirection}, </if>
|
||||
<if test="catId != null">`cat_id` = #{catId}, </if>
|
||||
<if test="catName != null">`cat_name` = #{catName}, </if>
|
||||
<if test="catChildId != null">`cat_child_id` = #{catChildId}, </if>
|
||||
<if test="catChildName != null">`cat_child_name` = #{catChildName}, </if>
|
||||
<if test="picUrl != null">`pic_url` = #{picUrl}, </if>
|
||||
<if test="bookName != null">`book_name` = #{bookName}, </if>
|
||||
<if test="heroName != null">`hero_name` = #{heroName}, </if>
|
||||
<if test="ladyName != null">`lady_name` = #{ladyName}, </if>
|
||||
<if test="bookStyle != null">`book_style` = #{bookStyle}, </if>
|
||||
<if test="bookLabel != null">`book_label` = #{bookLabel}, </if>
|
||||
<if test="authorId != null">`author_id` = #{authorId}, </if>
|
||||
<if test="authorName != null">`author_name` = #{authorName}, </if>
|
||||
<if test="bookDesc != null">`book_desc` = #{bookDesc}, </if>
|
||||
<if test="score != null">`score` = #{score}, </if>
|
||||
<if test="bookStatus != null">`book_status` = #{bookStatus}, </if>
|
||||
<if test="visitCount != null">`visit_count` = #{visitCount}, </if>
|
||||
<if test="wordCount != null">`word_count` = #{wordCount}, </if>
|
||||
<if test="commentCount != null">`comment_count` = #{commentCount}, </if>
|
||||
<if test="yesterdayBuy != null">`yesterday_buy` = #{yesterdayBuy}, </if>
|
||||
<if test="lastIndexId != null">`last_index_id` = #{lastIndexId}, </if>
|
||||
<if test="lastIndexName != null">`last_index_name` = #{lastIndexName}, </if>
|
||||
<if test="lastIndexUpdateTime != null">`last_index_update_time` = #{lastIndexUpdateTime}, </if>
|
||||
<if test="isVip != null">`is_vip` = #{isVip}, </if>
|
||||
<if test="status != null">`status` = #{status}, </if>
|
||||
<if test="updateTime != null">`update_time` = #{updateTime}, </if>
|
||||
<if test="createTime != null">`create_time` = #{createTime}, </if>
|
||||
<if test="crawlSourceId != null">`crawl_source_id` = #{crawlSourceId}, </if>
|
||||
<if test="crawlBookId != null">`crawl_book_id` = #{crawlBookId}, </if>
|
||||
<if test="crawlLastTime != null">`crawl_last_time` = #{crawlLastTime}, </if>
|
||||
<if test="crawlIsStop != null">`crawl_is_stop` = #{crawlIsStop}</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="remove">
|
||||
delete from book where id = #{value}
|
||||
</delete>
|
||||
|
||||
<delete id="batchRemove">
|
||||
delete from book where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="tableSta" resultType="map">
|
||||
SELECT
|
||||
DATE_FORMAT( create_time, "%Y-%m-%d" ) AS staDate,
|
||||
COUNT( 1 ) bookCount
|
||||
FROM
|
||||
book
|
||||
WHERE
|
||||
create_time >= #{minDate}
|
||||
GROUP BY
|
||||
DATE_FORMAT( create_time, "%Y-%m-%d" )
|
||||
ORDER BY
|
||||
staDate
|
||||
</select>
|
||||
|
||||
</mapper>
|
117
novel-admin/src/main/resources/mybatis/novel/CategoryMapper.xml
Normal file
117
novel-admin/src/main/resources/mybatis/novel/CategoryMapper.xml
Normal file
@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.java2nb.novel.dao.CategoryDao">
|
||||
|
||||
<select id="get" resultType="com.java2nb.novel.domain.CategoryDO">
|
||||
select `id`,`name`,`sort`,`create_user_id`,`create_time`,`update_user_id`,`update_time` from news_category where id = #{value}
|
||||
</select>
|
||||
|
||||
<select id="list" resultType="com.java2nb.novel.domain.CategoryDO">
|
||||
select `id`,`name`,`sort`,`create_user_id`,`create_time`,`update_user_id`,`update_time` from news_category
|
||||
<where>
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
||||
<if test="sort != null and sort != ''"> and sort = #{sort} </if>
|
||||
<if test="createUserId != null and createUserId != ''"> and create_user_id = #{createUserId} </if>
|
||||
<if test="createTime != null and createTime != ''"> and create_time = #{createTime} </if>
|
||||
<if test="updateUserId != null and updateUserId != ''"> and update_user_id = #{updateUserId} </if>
|
||||
<if test="updateTime != null and updateTime != ''"> and update_time = #{updateTime} </if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="sort != null and sort.trim() != ''">
|
||||
order by ${sort} ${order}
|
||||
</when>
|
||||
<otherwise>
|
||||
order by id desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="offset != null and limit != null">
|
||||
limit #{offset}, #{limit}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="count" resultType="int">
|
||||
select count(*) from news_category
|
||||
<where>
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="name != null and name != ''"> and name = #{name} </if>
|
||||
<if test="sort != null and sort != ''"> and sort = #{sort} </if>
|
||||
<if test="createUserId != null and createUserId != ''"> and create_user_id = #{createUserId} </if>
|
||||
<if test="createTime != null and createTime != ''"> and create_time = #{createTime} </if>
|
||||
<if test="updateUserId != null and updateUserId != ''"> and update_user_id = #{updateUserId} </if>
|
||||
<if test="updateTime != null and updateTime != ''"> and update_time = #{updateTime} </if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="save" parameterType="com.java2nb.novel.domain.CategoryDO">
|
||||
insert into news_category
|
||||
(
|
||||
`id`,
|
||||
`name`,
|
||||
`sort`,
|
||||
`create_user_id`,
|
||||
`create_time`,
|
||||
`update_user_id`,
|
||||
`update_time`
|
||||
)
|
||||
values
|
||||
(
|
||||
#{id},
|
||||
#{name},
|
||||
#{sort},
|
||||
#{createUserId},
|
||||
#{createTime},
|
||||
#{updateUserId},
|
||||
#{updateTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="saveSelective" parameterType="com.java2nb.novel.domain.CategoryDO">
|
||||
insert into news_category
|
||||
(
|
||||
<if test="id != null"> `id`, </if>
|
||||
<if test="name != null"> `name`, </if>
|
||||
<if test="sort != null"> `sort`, </if>
|
||||
<if test="createUserId != null"> `create_user_id`, </if>
|
||||
<if test="createTime != null"> `create_time`, </if>
|
||||
<if test="updateUserId != null"> `update_user_id`, </if>
|
||||
<if test="updateTime != null"> `update_time` </if>
|
||||
)
|
||||
values
|
||||
(
|
||||
<if test="id != null"> #{id}, </if>
|
||||
<if test="name != null"> #{name}, </if>
|
||||
<if test="sort != null"> #{sort}, </if>
|
||||
<if test="createUserId != null"> #{createUserId}, </if>
|
||||
<if test="createTime != null"> #{createTime}, </if>
|
||||
<if test="updateUserId != null"> #{updateUserId}, </if>
|
||||
<if test="updateTime != null"> #{updateTime} </if>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.java2nb.novel.domain.CategoryDO">
|
||||
update news_category
|
||||
<set>
|
||||
<if test="name != null">`name` = #{name}, </if>
|
||||
<if test="sort != null">`sort` = #{sort}, </if>
|
||||
<if test="createUserId != null">`create_user_id` = #{createUserId}, </if>
|
||||
<if test="createTime != null">`create_time` = #{createTime}, </if>
|
||||
<if test="updateUserId != null">`update_user_id` = #{updateUserId}, </if>
|
||||
<if test="updateTime != null">`update_time` = #{updateTime}</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="remove">
|
||||
delete from news_category where id = #{value}
|
||||
</delete>
|
||||
|
||||
<delete id="batchRemove">
|
||||
delete from news_category where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
138
novel-admin/src/main/resources/mybatis/novel/NewsMapper.xml
Normal file
138
novel-admin/src/main/resources/mybatis/novel/NewsMapper.xml
Normal file
@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.java2nb.novel.dao.NewsDao">
|
||||
|
||||
<select id="get" resultType="com.java2nb.novel.domain.NewsDO">
|
||||
select `id`,`cat_id`,`cat_name`,`source_name`,`title`,`content`,`create_time`,`create_user_id`,`update_time`,`update_user_id` from news where id = #{value}
|
||||
</select>
|
||||
|
||||
<select id="list" resultType="com.java2nb.novel.domain.NewsDO">
|
||||
select `id`,`cat_id`,`cat_name`,`source_name`,`title`,`content`,`create_time`,`create_user_id`,`update_time`,`update_user_id` from news
|
||||
<where>
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="catId != null and catId != ''"> and cat_id = #{catId} </if>
|
||||
<if test="catName != null and catName != ''"> and cat_name = #{catName} </if>
|
||||
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
|
||||
<if test="title != null and title != ''"> and title like concat('%',#{title},'%') </if>
|
||||
<if test="content != null and content != ''"> and content = #{content} </if>
|
||||
<if test="createTime != null and createTime != ''"> and create_time = #{createTime} </if>
|
||||
<if test="createUserId != null and createUserId != ''"> and create_user_id = #{createUserId} </if>
|
||||
<if test="updateTime != null and updateTime != ''"> and update_time = #{updateTime} </if>
|
||||
<if test="updateUserId != null and updateUserId != ''"> and update_user_id = #{updateUserId} </if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="sort != null and sort.trim() != ''">
|
||||
order by ${sort} ${order}
|
||||
</when>
|
||||
<otherwise>
|
||||
order by id desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="offset != null and limit != null">
|
||||
limit #{offset}, #{limit}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="count" resultType="int">
|
||||
select count(*) from news
|
||||
<where>
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="catId != null and catId != ''"> and cat_id = #{catId} </if>
|
||||
<if test="catName != null and catName != ''"> and cat_name = #{catName} </if>
|
||||
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
|
||||
<if test="title != null and title != ''"> and title = #{title} </if>
|
||||
<if test="content != null and content != ''"> and content = #{content} </if>
|
||||
<if test="createTime != null and createTime != ''"> and create_time = #{createTime} </if>
|
||||
<if test="createUserId != null and createUserId != ''"> and create_user_id = #{createUserId} </if>
|
||||
<if test="updateTime != null and updateTime != ''"> and update_time = #{updateTime} </if>
|
||||
<if test="updateUserId != null and updateUserId != ''"> and update_user_id = #{updateUserId} </if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="save" parameterType="com.java2nb.novel.domain.NewsDO">
|
||||
insert into news
|
||||
(
|
||||
`id`,
|
||||
`cat_id`,
|
||||
`cat_name`,
|
||||
`source_name`,
|
||||
`title`,
|
||||
`content`,
|
||||
`create_time`,
|
||||
`create_user_id`,
|
||||
`update_time`,
|
||||
`update_user_id`
|
||||
)
|
||||
values
|
||||
(
|
||||
#{id},
|
||||
#{catId},
|
||||
#{catName},
|
||||
#{sourceName},
|
||||
#{title},
|
||||
#{content},
|
||||
#{createTime},
|
||||
#{createUserId},
|
||||
#{updateTime},
|
||||
#{updateUserId}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="saveSelective" parameterType="com.java2nb.novel.domain.NewsDO">
|
||||
insert into news
|
||||
(
|
||||
<if test="id != null"> `id`, </if>
|
||||
<if test="catId != null"> `cat_id`, </if>
|
||||
<if test="catName != null"> `cat_name`, </if>
|
||||
<if test="sourceName != null"> `source_name`, </if>
|
||||
<if test="title != null"> `title`, </if>
|
||||
<if test="content != null"> `content`, </if>
|
||||
<if test="createTime != null"> `create_time`, </if>
|
||||
<if test="createUserId != null"> `create_user_id`, </if>
|
||||
<if test="updateTime != null"> `update_time`, </if>
|
||||
<if test="updateUserId != null"> `update_user_id` </if>
|
||||
)
|
||||
values
|
||||
(
|
||||
<if test="id != null"> #{id}, </if>
|
||||
<if test="catId != null"> #{catId}, </if>
|
||||
<if test="catName != null"> #{catName}, </if>
|
||||
<if test="sourceName != null"> #{sourceName}, </if>
|
||||
<if test="title != null"> #{title}, </if>
|
||||
<if test="content != null"> #{content}, </if>
|
||||
<if test="createTime != null"> #{createTime}, </if>
|
||||
<if test="createUserId != null"> #{createUserId}, </if>
|
||||
<if test="updateTime != null"> #{updateTime}, </if>
|
||||
<if test="updateUserId != null"> #{updateUserId} </if>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.java2nb.novel.domain.NewsDO">
|
||||
update news
|
||||
<set>
|
||||
<if test="catId != null">`cat_id` = #{catId}, </if>
|
||||
<if test="catName != null">`cat_name` = #{catName}, </if>
|
||||
<if test="sourceName != null">`source_name` = #{sourceName}, </if>
|
||||
<if test="title != null">`title` = #{title}, </if>
|
||||
<if test="content != null">`content` = #{content}, </if>
|
||||
<if test="createTime != null">`create_time` = #{createTime}, </if>
|
||||
<if test="createUserId != null">`create_user_id` = #{createUserId}, </if>
|
||||
<if test="updateTime != null">`update_time` = #{updateTime}, </if>
|
||||
<if test="updateUserId != null">`update_user_id` = #{updateUserId}</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="remove">
|
||||
delete from news where id = #{value}
|
||||
</delete>
|
||||
|
||||
<delete id="batchRemove">
|
||||
delete from news where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
145
novel-admin/src/main/resources/mybatis/novel/PayMapper.xml
Normal file
145
novel-admin/src/main/resources/mybatis/novel/PayMapper.xml
Normal file
@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.java2nb.novel.dao.PayDao">
|
||||
|
||||
<select id="get" resultType="com.java2nb.novel.domain.PayDO">
|
||||
select `id`,`out_trade_no`,`trade_no`,`pay_channel`,`total_amount`,`user_id`,`pay_status`,`create_time`,`update_time` from order_pay where id = #{value}
|
||||
</select>
|
||||
|
||||
<select id="list" resultType="com.java2nb.novel.domain.PayDO">
|
||||
select `id`,`out_trade_no`,`trade_no`,`pay_channel`,`total_amount`,`user_id`,`pay_status`,`create_time`,`update_time` from order_pay
|
||||
<where>
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="outTradeNo != null and outTradeNo != ''"> and out_trade_no = #{outTradeNo} </if>
|
||||
<if test="tradeNo != null and tradeNo != ''"> and trade_no = #{tradeNo} </if>
|
||||
<if test="payChannel != null and payChannel != ''"> and pay_channel = #{payChannel} </if>
|
||||
<if test="totalAmount != null and totalAmount != ''"> and total_amount = #{totalAmount} </if>
|
||||
<if test="userId != null and userId != ''"> and user_id = #{userId} </if>
|
||||
<if test="payStatus != null and payStatus != ''"> and pay_status = #{payStatus} </if>
|
||||
<if test="createTime != null and createTime != ''"> and create_time = #{createTime} </if>
|
||||
<if test="updateTime != null and updateTime != ''"> and update_time = #{updateTime} </if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="sort != null and sort.trim() != ''">
|
||||
order by ${sort} ${order}
|
||||
</when>
|
||||
<otherwise>
|
||||
order by id desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="offset != null and limit != null">
|
||||
limit #{offset}, #{limit}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="count" resultType="int">
|
||||
select count(*) from order_pay
|
||||
<where>
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="outTradeNo != null and outTradeNo != ''"> and out_trade_no = #{outTradeNo} </if>
|
||||
<if test="tradeNo != null and tradeNo != ''"> and trade_no = #{tradeNo} </if>
|
||||
<if test="payChannel != null and payChannel != ''"> and pay_channel = #{payChannel} </if>
|
||||
<if test="totalAmount != null and totalAmount != ''"> and total_amount = #{totalAmount} </if>
|
||||
<if test="userId != null and userId != ''"> and user_id = #{userId} </if>
|
||||
<if test="payStatus != null and payStatus != ''"> and pay_status = #{payStatus} </if>
|
||||
<if test="createTime != null and createTime != ''"> and create_time = #{createTime} </if>
|
||||
<if test="updateTime != null and updateTime != ''"> and update_time = #{updateTime} </if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="save" parameterType="com.java2nb.novel.domain.PayDO">
|
||||
insert into order_pay
|
||||
(
|
||||
`id`,
|
||||
`out_trade_no`,
|
||||
`trade_no`,
|
||||
`pay_channel`,
|
||||
`total_amount`,
|
||||
`user_id`,
|
||||
`pay_status`,
|
||||
`create_time`,
|
||||
`update_time`
|
||||
)
|
||||
values
|
||||
(
|
||||
#{id},
|
||||
#{outTradeNo},
|
||||
#{tradeNo},
|
||||
#{payChannel},
|
||||
#{totalAmount},
|
||||
#{userId},
|
||||
#{payStatus},
|
||||
#{createTime},
|
||||
#{updateTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="saveSelective" parameterType="com.java2nb.novel.domain.PayDO">
|
||||
insert into order_pay
|
||||
(
|
||||
<if test="id != null"> `id`, </if>
|
||||
<if test="outTradeNo != null"> `out_trade_no`, </if>
|
||||
<if test="tradeNo != null"> `trade_no`, </if>
|
||||
<if test="payChannel != null"> `pay_channel`, </if>
|
||||
<if test="totalAmount != null"> `total_amount`, </if>
|
||||
<if test="userId != null"> `user_id`, </if>
|
||||
<if test="payStatus != null"> `pay_status`, </if>
|
||||
<if test="createTime != null"> `create_time`, </if>
|
||||
<if test="updateTime != null"> `update_time` </if>
|
||||
)
|
||||
values
|
||||
(
|
||||
<if test="id != null"> #{id}, </if>
|
||||
<if test="outTradeNo != null"> #{outTradeNo}, </if>
|
||||
<if test="tradeNo != null"> #{tradeNo}, </if>
|
||||
<if test="payChannel != null"> #{payChannel}, </if>
|
||||
<if test="totalAmount != null"> #{totalAmount}, </if>
|
||||
<if test="userId != null"> #{userId}, </if>
|
||||
<if test="payStatus != null"> #{payStatus}, </if>
|
||||
<if test="createTime != null"> #{createTime}, </if>
|
||||
<if test="updateTime != null"> #{updateTime} </if>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.java2nb.novel.domain.PayDO">
|
||||
update order_pay
|
||||
<set>
|
||||
<if test="outTradeNo != null">`out_trade_no` = #{outTradeNo}, </if>
|
||||
<if test="tradeNo != null">`trade_no` = #{tradeNo}, </if>
|
||||
<if test="payChannel != null">`pay_channel` = #{payChannel}, </if>
|
||||
<if test="totalAmount != null">`total_amount` = #{totalAmount}, </if>
|
||||
<if test="userId != null">`user_id` = #{userId}, </if>
|
||||
<if test="payStatus != null">`pay_status` = #{payStatus}, </if>
|
||||
<if test="createTime != null">`create_time` = #{createTime}, </if>
|
||||
<if test="updateTime != null">`update_time` = #{updateTime}</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="remove">
|
||||
delete from order_pay where id = #{value}
|
||||
</delete>
|
||||
|
||||
<delete id="batchRemove">
|
||||
delete from order_pay where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="tableSta" resultType="map">
|
||||
SELECT
|
||||
DATE_FORMAT( create_time, "%Y-%m-%d" ) AS staDate,
|
||||
COUNT( 1 ) orderCount
|
||||
FROM
|
||||
order_pay
|
||||
WHERE
|
||||
create_time >= #{minDate}
|
||||
GROUP BY
|
||||
DATE_FORMAT( create_time, "%Y-%m-%d" )
|
||||
ORDER BY
|
||||
staDate
|
||||
</select>
|
||||
|
||||
</mapper>
|
154
novel-admin/src/main/resources/mybatis/novel/UserMapper.xml
Normal file
154
novel-admin/src/main/resources/mybatis/novel/UserMapper.xml
Normal file
@ -0,0 +1,154 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.java2nb.novel.dao.UserDao">
|
||||
|
||||
<select id="get" resultType="com.java2nb.novel.domain.UserDO">
|
||||
select `id`,`username`,`password`,`nick_name`,`user_photo`,`user_sex`,`account_balance`,`status`,`create_time`,`update_time` from user where id = #{value}
|
||||
</select>
|
||||
|
||||
<select id="list" resultType="com.java2nb.novel.domain.UserDO">
|
||||
select
|
||||
`id`,`username`,`password`,`nick_name`,`user_photo`,`user_sex`,`account_balance`,`status`,`create_time`,`update_time`
|
||||
from user
|
||||
<where>
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="username != null and username != ''">and username = #{username}</if>
|
||||
<if test="password != null and password != ''">and password = #{password}</if>
|
||||
<if test="nickName != null and nickName != ''">and nick_name = #{nickName}</if>
|
||||
<if test="userPhoto != null and userPhoto != ''">and user_photo = #{userPhoto}</if>
|
||||
<if test="userSex != null and userSex != ''">and user_sex = #{userSex}</if>
|
||||
<if test="accountBalance != null and accountBalance != ''">and account_balance = #{accountBalance}</if>
|
||||
<if test="status != null and status != ''">and status = #{status}</if>
|
||||
<if test="createTime != null and createTime != ''">and create_time = #{createTime}</if>
|
||||
<if test="updateTime != null and updateTime != ''">and update_time = #{updateTime}</if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="sort != null and sort.trim() != ''">
|
||||
order by ${sort} ${order}
|
||||
</when>
|
||||
<otherwise>
|
||||
order by id desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="offset != null and limit != null">
|
||||
limit #{offset}, #{limit}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="count" resultType="int">
|
||||
select count(*) from user
|
||||
<where>
|
||||
<if test="id != null and id != ''">and id = #{id}</if>
|
||||
<if test="username != null and username != ''">and username = #{username}</if>
|
||||
<if test="password != null and password != ''">and password = #{password}</if>
|
||||
<if test="nickName != null and nickName != ''">and nick_name = #{nickName}</if>
|
||||
<if test="userPhoto != null and userPhoto != ''">and user_photo = #{userPhoto}</if>
|
||||
<if test="userSex != null and userSex != ''">and user_sex = #{userSex}</if>
|
||||
<if test="accountBalance != null and accountBalance != ''">and account_balance = #{accountBalance}</if>
|
||||
<if test="status != null and status != ''">and status = #{status}</if>
|
||||
<if test="createTime != null and createTime != ''">and create_time = #{createTime}</if>
|
||||
<if test="updateTime != null and updateTime != ''">and update_time = #{updateTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="save" parameterType="com.java2nb.novel.domain.UserDO">
|
||||
insert into user
|
||||
(
|
||||
`id`,
|
||||
`username`,
|
||||
`password`,
|
||||
`nick_name`,
|
||||
`user_photo`,
|
||||
`user_sex`,
|
||||
`account_balance`,
|
||||
`status`,
|
||||
`create_time`,
|
||||
`update_time`
|
||||
)
|
||||
values
|
||||
(
|
||||
#{id},
|
||||
#{username},
|
||||
#{password},
|
||||
#{nickName},
|
||||
#{userPhoto},
|
||||
#{userSex},
|
||||
#{accountBalance},
|
||||
#{status},
|
||||
#{createTime},
|
||||
#{updateTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="saveSelective" parameterType="com.java2nb.novel.domain.UserDO">
|
||||
insert into user
|
||||
(
|
||||
<if test="id != null">`id`,</if>
|
||||
<if test="username != null">`username`,</if>
|
||||
<if test="password != null">`password`,</if>
|
||||
<if test="nickName != null">`nick_name`,</if>
|
||||
<if test="userPhoto != null">`user_photo`,</if>
|
||||
<if test="userSex != null">`user_sex`,</if>
|
||||
<if test="accountBalance != null">`account_balance`,</if>
|
||||
<if test="status != null">`status`,</if>
|
||||
<if test="createTime != null">`create_time`,</if>
|
||||
<if test="updateTime != null">`update_time`</if>
|
||||
)
|
||||
values
|
||||
(
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="username != null">#{username},</if>
|
||||
<if test="password != null">#{password},</if>
|
||||
<if test="nickName != null">#{nickName},</if>
|
||||
<if test="userPhoto != null">#{userPhoto},</if>
|
||||
<if test="userSex != null">#{userSex},</if>
|
||||
<if test="accountBalance != null">#{accountBalance},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime}</if>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.java2nb.novel.domain.UserDO">
|
||||
update user
|
||||
<set>
|
||||
<if test="username != null">`username` = #{username},</if>
|
||||
<if test="password != null">`password` = #{password},</if>
|
||||
<if test="nickName != null">`nick_name` = #{nickName},</if>
|
||||
<if test="userPhoto != null">`user_photo` = #{userPhoto},</if>
|
||||
<if test="userSex != null">`user_sex` = #{userSex},</if>
|
||||
<if test="accountBalance != null">`account_balance` = #{accountBalance},</if>
|
||||
<if test="status != null">`status` = #{status},</if>
|
||||
<if test="createTime != null">`create_time` = #{createTime},</if>
|
||||
<if test="updateTime != null">`update_time` = #{updateTime}</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="remove">
|
||||
delete from user where id = #{value}
|
||||
</delete>
|
||||
|
||||
<delete id="batchRemove">
|
||||
delete from user where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="tableSta" resultType="map">
|
||||
SELECT
|
||||
DATE_FORMAT( create_time, "%Y-%m-%d" ) AS staDate,
|
||||
COUNT( 1 ) userCount
|
||||
FROM
|
||||
user
|
||||
WHERE
|
||||
create_time >= #{minDate}
|
||||
GROUP BY
|
||||
DATE_FORMAT( create_time, "%Y-%m-%d" )
|
||||
ORDER BY
|
||||
staDate
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.java2nb.system.dao.UserDao">
|
||||
<mapper namespace="com.java2nb.system.dao.SysUserDao">
|
||||
|
||||
<select id="get" resultType="com.java2nb.system.domain.UserDO">
|
||||
select `user_id`,`username`,`name`,`password`,`dept_id`,`email`,`mobile`,`status`,`user_id_create`,`gmt_create`,`gmt_modified`,`sex`,`birth`,`pic_id`,`live_address`,`hobby`,`province`,`city`,`district` from sys_user where user_id = #{value}
|
||||
|
@ -1,283 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.java2nb.test.dao.OrderDao">
|
||||
|
||||
<select id="get" resultType="com.java2nb.test.domain.OrderDO">
|
||||
select `id`,`fb_merchant_code`,`merchant_order_sn`,`order_sn`,`platform_order_no`,`trade_no`,`order_state`,`fn_coupon`,`red_packet`,`total_fee`,`order_price`,`fee`,`body`,`attach`,`store_id`,`cashier_id`,`device_no`,`user_id`,`user_logon_id`,`pay_time`,`pay_channel`,`no_cash_coupon_fee`,`cash_coupon_fee`,`cash_fee`,`sign`,`options`,`create_time`,`push_time`,`push_ip`,`mcht_id`,`sn` from fb_order where id = #{value}
|
||||
</select>
|
||||
|
||||
<select id="list" resultType="com.java2nb.test.domain.OrderDO">
|
||||
select `id`,`fb_merchant_code`,`merchant_order_sn`,`order_sn`,`platform_order_no`,`trade_no`,`order_state`,`fn_coupon`,`red_packet`,`total_fee`,`order_price`,`fee`,`body`,`attach`,`store_id`,`cashier_id`,`device_no`,`user_id`,`user_logon_id`,`pay_time`,`pay_channel`,`no_cash_coupon_fee`,`cash_coupon_fee`,`cash_fee`,`sign`,`options`,`create_time`,`push_time`,`push_ip`,`mcht_id`,`sn` from fb_order
|
||||
<where>
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="fbMerchantCode != null and fbMerchantCode != ''"> and fb_merchant_code = #{fbMerchantCode} </if>
|
||||
<if test="merchantOrderSn != null and merchantOrderSn != ''"> and merchant_order_sn = #{merchantOrderSn} </if>
|
||||
<if test="orderSn != null and orderSn != ''"> and order_sn = #{orderSn} </if>
|
||||
<if test="platformOrderNo != null and platformOrderNo != ''"> and platform_order_no = #{platformOrderNo} </if>
|
||||
<if test="tradeNo != null and tradeNo != ''"> and trade_no = #{tradeNo} </if>
|
||||
<if test="orderState != null and orderState != ''"> and order_state = #{orderState} </if>
|
||||
<if test="fnCoupon != null and fnCoupon != ''"> and fn_coupon = #{fnCoupon} </if>
|
||||
<if test="redPacket != null and redPacket != ''"> and red_packet = #{redPacket} </if>
|
||||
<if test="totalFee != null and totalFee != ''"> and total_fee = #{totalFee} </if>
|
||||
<if test="orderPrice != null and orderPrice != ''"> and order_price = #{orderPrice} </if>
|
||||
<if test="fee != null and fee != ''"> and fee = #{fee} </if>
|
||||
<if test="body != null and body != ''"> and body = #{body} </if>
|
||||
<if test="attach != null and attach != ''"> and attach = #{attach} </if>
|
||||
<if test="storeId != null and storeId != ''"> and store_id = #{storeId} </if>
|
||||
<if test="cashierId != null and cashierId != ''"> and cashier_id = #{cashierId} </if>
|
||||
<if test="deviceNo != null and deviceNo != ''"> and device_no = #{deviceNo} </if>
|
||||
<if test="userId != null and userId != ''"> and user_id = #{userId} </if>
|
||||
<if test="userLogonId != null and userLogonId != ''"> and user_logon_id = #{userLogonId} </if>
|
||||
<if test="payTime != null and payTime != ''"> and pay_time = #{payTime} </if>
|
||||
<if test="payChannel != null and payChannel != ''"> and pay_channel = #{payChannel} </if>
|
||||
<if test="noCashCouponFee != null and noCashCouponFee != ''"> and no_cash_coupon_fee = #{noCashCouponFee} </if>
|
||||
<if test="cashCouponFee != null and cashCouponFee != ''"> and cash_coupon_fee = #{cashCouponFee} </if>
|
||||
<if test="cashFee != null and cashFee != ''"> and cash_fee = #{cashFee} </if>
|
||||
<if test="sign != null and sign != ''"> and sign = #{sign} </if>
|
||||
<if test="options != null and options != ''"> and options = #{options} </if>
|
||||
<if test="createTime != null and createTime != ''"> and create_time = #{createTime} </if>
|
||||
<if test="pushTime != null and pushTime != ''"> and push_time = #{pushTime} </if>
|
||||
<if test="pushIp != null and pushIp != ''"> and push_ip = #{pushIp} </if>
|
||||
<if test="mchtId != null and mchtId != ''"> and mcht_id = #{mchtId} </if>
|
||||
<if test="sn != null and sn != ''"> and sn = #{sn} </if>
|
||||
</where>
|
||||
<choose>
|
||||
<when test="sort != null and sort.trim() != ''">
|
||||
order by ${sort} ${order}
|
||||
</when>
|
||||
<otherwise>
|
||||
order by id desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
<if test="offset != null and limit != null">
|
||||
limit #{offset}, #{limit}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="count" resultType="int">
|
||||
select count(*) from fb_order
|
||||
<where>
|
||||
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||
<if test="fbMerchantCode != null and fbMerchantCode != ''"> and fb_merchant_code = #{fbMerchantCode} </if>
|
||||
<if test="merchantOrderSn != null and merchantOrderSn != ''"> and merchant_order_sn = #{merchantOrderSn} </if>
|
||||
<if test="orderSn != null and orderSn != ''"> and order_sn = #{orderSn} </if>
|
||||
<if test="platformOrderNo != null and platformOrderNo != ''"> and platform_order_no = #{platformOrderNo} </if>
|
||||
<if test="tradeNo != null and tradeNo != ''"> and trade_no = #{tradeNo} </if>
|
||||
<if test="orderState != null and orderState != ''"> and order_state = #{orderState} </if>
|
||||
<if test="fnCoupon != null and fnCoupon != ''"> and fn_coupon = #{fnCoupon} </if>
|
||||
<if test="redPacket != null and redPacket != ''"> and red_packet = #{redPacket} </if>
|
||||
<if test="totalFee != null and totalFee != ''"> and total_fee = #{totalFee} </if>
|
||||
<if test="orderPrice != null and orderPrice != ''"> and order_price = #{orderPrice} </if>
|
||||
<if test="fee != null and fee != ''"> and fee = #{fee} </if>
|
||||
<if test="body != null and body != ''"> and body = #{body} </if>
|
||||
<if test="attach != null and attach != ''"> and attach = #{attach} </if>
|
||||
<if test="storeId != null and storeId != ''"> and store_id = #{storeId} </if>
|
||||
<if test="cashierId != null and cashierId != ''"> and cashier_id = #{cashierId} </if>
|
||||
<if test="deviceNo != null and deviceNo != ''"> and device_no = #{deviceNo} </if>
|
||||
<if test="userId != null and userId != ''"> and user_id = #{userId} </if>
|
||||
<if test="userLogonId != null and userLogonId != ''"> and user_logon_id = #{userLogonId} </if>
|
||||
<if test="payTime != null and payTime != ''"> and pay_time = #{payTime} </if>
|
||||
<if test="payChannel != null and payChannel != ''"> and pay_channel = #{payChannel} </if>
|
||||
<if test="noCashCouponFee != null and noCashCouponFee != ''"> and no_cash_coupon_fee = #{noCashCouponFee} </if>
|
||||
<if test="cashCouponFee != null and cashCouponFee != ''"> and cash_coupon_fee = #{cashCouponFee} </if>
|
||||
<if test="cashFee != null and cashFee != ''"> and cash_fee = #{cashFee} </if>
|
||||
<if test="sign != null and sign != ''"> and sign = #{sign} </if>
|
||||
<if test="options != null and options != ''"> and options = #{options} </if>
|
||||
<if test="createTime != null and createTime != ''"> and create_time = #{createTime} </if>
|
||||
<if test="pushTime != null and pushTime != ''"> and push_time = #{pushTime} </if>
|
||||
<if test="pushIp != null and pushIp != ''"> and push_ip = #{pushIp} </if>
|
||||
<if test="mchtId != null and mchtId != ''"> and mcht_id = #{mchtId} </if>
|
||||
<if test="sn != null and sn != ''"> and sn = #{sn} </if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="save" parameterType="com.java2nb.test.domain.OrderDO" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into fb_order
|
||||
(
|
||||
`fb_merchant_code`,
|
||||
`merchant_order_sn`,
|
||||
`order_sn`,
|
||||
`platform_order_no`,
|
||||
`trade_no`,
|
||||
`order_state`,
|
||||
`fn_coupon`,
|
||||
`red_packet`,
|
||||
`total_fee`,
|
||||
`order_price`,
|
||||
`fee`,
|
||||
`body`,
|
||||
`attach`,
|
||||
`store_id`,
|
||||
`cashier_id`,
|
||||
`device_no`,
|
||||
`user_id`,
|
||||
`user_logon_id`,
|
||||
`pay_time`,
|
||||
`pay_channel`,
|
||||
`no_cash_coupon_fee`,
|
||||
`cash_coupon_fee`,
|
||||
`cash_fee`,
|
||||
`sign`,
|
||||
`options`,
|
||||
`create_time`,
|
||||
`push_time`,
|
||||
`push_ip`,
|
||||
`mcht_id`,
|
||||
`sn`
|
||||
)
|
||||
values
|
||||
(
|
||||
#{fbMerchantCode},
|
||||
#{merchantOrderSn},
|
||||
#{orderSn},
|
||||
#{platformOrderNo},
|
||||
#{tradeNo},
|
||||
#{orderState},
|
||||
#{fnCoupon},
|
||||
#{redPacket},
|
||||
#{totalFee},
|
||||
#{orderPrice},
|
||||
#{fee},
|
||||
#{body},
|
||||
#{attach},
|
||||
#{storeId},
|
||||
#{cashierId},
|
||||
#{deviceNo},
|
||||
#{userId},
|
||||
#{userLogonId},
|
||||
#{payTime},
|
||||
#{payChannel},
|
||||
#{noCashCouponFee},
|
||||
#{cashCouponFee},
|
||||
#{cashFee},
|
||||
#{sign},
|
||||
#{options},
|
||||
#{createTime},
|
||||
#{pushTime},
|
||||
#{pushIp},
|
||||
#{mchtId},
|
||||
#{sn}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="saveSelective" parameterType="com.java2nb.test.domain.OrderDO" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into fb_order
|
||||
(
|
||||
<if test="id != null"> `id`, </if>
|
||||
<if test="fbMerchantCode != null"> `fb_merchant_code`, </if>
|
||||
<if test="merchantOrderSn != null"> `merchant_order_sn`, </if>
|
||||
<if test="orderSn != null"> `order_sn`, </if>
|
||||
<if test="platformOrderNo != null"> `platform_order_no`, </if>
|
||||
<if test="tradeNo != null"> `trade_no`, </if>
|
||||
<if test="orderState != null"> `order_state`, </if>
|
||||
<if test="fnCoupon != null"> `fn_coupon`, </if>
|
||||
<if test="redPacket != null"> `red_packet`, </if>
|
||||
<if test="totalFee != null"> `total_fee`, </if>
|
||||
<if test="orderPrice != null"> `order_price`, </if>
|
||||
<if test="fee != null"> `fee`, </if>
|
||||
<if test="body != null"> `body`, </if>
|
||||
<if test="attach != null"> `attach`, </if>
|
||||
<if test="storeId != null"> `store_id`, </if>
|
||||
<if test="cashierId != null"> `cashier_id`, </if>
|
||||
<if test="deviceNo != null"> `device_no`, </if>
|
||||
<if test="userId != null"> `user_id`, </if>
|
||||
<if test="userLogonId != null"> `user_logon_id`, </if>
|
||||
<if test="payTime != null"> `pay_time`, </if>
|
||||
<if test="payChannel != null"> `pay_channel`, </if>
|
||||
<if test="noCashCouponFee != null"> `no_cash_coupon_fee`, </if>
|
||||
<if test="cashCouponFee != null"> `cash_coupon_fee`, </if>
|
||||
<if test="cashFee != null"> `cash_fee`, </if>
|
||||
<if test="sign != null"> `sign`, </if>
|
||||
<if test="options != null"> `options`, </if>
|
||||
<if test="createTime != null"> `create_time`, </if>
|
||||
<if test="pushTime != null"> `push_time`, </if>
|
||||
<if test="pushIp != null"> `push_ip`, </if>
|
||||
<if test="mchtId != null"> `mcht_id`, </if>
|
||||
<if test="sn != null"> `sn` </if>
|
||||
)
|
||||
values
|
||||
(
|
||||
<if test="id != null"> #{id}, </if>
|
||||
<if test="fbMerchantCode != null"> #{fbMerchantCode}, </if>
|
||||
<if test="merchantOrderSn != null"> #{merchantOrderSn}, </if>
|
||||
<if test="orderSn != null"> #{orderSn}, </if>
|
||||
<if test="platformOrderNo != null"> #{platformOrderNo}, </if>
|
||||
<if test="tradeNo != null"> #{tradeNo}, </if>
|
||||
<if test="orderState != null"> #{orderState}, </if>
|
||||
<if test="fnCoupon != null"> #{fnCoupon}, </if>
|
||||
<if test="redPacket != null"> #{redPacket}, </if>
|
||||
<if test="totalFee != null"> #{totalFee}, </if>
|
||||
<if test="orderPrice != null"> #{orderPrice}, </if>
|
||||
<if test="fee != null"> #{fee}, </if>
|
||||
<if test="body != null"> #{body}, </if>
|
||||
<if test="attach != null"> #{attach}, </if>
|
||||
<if test="storeId != null"> #{storeId}, </if>
|
||||
<if test="cashierId != null"> #{cashierId}, </if>
|
||||
<if test="deviceNo != null"> #{deviceNo}, </if>
|
||||
<if test="userId != null"> #{userId}, </if>
|
||||
<if test="userLogonId != null"> #{userLogonId}, </if>
|
||||
<if test="payTime != null"> #{payTime}, </if>
|
||||
<if test="payChannel != null"> #{payChannel}, </if>
|
||||
<if test="noCashCouponFee != null"> #{noCashCouponFee}, </if>
|
||||
<if test="cashCouponFee != null"> #{cashCouponFee}, </if>
|
||||
<if test="cashFee != null"> #{cashFee}, </if>
|
||||
<if test="sign != null"> #{sign}, </if>
|
||||
<if test="options != null"> #{options}, </if>
|
||||
<if test="createTime != null"> #{createTime}, </if>
|
||||
<if test="pushTime != null"> #{pushTime}, </if>
|
||||
<if test="pushIp != null"> #{pushIp}, </if>
|
||||
<if test="mchtId != null"> #{mchtId}, </if>
|
||||
<if test="sn != null"> #{sn} </if>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.java2nb.test.domain.OrderDO">
|
||||
update fb_order
|
||||
<set>
|
||||
<if test="fbMerchantCode != null">`fb_merchant_code` = #{fbMerchantCode}, </if>
|
||||
<if test="merchantOrderSn != null">`merchant_order_sn` = #{merchantOrderSn}, </if>
|
||||
<if test="orderSn != null">`order_sn` = #{orderSn}, </if>
|
||||
<if test="platformOrderNo != null">`platform_order_no` = #{platformOrderNo}, </if>
|
||||
<if test="tradeNo != null">`trade_no` = #{tradeNo}, </if>
|
||||
<if test="orderState != null">`order_state` = #{orderState}, </if>
|
||||
<if test="fnCoupon != null">`fn_coupon` = #{fnCoupon}, </if>
|
||||
<if test="redPacket != null">`red_packet` = #{redPacket}, </if>
|
||||
<if test="totalFee != null">`total_fee` = #{totalFee}, </if>
|
||||
<if test="orderPrice != null">`order_price` = #{orderPrice}, </if>
|
||||
<if test="fee != null">`fee` = #{fee}, </if>
|
||||
<if test="body != null">`body` = #{body}, </if>
|
||||
<if test="attach != null">`attach` = #{attach}, </if>
|
||||
<if test="storeId != null">`store_id` = #{storeId}, </if>
|
||||
<if test="cashierId != null">`cashier_id` = #{cashierId}, </if>
|
||||
<if test="deviceNo != null">`device_no` = #{deviceNo}, </if>
|
||||
<if test="userId != null">`user_id` = #{userId}, </if>
|
||||
<if test="userLogonId != null">`user_logon_id` = #{userLogonId}, </if>
|
||||
<if test="payTime != null">`pay_time` = #{payTime}, </if>
|
||||
<if test="payChannel != null">`pay_channel` = #{payChannel}, </if>
|
||||
<if test="noCashCouponFee != null">`no_cash_coupon_fee` = #{noCashCouponFee}, </if>
|
||||
<if test="cashCouponFee != null">`cash_coupon_fee` = #{cashCouponFee}, </if>
|
||||
<if test="cashFee != null">`cash_fee` = #{cashFee}, </if>
|
||||
<if test="sign != null">`sign` = #{sign}, </if>
|
||||
<if test="options != null">`options` = #{options}, </if>
|
||||
<if test="createTime != null">`create_time` = #{createTime}, </if>
|
||||
<if test="pushTime != null">`push_time` = #{pushTime}, </if>
|
||||
<if test="pushIp != null">`push_ip` = #{pushIp}, </if>
|
||||
<if test="mchtId != null">`mcht_id` = #{mchtId}, </if>
|
||||
<if test="sn != null">`sn` = #{sn}</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="remove">
|
||||
delete from fb_order where id = #{value}
|
||||
</delete>
|
||||
|
||||
<delete id="batchRemove">
|
||||
delete from fb_order where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
107
novel-admin/src/main/resources/static/js/appjs/novel/book/add.js
Normal file
107
novel-admin/src/main/resources/static/js/appjs/novel/book/add.js
Normal file
@ -0,0 +1,107 @@
|
||||
var E = window.wangEditor;
|
||||
$("[id^='contentEditor']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(13);
|
||||
var editor = new E('#contentEditor' + relName);
|
||||
// 自定义菜单配置
|
||||
editor.customConfig.menus = [
|
||||
'head', // 标题
|
||||
'bold', // 粗体
|
||||
'fontSize', // 字号
|
||||
'fontName', // 字体
|
||||
'italic', // 斜体
|
||||
'underline', // 下划线
|
||||
'strikeThrough', // 删除线
|
||||
'foreColor', // 文字颜色
|
||||
//'backColor', // 背景颜色
|
||||
//'link', // 插入链接
|
||||
'list', // 列表
|
||||
'justify', // 对齐方式
|
||||
'quote', // 引用
|
||||
'emoticon', // 表情
|
||||
'image', // 插入图片
|
||||
//'table', // 表格
|
||||
//'video', // 插入视频
|
||||
//'code', // 插入代码
|
||||
'undo', // 撤销
|
||||
'redo' // 重复
|
||||
];
|
||||
editor.customConfig.onchange = function (html) {
|
||||
// html 即变化之后的内容
|
||||
$("#" + relName).val(html);
|
||||
}
|
||||
editor.customConfig.uploadImgShowBase64 = true;
|
||||
editor.create();
|
||||
|
||||
})
|
||||
|
||||
$("[id^='picImage']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(8);
|
||||
layui.use('upload', function () {
|
||||
var upload = layui.upload;
|
||||
//执行实例
|
||||
var uploadInst = upload.render({
|
||||
elem: '#picImage' + relName, //绑定元素
|
||||
url: '/common/sysFile/upload', //上传接口
|
||||
size: 1000,
|
||||
accept: 'file',
|
||||
done: function (r) {
|
||||
$("#picImage" + relName).attr("src", r.fileName);
|
||||
$("#" + relName).val(r.fileName);
|
||||
},
|
||||
error: function (r) {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$().ready(function () {
|
||||
validateRule();
|
||||
});
|
||||
|
||||
$.validator.setDefaults({
|
||||
submitHandler: function () {
|
||||
save();
|
||||
}
|
||||
});
|
||||
function save() {
|
||||
$.ajax({
|
||||
cache: true,
|
||||
type: "POST",
|
||||
url: "/novel/book/save",
|
||||
data: $('#signupForm').serialize(),// 你的formid
|
||||
async: false,
|
||||
error: function (request) {
|
||||
parent.layer.alert("Connection error");
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
parent.layer.msg("操作成功");
|
||||
parent.reLoad();
|
||||
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
|
||||
parent.layer.close(index);
|
||||
|
||||
} else {
|
||||
parent.layer.alert(data.msg)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function validateRule() {
|
||||
var icon = "<i class='fa fa-times-circle'></i> ";
|
||||
$("#signupForm").validate({
|
||||
ignore: "",
|
||||
rules: {
|
||||
},
|
||||
messages: {
|
||||
}
|
||||
})
|
||||
}
|
@ -0,0 +1,363 @@
|
||||
var prefix = "/novel/book"
|
||||
$(function () {
|
||||
load();
|
||||
});
|
||||
|
||||
function load() {
|
||||
$('#exampleTable')
|
||||
.bootstrapTable(
|
||||
{
|
||||
method: 'get', // 服务器数据的请求方式 get or post
|
||||
url: prefix + "/list", // 服务器数据的加载地址
|
||||
// showRefresh : true,
|
||||
// showToggle : true,
|
||||
// showColumns : true,
|
||||
iconSize: 'outline',
|
||||
toolbar: '#exampleToolbar',
|
||||
striped: true, // 设置为true会有隔行变色效果
|
||||
dataType: "json", // 服务器返回的数据类型
|
||||
pagination: true, // 设置为true会在底部显示分页条
|
||||
// queryParamsType : "limit",
|
||||
// //设置为limit则会发送符合RESTFull格式的参数
|
||||
singleSelect: false, // 设置为true将禁止多选
|
||||
// contentType : "application/x-www-form-urlencoded",
|
||||
// //发送到服务器的数据编码类型
|
||||
pageSize: 10, // 如果设置了分页,每页数据条数
|
||||
pageNumber: 1, // 如果设置了分布,首页页码
|
||||
//search : true, // 是否显示搜索框
|
||||
showColumns: false, // 是否显示内容下拉框(选择显示的列)
|
||||
sidePagination: "server", // 设置在哪里进行分页,可选值为"client" 或者 "server"
|
||||
queryParams: function (params) {
|
||||
//说明:传入后台的参数包括offset开始索引,limit步长,sort排序列,order:desc或者,以及所有列的键值对
|
||||
var queryParams = getFormJson("searchForm");
|
||||
queryParams.limit = params.limit;
|
||||
queryParams.offset = params.offset;
|
||||
return queryParams;
|
||||
},
|
||||
// //请求服务器数据时,你可以通过重写参数的方式添加一些额外的参数,例如 toolbar 中的参数 如果
|
||||
// queryParamsType = 'limit' ,返回参数必须包含
|
||||
// limit, offset, search, sort, order 否则, 需要包含:
|
||||
// pageSize, pageNumber, searchText, sortName,
|
||||
// sortOrder.
|
||||
// 返回false将会终止请求
|
||||
responseHandler: function (rs) {
|
||||
|
||||
if (rs.code == 0) {
|
||||
return rs.data;
|
||||
} else {
|
||||
parent.layer.alert(rs.msg)
|
||||
return {total: 0, rows: []};
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
formatter: function () {
|
||||
return arguments[2] + 1;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: '主键'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'workDirection',
|
||||
title: '作品方向,0:男频,1:女频'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'catId',
|
||||
title: '分类ID'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'catName',
|
||||
title: '分类名'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'catChildId',
|
||||
title: '子分类ID'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'catChildName',
|
||||
title: '子分类名'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'picUrl',
|
||||
title: '小说封面'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'bookName',
|
||||
title: '小说名'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'heroName',
|
||||
title: '男主角姓名'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'ladyName',
|
||||
title: '女主角姓名'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'bookStyle',
|
||||
title: '作品风格,0:甜宠,1:虐恋,2:其他'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'bookLabel',
|
||||
title: '作品标签'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'authorId',
|
||||
title: '作者id'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'authorName',
|
||||
title: '作者名'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'bookDesc',
|
||||
title: '书籍描述'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'score',
|
||||
title: '评分,预留字段'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'bookStatus',
|
||||
title: '书籍状态,0:连载中,1:已完结'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'visitCount',
|
||||
title: '点击量'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'wordCount',
|
||||
title: '总字数'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'commentCount',
|
||||
title: '评论数'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'yesterdayBuy',
|
||||
title: '昨日订阅数'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'lastIndexId',
|
||||
title: '最新目录ID'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'lastIndexName',
|
||||
title: '最新目录名'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'lastIndexUpdateTime',
|
||||
title: '最新目录更新时间'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'isVip',
|
||||
title: '是否收费,1:收费,0:免费'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'status',
|
||||
title: '状态,0:入库,1:上架'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'updateTime',
|
||||
title: '更新时间'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'crawlSourceId',
|
||||
title: '爬虫源站ID'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'crawlBookId',
|
||||
title: '抓取的源站小说ID'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'crawlLastTime',
|
||||
title: '最后一次的抓取时间'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'crawlIsStop',
|
||||
title: '是否已停止更新,0:未停止,1:已停止'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
field: 'id',
|
||||
align: 'center',
|
||||
formatter: function (value, row, index) {
|
||||
var d = '<a class="btn btn-primary btn-sm ' + s_detail_h + '" href="#" mce_href="#" title="详情" onclick="detail(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-file"></i></a> ';
|
||||
var e = '<a class="btn btn-primary btn-sm ' + s_edit_h + '" href="#" mce_href="#" title="编辑" onclick="edit(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-edit"></i></a> ';
|
||||
var r = '<a class="btn btn-warning btn-sm ' + s_remove_h + '" href="#" title="删除" mce_href="#" onclick="remove(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-remove"></i></a> ';
|
||||
return d + e + r;
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
function reLoad() {
|
||||
$('#exampleTable').bootstrapTable('refresh');
|
||||
}
|
||||
function add() {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '增加',
|
||||
maxmin: true,
|
||||
shadeClose: false, // 点击遮罩关闭层
|
||||
area: ['800px', '520px'],
|
||||
content: prefix + '/add' // iframe的url
|
||||
});
|
||||
}
|
||||
function detail(id) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '详情',
|
||||
maxmin: true,
|
||||
shadeClose: false, // 点击遮罩关闭层
|
||||
area: ['800px', '520px'],
|
||||
content: prefix + '/detail/' + id // iframe的url
|
||||
});
|
||||
}
|
||||
function edit(id) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '编辑',
|
||||
maxmin: true,
|
||||
shadeClose: false, // 点击遮罩关闭层
|
||||
area: ['800px', '520px'],
|
||||
content: prefix + '/edit/' + id // iframe的url
|
||||
});
|
||||
}
|
||||
function remove(id) {
|
||||
layer.confirm('确定要删除选中的记录?', {
|
||||
btn: ['确定', '取消']
|
||||
}, function () {
|
||||
$.ajax({
|
||||
url: prefix + "/remove",
|
||||
type: "post",
|
||||
data: {
|
||||
'id': id
|
||||
},
|
||||
success: function (r) {
|
||||
if (r.code == 0) {
|
||||
layer.msg(r.msg);
|
||||
reLoad();
|
||||
} else {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function resetPwd(id) {
|
||||
}
|
||||
function batchRemove() {
|
||||
var rows = $('#exampleTable').bootstrapTable('getSelections'); // 返回所有选择的行,当没有选择的记录时,返回一个空数组
|
||||
if (rows.length == 0) {
|
||||
layer.msg("请选择要删除的数据");
|
||||
return;
|
||||
}
|
||||
layer.confirm("确认要删除选中的'" + rows.length + "'条数据吗?", {
|
||||
btn: ['确定', '取消']
|
||||
// 按钮
|
||||
}, function () {
|
||||
var ids = new Array();
|
||||
// 遍历所有选择的行数据,取每条数据对应的ID
|
||||
$.each(rows, function (i, row) {
|
||||
ids[i] = row['id'];
|
||||
});
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
data: {
|
||||
"ids": ids
|
||||
},
|
||||
url: prefix + '/batchRemove',
|
||||
success: function (r) {
|
||||
if (r.code == 0) {
|
||||
layer.msg(r.msg);
|
||||
reLoad();
|
||||
} else {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, function () {
|
||||
|
||||
});
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
var E = window.wangEditor;
|
||||
$("[id^='contentEditor']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(13);
|
||||
var editor = new E('#contentEditor' + relName);
|
||||
// 自定义菜单配置
|
||||
editor.customConfig.menus = [
|
||||
'head', // 标题
|
||||
'bold', // 粗体
|
||||
'fontSize', // 字号
|
||||
'fontName', // 字体
|
||||
'italic', // 斜体
|
||||
'underline', // 下划线
|
||||
'strikeThrough', // 删除线
|
||||
'foreColor', // 文字颜色
|
||||
//'backColor', // 背景颜色
|
||||
//'link', // 插入链接
|
||||
'list', // 列表
|
||||
'justify', // 对齐方式
|
||||
'quote', // 引用
|
||||
'emoticon', // 表情
|
||||
'image', // 插入图片
|
||||
//'table', // 表格
|
||||
//'video', // 插入视频
|
||||
//'code', // 插入代码
|
||||
'undo', // 撤销
|
||||
'redo' // 重复
|
||||
];
|
||||
editor.customConfig.onchange = function (html) {
|
||||
// html 即变化之后的内容
|
||||
$("#" + relName).val(html);
|
||||
}
|
||||
editor.customConfig.uploadImgShowBase64 = true;
|
||||
editor.create();
|
||||
editor.txt.html($("#" + relName).val());
|
||||
|
||||
})
|
||||
|
||||
$("[id^='picImage']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(8);
|
||||
layui.use('upload', function () {
|
||||
var upload = layui.upload;
|
||||
//执行实例
|
||||
var uploadInst = upload.render({
|
||||
elem: '#picImage' + relName, //绑定元素
|
||||
url: '/common/sysFile/upload', //上传接口
|
||||
size: 1000,
|
||||
accept: 'file',
|
||||
done: function (r) {
|
||||
$("#picImage" + relName).attr("src", r.fileName);
|
||||
$("#" + relName).val(r.fileName);
|
||||
},
|
||||
error: function (r) {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$().ready(function () {
|
||||
validateRule();
|
||||
});
|
||||
|
||||
$.validator.setDefaults({
|
||||
submitHandler: function () {
|
||||
update();
|
||||
}
|
||||
});
|
||||
function update() {
|
||||
$.ajax({
|
||||
cache: true,
|
||||
type: "POST",
|
||||
url: "/novel/book/update",
|
||||
data: $('#signupForm').serialize(),// 你的formid
|
||||
async: false,
|
||||
error: function (request) {
|
||||
parent.layer.alert("Connection error");
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
parent.layer.msg("操作成功");
|
||||
parent.reLoad();
|
||||
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
|
||||
parent.layer.close(index);
|
||||
|
||||
} else {
|
||||
parent.layer.alert(data.msg)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function validateRule() {
|
||||
var icon = "<i class='fa fa-times-circle'></i> ";
|
||||
$("#signupForm").validate({
|
||||
ignore: "",
|
||||
rules: {
|
||||
},
|
||||
messages: {
|
||||
}
|
||||
})
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
var E = window.wangEditor;
|
||||
$("[id^='contentEditor']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(13);
|
||||
var editor = new E('#contentEditor' + relName);
|
||||
// 自定义菜单配置
|
||||
editor.customConfig.menus = [
|
||||
'head', // 标题
|
||||
'bold', // 粗体
|
||||
'fontSize', // 字号
|
||||
'fontName', // 字体
|
||||
'italic', // 斜体
|
||||
'underline', // 下划线
|
||||
'strikeThrough', // 删除线
|
||||
'foreColor', // 文字颜色
|
||||
//'backColor', // 背景颜色
|
||||
//'link', // 插入链接
|
||||
'list', // 列表
|
||||
'justify', // 对齐方式
|
||||
'quote', // 引用
|
||||
'emoticon', // 表情
|
||||
'image', // 插入图片
|
||||
//'table', // 表格
|
||||
//'video', // 插入视频
|
||||
//'code', // 插入代码
|
||||
'undo', // 撤销
|
||||
'redo' // 重复
|
||||
];
|
||||
editor.customConfig.onchange = function (html) {
|
||||
// html 即变化之后的内容
|
||||
$("#" + relName).val(html);
|
||||
}
|
||||
editor.customConfig.uploadImgShowBase64 = true;
|
||||
editor.create();
|
||||
|
||||
})
|
||||
|
||||
$("[id^='picImage']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(8);
|
||||
layui.use('upload', function () {
|
||||
var upload = layui.upload;
|
||||
//执行实例
|
||||
var uploadInst = upload.render({
|
||||
elem: '#picImage' + relName, //绑定元素
|
||||
url: '/common/sysFile/upload', //上传接口
|
||||
size: 1000,
|
||||
accept: 'file',
|
||||
done: function (r) {
|
||||
$("#picImage" + relName).attr("src", r.fileName);
|
||||
$("#" + relName).val(r.fileName);
|
||||
},
|
||||
error: function (r) {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$().ready(function () {
|
||||
validateRule();
|
||||
});
|
||||
|
||||
$.validator.setDefaults({
|
||||
submitHandler: function () {
|
||||
save();
|
||||
}
|
||||
});
|
||||
function save() {
|
||||
$.ajax({
|
||||
cache: true,
|
||||
type: "POST",
|
||||
url: "/novel/category/save",
|
||||
data: $('#signupForm').serialize(),// 你的formid
|
||||
async: false,
|
||||
error: function (request) {
|
||||
parent.layer.alert("Connection error");
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
parent.layer.msg("操作成功");
|
||||
parent.reLoad();
|
||||
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
|
||||
parent.layer.close(index);
|
||||
|
||||
} else {
|
||||
parent.layer.alert(data.msg)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function validateRule() {
|
||||
var icon = "<i class='fa fa-times-circle'></i> ";
|
||||
$("#signupForm").validate({
|
||||
ignore: "",
|
||||
rules: {
|
||||
name: {
|
||||
required: true
|
||||
}, },
|
||||
messages: {
|
||||
name: {
|
||||
required: icon + "请选择分类名"
|
||||
}, }
|
||||
})
|
||||
}
|
@ -0,0 +1,193 @@
|
||||
var prefix = "/novel/category"
|
||||
$(function () {
|
||||
load();
|
||||
});
|
||||
|
||||
function load() {
|
||||
$('#exampleTable')
|
||||
.bootstrapTable(
|
||||
{
|
||||
method: 'get', // 服务器数据的请求方式 get or post
|
||||
url: prefix + "/list", // 服务器数据的加载地址
|
||||
// showRefresh : true,
|
||||
// showToggle : true,
|
||||
// showColumns : true,
|
||||
iconSize: 'outline',
|
||||
toolbar: '#exampleToolbar',
|
||||
striped: true, // 设置为true会有隔行变色效果
|
||||
dataType: "json", // 服务器返回的数据类型
|
||||
pagination: true, // 设置为true会在底部显示分页条
|
||||
// queryParamsType : "limit",
|
||||
// //设置为limit则会发送符合RESTFull格式的参数
|
||||
singleSelect: false, // 设置为true将禁止多选
|
||||
// contentType : "application/x-www-form-urlencoded",
|
||||
// //发送到服务器的数据编码类型
|
||||
pageSize: 10, // 如果设置了分页,每页数据条数
|
||||
pageNumber: 1, // 如果设置了分布,首页页码
|
||||
//search : true, // 是否显示搜索框
|
||||
showColumns: false, // 是否显示内容下拉框(选择显示的列)
|
||||
sidePagination: "server", // 设置在哪里进行分页,可选值为"client" 或者 "server"
|
||||
queryParams: function (params) {
|
||||
//说明:传入后台的参数包括offset开始索引,limit步长,sort排序列,order:desc或者,以及所有列的键值对
|
||||
var queryParams = getFormJson("searchForm");
|
||||
queryParams.limit = params.limit;
|
||||
queryParams.offset = params.offset;
|
||||
return queryParams;
|
||||
},
|
||||
// //请求服务器数据时,你可以通过重写参数的方式添加一些额外的参数,例如 toolbar 中的参数 如果
|
||||
// queryParamsType = 'limit' ,返回参数必须包含
|
||||
// limit, offset, search, sort, order 否则, 需要包含:
|
||||
// pageSize, pageNumber, searchText, sortName,
|
||||
// sortOrder.
|
||||
// 返回false将会终止请求
|
||||
responseHandler: function (rs) {
|
||||
|
||||
if (rs.code == 0) {
|
||||
return rs.data;
|
||||
} else {
|
||||
parent.layer.alert(rs.msg)
|
||||
return {total: 0, rows: []};
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
formatter: function () {
|
||||
return arguments[2] + 1;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'name',
|
||||
title: '分类名'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'sort',
|
||||
title: '排序'
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
field: 'id',
|
||||
align: 'center',
|
||||
formatter: function (value, row, index) {
|
||||
var d = '<a class="btn btn-primary btn-sm ' + s_detail_h + '" href="#" mce_href="#" title="详情" onclick="detail(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-file"></i></a> ';
|
||||
var e = '<a class="btn btn-primary btn-sm ' + s_edit_h + '" href="#" mce_href="#" title="编辑" onclick="edit(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-edit"></i></a> ';
|
||||
var r = '<a class="btn btn-warning btn-sm ' + s_remove_h + '" href="#" title="删除" mce_href="#" onclick="remove(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-remove"></i></a> ';
|
||||
return e + r;
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
function reLoad() {
|
||||
$('#exampleTable').bootstrapTable('refresh');
|
||||
}
|
||||
|
||||
function add() {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '增加',
|
||||
maxmin: true,
|
||||
shadeClose: false, // 点击遮罩关闭层
|
||||
area: ['800px', '520px'],
|
||||
content: prefix + '/add' // iframe的url
|
||||
});
|
||||
}
|
||||
|
||||
function detail(id) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '详情',
|
||||
maxmin: true,
|
||||
shadeClose: false, // 点击遮罩关闭层
|
||||
area: ['800px', '520px'],
|
||||
content: prefix + '/detail/' + id // iframe的url
|
||||
});
|
||||
}
|
||||
|
||||
function edit(id) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '编辑',
|
||||
maxmin: true,
|
||||
shadeClose: false, // 点击遮罩关闭层
|
||||
area: ['800px', '520px'],
|
||||
content: prefix + '/edit/' + id // iframe的url
|
||||
});
|
||||
}
|
||||
|
||||
function remove(id) {
|
||||
layer.confirm('确定要删除选中的记录?', {
|
||||
btn: ['确定', '取消']
|
||||
}, function () {
|
||||
$.ajax({
|
||||
url: prefix + "/remove",
|
||||
type: "post",
|
||||
data: {
|
||||
'id': id
|
||||
},
|
||||
success: function (r) {
|
||||
if (r.code == 0) {
|
||||
layer.msg(r.msg);
|
||||
reLoad();
|
||||
} else {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function resetPwd(id) {
|
||||
}
|
||||
|
||||
function batchRemove() {
|
||||
var rows = $('#exampleTable').bootstrapTable('getSelections'); // 返回所有选择的行,当没有选择的记录时,返回一个空数组
|
||||
if (rows.length == 0) {
|
||||
layer.msg("请选择要删除的数据");
|
||||
return;
|
||||
}
|
||||
layer.confirm("确认要删除选中的'" + rows.length + "'条数据吗?", {
|
||||
btn: ['确定', '取消']
|
||||
// 按钮
|
||||
}, function () {
|
||||
var ids = new Array();
|
||||
// 遍历所有选择的行数据,取每条数据对应的ID
|
||||
$.each(rows, function (i, row) {
|
||||
ids[i] = row['id'];
|
||||
});
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
data: {
|
||||
"ids": ids
|
||||
},
|
||||
url: prefix + '/batchRemove',
|
||||
success: function (r) {
|
||||
if (r.code == 0) {
|
||||
layer.msg(r.msg);
|
||||
reLoad();
|
||||
} else {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, function () {
|
||||
|
||||
});
|
||||
}
|
@ -0,0 +1,109 @@
|
||||
var E = window.wangEditor;
|
||||
$("[id^='contentEditor']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(13);
|
||||
var editor = new E('#contentEditor' + relName);
|
||||
// 自定义菜单配置
|
||||
editor.customConfig.menus = [
|
||||
'head', // 标题
|
||||
'bold', // 粗体
|
||||
'fontSize', // 字号
|
||||
'fontName', // 字体
|
||||
'italic', // 斜体
|
||||
'underline', // 下划线
|
||||
'strikeThrough', // 删除线
|
||||
'foreColor', // 文字颜色
|
||||
//'backColor', // 背景颜色
|
||||
//'link', // 插入链接
|
||||
'list', // 列表
|
||||
'justify', // 对齐方式
|
||||
'quote', // 引用
|
||||
'emoticon', // 表情
|
||||
'image', // 插入图片
|
||||
//'table', // 表格
|
||||
//'video', // 插入视频
|
||||
//'code', // 插入代码
|
||||
'undo', // 撤销
|
||||
'redo' // 重复
|
||||
];
|
||||
editor.customConfig.onchange = function (html) {
|
||||
// html 即变化之后的内容
|
||||
$("#" + relName).val(html);
|
||||
}
|
||||
editor.customConfig.uploadImgShowBase64 = true;
|
||||
editor.create();
|
||||
editor.txt.html($("#" + relName).val());
|
||||
|
||||
})
|
||||
|
||||
$("[id^='picImage']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(8);
|
||||
layui.use('upload', function () {
|
||||
var upload = layui.upload;
|
||||
//执行实例
|
||||
var uploadInst = upload.render({
|
||||
elem: '#picImage' + relName, //绑定元素
|
||||
url: '/common/sysFile/upload', //上传接口
|
||||
size: 1000,
|
||||
accept: 'file',
|
||||
done: function (r) {
|
||||
$("#picImage" + relName).attr("src", r.fileName);
|
||||
$("#" + relName).val(r.fileName);
|
||||
},
|
||||
error: function (r) {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$().ready(function () {
|
||||
validateRule();
|
||||
});
|
||||
|
||||
$.validator.setDefaults({
|
||||
submitHandler: function () {
|
||||
update();
|
||||
}
|
||||
});
|
||||
function update() {
|
||||
$.ajax({
|
||||
cache: true,
|
||||
type: "POST",
|
||||
url: "/novel/category/update",
|
||||
data: $('#signupForm').serialize(),// 你的formid
|
||||
async: false,
|
||||
error: function (request) {
|
||||
parent.layer.alert("Connection error");
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
parent.layer.msg("操作成功");
|
||||
parent.reLoad();
|
||||
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
|
||||
parent.layer.close(index);
|
||||
|
||||
} else {
|
||||
parent.layer.alert(data.msg)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function validateRule() {
|
||||
var icon = "<i class='fa fa-times-circle'></i> ";
|
||||
$("#signupForm").validate({
|
||||
ignore: "",
|
||||
rules: {
|
||||
name:
|
||||
{
|
||||
required: true
|
||||
}, },
|
||||
messages: {
|
||||
name:
|
||||
{
|
||||
required: icon + "请选择分类名"
|
||||
}, }
|
||||
})
|
||||
}
|
123
novel-admin/src/main/resources/static/js/appjs/novel/news/add.js
Normal file
123
novel-admin/src/main/resources/static/js/appjs/novel/news/add.js
Normal file
@ -0,0 +1,123 @@
|
||||
var E = window.wangEditor;
|
||||
$("[id^='contentEditor']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(13);
|
||||
var editor = new E('#contentEditor' + relName);
|
||||
// 自定义菜单配置
|
||||
editor.customConfig.menus = [
|
||||
'head', // 标题
|
||||
'bold', // 粗体
|
||||
'fontSize', // 字号
|
||||
'fontName', // 字体
|
||||
'italic', // 斜体
|
||||
'underline', // 下划线
|
||||
'strikeThrough', // 删除线
|
||||
'foreColor', // 文字颜色
|
||||
//'backColor', // 背景颜色
|
||||
//'link', // 插入链接
|
||||
'list', // 列表
|
||||
'justify', // 对齐方式
|
||||
'quote', // 引用
|
||||
'emoticon', // 表情
|
||||
'image', // 插入图片
|
||||
//'table', // 表格
|
||||
//'video', // 插入视频
|
||||
//'code', // 插入代码
|
||||
'undo', // 撤销
|
||||
'redo' // 重复
|
||||
];
|
||||
editor.customConfig.onchange = function (html) {
|
||||
// html 即变化之后的内容
|
||||
$("#" + relName).val(html);
|
||||
}
|
||||
editor.customConfig.uploadImgShowBase64 = true;
|
||||
editor.create();
|
||||
|
||||
})
|
||||
|
||||
$("[id^='picImage']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(8);
|
||||
layui.use('upload', function () {
|
||||
var upload = layui.upload;
|
||||
//执行实例
|
||||
var uploadInst = upload.render({
|
||||
elem: '#picImage' + relName, //绑定元素
|
||||
url: '/common/sysFile/upload', //上传接口
|
||||
size: 1000,
|
||||
accept: 'file',
|
||||
done: function (r) {
|
||||
$("#picImage" + relName).attr("src", r.fileName);
|
||||
$("#" + relName).val(r.fileName);
|
||||
},
|
||||
error: function (r) {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$().ready(function () {
|
||||
validateRule();
|
||||
});
|
||||
|
||||
$.validator.setDefaults({
|
||||
submitHandler: function () {
|
||||
save();
|
||||
}
|
||||
});
|
||||
function save() {
|
||||
$.ajax({
|
||||
cache: true,
|
||||
type: "POST",
|
||||
url: "/novel/news/save",
|
||||
data: $('#signupForm').serialize(),// 你的formid
|
||||
async: false,
|
||||
error: function (request) {
|
||||
parent.layer.alert("Connection error");
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
parent.layer.msg("操作成功");
|
||||
parent.reLoad();
|
||||
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
|
||||
parent.layer.close(index);
|
||||
|
||||
} else {
|
||||
parent.layer.alert(data.msg)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function validateRule() {
|
||||
var icon = "<i class='fa fa-times-circle'></i> ";
|
||||
$("#signupForm").validate({
|
||||
ignore: "",
|
||||
rules: {
|
||||
catId: {
|
||||
required: true
|
||||
}, catName: {
|
||||
required: true
|
||||
}, title: {
|
||||
required: true
|
||||
}, content: {
|
||||
required: true
|
||||
}, },
|
||||
messages: {
|
||||
catId: {
|
||||
required: icon + "请选择类别ID"
|
||||
}, catName: {
|
||||
required: icon + "请选择分类名"
|
||||
}, title: {
|
||||
required: icon + "请选择标题"
|
||||
}, content: {
|
||||
required: icon + "请选择内容"
|
||||
}, }
|
||||
})
|
||||
}
|
@ -0,0 +1,127 @@
|
||||
var E = window.wangEditor;
|
||||
$("[id^='contentEditor']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(13);
|
||||
var editor = new E('#contentEditor' + relName);
|
||||
// 自定义菜单配置
|
||||
editor.customConfig.menus = [
|
||||
'head', // 标题
|
||||
'bold', // 粗体
|
||||
'fontSize', // 字号
|
||||
'fontName', // 字体
|
||||
'italic', // 斜体
|
||||
'underline', // 下划线
|
||||
'strikeThrough', // 删除线
|
||||
'foreColor', // 文字颜色
|
||||
//'backColor', // 背景颜色
|
||||
//'link', // 插入链接
|
||||
'list', // 列表
|
||||
'justify', // 对齐方式
|
||||
'quote', // 引用
|
||||
'emoticon', // 表情
|
||||
'image', // 插入图片
|
||||
//'table', // 表格
|
||||
//'video', // 插入视频
|
||||
//'code', // 插入代码
|
||||
'undo', // 撤销
|
||||
'redo' // 重复
|
||||
];
|
||||
editor.customConfig.onchange = function (html) {
|
||||
// html 即变化之后的内容
|
||||
$("#" + relName).val(html);
|
||||
}
|
||||
editor.customConfig.uploadImgShowBase64 = true;
|
||||
editor.create();
|
||||
editor.txt.html($("#" + relName).val());
|
||||
|
||||
})
|
||||
|
||||
$("[id^='picImage']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(8);
|
||||
layui.use('upload', function () {
|
||||
var upload = layui.upload;
|
||||
//执行实例
|
||||
var uploadInst = upload.render({
|
||||
elem: '#picImage' + relName, //绑定元素
|
||||
url: '/common/sysFile/upload', //上传接口
|
||||
size: 1000,
|
||||
accept: 'file',
|
||||
done: function (r) {
|
||||
$("#picImage" + relName).attr("src", r.fileName);
|
||||
$("#" + relName).val(r.fileName);
|
||||
},
|
||||
error: function (r) {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$().ready(function () {
|
||||
validateRule();
|
||||
});
|
||||
|
||||
$.validator.setDefaults({
|
||||
submitHandler: function () {
|
||||
update();
|
||||
}
|
||||
});
|
||||
function update() {
|
||||
$.ajax({
|
||||
cache: true,
|
||||
type: "POST",
|
||||
url: "/novel/news/update",
|
||||
data: $('#signupForm').serialize(),// 你的formid
|
||||
async: false,
|
||||
error: function (request) {
|
||||
parent.layer.alert("Connection error");
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
parent.layer.msg("操作成功");
|
||||
parent.reLoad();
|
||||
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
|
||||
parent.layer.close(index);
|
||||
|
||||
} else {
|
||||
parent.layer.alert(data.msg)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function validateRule() {
|
||||
var icon = "<i class='fa fa-times-circle'></i> ";
|
||||
$("#signupForm").validate({
|
||||
ignore: "",
|
||||
rules: {
|
||||
catId:
|
||||
{
|
||||
required: true
|
||||
}, catName:
|
||||
{
|
||||
required: true
|
||||
}, title:
|
||||
{
|
||||
required: true
|
||||
}, content:
|
||||
{
|
||||
required: true
|
||||
}, },
|
||||
messages: {
|
||||
catId:
|
||||
{
|
||||
required: icon + "请选择类别ID"
|
||||
}, catName:
|
||||
{
|
||||
required: icon + "请选择分类名"
|
||||
}, title:
|
||||
{
|
||||
required: icon + "请选择标题"
|
||||
}, content:
|
||||
{
|
||||
required: icon + "请选择内容"
|
||||
}, }
|
||||
})
|
||||
}
|
@ -0,0 +1,206 @@
|
||||
var prefix = "/novel/news"
|
||||
$(function () {
|
||||
load();
|
||||
});
|
||||
|
||||
function load() {
|
||||
$('#exampleTable')
|
||||
.bootstrapTable(
|
||||
{
|
||||
method: 'get', // 服务器数据的请求方式 get or post
|
||||
url: prefix + "/list", // 服务器数据的加载地址
|
||||
// showRefresh : true,
|
||||
// showToggle : true,
|
||||
// showColumns : true,
|
||||
iconSize: 'outline',
|
||||
toolbar: '#exampleToolbar',
|
||||
striped: true, // 设置为true会有隔行变色效果
|
||||
dataType: "json", // 服务器返回的数据类型
|
||||
pagination: true, // 设置为true会在底部显示分页条
|
||||
// queryParamsType : "limit",
|
||||
// //设置为limit则会发送符合RESTFull格式的参数
|
||||
singleSelect: false, // 设置为true将禁止多选
|
||||
// contentType : "application/x-www-form-urlencoded",
|
||||
// //发送到服务器的数据编码类型
|
||||
pageSize: 10, // 如果设置了分页,每页数据条数
|
||||
pageNumber: 1, // 如果设置了分布,首页页码
|
||||
//search : true, // 是否显示搜索框
|
||||
showColumns: false, // 是否显示内容下拉框(选择显示的列)
|
||||
sidePagination: "server", // 设置在哪里进行分页,可选值为"client" 或者 "server"
|
||||
queryParams: function (params) {
|
||||
//说明:传入后台的参数包括offset开始索引,limit步长,sort排序列,order:desc或者,以及所有列的键值对
|
||||
var queryParams = getFormJson("searchForm");
|
||||
queryParams.limit = params.limit;
|
||||
queryParams.offset = params.offset;
|
||||
return queryParams;
|
||||
},
|
||||
// //请求服务器数据时,你可以通过重写参数的方式添加一些额外的参数,例如 toolbar 中的参数 如果
|
||||
// queryParamsType = 'limit' ,返回参数必须包含
|
||||
// limit, offset, search, sort, order 否则, 需要包含:
|
||||
// pageSize, pageNumber, searchText, sortName,
|
||||
// sortOrder.
|
||||
// 返回false将会终止请求
|
||||
responseHandler: function (rs) {
|
||||
|
||||
if (rs.code == 0) {
|
||||
return rs.data;
|
||||
} else {
|
||||
parent.layer.alert(rs.msg)
|
||||
return {total: 0, rows: []};
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
formatter: function () {
|
||||
return arguments[2] + 1;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'catName',
|
||||
title: '分类名'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'sourceName',
|
||||
title: '来源'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'title',
|
||||
title: '标题'
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '发布时间'
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
field: 'id',
|
||||
align: 'center',
|
||||
formatter: function (value, row, index) {
|
||||
var d = '<a class="btn btn-primary btn-sm ' + s_detail_h + '" href="#" mce_href="#" title="详情" onclick="detail(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-file"></i></a> ';
|
||||
var e = '<a class="btn btn-primary btn-sm ' + s_edit_h + '" href="#" mce_href="#" title="编辑" onclick="edit(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-edit"></i></a> ';
|
||||
var r = '<a class="btn btn-warning btn-sm ' + s_remove_h + '" href="#" title="删除" mce_href="#" onclick="remove(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-remove"></i></a> ';
|
||||
return e + r;
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
function reLoad() {
|
||||
$('#exampleTable').bootstrapTable('refresh');
|
||||
}
|
||||
|
||||
function add() {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '增加',
|
||||
maxmin: true,
|
||||
shadeClose: false, // 点击遮罩关闭层
|
||||
area: ['800px', '520px'],
|
||||
content: prefix + '/add' // iframe的url
|
||||
});
|
||||
}
|
||||
|
||||
function detail(id) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '详情',
|
||||
maxmin: true,
|
||||
shadeClose: false, // 点击遮罩关闭层
|
||||
area: ['800px', '520px'],
|
||||
content: prefix + '/detail/' + id // iframe的url
|
||||
});
|
||||
}
|
||||
|
||||
function edit(id) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '编辑',
|
||||
maxmin: true,
|
||||
shadeClose: false, // 点击遮罩关闭层
|
||||
area: ['800px', '520px'],
|
||||
content: prefix + '/edit/' + id // iframe的url
|
||||
});
|
||||
}
|
||||
|
||||
function remove(id) {
|
||||
layer.confirm('确定要删除选中的记录?', {
|
||||
btn: ['确定', '取消']
|
||||
}, function () {
|
||||
$.ajax({
|
||||
url: prefix + "/remove",
|
||||
type: "post",
|
||||
data: {
|
||||
'id': id
|
||||
},
|
||||
success: function (r) {
|
||||
if (r.code == 0) {
|
||||
layer.msg(r.msg);
|
||||
reLoad();
|
||||
} else {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function resetPwd(id) {
|
||||
}
|
||||
|
||||
function batchRemove() {
|
||||
var rows = $('#exampleTable').bootstrapTable('getSelections'); // 返回所有选择的行,当没有选择的记录时,返回一个空数组
|
||||
if (rows.length == 0) {
|
||||
layer.msg("请选择要删除的数据");
|
||||
return;
|
||||
}
|
||||
layer.confirm("确认要删除选中的'" + rows.length + "'条数据吗?", {
|
||||
btn: ['确定', '取消']
|
||||
// 按钮
|
||||
}, function () {
|
||||
var ids = new Array();
|
||||
// 遍历所有选择的行数据,取每条数据对应的ID
|
||||
$.each(rows, function (i, row) {
|
||||
ids[i] = row['id'];
|
||||
});
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
data: {
|
||||
"ids": ids
|
||||
},
|
||||
url: prefix + '/batchRemove',
|
||||
success: function (r) {
|
||||
if (r.code == 0) {
|
||||
layer.msg(r.msg);
|
||||
reLoad();
|
||||
} else {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, function () {
|
||||
|
||||
});
|
||||
}
|
107
novel-admin/src/main/resources/static/js/appjs/novel/pay/add.js
Normal file
107
novel-admin/src/main/resources/static/js/appjs/novel/pay/add.js
Normal file
@ -0,0 +1,107 @@
|
||||
var E = window.wangEditor;
|
||||
$("[id^='contentEditor']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(13);
|
||||
var editor = new E('#contentEditor' + relName);
|
||||
// 自定义菜单配置
|
||||
editor.customConfig.menus = [
|
||||
'head', // 标题
|
||||
'bold', // 粗体
|
||||
'fontSize', // 字号
|
||||
'fontName', // 字体
|
||||
'italic', // 斜体
|
||||
'underline', // 下划线
|
||||
'strikeThrough', // 删除线
|
||||
'foreColor', // 文字颜色
|
||||
//'backColor', // 背景颜色
|
||||
//'link', // 插入链接
|
||||
'list', // 列表
|
||||
'justify', // 对齐方式
|
||||
'quote', // 引用
|
||||
'emoticon', // 表情
|
||||
'image', // 插入图片
|
||||
//'table', // 表格
|
||||
//'video', // 插入视频
|
||||
//'code', // 插入代码
|
||||
'undo', // 撤销
|
||||
'redo' // 重复
|
||||
];
|
||||
editor.customConfig.onchange = function (html) {
|
||||
// html 即变化之后的内容
|
||||
$("#" + relName).val(html);
|
||||
}
|
||||
editor.customConfig.uploadImgShowBase64 = true;
|
||||
editor.create();
|
||||
|
||||
})
|
||||
|
||||
$("[id^='picImage']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(8);
|
||||
layui.use('upload', function () {
|
||||
var upload = layui.upload;
|
||||
//执行实例
|
||||
var uploadInst = upload.render({
|
||||
elem: '#picImage' + relName, //绑定元素
|
||||
url: '/common/sysFile/upload', //上传接口
|
||||
size: 1000,
|
||||
accept: 'file',
|
||||
done: function (r) {
|
||||
$("#picImage" + relName).attr("src", r.fileName);
|
||||
$("#" + relName).val(r.fileName);
|
||||
},
|
||||
error: function (r) {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$().ready(function () {
|
||||
validateRule();
|
||||
});
|
||||
|
||||
$.validator.setDefaults({
|
||||
submitHandler: function () {
|
||||
save();
|
||||
}
|
||||
});
|
||||
function save() {
|
||||
$.ajax({
|
||||
cache: true,
|
||||
type: "POST",
|
||||
url: "/novel/pay/save",
|
||||
data: $('#signupForm').serialize(),// 你的formid
|
||||
async: false,
|
||||
error: function (request) {
|
||||
parent.layer.alert("Connection error");
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
parent.layer.msg("操作成功");
|
||||
parent.reLoad();
|
||||
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
|
||||
parent.layer.close(index);
|
||||
|
||||
} else {
|
||||
parent.layer.alert(data.msg)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function validateRule() {
|
||||
var icon = "<i class='fa fa-times-circle'></i> ";
|
||||
$("#signupForm").validate({
|
||||
ignore: "",
|
||||
rules: {
|
||||
},
|
||||
messages: {
|
||||
}
|
||||
})
|
||||
}
|
103
novel-admin/src/main/resources/static/js/appjs/novel/pay/edit.js
Normal file
103
novel-admin/src/main/resources/static/js/appjs/novel/pay/edit.js
Normal file
@ -0,0 +1,103 @@
|
||||
var E = window.wangEditor;
|
||||
$("[id^='contentEditor']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(13);
|
||||
var editor = new E('#contentEditor' + relName);
|
||||
// 自定义菜单配置
|
||||
editor.customConfig.menus = [
|
||||
'head', // 标题
|
||||
'bold', // 粗体
|
||||
'fontSize', // 字号
|
||||
'fontName', // 字体
|
||||
'italic', // 斜体
|
||||
'underline', // 下划线
|
||||
'strikeThrough', // 删除线
|
||||
'foreColor', // 文字颜色
|
||||
//'backColor', // 背景颜色
|
||||
//'link', // 插入链接
|
||||
'list', // 列表
|
||||
'justify', // 对齐方式
|
||||
'quote', // 引用
|
||||
'emoticon', // 表情
|
||||
'image', // 插入图片
|
||||
//'table', // 表格
|
||||
//'video', // 插入视频
|
||||
//'code', // 插入代码
|
||||
'undo', // 撤销
|
||||
'redo' // 重复
|
||||
];
|
||||
editor.customConfig.onchange = function (html) {
|
||||
// html 即变化之后的内容
|
||||
$("#" + relName).val(html);
|
||||
}
|
||||
editor.customConfig.uploadImgShowBase64 = true;
|
||||
editor.create();
|
||||
editor.txt.html($("#" + relName).val());
|
||||
|
||||
})
|
||||
|
||||
$("[id^='picImage']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(8);
|
||||
layui.use('upload', function () {
|
||||
var upload = layui.upload;
|
||||
//执行实例
|
||||
var uploadInst = upload.render({
|
||||
elem: '#picImage' + relName, //绑定元素
|
||||
url: '/common/sysFile/upload', //上传接口
|
||||
size: 1000,
|
||||
accept: 'file',
|
||||
done: function (r) {
|
||||
$("#picImage" + relName).attr("src", r.fileName);
|
||||
$("#" + relName).val(r.fileName);
|
||||
},
|
||||
error: function (r) {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$().ready(function () {
|
||||
validateRule();
|
||||
});
|
||||
|
||||
$.validator.setDefaults({
|
||||
submitHandler: function () {
|
||||
update();
|
||||
}
|
||||
});
|
||||
function update() {
|
||||
$.ajax({
|
||||
cache: true,
|
||||
type: "POST",
|
||||
url: "/novel/pay/update",
|
||||
data: $('#signupForm').serialize(),// 你的formid
|
||||
async: false,
|
||||
error: function (request) {
|
||||
parent.layer.alert("Connection error");
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
parent.layer.msg("操作成功");
|
||||
parent.reLoad();
|
||||
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
|
||||
parent.layer.close(index);
|
||||
|
||||
} else {
|
||||
parent.layer.alert(data.msg)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function validateRule() {
|
||||
var icon = "<i class='fa fa-times-circle'></i> ";
|
||||
$("#signupForm").validate({
|
||||
ignore: "",
|
||||
rules: {
|
||||
},
|
||||
messages: {
|
||||
}
|
||||
})
|
||||
}
|
225
novel-admin/src/main/resources/static/js/appjs/novel/pay/pay.js
Normal file
225
novel-admin/src/main/resources/static/js/appjs/novel/pay/pay.js
Normal file
@ -0,0 +1,225 @@
|
||||
var prefix = "/novel/pay"
|
||||
$(function () {
|
||||
load();
|
||||
});
|
||||
|
||||
function load() {
|
||||
$('#exampleTable')
|
||||
.bootstrapTable(
|
||||
{
|
||||
method: 'get', // 服务器数据的请求方式 get or post
|
||||
url: prefix + "/list", // 服务器数据的加载地址
|
||||
// showRefresh : true,
|
||||
// showToggle : true,
|
||||
// showColumns : true,
|
||||
iconSize: 'outline',
|
||||
toolbar: '#exampleToolbar',
|
||||
striped: true, // 设置为true会有隔行变色效果
|
||||
dataType: "json", // 服务器返回的数据类型
|
||||
pagination: true, // 设置为true会在底部显示分页条
|
||||
// queryParamsType : "limit",
|
||||
// //设置为limit则会发送符合RESTFull格式的参数
|
||||
singleSelect: false, // 设置为true将禁止多选
|
||||
// contentType : "application/x-www-form-urlencoded",
|
||||
// //发送到服务器的数据编码类型
|
||||
pageSize: 10, // 如果设置了分页,每页数据条数
|
||||
pageNumber: 1, // 如果设置了分布,首页页码
|
||||
//search : true, // 是否显示搜索框
|
||||
showColumns: false, // 是否显示内容下拉框(选择显示的列)
|
||||
sidePagination: "server", // 设置在哪里进行分页,可选值为"client" 或者 "server"
|
||||
queryParams: function (params) {
|
||||
//说明:传入后台的参数包括offset开始索引,limit步长,sort排序列,order:desc或者,以及所有列的键值对
|
||||
var queryParams = getFormJson("searchForm");
|
||||
queryParams.limit = params.limit;
|
||||
queryParams.offset = params.offset;
|
||||
return queryParams;
|
||||
},
|
||||
// //请求服务器数据时,你可以通过重写参数的方式添加一些额外的参数,例如 toolbar 中的参数 如果
|
||||
// queryParamsType = 'limit' ,返回参数必须包含
|
||||
// limit, offset, search, sort, order 否则, 需要包含:
|
||||
// pageSize, pageNumber, searchText, sortName,
|
||||
// sortOrder.
|
||||
// 返回false将会终止请求
|
||||
responseHandler: function (rs) {
|
||||
|
||||
if (rs.code == 0) {
|
||||
return rs.data;
|
||||
} else {
|
||||
parent.layer.alert(rs.msg)
|
||||
return {total: 0, rows: []};
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
formatter: function () {
|
||||
return arguments[2] + 1;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: '主键'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'outTradeNo',
|
||||
title: '保留'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'tradeNo',
|
||||
title: '订单号'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'payChannel',
|
||||
title: '保留'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'totalAmount',
|
||||
title: '交易香蕉币'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'userId',
|
||||
title: '支付用户ID'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'payStatus',
|
||||
title: '支付状态:0:支付失败,1:支付成功,2:待支付'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'updateTime',
|
||||
title: '更新时间'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
field: 'id',
|
||||
align: 'center',
|
||||
formatter: function (value, row, index) {
|
||||
var d = '<a class="btn btn-primary btn-sm ' + s_detail_h + '" href="#" mce_href="#" title="详情" onclick="detail(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-file"></i></a> ';
|
||||
var e = '<a class="btn btn-primary btn-sm ' + s_edit_h + '" href="#" mce_href="#" title="编辑" onclick="edit(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-edit"></i></a> ';
|
||||
var r = '<a class="btn btn-warning btn-sm ' + s_remove_h + '" href="#" title="删除" mce_href="#" onclick="remove(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-remove"></i></a> ';
|
||||
return d + e + r;
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
function reLoad() {
|
||||
$('#exampleTable').bootstrapTable('refresh');
|
||||
}
|
||||
function add() {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '增加',
|
||||
maxmin: true,
|
||||
shadeClose: false, // 点击遮罩关闭层
|
||||
area: ['800px', '520px'],
|
||||
content: prefix + '/add' // iframe的url
|
||||
});
|
||||
}
|
||||
function detail(id) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '详情',
|
||||
maxmin: true,
|
||||
shadeClose: false, // 点击遮罩关闭层
|
||||
area: ['800px', '520px'],
|
||||
content: prefix + '/detail/' + id // iframe的url
|
||||
});
|
||||
}
|
||||
function edit(id) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '编辑',
|
||||
maxmin: true,
|
||||
shadeClose: false, // 点击遮罩关闭层
|
||||
area: ['800px', '520px'],
|
||||
content: prefix + '/edit/' + id // iframe的url
|
||||
});
|
||||
}
|
||||
function remove(id) {
|
||||
layer.confirm('确定要删除选中的记录?', {
|
||||
btn: ['确定', '取消']
|
||||
}, function () {
|
||||
$.ajax({
|
||||
url: prefix + "/remove",
|
||||
type: "post",
|
||||
data: {
|
||||
'id': id
|
||||
},
|
||||
success: function (r) {
|
||||
if (r.code == 0) {
|
||||
layer.msg(r.msg);
|
||||
reLoad();
|
||||
} else {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function resetPwd(id) {
|
||||
}
|
||||
function batchRemove() {
|
||||
var rows = $('#exampleTable').bootstrapTable('getSelections'); // 返回所有选择的行,当没有选择的记录时,返回一个空数组
|
||||
if (rows.length == 0) {
|
||||
layer.msg("请选择要删除的数据");
|
||||
return;
|
||||
}
|
||||
layer.confirm("确认要删除选中的'" + rows.length + "'条数据吗?", {
|
||||
btn: ['确定', '取消']
|
||||
// 按钮
|
||||
}, function () {
|
||||
var ids = new Array();
|
||||
// 遍历所有选择的行数据,取每条数据对应的ID
|
||||
$.each(rows, function (i, row) {
|
||||
ids[i] = row['id'];
|
||||
});
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
data: {
|
||||
"ids": ids
|
||||
},
|
||||
url: prefix + '/batchRemove',
|
||||
success: function (r) {
|
||||
if (r.code == 0) {
|
||||
layer.msg(r.msg);
|
||||
reLoad();
|
||||
} else {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, function () {
|
||||
|
||||
});
|
||||
}
|
107
novel-admin/src/main/resources/static/js/appjs/novel/user/add.js
Normal file
107
novel-admin/src/main/resources/static/js/appjs/novel/user/add.js
Normal file
@ -0,0 +1,107 @@
|
||||
var E = window.wangEditor;
|
||||
$("[id^='contentEditor']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(13);
|
||||
var editor = new E('#contentEditor' + relName);
|
||||
// 自定义菜单配置
|
||||
editor.customConfig.menus = [
|
||||
'head', // 标题
|
||||
'bold', // 粗体
|
||||
'fontSize', // 字号
|
||||
'fontName', // 字体
|
||||
'italic', // 斜体
|
||||
'underline', // 下划线
|
||||
'strikeThrough', // 删除线
|
||||
'foreColor', // 文字颜色
|
||||
//'backColor', // 背景颜色
|
||||
//'link', // 插入链接
|
||||
'list', // 列表
|
||||
'justify', // 对齐方式
|
||||
'quote', // 引用
|
||||
'emoticon', // 表情
|
||||
'image', // 插入图片
|
||||
//'table', // 表格
|
||||
//'video', // 插入视频
|
||||
//'code', // 插入代码
|
||||
'undo', // 撤销
|
||||
'redo' // 重复
|
||||
];
|
||||
editor.customConfig.onchange = function (html) {
|
||||
// html 即变化之后的内容
|
||||
$("#" + relName).val(html);
|
||||
}
|
||||
editor.customConfig.uploadImgShowBase64 = true;
|
||||
editor.create();
|
||||
|
||||
})
|
||||
|
||||
$("[id^='picImage']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(8);
|
||||
layui.use('upload', function () {
|
||||
var upload = layui.upload;
|
||||
//执行实例
|
||||
var uploadInst = upload.render({
|
||||
elem: '#picImage' + relName, //绑定元素
|
||||
url: '/common/sysFile/upload', //上传接口
|
||||
size: 1000,
|
||||
accept: 'file',
|
||||
done: function (r) {
|
||||
$("#picImage" + relName).attr("src", r.fileName);
|
||||
$("#" + relName).val(r.fileName);
|
||||
},
|
||||
error: function (r) {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$().ready(function () {
|
||||
validateRule();
|
||||
});
|
||||
|
||||
$.validator.setDefaults({
|
||||
submitHandler: function () {
|
||||
save();
|
||||
}
|
||||
});
|
||||
function save() {
|
||||
$.ajax({
|
||||
cache: true,
|
||||
type: "POST",
|
||||
url: "/novel/user/save",
|
||||
data: $('#signupForm').serialize(),// 你的formid
|
||||
async: false,
|
||||
error: function (request) {
|
||||
parent.layer.alert("Connection error");
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
parent.layer.msg("操作成功");
|
||||
parent.reLoad();
|
||||
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
|
||||
parent.layer.close(index);
|
||||
|
||||
} else {
|
||||
parent.layer.alert(data.msg)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function validateRule() {
|
||||
var icon = "<i class='fa fa-times-circle'></i> ";
|
||||
$("#signupForm").validate({
|
||||
ignore: "",
|
||||
rules: {
|
||||
},
|
||||
messages: {
|
||||
}
|
||||
})
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
var E = window.wangEditor;
|
||||
$("[id^='contentEditor']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(13);
|
||||
var editor = new E('#contentEditor' + relName);
|
||||
// 自定义菜单配置
|
||||
editor.customConfig.menus = [
|
||||
'head', // 标题
|
||||
'bold', // 粗体
|
||||
'fontSize', // 字号
|
||||
'fontName', // 字体
|
||||
'italic', // 斜体
|
||||
'underline', // 下划线
|
||||
'strikeThrough', // 删除线
|
||||
'foreColor', // 文字颜色
|
||||
//'backColor', // 背景颜色
|
||||
//'link', // 插入链接
|
||||
'list', // 列表
|
||||
'justify', // 对齐方式
|
||||
'quote', // 引用
|
||||
'emoticon', // 表情
|
||||
'image', // 插入图片
|
||||
//'table', // 表格
|
||||
//'video', // 插入视频
|
||||
//'code', // 插入代码
|
||||
'undo', // 撤销
|
||||
'redo' // 重复
|
||||
];
|
||||
editor.customConfig.onchange = function (html) {
|
||||
// html 即变化之后的内容
|
||||
$("#" + relName).val(html);
|
||||
}
|
||||
editor.customConfig.uploadImgShowBase64 = true;
|
||||
editor.create();
|
||||
editor.txt.html($("#" + relName).val());
|
||||
|
||||
})
|
||||
|
||||
$("[id^='picImage']").each(function (index, ele) {
|
||||
var relName = $(ele).attr("id").substring(8);
|
||||
layui.use('upload', function () {
|
||||
var upload = layui.upload;
|
||||
//执行实例
|
||||
var uploadInst = upload.render({
|
||||
elem: '#picImage' + relName, //绑定元素
|
||||
url: '/common/sysFile/upload', //上传接口
|
||||
size: 1000,
|
||||
accept: 'file',
|
||||
done: function (r) {
|
||||
$("#picImage" + relName).attr("src", r.fileName);
|
||||
$("#" + relName).val(r.fileName);
|
||||
},
|
||||
error: function (r) {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$().ready(function () {
|
||||
validateRule();
|
||||
});
|
||||
|
||||
$.validator.setDefaults({
|
||||
submitHandler: function () {
|
||||
update();
|
||||
}
|
||||
});
|
||||
function update() {
|
||||
$.ajax({
|
||||
cache: true,
|
||||
type: "POST",
|
||||
url: "/novel/user/update",
|
||||
data: $('#signupForm').serialize(),// 你的formid
|
||||
async: false,
|
||||
error: function (request) {
|
||||
parent.layer.alert("Connection error");
|
||||
},
|
||||
success: function (data) {
|
||||
if (data.code == 0) {
|
||||
parent.layer.msg("操作成功");
|
||||
parent.reLoad();
|
||||
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
|
||||
parent.layer.close(index);
|
||||
|
||||
} else {
|
||||
parent.layer.alert(data.msg)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function validateRule() {
|
||||
var icon = "<i class='fa fa-times-circle'></i> ";
|
||||
$("#signupForm").validate({
|
||||
ignore: "",
|
||||
rules: {
|
||||
},
|
||||
messages: {
|
||||
}
|
||||
})
|
||||
}
|
@ -0,0 +1,231 @@
|
||||
var prefix = "/novel/user"
|
||||
$(function () {
|
||||
load();
|
||||
});
|
||||
|
||||
function load() {
|
||||
$('#exampleTable')
|
||||
.bootstrapTable(
|
||||
{
|
||||
method: 'get', // 服务器数据的请求方式 get or post
|
||||
url: prefix + "/list", // 服务器数据的加载地址
|
||||
// showRefresh : true,
|
||||
// showToggle : true,
|
||||
// showColumns : true,
|
||||
iconSize: 'outline',
|
||||
toolbar: '#exampleToolbar',
|
||||
striped: true, // 设置为true会有隔行变色效果
|
||||
dataType: "json", // 服务器返回的数据类型
|
||||
pagination: true, // 设置为true会在底部显示分页条
|
||||
// queryParamsType : "limit",
|
||||
// //设置为limit则会发送符合RESTFull格式的参数
|
||||
singleSelect: false, // 设置为true将禁止多选
|
||||
// contentType : "application/x-www-form-urlencoded",
|
||||
// //发送到服务器的数据编码类型
|
||||
pageSize: 10, // 如果设置了分页,每页数据条数
|
||||
pageNumber: 1, // 如果设置了分布,首页页码
|
||||
//search : true, // 是否显示搜索框
|
||||
showColumns: false, // 是否显示内容下拉框(选择显示的列)
|
||||
sidePagination: "server", // 设置在哪里进行分页,可选值为"client" 或者 "server"
|
||||
queryParams: function (params) {
|
||||
//说明:传入后台的参数包括offset开始索引,limit步长,sort排序列,order:desc或者,以及所有列的键值对
|
||||
var queryParams = getFormJson("searchForm");
|
||||
queryParams.limit = params.limit;
|
||||
queryParams.offset = params.offset;
|
||||
return queryParams;
|
||||
},
|
||||
// //请求服务器数据时,你可以通过重写参数的方式添加一些额外的参数,例如 toolbar 中的参数 如果
|
||||
// queryParamsType = 'limit' ,返回参数必须包含
|
||||
// limit, offset, search, sort, order 否则, 需要包含:
|
||||
// pageSize, pageNumber, searchText, sortName,
|
||||
// sortOrder.
|
||||
// 返回false将会终止请求
|
||||
responseHandler: function (rs) {
|
||||
|
||||
if (rs.code == 0) {
|
||||
return rs.data;
|
||||
} else {
|
||||
parent.layer.alert(rs.msg)
|
||||
return {total: 0, rows: []};
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
title: '序号',
|
||||
formatter: function () {
|
||||
return arguments[2] + 1;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: '主键'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'username',
|
||||
title: '登录名'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'password',
|
||||
title: '登录密码'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'nickName',
|
||||
title: '昵称'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'userPhoto',
|
||||
title: '用户头像'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'userSex',
|
||||
title: '用户性别,0:男,1:女'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'accountBalance',
|
||||
title: '账户余额'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'status',
|
||||
title: '用户状态,0:正常'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
field: 'updateTime',
|
||||
title: '更新时间'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
field: 'id',
|
||||
align: 'center',
|
||||
formatter: function (value, row, index) {
|
||||
var d = '<a class="btn btn-primary btn-sm ' + s_detail_h + '" href="#" mce_href="#" title="详情" onclick="detail(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-file"></i></a> ';
|
||||
var e = '<a class="btn btn-primary btn-sm ' + s_edit_h + '" href="#" mce_href="#" title="编辑" onclick="edit(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-edit"></i></a> ';
|
||||
var r = '<a class="btn btn-warning btn-sm ' + s_remove_h + '" href="#" title="删除" mce_href="#" onclick="remove(\''
|
||||
+ row.id
|
||||
+ '\')"><i class="fa fa-remove"></i></a> ';
|
||||
return d + e + r;
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
function reLoad() {
|
||||
$('#exampleTable').bootstrapTable('refresh');
|
||||
}
|
||||
function add() {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '增加',
|
||||
maxmin: true,
|
||||
shadeClose: false, // 点击遮罩关闭层
|
||||
area: ['800px', '520px'],
|
||||
content: prefix + '/add' // iframe的url
|
||||
});
|
||||
}
|
||||
function detail(id) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '详情',
|
||||
maxmin: true,
|
||||
shadeClose: false, // 点击遮罩关闭层
|
||||
area: ['800px', '520px'],
|
||||
content: prefix + '/detail/' + id // iframe的url
|
||||
});
|
||||
}
|
||||
function edit(id) {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '编辑',
|
||||
maxmin: true,
|
||||
shadeClose: false, // 点击遮罩关闭层
|
||||
area: ['800px', '520px'],
|
||||
content: prefix + '/edit/' + id // iframe的url
|
||||
});
|
||||
}
|
||||
function remove(id) {
|
||||
layer.confirm('确定要删除选中的记录?', {
|
||||
btn: ['确定', '取消']
|
||||
}, function () {
|
||||
$.ajax({
|
||||
url: prefix + "/remove",
|
||||
type: "post",
|
||||
data: {
|
||||
'id': id
|
||||
},
|
||||
success: function (r) {
|
||||
if (r.code == 0) {
|
||||
layer.msg(r.msg);
|
||||
reLoad();
|
||||
} else {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
function resetPwd(id) {
|
||||
}
|
||||
function batchRemove() {
|
||||
var rows = $('#exampleTable').bootstrapTable('getSelections'); // 返回所有选择的行,当没有选择的记录时,返回一个空数组
|
||||
if (rows.length == 0) {
|
||||
layer.msg("请选择要删除的数据");
|
||||
return;
|
||||
}
|
||||
layer.confirm("确认要删除选中的'" + rows.length + "'条数据吗?", {
|
||||
btn: ['确定', '取消']
|
||||
// 按钮
|
||||
}, function () {
|
||||
var ids = new Array();
|
||||
// 遍历所有选择的行数据,取每条数据对应的ID
|
||||
$.each(rows, function (i, row) {
|
||||
ids[i] = row['id'];
|
||||
});
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
data: {
|
||||
"ids": ids
|
||||
},
|
||||
url: prefix + '/batchRemove',
|
||||
success: function (r) {
|
||||
if (r.code == 0) {
|
||||
layer.msg(r.msg);
|
||||
reLoad();
|
||||
} else {
|
||||
layer.msg(r.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, function () {
|
||||
|
||||
});
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -125,17 +125,17 @@ $(document).ready(function(){
|
||||
rules:{
|
||||
pwdOld:{
|
||||
required:true,
|
||||
minlength:6
|
||||
minlength:5
|
||||
},
|
||||
pwdNew:{
|
||||
required:true,
|
||||
minlength:6,
|
||||
minlength:5,
|
||||
isdiff:true,
|
||||
//issame:true,
|
||||
},
|
||||
confirm_password:{
|
||||
required:true,
|
||||
minlength:6,
|
||||
minlength:5,
|
||||
issame:true,
|
||||
}
|
||||
|
||||
@ -143,17 +143,17 @@ $(document).ready(function(){
|
||||
messages:{
|
||||
pwdOld : {
|
||||
required:'必填',
|
||||
minlength:$.validator.format('密码长度要大于6')
|
||||
minlength:$.validator.format('密码长度要大于5')
|
||||
},
|
||||
pwdNew:{
|
||||
required:'必填',
|
||||
minlength:$.validator.format('密码长度要大于6'),
|
||||
minlength:$.validator.format('密码长度要大于5'),
|
||||
isdiff:'原密码与新密码不能重复',
|
||||
|
||||
},
|
||||
confirm_password:{
|
||||
required:'必填',
|
||||
minlength:$.validator.format('密码长度要大于6'),
|
||||
minlength:$.validator.format('密码长度要大于5'),
|
||||
issame:'新密码要与确认新密码一致',
|
||||
}
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
-- 菜单SQL
|
||||
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||
VALUES ('1', '付呗-订单信息表', 'test/order', 'test:order:order', '1', 'fa', '6');
|
||||
VALUES ('1', '小说表', 'novel/book', 'novel:book:book', '1', 'fa', '6');
|
||||
|
||||
-- 按钮父菜单ID
|
||||
set @parentId = @@identity;
|
||||
|
||||
-- 菜单对应按钮SQL
|
||||
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||
SELECT @parentId, '查看', null, 'test:order:detail', '2', null, '6';
|
||||
SELECT @parentId, '查看', null, 'novel:book:detail', '2', null, '6';
|
||||
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||
SELECT @parentId, '新增', null, 'test:order:add', '2', null, '6';
|
||||
SELECT @parentId, '新增', null, 'novel:book:add', '2', null, '6';
|
||||
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||
SELECT @parentId, '修改', null, 'test:order:edit', '2', null, '6';
|
||||
SELECT @parentId, '修改', null, 'novel:book:edit', '2', null, '6';
|
||||
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||
SELECT @parentId, '删除', null, 'test:order:remove', '2', null, '6';
|
||||
SELECT @parentId, '删除', null, 'novel:book:remove', '2', null, '6';
|
||||
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||
SELECT @parentId, '批量删除', null, 'test:order:batchRemove', '2', null, '6';
|
||||
SELECT @parentId, '批量删除', null, 'novel:book:batchRemove', '2', null, '6';
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user