Compare commits

...

36 Commits

Author SHA1 Message Date
19d4c6b778 修复部分分页接口的查询bug 2021-02-04 23:59:26 +08:00
d22200b8c7 文档update 2021-01-28 09:00:36 +08:00
43fe1150fd 文档update 2021-01-28 08:58:20 +08:00
65b65f874f 文档update 2021-01-28 08:46:56 +08:00
3b6bc859a5 文档update 2021-01-28 08:35:08 +08:00
cfc55a6c92 update 2021-01-28 08:33:05 +08:00
0a80c5662d update 2021-01-28 08:28:03 +08:00
02fd0d7e25 模版更新 2021-01-25 18:10:47 +08:00
521142a792 v3.5.1发布 2021-01-25 16:56:41 +08:00
c567e37423 v3.5.1发布 2021-01-25 14:56:05 +08:00
b5e0814eb4 小说内容页性能优化 2021-01-25 14:14:54 +08:00
ca6c2aec96 update 2021-01-24 14:07:14 +08:00
34859c839b update 2021-01-22 10:18:25 +08:00
039f9d9cf8 update 2021-01-21 21:03:08 +08:00
224829dd1f v3.5.0发布 2021-01-19 19:39:33 +08:00
1a5122209a 个人中心新增头像设置 2021-01-19 19:34:14 +08:00
48aff7cf37 个人中心新增头像设置 2021-01-19 19:32:32 +08:00
e673f9be9d 新增启动banner 2021-01-19 19:00:54 +08:00
20469bd669 增加生产环境配置 2021-01-19 18:53:47 +08:00
755300db3c update 2021-01-14 23:26:38 +08:00
a790f8042d update 2021-01-14 23:22:03 +08:00
d0db2021a6 v3.4.1发布 2021-01-10 17:55:48 +08:00
c403fc7496 更新orange主题手机端首尾章节跳转逻辑 2021-01-07 20:59:19 +08:00
e4927d7ac6 爬虫管理系统设置session默认超时时间为1天,解决由于编写爬虫规则时间过长导致的提交失败问题 2021-01-05 21:46:01 +08:00
a00a2141f2 爬虫管理系统设置session默认超时时间为1天,解决由于编写爬虫规则时间过长导致的提交失败问题 2021-01-05 21:45:04 +08:00
7cc7d8b541 v3.4.0发布 2021-01-04 10:28:01 +08:00
e4822979e2 elasticsearch升级到7.x,集成RestHighLevelClient客户端 2021-01-03 13:42:40 +08:00
ab741ec6bf v3.3.0发布 2020-12-28 12:06:19 +08:00
057c0646cd v3.3.0发布 2020-12-28 12:02:34 +08:00
57a9cd09ef v3.3.0发布 2020-12-28 11:06:27 +08:00
1a49e2a340 增加外部配置文件来配置网站信息 2020-12-28 10:58:38 +08:00
f8411c2337 v3.3.0发布 2020-12-28 09:34:22 +08:00
343a741c21 更新展示图片 2020-12-27 15:54:50 +08:00
f1a5fb4813 更新展示图片 2020-12-27 15:34:23 +08:00
0428356bd4 新增蓝色主题模版 2020-12-27 09:43:45 +08:00
c01097cd5f 更新v3.3.0的安装文档 2020-12-26 23:53:05 +08:00
309 changed files with 7113 additions and 1499 deletions

View File

@ -2,9 +2,14 @@
# 小说精品屋-plus
[![Github stars](https://img.shields.io/github/stars/201206030/novel-plus?logo=github)](https://github.com/201206030/novel-plus)
[![Github forks](https://img.shields.io/github/forks/201206030/novel-plus?logo=github)](https://github.com/201206030/novel-plus)
[![Gitee star](https://gitee.com/novel_dev_team/novel-plus/badge/star.svg?theme=gitee)](https://gitee.com/novel_dev_team/novel-plus)
[![Gitee fork](https://gitee.com/novel_dev_team/novel-plus/badge/fork.svg?theme=gitee)](https://gitee.com/novel_dev_team/novel-plus)
#### 官网
https://xiongxyang.gitee.io/home/
https://xiongxyang.gitee.io
#### 新项目小说精品屋-微服务版
@ -78,6 +83,12 @@ novel-plus -- 父工程
| Layui | 前端UI
#### 开发工具
感谢Jetbrains公司提供的免费License
[![index]( https://s3.ax1x.com/2021/01/14/sdHsJg.png )]( https://www.jetbrains.com/?from=小说精品屋)
#### 接口文档
[点击查看接口文档示例](doc/api/api.md)
@ -87,7 +98,7 @@ novel-plus -- 父工程
1. 首页
![img](https://oscimg.oschina.net/oscnet/up-bbb1c7f72e183327bff754a9fa8bb75223e.png)
![img](https://s3.ax1x.com/2020/12/27/r5400A.png)
2. 分类索引页
@ -95,7 +106,7 @@ novel-plus -- 父工程
3. 搜索页
![img](https://gitee.com/xiongxyang/novel-plus/raw/release_v2.1.0/assets/QQ20200520-215756.png)
![img](https://s3.ax1x.com/2020/12/27/r5TO8x.png)
![img](https://oscimg.oschina.net/oscnet/up-ed5f689557718924acac76bc3ebca36afcb.png)
@ -141,19 +152,19 @@ novel-plus -- 父工程
1. 首页
<img src="https://s3.ax1x.com/2020/12/04/DbsSoj.jpg" alt="index" style="zoom:33%;" />
<img src="https://s3.ax1x.com/2020/12/27/r5447n.jpg" alt="index" width="300" />
2. 小说列表页
<img src="https://s3.ax1x.com/2020/12/04/DbrfsO.jpg" alt="微信图片_20190904181558" style="zoom: 33%;" />
<img src="https://s3.ax1x.com/2020/12/27/r55xKg.jpg" alt="微信图片_20190904181558" width="300" />
3. 小说详情页
<img src="https://s3.ax1x.com/2020/12/04/DbsklV.jpg" alt="QQ图片20191018161901" style="zoom:33%;" />
<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/04/Dbsew4.jpg" alt="QQ图片20191018161901" style="zoom:33%;" />
<img src="https://s3.ax1x.com/2020/12/27/r55Stx.jpg" alt="QQ图片20191018161901" width="300" />
##### 爬虫管理系统截图
@ -195,7 +206,11 @@ novel-plus -- 父工程
![QQ图片20191018161901](https://static.oschina.net/uploads/img/202006/24151813_fDgT.png)
#### 安装步骤
#### 蓝色主题模版截图更新中
![QQ图片20191018161901](https://s3.ax1x.com/2020/12/27/r5Fe0A.png)
#### 安装步骤源码小白请看其他安装教程
##### 数据库安装
@ -206,22 +221,59 @@ novel-plus -- 父工程
##### 爬虫管理系统安装
1. 修改novel-common模块下application-common-dev.yml配置文件中的数据库配置
1. 修改novel-common模块下application-common-dev.ymldev环境默认环境或application-common-prod.ymlprod环境需要在application.yml配置文件中切换配置文件中的数据库配置
2. 修改novel-crawl模块下application.yml文件中的管理员账号密码
3. 启动程序打开浏览器默认8081端口访问
4. 选择已有或新增爬虫源支持自定义爬虫规则点击`开启`按钮开始爬取小说数据
##### 前台小说门户安装jar包形式部署时需要复制templates文件夹到jar文件的相同目录下
##### 前台小说门户安装dev环境跳过34步骤
1. 修改novel-common模块下application-common-dev.yml配置文件中的数据库配置
2. 修改novel-front模块下application.yml配置文件中的模版名为你需要使用的模版名templates文件夹下的模版文件夹名内置orange和dark两套模版
![mini-code](https://s3.ax1x.com/2020/12/26/r4uGM6.png)
3. 启动程序打开浏览器默认8080端口访问
1. 修改novel-common模块下application-common-dev.ymldev环境默认环境或application-common-prod.ymlprod环境需要在application.yml配置文件中切换配置文件中的数据库配置
2. 修改novel-front模块下application-website配置文件中的网站信息
```
#网站配置
website:
#网站名
name: 小说精品屋
#域名
domain: xiongxyang.gitee.io
#SEO关键词
keyword: ${website.name},小说,小说CMS,原创文学系统,开源小说系统,免费小说建站程序
#SEO描述
description: ${website.name}是一个多端PCWAP阅读功能完善的原创文学CMS系统由前台门户系统作家后台管理系统平台后台管理系统爬虫管理系统等多个子系统构成支持会员充值订阅模式新闻发布和实时统计报表等功能新书自动入库老书自动更新
#联系QQ
qq: 1179705413
```
3. prod环境下需要修改novel-front模块下application-prod.yml配置文件中的模版名为你需要使用的模版名templates文件夹下的模版文件夹名内置orange和dark两套模版prod环境下才支持多模版
```
#模版配置
templates:
#模版名
name: orange
```
4. prod环境下的jar包形式部署时需要复制templates文件夹到jar文件的相同目录下
5. 启动程序打开浏览器默认8080端口访问
**喜欢此项目的可以给我的GitHub和Gitee加个Star支持一下 **
#### 其他安装教程
##### version>=3.5.0版本
包安装及低版本升级教程[点击前往](https://my.oschina.net/java2nb/blog/4914688)
##### 3.3.0<=version<3.5.0版本
包安装教程[点击前往](https://my.oschina.net/java2nb/blog/4842472)
##### version<3.3.0版本
包安装教程[点击前往](https://my.oschina.net/java2nb/blog/4272630)
宝塔安装教程非官方[点击前往](https://www.daniao.org/9166.html)
@ -236,7 +288,15 @@ docker安装教程[点击前往](https://my.oschina.net/java2nb/blog/4271989)
#### QQ交流群
[点击前往官网查看](https://xiongxyang.gitee.io/home/service.htm)
[点击前往官网查看](https://xiongxyang.gitee.io/service.htm)
问问题的三要素
1. 说明背景使用了哪个模块要做什么
2. 怎么输入或操作的得到了什么结果 截图日志
3. 哪里不明白或有什么疑问
#### 微信公众号发布最新更新资讯最新前端模版最新爬虫规则技术文档等
@ -252,12 +312,12 @@ docker安装教程[点击前往](https://my.oschina.net/java2nb/blog/4271989)
![mini-code](https://s1.ax1x.com/2020/10/31/BUQJwq.png)
### 免责声明
#### 免责声明
本项目提供的爬虫工具仅用于采集项目初期的测试数据请勿用于商业盈利
用户使用本系统从事任何违法违规的事情一切后果由用户自行承担作者不承担任何责任
### 备注
#### 备注
精品小说屋所有相关项目均已在开源中国公开感兴趣的可进入[开源中国](https://www.oschina.net/p/fiction_house)按关键字`精品小说屋`搜索。

View File

@ -5,7 +5,7 @@
<groupId>com.java2nb</groupId>
<artifactId>novel-admin</artifactId>
<version>3.3.0</version>
<version>3.5.0</version>
<packaging>jar</packaging>
<name>novel-admin</name>

View File

@ -2,20 +2,18 @@ package com.java2nb;
import org.mybatis.spring.annotation.MapperScan;
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.transaction.annotation.EnableTransactionManagement;
//关闭SpringSecurity的功能
@EnableAutoConfiguration(exclude = {
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class
})
@EnableTransactionManagement
@ServletComponentScan
@MapperScan("com.java2nb.*.dao")
@SpringBootApplication
@SpringBootApplication(exclude = {
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class
})
@EnableCaching
public class AdminApplication {
public static void main(String[] args) {

View File

@ -9,8 +9,8 @@ logging:
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/test?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
username: root
password: test123456
#password:

View File

@ -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
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

View File

@ -1,6 +1,15 @@
__ ________ ___.
|__|____ ___ _______ \_____ \ ____\_ |__
| \__ \\ \/ /\__ \ / ____/ / \| __ \
| |/ __ \\ / / __ \_/ \| | \ \_\ \
/\__| (____ /\_/ (____ /\_______ \___| /___ /
\______| \/ \/ \/ \/ \/
${AnsiColor.CYAN}
--------------------------------------------------------------------------------
${AnsiColor.RED}
|| / | / /
|| / | / / ___ // ___ ___ _ __
|| / /||/ / //___) ) // // ) ) // ) ) // ) ) ) )
||/ / | / // // // // / / // / / / /
| / | / ((____ // ((____ ((___/ / // / / / / 小说精品屋欢迎您!!!
-------Powered By XXY
${AnsiColor.CYAN}
--------------------------------------------------------------------------------
${AnsiColor.BRIGHT_YELLOW}
::: Spring-Boot ${spring-boot.formatted-version} :::

View File

@ -1,327 +0,0 @@
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-content">
<form class="form-horizontal m-t" id="signupForm">
<div class="form-group">
<label class="col-sm-3 control-label">付呗商户号:</label>
<div class="col-sm-8">
<input id="fbMerchantCode" name="fbMerchantCode"
class="form-control"
type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">第三方商户的订单号:</label>
<div class="col-sm-8">
<input id="merchantOrderSn" name="merchantOrderSn"
class="form-control"
type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">付呗订单号:</label>
<div class="col-sm-8">
<select data-placeholder="--选择--" id="orderSn"
name="orderSn"
class="form-control chosen-select" tabindex="2"
dict-type="color">
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">平台方订单号:</label>
<div class="col-sm-8">
<select data-placeholder="--选择--" id="platformOrderNo"
name="platformOrderNo"
class="form-control chosen-select" tabindex="2"
dict-type="oa_leave_type">
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">商户单号:</label>
<div class="col-sm-8">
<input type="hidden" id="tradeNo" name="tradeNo"/>
<div id="contentEditortradeNo">
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">订单状态1未支付2支付成功3支付失败4支付取消</label>
<div class="col-sm-8">
<select data-placeholder="--选择--" id="orderState"
name="orderState"
class="form-control chosen-select" tabindex="2"
dict-type="yes_no">
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">蜂鸟优惠卷抵扣:</label>
<div class="col-sm-8">
<input id="fnCoupon" name="fnCoupon"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">红包抵扣:</label>
<div class="col-sm-8">
<input id="redPacket" name="redPacket"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">实收金额(元)</label>
<div class="col-sm-8">
<input id="totalFee" name="totalFee"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">订单金额:</label>
<div class="col-sm-8">
<input id="orderPrice" name="orderPrice"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">手续费(元)</label>
<div class="col-sm-8">
<input id="fee" name="fee"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">对商品或交易的描述:</label>
<div class="col-sm-8">
<img title="点击选择图片" id="picImagebody"
style="cursor:pointer;width: 100px;height: 100px"
src="/img/webuploader.png"/>
<input id="body" name="body"
class="form-control"
type="hidden">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">附加数据:</label>
<div class="col-sm-8">
<input type="hidden" id="attach" name="attach"/>
<div id="contentEditorattach">
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">付呗系统的门店id</label>
<div class="col-sm-8">
<input id="storeId" name="storeId"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">付呗系统的收银员id</label>
<div class="col-sm-8">
<input id="cashierId" name="cashierId"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">设备终端号:</label>
<div class="col-sm-8">
<input id="deviceNo" name="deviceNo"
class="form-control"
type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">微信顾客支付授权的“open_id”或者支付宝顾客的“buyer_user_id”</label>
<div class="col-sm-8">
<input id="userId" name="userId"
class="form-control"
type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">支付宝顾客的账号:</label>
<div class="col-sm-8">
<textarea id="userLogonId" name="userLogonId"
class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交易成功的时间:</label>
<div class="col-sm-8">
<input type="text" class="laydate-icon layer-date form-control"
id="payTime"
name="payTime"
onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
style="background-color: #fff;" readonly="readonly"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">支付通道:1微信、2支付宝、3银联</label>
<div class="col-sm-8">
<select data-placeholder="--选择--" id="payChannel"
name="payChannel"
class="form-control chosen-select" tabindex="2"
dict-type="del_flag">
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">免充值代金券金额(元)</label>
<div class="col-sm-8">
<input id="noCashCouponFee" name="noCashCouponFee"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">预充值代金券金额(元)</label>
<div class="col-sm-8">
<input id="cashCouponFee" name="cashCouponFee"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">顾客实际支付金额(元)</label>
<div class="col-sm-8">
<input id="cashFee" name="cashFee"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">签名:</label>
<div class="col-sm-8">
<select data-placeholder="--选择--" id="sign"
name="sign"
class="form-control chosen-select" tabindex="2"
dict-type="theme">
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">其它选项:</label>
<div class="col-sm-8">
<img title="点击选择图片" id="picImageoptions"
style="cursor:pointer;width: 100px;height: 100px"
src="/img/webuploader.png"/>
<input id="options" name="options"
class="form-control"
type="hidden">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">创建时间:</label>
<div class="col-sm-8">
<input type="text" class="laydate-icon layer-date form-control"
id="createTime"
name="createTime"
onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
style="background-color: #fff;" readonly="readonly"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">推送时间:</label>
<div class="col-sm-8">
<input type="text" class="laydate-icon layer-date form-control"
id="pushTime"
name="pushTime"
onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
style="background-color: #fff;" readonly="readonly"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">推送IP</label>
<div class="col-sm-8">
<input type="hidden" id="pushIp" name="pushIp"/>
<div id="contentEditorpushIp">
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">商户id</label>
<div class="col-sm-8">
<input id="mchtId" name="mchtId"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">QR编号</label>
<div class="col-sm-8">
<input id="sn" name="sn"
class="form-control"
type="text">
</div>
</div>
<div class="form-group">
<div class="col-sm-8 col-sm-offset-3">
<button type="submit" class="btn btn-primary">提交</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript" src="/wangEditor/release/wangEditor.js"></script>
<script type="text/javascript" src="/js/appjs/test/order/add.js">
</script>
</body>
</html>

View File

@ -1,315 +0,0 @@
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-content">
<form class="form-horizontal m-t" id="signupForm">
<input id="id" name="id" th:value="${order.id}"
type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">付呗商户号:</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${order.fbMerchantCode}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">第三方商户的订单号:</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${order.merchantOrderSn}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">付呗订单号:</label>
<div style="padding-top:8px" class="col-sm-8 dict-type" dict-type="color"
th:attr="dict-value=${order.orderSn}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">平台方订单号:</label>
<div style="padding-top:8px" class="col-sm-8 dict-type" dict-type="oa_leave_type"
th:attr="dict-value=${order.platformOrderNo}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">商户单号:</label>
<div style="padding-top:8px" class="col-sm-8"
th:utext="${order.tradeNo}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">订单状态1未支付2支付成功3支付失败4支付取消</label>
<div style="padding-top:8px" class="col-sm-8 dict-type" dict-type="yes_no"
th:attr="dict-value=${order.orderState}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">蜂鸟优惠卷抵扣:</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${order.fnCoupon}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">红包抵扣:</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${order.redPacket}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">实收金额(元)</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${order.totalFee}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">订单金额:</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${order.orderPrice}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">手续费(元)</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${order.fee}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">对商品或交易的描述:</label>
<div style="padding-top:8px" class="col-sm-8">
<img id="picImagebody"
style="cursor:pointer;width: 100px;height: 100px"
th:src="${order.body}==null?'/img/webuploader.png':${order.body}"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">附加数据:</label>
<div style="padding-top:8px" class="col-sm-8"
th:utext="${order.attach}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">付呗系统的门店id</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${order.storeId}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">付呗系统的收银员id</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${order.cashierId}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">设备终端号:</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${order.deviceNo}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">微信顾客支付授权的“open_id”或者支付宝顾客的“buyer_user_id”</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${order.userId}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">支付宝顾客的账号:</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${order.userLogonId}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交易成功的时间:</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${order.payTime}==null?null:${#dates.format(order.payTime,'yyyy-MM-dd HH:mm:ss')}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">支付通道:1微信、2支付宝、3银联</label>
<div style="padding-top:8px" class="col-sm-8 dict-type" dict-type="del_flag"
th:attr="dict-value=${order.payChannel}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">免充值代金券金额(元)</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${order.noCashCouponFee}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">预充值代金券金额(元)</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${order.cashCouponFee}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">顾客实际支付金额(元)</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${order.cashFee}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">签名:</label>
<div style="padding-top:8px" class="col-sm-8 dict-type" dict-type="theme"
th:attr="dict-value=${order.sign}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">其它选项:</label>
<div style="padding-top:8px" class="col-sm-8">
<img id="picImageoptions"
style="cursor:pointer;width: 100px;height: 100px"
th:src="${order.options}==null?'/img/webuploader.png':${order.options}"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">创建时间:</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${order.createTime}==null?null:${#dates.format(order.createTime,'yyyy-MM-dd HH:mm:ss')}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">推送时间:</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${order.pushTime}==null?null:${#dates.format(order.pushTime,'yyyy-MM-dd HH:mm:ss')}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">推送IP</label>
<div style="padding-top:8px" class="col-sm-8"
th:utext="${order.pushIp}"></div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">商户id</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${order.mchtId}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">QR编号</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${order.sn}">
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div th:include="include::footer"></div>
</body>
</html>

View File

@ -1,323 +0,0 @@
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-content">
<form class="form-horizontal m-t" id="signupForm">
<input id="id" name="id" th:value="${order.id}"
type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">付呗商户号:</label>
<div class="col-sm-8">
<input id="fbMerchantCode" name="fbMerchantCode"
th:value="${order.fbMerchantCode}"
class="form-control"
type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">第三方商户的订单号:</label>
<div class="col-sm-8">
<input id="merchantOrderSn" name="merchantOrderSn"
th:value="${order.merchantOrderSn}"
class="form-control"
type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">付呗订单号:</label>
<div class="col-sm-8">
<select data-placeholder="--选择--" id="orderSn"
name="orderSn"
class="form-control chosen-select" tabindex="2"
dict-type="color"
th:attr="dict-value=${order.orderSn}" >
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">平台方订单号:</label>
<div class="col-sm-8">
<select data-placeholder="--选择--" id="platformOrderNo"
name="platformOrderNo"
class="form-control chosen-select" tabindex="2"
dict-type="oa_leave_type"
th:attr="dict-value=${order.platformOrderNo}" >
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">商户单号:</label>
<div class="col-sm-8">
<input type="hidden" id="tradeNo" name="tradeNo" th:value="${order.tradeNo}"/>
<div id="contentEditortradeNo">
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">订单状态1未支付2支付成功3支付失败4支付取消</label>
<div class="col-sm-8">
<select data-placeholder="--选择--" id="orderState"
name="orderState"
class="form-control chosen-select" tabindex="2"
dict-type="yes_no"
th:attr="dict-value=${order.orderState}" >
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">蜂鸟优惠卷抵扣:</label>
<div class="col-sm-8">
<input id="fnCoupon" name="fnCoupon"
th:value="${order.fnCoupon}"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">红包抵扣:</label>
<div class="col-sm-8">
<input id="redPacket" name="redPacket"
th:value="${order.redPacket}"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">实收金额(元)</label>
<div class="col-sm-8">
<input id="totalFee" name="totalFee"
th:value="${order.totalFee}"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">订单金额:</label>
<div class="col-sm-8">
<input id="orderPrice" name="orderPrice"
th:value="${order.orderPrice}"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">手续费(元)</label>
<div class="col-sm-8">
<input id="fee" name="fee"
th:value="${order.fee}"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">对商品或交易的描述:</label>
<div class="col-sm-8">
<img title="点击选择图片" id="picImagebody"
style="cursor:pointer;width: 100px;height: 100px"
th:src="${order.body}==null?'/img/webuploader.png':${order.body}"/>
<input id="body" name="body" th:value="${order.body}"
class="form-control"
type="hidden">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">附加数据:</label>
<div class="col-sm-8">
<input type="hidden" id="attach" name="attach" th:value="${order.attach}"/>
<div id="contentEditorattach">
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">付呗系统的门店id</label>
<div class="col-sm-8">
<input id="storeId" name="storeId"
th:value="${order.storeId}"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">付呗系统的收银员id</label>
<div class="col-sm-8">
<input id="cashierId" name="cashierId"
th:value="${order.cashierId}"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">设备终端号:</label>
<div class="col-sm-8">
<input id="deviceNo" name="deviceNo"
th:value="${order.deviceNo}"
class="form-control"
type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">微信顾客支付授权的“open_id”或者支付宝顾客的“buyer_user_id”</label>
<div class="col-sm-8">
<input id="userId" name="userId"
th:value="${order.userId}"
class="form-control"
type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">支付宝顾客的账号:</label>
<div class="col-sm-8">
<textarea id="userLogonId" name="userLogonId"
class="form-control" th:text="${order.userLogonId}"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交易成功的时间:</label>
<div class="col-sm-8">
<input type="text" class="laydate-icon layer-date form-control"
id="payTime"
name="payTime"
th:value="${order.payTime}==null?null:${#dates.format(order.payTime,'yyyy-MM-dd HH:mm:ss')}"
onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
style="background-color: #fff;" readonly="readonly"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">支付通道:1微信、2支付宝、3银联</label>
<div class="col-sm-8">
<select data-placeholder="--选择--" id="payChannel"
name="payChannel"
class="form-control chosen-select" tabindex="2"
dict-type="del_flag"
th:attr="dict-value=${order.payChannel}" >
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">免充值代金券金额(元)</label>
<div class="col-sm-8">
<input id="noCashCouponFee" name="noCashCouponFee"
th:value="${order.noCashCouponFee}"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">预充值代金券金额(元)</label>
<div class="col-sm-8">
<input id="cashCouponFee" name="cashCouponFee"
th:value="${order.cashCouponFee}"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">顾客实际支付金额(元)</label>
<div class="col-sm-8">
<input id="cashFee" name="cashFee"
th:value="${order.cashFee}"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">签名:</label>
<div class="col-sm-8">
<select data-placeholder="--选择--" id="sign"
name="sign"
class="form-control chosen-select" tabindex="2"
dict-type="theme"
th:attr="dict-value=${order.sign}" >
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">其它选项:</label>
<div class="col-sm-8">
<img title="点击选择图片" id="picImageoptions"
style="cursor:pointer;width: 100px;height: 100px"
th:src="${order.options}==null?'/img/webuploader.png':${order.options}"/>
<input id="options" name="options" th:value="${order.options}"
class="form-control"
type="hidden">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">创建时间:</label>
<div class="col-sm-8">
<input type="text" class="laydate-icon layer-date form-control"
id="createTime"
name="createTime"
th:value="${order.createTime}==null?null:${#dates.format(order.createTime,'yyyy-MM-dd HH:mm:ss')}"
onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
style="background-color: #fff;" readonly="readonly"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">推送时间:</label>
<div class="col-sm-8">
<input type="text" class="laydate-icon layer-date form-control"
id="pushTime"
name="pushTime"
th:value="${order.pushTime}==null?null:${#dates.format(order.pushTime,'yyyy-MM-dd HH:mm:ss')}"
onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
style="background-color: #fff;" readonly="readonly"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">推送IP</label>
<div class="col-sm-8">
<input type="hidden" id="pushIp" name="pushIp" th:value="${order.pushIp}"/>
<div id="contentEditorpushIp">
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">商户id</label>
<div class="col-sm-8">
<input id="mchtId" name="mchtId"
th:value="${order.mchtId}"
class="form-control"
type="number">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">QR编号</label>
<div class="col-sm-8">
<input id="sn" name="sn"
th:value="${order.sn}"
class="form-control"
type="text">
</div>
</div>
<div class="form-group">
<div class="col-sm-8 col-sm-offset-3">
<button type="submit" class="btn btn-primary">提交</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript" src="/wangEditor/release/wangEditor.js"></script>
<script type="text/javascript" src="/js/appjs/test/order/edit.js">
</script>
</body>
</html>

View File

@ -1,66 +0,0 @@
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
<div class="col-sm-12">
<div class="ibox">
<div class="ibox-body">
<div class="fixed-table-toolbar">
<div class="columns pull-left">
<button shiro:hasPermission="test:order:add" type="button"
class="btn btn-primary" onclick="add()">
<i class="fa fa-plus" aria-hidden="true"></i>添加
</button>
<button shiro:hasPermission="test:order:batchRemove" type="button"
class="btn btn-danger"
onclick="batchRemove()">
<i class="fa fa-trash" aria-hidden="true"></i>删除
</button>
</div>
<div class="columns pull-right">
<button class="btn btn-success" onclick="reLoad()">查询</button>
</div>
<form id="searchForm">
<div class="columns pull-right col-md-2">
<input id="id" name="id" type="text" class="form-control"
placeholder="主键">
</div>
</form>
</div>
<table id="exampleTable" data-mobile-responsive="true">
</table>
</div>
</div>
</div>
</div>
<!--shiro控制bootstraptable行内按钮看见性 -->
<div>
<script type="text/javascript">
var s_detail_h = 'hidden';
var s_edit_h = 'hidden';
var s_remove_h = 'hidden';
</script>
</div>
<div shiro:hasPermission="test:order:detail">
<script type="text/javascript">
s_detail_h = '';
</script>
</div>
<div shiro:hasPermission="test:order:edit">
<script type="text/javascript">
s_edit_h = '';
</script>
</div>
<div shiro:hasPermission="test:order:remove">
<script type="text/javascript">
var s_remove_h = '';
</script>
</div>
<div th:include="include :: footer"></div>
<script type="text/javascript" src="/js/appjs/test/order/order.js"></script>
</body>
</html>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>novel</artifactId>
<groupId>com.java2nb</groupId>
<version>3.3.0</version>
<version>3.5.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -123,6 +123,12 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
</dependencies>

View File

@ -0,0 +1,53 @@
package com.java2nb.novel.core.bean;
import com.github.pagehelper.PageInfo;
import lombok.Data;
import java.util.List;
/**
* 封装通用分页数据,接收PageHelper、SpringData等框架的分页数据转换成通用的PageBean对象
* @author xiongxiaoyang
* @version 1.0
* @since 2021/2/4
* @param <T> 分页集合类型
*/
@Data
public class PageBean<T> {
private Integer pageNum;
private Integer pageSize;
private Long total;
private List<? extends T> list;
/**
* 该构造函数用于PageHelper工具进行分页查询的场景
* 接收PageHelper分页后的list
*/
public PageBean(List<T> list){
PageInfo<T> pageInfo = new PageInfo<>(list);
this.pageNum = pageInfo.getPageNum();
this.pageSize = pageInfo.getPageSize();
this.total = pageInfo.getTotal();
this.list = pageInfo.getList();
}
/**
* 该构造函数用于通用分页查询的场景
* 接收普通分页数据和普通集合
*/
public PageBean(Integer pageNum, Integer pageSize, Long total, List<T> list) {
this.pageNum = pageNum;
this.pageSize = pageSize;
this.total = total;
this.list = list;
}
//TODO 使用其他的分页工具或框架进行分页查询的场景
}

View File

@ -71,8 +71,3 @@ sharding:
pic:
save:
type: 2 #图片保存方式, 1不保存使用爬取的网络图片 2保存在自己的存储介质
storage: local #存储介质local本地OSS阿里云对象存储fastDfs分布式文件系统
path: /var/pic #图片保存路径

View File

@ -0,0 +1,82 @@
spring:
profiles:
include: [common]
main:
allow-bean-definition-overriding: true
#Redis服务器IP
redis:
host: 127.0.0.1
#Redis服务器连接端口
port: 6379
#Redis服务器连接密码
password: test
jedis:
pool:
#连接池最大连接数使用负值表示没有限制
max-active: 8
#连接池最大阻塞等待时间使用负值表示没有限制
max-wait: 1
#连接池最大阻塞等待时间使用负值表示没有限制
max-idle: 8
#连接池中的最小空闲连接
min-idle: 0
#连接超时时间毫秒
timeout: 30000
datasource:
url: jdbc:mysql://127.0.0.1:3306/novel_biz?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
username: root
password: test123456
driver-class-name: com.mysql.cj.jdbc.Driver
####使用shardingJdbc时
####所有的jdbcType都不能是LONGVARCHAR,否则会导致java.io.NotSerializableException: java.io.StringReader错误
##### 应该替换所有的 LONGVARCHAR 类型为VARCHAR
sharding:
jdbc:
datasource:
names: ds0 #,ds1
ds0:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
jdbc-url: jdbc:mysql://localhost:3306/novel_plus?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
username: root
password: test123456
# ds1:
# type: com.alibaba.druid.pool.DruidDataSource
# driver-class-name: com.mysql.jdbc.Driver
# url: jdbc:mysql://localhost:3306/novel_plus2
# username: root
# password: test123456
config:
sharding:
props:
sql.show: true
tables:
book_content: #book_content表
key-generator-column-name: id #主键
actual-data-nodes: ds${0}.book_content${0..9} #数据节点
# database-strategy: #分库策略
# inline:
# sharding-column: book_id
# algorithm-expression: ds${book_id % 10}
table-strategy: #分表策略
inline:
shardingColumn: index_id
algorithm-expression: book_content${index_id % 10}
logging:
level:
root: error
com.java2nb: error

View File

@ -1,17 +0,0 @@
spring:
profiles:
include: [common]
datasource:
url: jdbc:mysql://127.0.0.1:3306/novel_biz?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
username: root
password: root
driver-class-name: com.mysql.cj.jdbc.Driver
pic:
save:
type: 2 #图片保存方式, 1不保存使用网络图片 2本地保存
path: /var/pic #图片保存路径

View File

@ -0,0 +1,15 @@
${AnsiColor.CYAN}
--------------------------------------------------------------------------------
${AnsiColor.RED}
|| / | / /
|| / | / / ___ // ___ ___ _ __
|| / /||/ / //___) ) // // ) ) // ) ) // ) ) ) )
||/ / | / // // // // / / // / / / /
| / | / ((____ // ((____ ((___/ / // / / / / 小说精品屋欢迎您!!!
-------Powered By XXY
${AnsiColor.CYAN}
--------------------------------------------------------------------------------
${AnsiColor.BRIGHT_YELLOW}
::: Spring-Boot ${spring-boot.formatted-version} :::

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>novel</artifactId>
<groupId>com.java2nb</groupId>
<version>3.3.0</version>
<version>3.5.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -39,8 +39,7 @@ public class CrawlController {
@GetMapping("listCrawlByPage")
public ResultBean listCrawlByPage(@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "10") int pageSize){
return ResultBean.ok(new PageInfo<>(BeanUtil.copyList(crawlService.listCrawlByPage(page,pageSize), CrawlSourceVO.class)
));
return ResultBean.ok(crawlService.listCrawlByPage(page,pageSize));
}
/**
@ -71,8 +70,7 @@ public class CrawlController {
@GetMapping("listCrawlSingleTaskByPage")
public ResultBean listCrawlSingleTaskByPage(@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "10") int pageSize){
return ResultBean.ok(new PageInfo<>(BeanUtil.copyList(crawlService.listCrawlSingleTaskByPage(page,pageSize), CrawlSingleTaskVO.class)
));
return ResultBean.ok(crawlService.listCrawlSingleTaskByPage(page,pageSize));
}
/**

View File

@ -1,8 +1,11 @@
package com.java2nb.novel.service;
import com.github.pagehelper.PageInfo;
import com.java2nb.novel.core.bean.PageBean;
import com.java2nb.novel.core.crawl.RuleBean;
import com.java2nb.novel.entity.CrawlSingleTask;
import com.java2nb.novel.entity.CrawlSource;
import com.java2nb.novel.vo.CrawlSourceVO;
import java.util.List;
@ -22,9 +25,9 @@ public interface CrawlService {
* 爬虫源分页列表
* @param page 当前页码
* @param pageSize 分页大小
*@return 爬虫源集合
*@return 爬虫源分页数据
* */
List<CrawlSource> listCrawlByPage(int page, int pageSize);
PageBean<CrawlSource> listCrawlByPage(int page, int pageSize);
/**
* 开启或停止爬虫
@ -83,9 +86,9 @@ public interface CrawlService {
* 单本采集任务分页列表查询
* @param page 当前页码
* @param pageSize 分页大小
* @return 单本采集任务集合
* @return 单本采集任务分页数据
* */
List<CrawlSingleTask> listCrawlSingleTaskByPage(int page, int pageSize);
PageBean<CrawlSingleTask> listCrawlSingleTaskByPage(int page, int pageSize);
/**
* 删除采集任务

View File

@ -1,13 +1,17 @@
package com.java2nb.novel.service.impl;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.java2nb.novel.core.bean.PageBean;
import com.java2nb.novel.core.cache.CacheKey;
import com.java2nb.novel.core.cache.CacheService;
import com.java2nb.novel.core.crawl.CrawlParser;
import com.java2nb.novel.core.crawl.RuleBean;
import com.java2nb.novel.core.enums.ResponseStatus;
import com.java2nb.novel.core.exception.BusinessException;
import com.java2nb.novel.core.utils.BeanUtil;
import com.java2nb.novel.core.utils.IdWorker;
import com.java2nb.novel.core.utils.SpringUtil;
import com.java2nb.novel.core.utils.ThreadUtil;
@ -16,6 +20,8 @@ import com.java2nb.novel.entity.CrawlSource;
import com.java2nb.novel.mapper.*;
import com.java2nb.novel.service.BookService;
import com.java2nb.novel.service.CrawlService;
import com.java2nb.novel.vo.CrawlSingleTaskVO;
import com.java2nb.novel.vo.CrawlSourceVO;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
@ -66,14 +72,17 @@ public class CrawlServiceImpl implements CrawlService {
}
@Override
public List<CrawlSource> listCrawlByPage(int page, int pageSize) {
public PageBean<CrawlSource> listCrawlByPage(int page, int pageSize) {
PageHelper.startPage(page, pageSize);
SelectStatementProvider render = select(id, sourceName, sourceStatus, createTime, updateTime)
.from(crawlSource)
.orderBy(updateTime)
.build()
.render(RenderingStrategies.MYBATIS3);
return crawlSourceMapper.selectMany(render);
List<CrawlSource> crawlSources = crawlSourceMapper.selectMany(render);
PageBean<CrawlSource> pageBean = new PageBean<>(crawlSources);
pageBean.setList(BeanUtil.copyList(crawlSources, CrawlSourceVO.class));
return pageBean;
}
@SneakyThrows
@ -156,14 +165,17 @@ public class CrawlServiceImpl implements CrawlService {
}
@Override
public List<CrawlSingleTask> listCrawlSingleTaskByPage(int page, int pageSize) {
public PageBean<CrawlSingleTask> listCrawlSingleTaskByPage(int page, int pageSize) {
PageHelper.startPage(page, pageSize);
SelectStatementProvider render = select(CrawlSingleTaskDynamicSqlSupport.crawlSingleTask.allColumns())
.from(CrawlSingleTaskDynamicSqlSupport.crawlSingleTask)
.orderBy(CrawlSingleTaskDynamicSqlSupport.createTime.descending())
.build()
.render(RenderingStrategies.MYBATIS3);
return crawlSingleTaskMapper.selectMany(render);
List<CrawlSingleTask> crawlSingleTasks = crawlSingleTaskMapper.selectMany(render);
PageBean<CrawlSingleTask> pageBean = new PageBean<>(crawlSingleTasks);
pageBean.setList(BeanUtil.copyList(crawlSingleTasks, CrawlSingleTaskVO.class));
return pageBean;
}
@Override

View File

@ -0,0 +1,3 @@
spring:
profiles:
include: [common-prod]

View File

@ -1,6 +1,9 @@
#端口号
server:
port: 8081
servlet:
session:
timeout: 1D
spring:
profiles:
@ -19,3 +22,6 @@ crawl:
thread: 1

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>novel</artifactId>
<groupId>com.java2nb</groupId>
<version>3.3.0</version>
<version>3.5.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -39,6 +39,12 @@
<version>${jest.version}</version>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>${elasticsearch.version}</version>
</dependency>
<!--aliyunOSS-->
<dependency>
<groupId>com.aliyun.oss</groupId>

View File

@ -5,6 +5,7 @@ import io.shardingsphere.shardingjdbc.spring.boot.SpringBootConfiguration;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
@ -20,6 +21,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableTransactionManagement
@EnableScheduling
@EnableCaching
@ServletComponentScan
@MapperScan(basePackages = {"com.java2nb.novel.mapper"})
@Import(FdfsClientConfig.class)
public class FrontNovelApplication {

View File

@ -47,8 +47,7 @@ public class AuthorController extends BaseController{
@GetMapping("listBookByPage")
public ResultBean listBookByPage(@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "10") int pageSize ,HttpServletRequest request){
return ResultBean.ok(new PageInfo<>(bookService.listBookPageByUserId(getUserDetails(request).getId(),page,pageSize)
));
return ResultBean.ok(bookService.listBookPageByUserId(getUserDetails(request).getId(),page,pageSize));
}
/**
@ -172,8 +171,7 @@ public class AuthorController extends BaseController{
@RequestParam(value = "endTime",defaultValue = "2030-01-01") Date endTime,
HttpServletRequest request){
return ResultBean.ok(new PageInfo<>(authorService.listIncomeDailyByPage(page,pageSize,getUserDetails(request).getId(),bookId,startTime,endTime)
));
return ResultBean.ok(authorService.listIncomeDailyByPage(page,pageSize,getUserDetails(request).getId(),bookId,startTime,endTime));
}
@ -186,8 +184,7 @@ public class AuthorController extends BaseController{
@RequestParam(value = "bookId", defaultValue = "0") Long bookId,
HttpServletRequest request){
return ResultBean.ok(new PageInfo<>(authorService.listIncomeMonthByPage(page,pageSize,getUserDetails(request).getId(),bookId)
));
return ResultBean.ok(authorService.listIncomeMonthByPage(page,pageSize,getUserDetails(request).getId(),bookId));
}
private Author checkAuthor(HttpServletRequest request) {

View File

@ -1,11 +1,13 @@
package com.java2nb.novel.controller;
import com.github.pagehelper.PageInfo;
import com.java2nb.novel.core.bean.PageBean;
import com.java2nb.novel.core.bean.ResultBean;
import com.java2nb.novel.core.bean.UserDetails;
import com.java2nb.novel.core.enums.ResponseStatus;
import com.java2nb.novel.entity.Book;
import com.java2nb.novel.entity.BookComment;
import com.java2nb.novel.search.BookSP;
import com.java2nb.novel.vo.BookSpVO;
import com.java2nb.novel.service.BookService;
import com.java2nb.novel.vo.BookVO;
import lombok.RequiredArgsConstructor;
@ -79,9 +81,8 @@ public class BookController extends BaseController{
* 分页搜索
* */
@GetMapping("searchByPage")
public ResultBean searchByPage(BookSP bookSP, @RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "20") int pageSize){
PageInfo<BookVO> pageInfo = bookService.searchByPage(bookSP,page,pageSize);
return ResultBean.ok(pageInfo);
public ResultBean searchByPage(BookSpVO bookSP, @RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "20") int pageSize){
return ResultBean.ok(bookService.searchByPage(bookSP,page,pageSize));
}
/**
@ -143,7 +144,7 @@ public class BookController extends BaseController{
* */
@GetMapping("listCommentByPage")
public ResultBean listCommentByPage(@RequestParam("bookId") Long bookId,@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "5") int pageSize) {
return ResultBean.ok(new PageInfo<>(bookService.listCommentByPage(null,bookId,page,pageSize)));
return ResultBean.ok(bookService.listCommentByPage(null,bookId,page,pageSize));
}
/**
@ -172,7 +173,7 @@ public class BookController extends BaseController{
* */
@GetMapping("/queryIndexList")
public ResultBean indexList(Long bookId,@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "5") int pageSize,@RequestParam(value = "orderBy",defaultValue = "index_num desc") String orderBy) {
return ResultBean.ok(new PageInfo<>(bookService.queryIndexList(bookId,orderBy,page,pageSize)));
return ResultBean.ok(new PageBean<>(bookService.queryIndexList(bookId,orderBy,page,pageSize)));
}

View File

@ -31,7 +31,7 @@ public class NewsController {
* */
@GetMapping("listByPage")
public ResultBean listByPage(@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "5") int pageSize){
return ResultBean.ok(new PageInfo<>(newsService.listByPage(page,pageSize)));
return ResultBean.ok(newsService.listByPage(page,pageSize));
}

View File

@ -5,7 +5,7 @@ import com.alipay.api.DefaultAlipayClient;
import com.alipay.api.internal.util.AlipaySignature;
import com.alipay.api.request.AlipayTradePagePayRequest;
import com.java2nb.novel.core.bean.UserDetails;
import com.java2nb.novel.core.config.AlipayConfig;
import com.java2nb.novel.core.config.AlipayProperties;
import com.java2nb.novel.service.OrderService;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
@ -31,7 +31,7 @@ import java.util.Map;
public class PayController extends BaseController {
private final AlipayConfig alipayConfig;
private final AlipayProperties alipayConfig;
private final OrderService orderService;

View File

@ -1,6 +1,5 @@
package com.java2nb.novel.controller;
import com.github.pagehelper.PageInfo;
import com.java2nb.novel.core.bean.ResultBean;
import com.java2nb.novel.core.bean.UserDetails;
import com.java2nb.novel.core.cache.CacheService;
@ -19,7 +18,6 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import java.util.HashMap;
import java.util.Map;
@ -147,7 +145,7 @@ public class UserController extends BaseController {
if (userDetails == null) {
return ResultBean.fail(ResponseStatus.NO_LOGIN);
}
return ResultBean.ok(new PageInfo<>(userService.listBookShelfByPage(userDetails.getId(),page,pageSize)));
return ResultBean.ok(userService.listBookShelfByPage(userDetails.getId(),page,pageSize));
}
/**
@ -159,7 +157,7 @@ public class UserController extends BaseController {
if (userDetails == null) {
return ResultBean.fail(ResponseStatus.NO_LOGIN);
}
return ResultBean.ok(new PageInfo<>(userService.listReadHistoryByPage(userDetails.getId(),page,pageSize)));
return ResultBean.ok(userService.listReadHistoryByPage(userDetails.getId(),page,pageSize));
}
/**
@ -197,7 +195,7 @@ public class UserController extends BaseController {
if (userDetails == null) {
return ResultBean.fail(ResponseStatus.NO_LOGIN);
}
return ResultBean.ok(new PageInfo<>(userService.listUserFeedBackByPage(userDetails.getId(),page,pageSize)));
return ResultBean.ok(userService.listUserFeedBackByPage(userDetails.getId(),page,pageSize));
}
/**
@ -257,7 +255,7 @@ public class UserController extends BaseController {
if (userDetails == null) {
return ResultBean.fail(ResponseStatus.NO_LOGIN);
}
return ResultBean.ok(new PageInfo<>(bookService.listCommentByPage(userDetails.getId(),null,page,pageSize)));
return ResultBean.ok(bookService.listCommentByPage(userDetails.getId(),null,page,pageSize));
}

View File

@ -10,7 +10,7 @@ import org.springframework.stereotype.Component;
@Data
@Component
@ConfigurationProperties(prefix="alipay")
public class AlipayConfig {
public class AlipayProperties {
private String appId;
private String merchantPrivateKey;

View File

@ -7,13 +7,13 @@ import org.springframework.stereotype.Component;
import java.math.BigDecimal;
/**
* 作家收入配置
* 作家收入配置属性
* @author cd
*/
@Component
@Data
@ConfigurationProperties(prefix = "author.income")
public class AuthorIncomeConfig {
public class AuthorIncomeProperties {
private BigDecimal taxRate;

View File

@ -7,13 +7,13 @@ import org.springframework.stereotype.Component;
import java.math.BigDecimal;
/**
* 章节费用配置
* 章节费用配置属性
* @author cd
*/
@Component
@Data
@ConfigurationProperties(prefix = "book.price")
public class BookPriceConfig {
public class BookPriceProperties {
private BigDecimal wordCount;

View File

@ -0,0 +1,41 @@
package com.java2nb.novel.core.config;
import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* elasticsearch搜索引擎配置
* @author xiongxiaoyang
*/
@Configuration
@ConditionalOnProperty(prefix = "spring.elasticsearch", name = "enable", havingValue = "1")
public class EsConfig {
@Value("${spring.elasticsearch.jest.uris}")
private String esUris;
@Bean
public RestHighLevelClient esClient(){
String[] uris = esUris.split(",");
HttpHost[] hosts = new HttpHost[uris.length];
for(int i = 0 ; i < uris.length ; i++){
String uri = uris[i];
String scheme = uri.substring(0,uri.indexOf(":")).trim();
String hostname = uri.substring(uri.indexOf("://")+3,uri.lastIndexOf(":")).trim();
Integer port = Integer.parseInt(uri.substring(uri.lastIndexOf(":")+1).trim());
hosts[i] = new HttpHost(hostname,port,scheme);
}
return new RestHighLevelClient(
RestClient.builder(hosts));
}
}

View File

@ -9,5 +9,5 @@ import org.springframework.jmx.support.RegistrationPolicy;
*/
@Configuration
@EnableMBeanExport(registration= RegistrationPolicy.IGNORE_EXISTING)
public class FdfsConfiguration {
public class FdfsConfig {
}

View File

@ -0,0 +1,23 @@
package com.java2nb.novel.core.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/**
* 线程池配置
* @author xiongxiaoyang
*/
@Configuration
public class ThreadPoolConfig {
@Bean
public ThreadPoolExecutor threadPoolExecutor(ThreadPoolProperties properties){
return new ThreadPoolExecutor(properties.getCorePoolSize(),properties.getMaximumPoolSize(),properties.getKeepAliveTime()
, TimeUnit.SECONDS, new LinkedBlockingDeque<>(properties.getQueueSize()),new ThreadPoolExecutor.AbortPolicy());
}
}

View File

@ -0,0 +1,22 @@
package com.java2nb.novel.core.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* 线程池配置属性
* @author xiongxiaoyang
*/
@Data
@Component
@ConfigurationProperties(prefix = "thread.pool")
public class ThreadPoolProperties {
private Integer corePoolSize;
private Integer maximumPoolSize;
private Long keepAliveTime;
private Integer queueSize;
}

View File

@ -0,0 +1,20 @@
package com.java2nb.novel.core.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* @author 11797
*/
@Data
@Component
@ConfigurationProperties(prefix="website")
public class WebsiteProperties {
private String name;
private String domain;
private String keyword;
private String description;
private String qq;
}

View File

@ -0,0 +1,28 @@
package com.java2nb.novel.core.listener;
import com.java2nb.novel.core.config.WebsiteProperties;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
/**
* 启动监听器
* @author xiongxiaoyang
*/
@WebListener
@Slf4j
@RequiredArgsConstructor
public class StarterListener implements ServletContextListener {
private final WebsiteProperties websiteConfig;
@Override
public void contextInitialized(ServletContextEvent sce) {
sce.getServletContext().setAttribute("website",websiteConfig);
}
}

View File

@ -2,19 +2,11 @@ package com.java2nb.novel.core.schedule;
import com.java2nb.novel.core.cache.CacheKey;
import com.java2nb.novel.core.cache.CacheService;
import com.java2nb.novel.core.utils.BeanUtil;
import com.java2nb.novel.entity.Book;
import com.java2nb.novel.service.BookService;
import com.java2nb.novel.service.SearchService;
import com.java2nb.novel.vo.EsBookVO;
import io.searchbox.client.JestClient;
import io.searchbox.core.DocumentResult;
import io.searchbox.core.Index;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
@ -68,8 +60,6 @@ public class BookToEsSchedule {
}
cacheService.setObject(CacheKey.ES_LAST_UPDATE_TIME, lastDate);
} catch (Exception e) {

View File

@ -1,7 +1,6 @@
package com.java2nb.novel.core.schedule;
import com.java2nb.novel.core.config.AuthorIncomeConfig;
import com.java2nb.novel.core.utils.DateUtil;
import com.java2nb.novel.entity.Author;
import com.java2nb.novel.entity.AuthorIncomeDetail;

View File

@ -1,19 +1,17 @@
package com.java2nb.novel.core.schedule;
import com.java2nb.novel.core.config.AuthorIncomeConfig;
import com.java2nb.novel.core.config.AuthorIncomeProperties;
import com.java2nb.novel.core.utils.DateUtil;
import com.java2nb.novel.entity.*;
import com.java2nb.novel.service.AuthorService;
import com.java2nb.novel.service.BookService;
import com.java2nb.novel.service.UserService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -31,7 +29,7 @@ public class MonthIncomeStaSchedule {
private final BookService bookService;
private final AuthorIncomeConfig authorIncomeConfig;
private final AuthorIncomeProperties authorIncomeConfig;
/**
* 每个月1号凌晨2点统计上个月数据

View File

@ -1,11 +1,10 @@
package com.java2nb.novel.mapper;
import com.java2nb.novel.entity.Book;
import com.java2nb.novel.search.BookSP;
import com.java2nb.novel.vo.BookSpVO;
import com.java2nb.novel.vo.BookVO;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
/**
@ -14,7 +13,7 @@ import java.util.List;
public interface FrontBookMapper extends BookMapper {
List<BookVO> searchByPage(BookSP params);
List<BookVO> searchByPage(BookSpVO params);
void addVisitCount(@Param("bookId") Long bookId, @Param("visitCount") Integer visitCount);

View File

@ -19,7 +19,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.Serializable;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ThreadPoolExecutor;
/**
* @author 11797
@ -37,6 +40,8 @@ public class PageController extends BaseController {
private final UserService userService;
private final ThreadPoolExecutor threadPoolExecutor;
@RequestMapping("{url}.html")
public String module(@PathVariable("url") String url) {
@ -44,9 +49,9 @@ public class PageController extends BaseController {
}
@RequestMapping("{module}/{url}.html")
public String module2(@PathVariable("module") String module, @PathVariable("url") String url,HttpServletRequest request) {
public String module2(@PathVariable("module") String module, @PathVariable("url") String url, HttpServletRequest request) {
if(request.getRequestURI().startsWith("/author")) {
if (request.getRequestURI().startsWith("/author")) {
//访问作者专区
UserDetails user = getUserDetails(request);
if (user == null) {
@ -56,7 +61,7 @@ public class PageController extends BaseController {
boolean isAuthor = authorService.isAuthor(user.getId());
if (!isAuthor) {
return "redirect:/author/register.html" ;
return "redirect:/author/register.html";
}
}
@ -70,15 +75,15 @@ public class PageController extends BaseController {
/**
* 首页
* */
*/
@RequestMapping(path = {"/", "/index", "/index.html"})
public String index() {
return ThreadLocalUtil.getTemplateDir()+"index";
return ThreadLocalUtil.getTemplateDir() + "index";
}
/**
* 作品页
* */
*/
@RequestMapping("book/bookclass.html")
public String bookClass() {
return "book/bookclass";
@ -86,129 +91,170 @@ public class PageController extends BaseController {
/**
* 排行页
* */
*/
@RequestMapping("book/book_ranking.html")
public String bookRank() {
return ThreadLocalUtil.getTemplateDir()+"book/book_ranking";
return ThreadLocalUtil.getTemplateDir() + "book/book_ranking";
}
/**
* 详情页
* */
*/
@SneakyThrows
@RequestMapping("/book/{bookId}.html")
public String bookDetail(@PathVariable("bookId") Long bookId, Model model) {
Book book = bookService.queryBookDetail(bookId);
model.addAttribute("book",book);
if(book.getLastIndexId() != null) {
model.addAttribute("book", book);
if (book.getLastIndexId() != null) {
//查询首章目录ID
Long firstBookIndexId = bookService.queryFirstBookIndexId(bookId);
model.addAttribute("firstBookIndexId", firstBookIndexId);
}
return ThreadLocalUtil.getTemplateDir()+"book/book_detail";
return ThreadLocalUtil.getTemplateDir() + "book/book_detail";
}
/**
* 目录页
* */
*/
@SneakyThrows
@RequestMapping("/book/indexList-{bookId}.html")
public String indexList(@PathVariable("bookId") Long bookId, Model model) {
Book book = bookService.queryBookDetail(bookId);
model.addAttribute("book",book);
List<BookIndex> bookIndexList = bookService.queryIndexList(bookId,null,1,null);
model.addAttribute("bookIndexList",bookIndexList);
model.addAttribute("bookIndexCount",bookIndexList.size());
return ThreadLocalUtil.getTemplateDir()+"book/book_index";
model.addAttribute("book", book);
List<BookIndex> bookIndexList = bookService.queryIndexList(bookId, null, 1, null);
model.addAttribute("bookIndexList", bookIndexList);
model.addAttribute("bookIndexCount", bookIndexList.size());
return ThreadLocalUtil.getTemplateDir() + "book/book_index";
}
/**
* 内容页
* */
*/
@SneakyThrows
@RequestMapping("/book/{bookId}/{bookIndexId}.html")
public String indexList(@PathVariable("bookId") Long bookId,@PathVariable("bookIndexId") Long bookIndexId, HttpServletRequest request, Model model) {
//查询书籍
Book book = bookService.queryBookDetail(bookId);
//查询目录
BookIndex bookIndex = bookService.queryBookIndex(bookIndexId);
model.addAttribute("book",book);
model.addAttribute("bookIndex",bookIndex);
//查询上一章节目录ID
Long preBookIndexId = bookService.queryPreBookIndexId(bookId,bookIndex.getIndexNum());
model.addAttribute("preBookIndexId",preBookIndexId);
//查询下一章目录ID
Long nextBookIndexId = bookService.queryNextBookIndexId(bookId,bookIndex.getIndexNum());
model.addAttribute("nextBookIndexId",nextBookIndexId);
//查询内容
BookContent bookContent = bookService.queryBookContent(bookIndex.getId());
model.addAttribute("bookContent",bookContent);
public String indexList(@PathVariable("bookId") Long bookId, @PathVariable("bookIndexId") Long bookIndexId, HttpServletRequest request, Model model) {
boolean needBuy = false;
//判断该目录是否收费
if(bookIndex.getIsVip()!=null && bookIndex.getIsVip() == 1 ){
UserDetails user = getUserDetails(request);
if(user == null){
//未登录
return "redirect:/user/login.html?originUrl="+request.getRequestURI();
//加载小说基本信息线程
CompletableFuture<Book> bookCompletableFuture = CompletableFuture.supplyAsync(() -> {
//查询书籍
Book book = bookService.queryBookDetail(bookId);
log.debug("加载小说基本信息线程结束");
return book;
}, threadPoolExecutor);
//加载小说章节信息线程
CompletableFuture<BookIndex> bookIndexCompletableFuture = CompletableFuture.supplyAsync(() -> {
//查询目录
BookIndex bookIndex = bookService.queryBookIndex(bookIndexId);
log.debug("加载小说章节信息线程结束");
return bookIndex;
}, threadPoolExecutor);
//加载小说上一章节信息线程,该线程在加载小说章节信息线程执行完毕后才执行
CompletableFuture<Long> preBookIndexIdCompletableFuture = bookIndexCompletableFuture.thenApplyAsync((bookIndex) -> {
//查询上一章节目录ID
Long preBookIndexId = bookService.queryPreBookIndexId(bookId, bookIndex.getIndexNum());
log.debug("加载小说上一章节信息线程结束");
return preBookIndexId;
}, threadPoolExecutor);
//加载小说下一章节信息线程,该线程在加载小说章节信息线程执行完毕后才执行
CompletableFuture<Long> nextBookIndexIdCompletableFuture = bookIndexCompletableFuture.thenApplyAsync((bookIndex) -> {
//查询下一章目录ID
Long nextBookIndexId = bookService.queryNextBookIndexId(bookId, bookIndex.getIndexNum());
log.debug("加载小说下一章节信息线程结束");
return nextBookIndexId;
}, threadPoolExecutor);
//加载小说内容信息线程
CompletableFuture<BookContent> bookContentCompletableFuture = CompletableFuture.supplyAsync(() -> {
//查询内容
BookContent bookContent = bookService.queryBookContent(bookIndexId);
log.debug("加载小说内容信息线程结束");
return bookContent;
}, threadPoolExecutor);
//判断用户是否需要购买线程,该线程在加载小说章节信息线程执行完毕后才执行
CompletableFuture<Boolean> needBuyCompletableFuture = bookIndexCompletableFuture.thenApplyAsync((bookIndex) -> {
//判断该目录是否收费
if (bookIndex.getIsVip() != null && bookIndex.getIsVip() == 1) {
//收费
UserDetails user = getUserDetails(request);
if (user == null) {
//未登录,需要购买
return true;
}
//判断用户是否购买过该目录
boolean isBuy = userService.queryIsBuyBookIndex(user.getId(), bookIndexId);
if (!isBuy) {
//没有购买过,需要购买
return true;
}
}
//收费,判断用户是否购买过该目录
boolean isBuy = userService.queryIsBuyBookIndex(user.getId(),bookIndexId);
if(!isBuy){
//没有购买过,需要购买
bookContent.setContent(null);
needBuy = true;
}
}
model.addAttribute("needBuy",needBuy);
return ThreadLocalUtil.getTemplateDir()+"book/book_content";
log.debug("判断用户是否需要购买线程结束");
return false;
}, threadPoolExecutor);
model.addAttribute("book", bookCompletableFuture.get());
model.addAttribute("bookIndex", bookIndexCompletableFuture.get());
model.addAttribute("preBookIndexId", preBookIndexIdCompletableFuture.get());
model.addAttribute("nextBookIndexId", nextBookIndexIdCompletableFuture.get());
model.addAttribute("bookContent", bookContentCompletableFuture.get());
model.addAttribute("needBuy", needBuyCompletableFuture.get());
return ThreadLocalUtil.getTemplateDir() + "book/book_content";
}
/**
* 评论页面
* */
*/
@RequestMapping("/book/comment-{bookId}.html")
public String commentList(@PathVariable("bookId") Long bookId, Model model) {
//查询书籍
Book book = bookService.queryBookDetail(bookId);
model.addAttribute("book",book);
model.addAttribute("book", book);
return "book/book_comment";
}
/**
* 新闻内容页面
* */
*/
@RequestMapping("/about/newsInfo-{newsId}.html")
public String newsInfo(@PathVariable("newsId") Long newsId, Model model) {
//查询新闻
News news = newsService.queryNewsInfo(newsId);
model.addAttribute("news",news);
model.addAttribute("news", news);
return "about/news_info";
}
/**
* 作者注册页面
* */
*/
@RequestMapping("author/register.html")
public String authorRegister(Author author, HttpServletRequest request, Model model){
public String authorRegister(Author author, HttpServletRequest request, Model model) {
UserDetails user = getUserDetails(request);
if(user == null){
if (user == null) {
//未登录
return "redirect:/user/login.html?originUrl=/author/register.html";
}
if(StringUtils.isNotBlank(author.getInviteCode())) {
if (StringUtils.isNotBlank(author.getInviteCode())) {
//提交作者注册信息
String errorInfo = authorService.register(user.getId(), author);
if(StringUtils.isBlank(errorInfo)){
if (StringUtils.isBlank(errorInfo)) {
//注册成功
return "redirect:/author/index.html";
}
model.addAttribute("LabErr",errorInfo);
model.addAttribute("author",author);
model.addAttribute("LabErr", errorInfo);
model.addAttribute("author", author);
}
return "author/register";
}

View File

@ -1,6 +1,7 @@
package com.java2nb.novel.service;
import com.java2nb.novel.core.bean.PageBean;
import com.java2nb.novel.entity.Author;
import com.java2nb.novel.entity.AuthorIncome;
import com.java2nb.novel.entity.AuthorIncomeDetail;
@ -111,9 +112,9 @@ public interface AuthorService {
* @param bookId 小说ID
* @param startTime 开始时间
* @param endTime 结束时间
* @return 日收入统计数据列表
* @return 日收入统计数据分页数据
*/
List<AuthorIncomeDetail> listIncomeDailyByPage(int page, int pageSize, Long userId, Long bookId, Date startTime, Date endTime);
PageBean<AuthorIncomeDetail> listIncomeDailyByPage(int page, int pageSize, Long userId, Long bookId, Date startTime, Date endTime);
/**
@ -122,7 +123,7 @@ public interface AuthorService {
* @param pageSize 分页大小
* @param userId 用户ID
* @param bookId 小说ID
* @return
* @return 分页数据
* */
List<AuthorIncome> listIncomeMonthByPage(int page, int pageSize, Long userId, Long bookId);
PageBean<AuthorIncome> listIncomeMonthByPage(int page, int pageSize, Long userId, Long bookId);
}

View File

@ -2,7 +2,8 @@ package com.java2nb.novel.service;
import com.github.pagehelper.PageInfo;
import com.java2nb.novel.search.BookSP;
import com.java2nb.novel.core.bean.PageBean;
import com.java2nb.novel.vo.BookSpVO;
import com.java2nb.novel.vo.BookCommentVO;
import com.java2nb.novel.vo.BookSettingVO;
import com.java2nb.novel.entity.*;
@ -48,7 +49,7 @@ public interface BookService {
* @param pageSize 分页大小
* @return 小说集合分页信息
* */
PageInfo searchByPage(BookSP params, int page, int pageSize);
PageBean searchByPage(BookSpVO params, int page, int pageSize);
/**
* 查询小说分类列表
@ -144,9 +145,9 @@ public interface BookService {
* @param bookId 书籍ID
* @param page 页码
* @param pageSize 分页大小
* @return 评论集合
* @return 评论分页数据
* */
List<BookCommentVO> listCommentByPage(Long userId, Long bookId, int page, int pageSize);
PageBean<BookCommentVO> listCommentByPage(Long userId, Long bookId, int page, int pageSize);
/**
* 新增评价
@ -202,9 +203,9 @@ public interface BookService {
* @param userId 用户ID
* @param page 页码
* @param pageSize 分页大小
* @return 小说集合
* @return 小说分页数据
* */
List<Book> listBookPageByUserId(Long userId, int page, int pageSize);
PageBean<Book> listBookPageByUserId(Long userId, int page, int pageSize);
/**
* 发布小说

View File

@ -1,6 +1,7 @@
package com.java2nb.novel.service;
import com.java2nb.novel.core.bean.PageBean;
import com.java2nb.novel.entity.News;
import com.java2nb.novel.vo.NewsVO;
@ -28,7 +29,7 @@ public interface NewsService {
* 分页查询新闻列表
* @param page 页码
* @param pageSize 分页大小
* @return 新闻集合
* @return 新闻分页数据
* */
List<NewsVO> listByPage(int page, int pageSize);
PageBean<News> listByPage(int page, int pageSize);
}

View File

@ -2,8 +2,11 @@ package com.java2nb.novel.service;
import com.github.pagehelper.PageInfo;
import com.java2nb.novel.core.bean.PageBean;
import com.java2nb.novel.entity.Book;
import com.java2nb.novel.search.BookSP;
import com.java2nb.novel.vo.BookSpVO;
import com.java2nb.novel.vo.BookVO;
import com.java2nb.novel.vo.EsBookVO;
/**
* @author 11797
@ -23,5 +26,5 @@ public interface SearchService {
* @param pageSize 每页大小
* @return 分页信息
*/
PageInfo searchBook(BookSP params, int page, int pageSize);
PageBean<EsBookVO> searchBook(BookSpVO params, int page, int pageSize);
}

View File

@ -1,8 +1,10 @@
package com.java2nb.novel.service;
import com.java2nb.novel.core.bean.PageBean;
import com.java2nb.novel.core.bean.UserDetails;
import com.java2nb.novel.entity.UserBuyRecord;
import com.java2nb.novel.entity.UserFeedback;
import com.java2nb.novel.vo.BookReadHistoryVO;
import com.java2nb.novel.vo.BookShelfVO;
import com.java2nb.novel.entity.User;
@ -58,9 +60,9 @@ public interface UserService {
* @param userId 用户ID
* @param page
* @param pageSize
* @return 书架集合
* @return 书架分页信息
* */
List<BookShelfVO> listBookShelfByPage(Long userId, int page, int pageSize);
PageBean<BookShelfVO> listBookShelfByPage(Long userId, int page, int pageSize);
/**
* 添加阅读记录
@ -82,9 +84,9 @@ public interface UserService {
* @param userId 用户ID
* @param page 页码
* @param pageSize 分页大小
* @return 反馈集合
* @return 反馈分页数据
* */
List<UserFeedbackVO> listUserFeedBackByPage(Long userId, int page, int pageSize);
PageBean<UserFeedback> listUserFeedBackByPage(Long userId, int page, int pageSize);
/**
* 查询个人信息
@ -98,9 +100,9 @@ public interface UserService {
* @param userId 用户id
* @param page 页码
* @param pageSize 分页大小
* @return
* @return 分页数据
* */
List<BookReadHistoryVO> listReadHistoryByPage(Long userId, int page, int pageSize);
PageBean<BookReadHistoryVO> listReadHistoryByPage(Long userId, int page, int pageSize);
/**
* 更新个人信息

View File

@ -1,6 +1,7 @@
package com.java2nb.novel.service.impl;
import com.github.pagehelper.PageHelper;
import com.java2nb.novel.core.bean.PageBean;
import com.java2nb.novel.core.cache.CacheKey;
import com.java2nb.novel.core.cache.CacheService;
import com.java2nb.novel.core.enums.ResponseStatus;
@ -170,9 +171,9 @@ public class AuthorServiceImpl implements AuthorService {
@Override
public List<AuthorIncomeDetail> listIncomeDailyByPage(int page, int pageSize, Long userId, Long bookId, Date startTime, Date endTime) {
public PageBean<AuthorIncomeDetail> listIncomeDailyByPage(int page, int pageSize, Long userId, Long bookId, Date startTime, Date endTime) {
PageHelper.startPage(page, pageSize);
return authorIncomeDetailMapper.selectMany(
return new PageBean<>(authorIncomeDetailMapper.selectMany(
select(AuthorIncomeDetailDynamicSqlSupport.incomeDate, AuthorIncomeDetailDynamicSqlSupport.incomeAccount
, AuthorIncomeDetailDynamicSqlSupport.incomeCount, AuthorIncomeDetailDynamicSqlSupport.incomeNumber)
.from(AuthorIncomeDetailDynamicSqlSupport.authorIncomeDetail)
@ -182,14 +183,14 @@ public class AuthorServiceImpl implements AuthorService {
.and(AuthorIncomeDetailDynamicSqlSupport.incomeDate, isLessThanOrEqualTo(endTime))
.orderBy(AuthorIncomeDetailDynamicSqlSupport.incomeDate.descending())
.build()
.render(RenderingStrategies.MYBATIS3));
.render(RenderingStrategies.MYBATIS3)));
}
@Override
public List<AuthorIncome> listIncomeMonthByPage(int page, int pageSize, Long userId, Long bookId) {
public PageBean<AuthorIncome> listIncomeMonthByPage(int page, int pageSize, Long userId, Long bookId) {
PageHelper.startPage(page, pageSize);
return authorIncomeMapper.selectMany(select(AuthorIncomeDynamicSqlSupport.incomeMonth
return new PageBean<>(authorIncomeMapper.selectMany(select(AuthorIncomeDynamicSqlSupport.incomeMonth
, AuthorIncomeDynamicSqlSupport.preTaxIncome
, AuthorIncomeDynamicSqlSupport.afterTaxIncome
, AuthorIncomeDynamicSqlSupport.payStatus
@ -199,6 +200,6 @@ public class AuthorServiceImpl implements AuthorService {
.and(AuthorIncomeDynamicSqlSupport.bookId, isEqualTo(bookId))
.orderBy(AuthorIncomeDynamicSqlSupport.incomeMonth.descending())
.build()
.render(RenderingStrategies.MYBATIS3));
.render(RenderingStrategies.MYBATIS3)));
}
}

View File

@ -3,16 +3,17 @@ package com.java2nb.novel.service.impl;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.java2nb.novel.core.bean.PageBean;
import com.java2nb.novel.core.cache.CacheKey;
import com.java2nb.novel.core.cache.CacheService;
import com.java2nb.novel.core.config.BookPriceConfig;
import com.java2nb.novel.core.config.BookPriceProperties;
import com.java2nb.novel.core.enums.ResponseStatus;
import com.java2nb.novel.core.exception.BusinessException;
import com.java2nb.novel.core.utils.*;
import com.java2nb.novel.entity.*;
import com.java2nb.novel.entity.Book;
import com.java2nb.novel.mapper.*;
import com.java2nb.novel.search.BookSP;
import com.java2nb.novel.vo.BookSpVO;
import com.java2nb.novel.service.AuthorService;
import com.java2nb.novel.service.BookService;
import com.java2nb.novel.service.FileService;
@ -89,7 +90,7 @@ public class BookServiceImpl implements BookService {
private final FileService fileService;
private final BookPriceConfig bookPriceConfig;
private final BookPriceProperties bookPriceConfig;
@SneakyThrows
@ -186,7 +187,7 @@ public class BookServiceImpl implements BookService {
}
@Override
public PageInfo searchByPage(BookSP params, int page, int pageSize) {
public PageBean searchByPage(BookSpVO params, int page, int pageSize) {
if (params.getUpdatePeriod() != null) {
@ -213,7 +214,7 @@ public class BookServiceImpl implements BookService {
if (StringUtils.isNotBlank(params.getSort())) {
OrderByHelper.orderBy(params.getSort() + " desc");
}
return new PageInfo<>(bookMapper.searchByPage(params));
return new PageBean(bookMapper.searchByPage(params));
}
@ -382,10 +383,10 @@ public class BookServiceImpl implements BookService {
}
@Override
public List<BookCommentVO> listCommentByPage(Long userId, Long bookId, int page, int pageSize) {
public PageBean<BookCommentVO> listCommentByPage(Long userId, Long bookId, int page, int pageSize) {
PageHelper.startPage(page, pageSize);
OrderByHelper.orderBy("t1.create_time desc");
return bookCommentMapper.listCommentByPage(userId, bookId);
return new PageBean<>(bookCommentMapper.listCommentByPage(userId, bookId));
}
@Transactional(rollbackFor = Exception.class)
@ -491,7 +492,7 @@ public class BookServiceImpl implements BookService {
}
@Override
public List<Book> listBookPageByUserId(Long userId, int page, int pageSize) {
public PageBean<Book> listBookPageByUserId(Long userId, int page, int pageSize) {
PageHelper.startPage(page, pageSize);
@ -501,7 +502,7 @@ public class BookServiceImpl implements BookService {
.orderBy(BookDynamicSqlSupport.createTime.descending())
.build()
.render(RenderingStrategies.MYBATIS3);
return bookMapper.selectMany(selectStatement);
return new PageBean<>(bookMapper.selectMany(selectStatement));
}
@ -600,6 +601,7 @@ public class BookServiceImpl implements BookService {
return bookMapper.selectMany(select(book.allColumns())
.from(book)
.where(updateTime, isGreaterThan(startDate))
.and(lastIndexId,isNotNull())
.orderBy(updateTime)
.limit(limit)
.build()

View File

@ -1,6 +1,7 @@
package com.java2nb.novel.service.impl;
import com.github.pagehelper.PageHelper;
import com.java2nb.novel.core.bean.PageBean;
import com.java2nb.novel.core.utils.BeanUtil;
import com.java2nb.novel.service.NewsService;
import com.java2nb.novel.core.cache.CacheKey;
@ -35,7 +36,7 @@ public class NewsServiceImpl implements NewsService {
public List<News> listIndexNews() {
List<News> result = (List<News>) cacheService.getObject(CacheKey.INDEX_NEWS_KEY);
if(result == null || result.size() == 0) {
SelectStatementProvider selectStatement = select(id, catName, catId, title)
SelectStatementProvider selectStatement = select(id, catName, catId, title,createTime)
.from(news)
.orderBy(createTime.descending())
.limit(2)
@ -59,14 +60,16 @@ public class NewsServiceImpl implements NewsService {
}
@Override
public List<NewsVO> listByPage(int page, int pageSize) {
public PageBean<News> listByPage(int page, int pageSize) {
PageHelper.startPage(page,pageSize);
SelectStatementProvider selectStatement = select(id, catName, catId, title,createTime)
.from(news)
.orderBy(createTime.descending())
.build()
.render(RenderingStrategies.MYBATIS3);
return BeanUtil.copyList(newsMapper.selectMany(selectStatement),NewsVO.class);
List<News> news = newsMapper.selectMany(selectStatement);
PageBean<News> pageBean = new PageBean<>(news);
pageBean.setList(BeanUtil.copyList(news,NewsVO.class));
return pageBean;
}
}

View File

@ -3,19 +3,29 @@ package com.java2nb.novel.service.impl;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.pagehelper.PageInfo;
import com.java2nb.novel.core.bean.PageBean;
import com.java2nb.novel.core.enums.ResponseStatus;
import com.java2nb.novel.core.exception.BusinessException;
import com.java2nb.novel.core.utils.StringUtil;
import com.java2nb.novel.entity.Book;
import com.java2nb.novel.search.BookSP;
import com.java2nb.novel.vo.BookSpVO;
import com.java2nb.novel.service.SearchService;
import com.java2nb.novel.vo.BookVO;
import com.java2nb.novel.vo.EsBookVO;
import io.searchbox.client.JestClient;
import io.searchbox.core.*;
import io.searchbox.core.Count;
import io.searchbox.core.CountResult;
import io.searchbox.core.Search;
import io.searchbox.core.SearchResult;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.builder.SearchSourceBuilder;
@ -37,12 +47,12 @@ import java.util.Map;
@Slf4j
public class SearchServiceImpl implements SearchService {
private final String INDEX = "novel";
private final String TYPE = "book";
private final JestClient jestClient;
private final RestHighLevelClient restHighLevelClient;
private final String INDEX = "novel";
@Override
@SneakyThrows
@ -51,16 +61,19 @@ public class SearchServiceImpl implements SearchService {
EsBookVO esBookVO = new EsBookVO();
BeanUtils.copyProperties(book, esBookVO, "lastIndexUpdateTime");
esBookVO.setLastIndexUpdateTime(new SimpleDateFormat("yyyy/MM/dd HH:mm").format(book.getLastIndexUpdateTime()));
Index action = new Index.Builder(esBookVO).index(INDEX).type(TYPE).id(book.getId().toString()).build();
jestClient.execute(action);
IndexRequest request = new IndexRequest(INDEX);
request.id(book.getId()+"");
request.source(new ObjectMapper().writeValueAsString(esBookVO), XContentType.JSON);
IndexResponse index = restHighLevelClient.index(request, RequestOptions.DEFAULT);
log.debug(index.getResult().toString());
}
@SneakyThrows
@Override
public PageInfo searchBook(BookSP params, int page, int pageSize) {
public PageBean<EsBookVO> searchBook(BookSpVO params, int page, int pageSize) {
List<EsBookVO> bookList = new ArrayList<>(0);
//使用搜索引擎搜索
@ -102,7 +115,7 @@ public class SearchServiceImpl implements SearchService {
searchSourceBuilder.query(boolQueryBuilder);
Count count = new Count.Builder().addIndex(INDEX).addType(TYPE)
Count count = new Count.Builder().addIndex(INDEX)
.query(searchSourceBuilder.toString()).build();
CountResult results = jestClient.execute(count);
Double total = results.getCount();
@ -130,7 +143,7 @@ public class SearchServiceImpl implements SearchService {
searchSourceBuilder.size(pageSize);
// 构建Search对象
Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(INDEX).addType(TYPE).build();
Search search = new Search.Builder(searchSourceBuilder.toString()).addIndex(INDEX).build();
log.debug(search.toString());
SearchResult result;
result = jestClient.execute(search);
@ -188,11 +201,7 @@ public class SearchServiceImpl implements SearchService {
}
}
PageInfo<EsBookVO> pageInfo = new PageInfo<>(bookList);
pageInfo.setTotal(total.longValue());
pageInfo.setPageNum(page);
pageInfo.setPageSize(pageSize);
return pageInfo;
return new PageBean<>(page,pageSize,total.longValue(),bookList);
}
throw new BusinessException(ResponseStatus.ES_SEARCH_FAIL);
}

View File

@ -1,6 +1,7 @@
package com.java2nb.novel.service.impl;
import com.github.pagehelper.PageHelper;
import com.java2nb.novel.core.bean.PageBean;
import com.java2nb.novel.core.bean.UserDetails;
import com.java2nb.novel.core.utils.BeanUtil;
import com.java2nb.novel.entity.*;
@ -147,9 +148,9 @@ public class UserServiceImpl implements UserService {
}
@Override
public List<BookShelfVO> listBookShelfByPage(Long userId, int page, int pageSize) {
public PageBean<BookShelfVO> listBookShelfByPage(Long userId, int page, int pageSize) {
PageHelper.startPage(page, pageSize);
return userBookshelfMapper.listBookShelf(userId);
return new PageBean<>(userBookshelfMapper.listBookShelf(userId));
}
@Transactional(rollbackFor = Exception.class)
@ -201,7 +202,7 @@ public class UserServiceImpl implements UserService {
}
@Override
public List<UserFeedbackVO> listUserFeedBackByPage(Long userId, int page, int pageSize) {
public PageBean<UserFeedback> listUserFeedBackByPage(Long userId, int page, int pageSize) {
PageHelper.startPage(page, pageSize);
SelectStatementProvider selectStatement = select(UserFeedbackDynamicSqlSupport.content, UserFeedbackDynamicSqlSupport.createTime)
.from(userFeedback)
@ -209,7 +210,10 @@ public class UserServiceImpl implements UserService {
.orderBy(UserFeedbackDynamicSqlSupport.id.descending())
.build()
.render(RenderingStrategies.MYBATIS3);
return BeanUtil.copyList(userFeedbackMapper.selectMany(selectStatement),UserFeedbackVO.class);
List<UserFeedback> userFeedbacks = userFeedbackMapper.selectMany(selectStatement);
PageBean<UserFeedback> pageBean = new PageBean<>(userFeedbacks);
pageBean.setList(BeanUtil.copyList(userFeedbacks,UserFeedbackVO.class));
return pageBean;
}
@Override
@ -223,9 +227,9 @@ public class UserServiceImpl implements UserService {
}
@Override
public List<BookReadHistoryVO> listReadHistoryByPage(Long userId, int page, int pageSize) {
public PageBean<BookReadHistoryVO> listReadHistoryByPage(Long userId, int page, int pageSize) {
PageHelper.startPage(page, pageSize);
return userReadHistoryMapper.listReadHistory(userId);
return new PageBean<>(userReadHistoryMapper.listReadHistory(userId));
}
@Override

View File

@ -21,6 +21,12 @@ public class BookSettingVO extends BookSetting implements Serializable {
private Float score;
private Integer catId;
private String catName;
private Byte bookStatus;
@Override
public String toString() {

View File

@ -1,4 +1,4 @@
package com.java2nb.novel.search;
package com.java2nb.novel.vo;
import lombok.Data;
@ -9,7 +9,7 @@ import java.util.Date;
* @author 11797
*/
@Data
public class BookSP {
public class BookSpVO {
private String keyword;

View File

@ -1,13 +1,7 @@
package com.java2nb.novel.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.java2nb.novel.entity.Book;
import lombok.Data;
import javax.annotation.Generated;
import java.io.Serializable;
import java.util.Date;
/**
* @author Administrator
*/

View File

@ -1,3 +1,24 @@
spring:
profiles:
include: [common-dev]
profiles:
include: [common-dev]
pic:
save:
type: 1 #图片保存方式, 1不保存使用爬取的网络图片 2保存在自己的存储介质
storage: local #存储介质local本地OSS阿里云对象存储fastDfs分布式文件系统
path: /Users/xiongxiaoyang/java #图片保存路径
#线程池配置
thread:
pool:
#核心线程池数量
core-pool-size: 10
#最大线程池数量
maximum-pool-size: 20
#线程超时时间
keep-alive-time: 10
#队列大小
queue-size: 100

View File

@ -0,0 +1,37 @@
spring:
profiles:
include: [common-prod]
#静态文件路径配置
resources:
static-locations: file:${user.dir}/templates/${templates.name}/static/
#thymeleaf模版路径配置
thymeleaf:
prefix: file:${user.dir}/templates/${templates.name}/html/
suffix: .html
#模版配置
templates:
name: orange
pic:
save:
type: 2 #图片保存方式, 1不保存使用爬取的网络图片 2保存在自己的存储介质
storage: local #存储介质local本地OSS阿里云对象存储fastDfs分布式文件系统
path: /var/pic #图片保存路径
#线程池配置
thread:
pool:
#核心线程池数量
core-pool-size: 10
#最大线程池数量
maximum-pool-size: 20
#线程超时时间
keep-alive-time: 10
#队列大小
queue-size: 1000

View File

@ -1,3 +0,0 @@
spring:
profiles:
include: [common-test]

View File

@ -0,0 +1,12 @@
#网站配置
website:
#网站名
name: 小说精品屋
#域名
domain: xiongxyang.gitee.io
#SEO关键词
keyword: ${website.name},小说,小说CMS,原创文学系统,开源小说系统,免费小说建站程序
#SEO描述
description: ${website.name}是一个多端PCWAP阅读功能完善的原创文学CMS系统由前台门户系统作家后台管理系统平台后台管理系统爬虫管理系统等多个子系统构成支持会员充值订阅模式新闻发布和实时统计报表等功能新书自动入库老书自动更新
#联系QQ
qq: 1179705413

View File

@ -4,7 +4,7 @@ server:
spring:
profiles:
active: dev
include: alipay,oss,fastdfs
include: website,alipay,oss,fastdfs
rabbitmq:
@ -23,15 +23,9 @@ spring:
#是否开启搜索引擎1开启0不开启
enable: 0
jest:
uris: http://127.0.0.1:9200
uris: http://192.168.0.105:9200
#thymeleaf模版路径配置
thymeleaf:
prefix: file:${user.dir}/templates/${templates.name}/html/
suffix: .html
#静态文件路径配置
resources:
static-locations: file:${user.dir}/templates/${templates.name}/static/
redisson:
singleServerConfig:
@ -76,9 +70,7 @@ book:
#模版配置
templates:
name: orange

View File

@ -1,5 +0,0 @@
#网站配置
#网站名
website.name=小说精品屋
#PC站网站域名
website.domain=www.java2nb.com

View File

@ -3,7 +3,7 @@
<mapper namespace="com.java2nb.novel.mapper.FrontBookMapper">
<select id="searchByPage" parameterType="com.java2nb.novel.search.BookSP" resultType="com.java2nb.novel.vo.BookVO">
<select id="searchByPage" parameterType="com.java2nb.novel.vo.BookSpVO" resultType="com.java2nb.novel.vo.BookVO">
select
id,cat_id,cat_name,book_name,author_id,author_name,word_count,last_index_id,last_index_name,score,pic_url,book_status,last_index_update_time,book_desc
from book where word_count > 0

View File

@ -4,7 +4,7 @@
<mapper namespace="com.java2nb.novel.mapper.FrontBookSettingMapper">
<select id="listVO" resultType="com.java2nb.novel.vo.BookSettingVO">
select t1.book_id,t1.type,t1.sort,t2.book_name,t2.author_name,t2.pic_url,t2.book_desc,t2.score
select t1.book_id,t1.type,t1.sort,t2.book_name,t2.author_name,t2.pic_url,t2.book_desc,t2.score,t2.cat_id,t2.cat_name,t2.book_status
from book_setting t1 inner join book t2
on t1.book_id = t2.id
order by t1.sort

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 150 KiB

View File

@ -3,9 +3,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'联系我们_'+#{website.name}"></title>
<title th:text="'联系我们_'+${application.website.name}"></title>
<meta name="keywords" content="联系我们,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学" />
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
<meta name="description" th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'小说!'" />
<link rel="stylesheet" href="/css/about.css"/>
</head>
<body class="body">
@ -30,8 +30,8 @@
<div class="aboutBox">
<h2>联系我们</h2>
<div class="about_info">
<A href="tencent://message/?uin=1179705413&amp;Site=作家申请,商务合作&amp;Menu=yes">
<img style="border:0px;" src=http://wpa.qq.com/pa?p=1:1179705413:6></a>
<A th:href="'tencent://message/?uin='+${application.website.qq}+'&amp;Site=作家申请,商务合作&amp;Menu=yes'">
<img style="border:0px;" th:src="'http://wpa.qq.com/pa?p=1:'+${application.website.qq}+':6'"></a>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>

View File

@ -3,9 +3,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'版权声明_'+#{website.name}"></title>
<title th:text="'版权声明_'+${application.website.name}"></title>
<meta name="keywords" content="版权声明,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学" />
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
<meta name="description" th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'小说!'" />
<link rel="stylesheet" href="/css/about.css"/>
</head>
<body class="body">

View File

@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'关于我们_'+#{website.name}"></title>
<title th:text="'关于我们_'+${application.website.name}"></title>
<meta name="keywords" content="关于我们,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学" />
<meta name="description" th:content="#{website.name}+'每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
<meta name="description" th:content="${application.website.name}+'每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'小说!'" />
<link rel="stylesheet" href="/css/about.css"/>
</head>
<body class="body">
@ -27,7 +27,7 @@
<div class="aboutBox">
<h2>关于我们</h2>
<div class="about_info">
<p th:text="#{website.name}+'创建于2019年是集创作阅读作品加工IP运营为一体的中文小说阅读综合平台'"></p>
<p th:text="${application.website.name}+'创建于2019年是集创作阅读作品加工IP运营为一体的中文小说阅读综合平台'"></p>
<p></p>
</div>
</div>

View File

@ -2,10 +2,10 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'新闻公共_'+#{website.name}"></title>
<title th:text="'新闻公共_'+${application.website.name}"></title>
<meta name="keywords" content="新闻公告,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学"/>
<meta name="description"
th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'"/>
th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'小说!'"/>
<link rel="stylesheet" href="/css/about.css"/>
</head>
<body class="body">

View File

@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'新闻公告_'+#{website.name}"></title>
<title th:text="'新闻公告_'+${application.website.name}"></title>
<meta name="keywords" content="新闻公告,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学"/>
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
<meta name="description" th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'小说!'" />
<link rel="stylesheet" href="/css/about.css" />
</head>
<body class="body">

View File

@ -3,9 +3,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'投稿说明_'+#{website.name}"></title>
<title th:text="'投稿说明_'+${application.website.name}"></title>
<meta name="keywords" content="投稿说明,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学" />
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
<meta name="description" th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'小说!'" />
<link rel="stylesheet" href="/css/about.css"/>
</head>
<body class="body">

View File

@ -3,9 +3,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'用户协议_'+#{website.name}"></title>
<title th:text="'用户协议_'+${application.website.name}"></title>
<meta name="keywords" content="用户协议,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学" />
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
<meta name="description" th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'小说!'" />
<link rel="stylesheet" href="/css/about.css"/>
</head>
<body class="body">

View File

@ -3,9 +3,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="${book.bookName}+'作品评论区_'+#{website.name}"></title>
<title th:text="${book.bookName}+'作品评论区_'+${application.website.name}"></title>
<meta name="keywords" th:content="${book.bookName}+'官方首发,'+${book.bookName}+'小说,'+${book.bookName}+'最新章节,'+${book.bookName}+'txt下载,'+${book.bookName}+'无弹窗,'+${book.bookName}+'吧,'+${book.bookName}+'离线完本'" />
<meta name="description" th:content="${book.bookName}+','+${book.bookName}+'小说阅读,'+#{website.name}+'提供'+${book.bookName}+'首发最新章节及txt下载,'+${book.bookName}+'最新更新章节,精彩尽在'+#{website.name}+'。'" />
<meta name="description" th:content="${book.bookName}+','+${book.bookName}+'小说阅读,'+${application.website.name}+'提供'+${book.bookName}+'首发最新章节及txt下载,'+${book.bookName}+'最新更新章节,精彩尽在'+${application.website.name}+'。'" />
<link href="/css/main.css" rel="stylesheet" />
<link href="/css/book.css" rel="stylesheet" />
</head>

View File

@ -2,9 +2,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:utext="${book.bookName}+'_'+${bookIndex.indexName}+'_'+#{website.name}"></title>
<title th:utext="${book.bookName}+'_'+${bookIndex.indexName}+'_'+${application.website.name}"></title>
<meta name="keywords" th:content="${book.bookName}+'官方首发,'+${book.bookName}+'小说,'+${book.bookName}+'最新章节,'+${book.bookName}+'txt下载,'+${book.bookName}+'无弹窗,'+${book.bookName}+'吧,'+${book.bookName}+'离线完本'" />
<meta name="description" th:content="${book.bookName}+','+${book.bookName}+'小说阅读,'+#{website.name}+'提供'+${book.bookName}+'首发最新章节及txt下载,'+${book.bookName}+'最新更新章节,精彩尽在'+#{website.name}+'。'" />
<meta name="description" th:content="${book.bookName}+','+${book.bookName}+'小说阅读,'+${application.website.name}+'提供'+${book.bookName}+'首发最新章节及txt下载,'+${book.bookName}+'最新更新章节,精彩尽在'+${application.website.name}+'。'" />
<link rel="stylesheet" href="/css/read.css" />
<link href="/css/book.css" rel="stylesheet" />
@ -348,6 +348,7 @@
} else if(data.code == 1001){
//未登录
location.href = '/user/login.html?originUrl='+decodeURIComponent(location.href);
}else {
layer.alert(data.msg);

View File

@ -2,11 +2,11 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:utext="${book.bookName}+'_'+${book.authorName}+'_'+${book.bookName}+'txt下载'+'_'+${book.bookName}+'无弹窗_'+#{website.name}"></title>
<title th:utext="${book.bookName}+'_'+${book.authorName}+'_'+${book.bookName}+'txt下载'+'_'+${book.bookName}+'无弹窗_'+${application.website.name}"></title>
<meta name="keywords"
th:content="${book.bookName}+'官方首发,'+${book.bookName}+'小说,'+${book.bookName}+'最新章节'+${book.bookName}+'txt下载,'+${book.bookName}+'无弹窗,'+${book.bookName}+'吧,'+${book.bookName}+'离线完本'"/>
<meta name="description"
th:content="${book.bookName}+','+${book.bookName}+'小说阅读,'+${book.bookName}+'由作家'+${book.authorName}+'创作,'+#{website.name}+'提供'+${book.bookName}+'首发最新章节及txt下载,'+${book.bookName}+'最新更新章节,精彩尽在'+#{website.name}+'。'"/>
th:content="${book.bookName}+','+${book.bookName}+'小说阅读,'+${book.bookName}+'由作家'+${book.authorName}+'创作,'+${application.website.name}+'提供'+${book.bookName}+'首发最新章节及txt下载,'+${book.bookName}+'最新更新章节,精彩尽在'+${application.website.name}+'。'"/>
<link rel="stylesheet" href="/css/main.css"/>
<link href="/css/book.css?v=2019" rel="stylesheet"/>
</head>
@ -22,7 +22,7 @@
<div class="main box_center cf mb50">
<div class="nav_sub">
<a href="/" th:text="#{website.name}"></a>&gt;<a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>&gt;<a
<a href="/" th:text="${application.website.name}"></a>&gt;<a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>&gt;<a
th:href="'/book/'+${book.id}+'.html'" th:utext="${book.bookName}"></a>
</div>
<div class="channelWrap channelBookInfo cf">

View File

@ -2,10 +2,10 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:utext="${book.bookName}+'目录,'+${book.bookName}+'最新章节列表_'+#{website.name}"></title>
<title th:utext="${book.bookName}+'目录,'+${book.bookName}+'最新章节列表_'+${application.website.name}"></title>
<meta name="keywords" th:content="${book.bookName}+','+${book.bookName}+'目录,'+${book.bookName}+'最新章节列表'"/>
<meta name="description"
th:content="#{website.name}+'小说为您提供'+${book.bookName}+'目录,'+${book.bookName}+'最新章节列表,'+${book.bookName}+'全文阅读,'+${book.bookName}+'免费阅读,'+${book.bookName}+'下载'"/>
th:content="${application.website.name}+'小说为您提供'+${book.bookName}+'目录,'+${book.bookName}+'最新章节列表,'+${book.bookName}+'全文阅读,'+${book.bookName}+'免费阅读,'+${book.bookName}+'下载'"/>
<link rel="stylesheet" href="/css/main.css"/>
<link rel="stylesheet" href="/css/book.css"/>
</head>
@ -16,7 +16,7 @@
<div class="main box_center cf">
<div class="nav_sub">
<a href="/" th:text="#{website.name}"></a>&gt;<a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>&gt;<a
<a href="/" th:text="${application.website.name}"></a>&gt;<a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>&gt;<a
th:href="'/book/'+${book.id}+'.html'" th:utext="${book.bookName}"></a>&gt;<a
th:href="'/book/indexList-'+${book.id}+'.html'">作品目录</a>
</div>

View File

@ -3,9 +3,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'小说排行榜_'+#{website.name}"></title>
<title th:text="'小说排行榜_'+${application.website.name}"></title>
<meta name="keywords" content="小说排行榜,热门小说榜,小说排行榜完结版,完结小说排行榜,完本小说排行榜,最新小说排行榜,网络小说排行榜,排行榜,点击榜,新书榜,推荐榜" />
<meta name="description" th:content="'最新热门网络小说排行榜,包含各类热门小说榜,小说排行榜上都是受用户喜爱的小说作品,精彩尽在'+#{website.name}+'。'" />
<meta name="description" th:content="'最新热门网络小说排行榜,包含各类热门小说榜,小说排行榜上都是受用户喜爱的小说作品,精彩尽在'+${application.website.name}+'。'" />
<link rel="stylesheet" href="/css/main.css" />
<link rel="stylesheet" href="/css/book.css" />
</head>

View File

@ -2,10 +2,10 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'全部作品_'+#{website.name}"></title>
<meta name="keywords" th:content="#{website.name}+',小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学'"/>
<title th:text="'全部作品_'+${application.website.name}"></title>
<meta name="keywords" th:content="${application.website.name}+',小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学'"/>
<meta name="description"
th:content="#{website.name}+'每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'。'"/>
th:content="${application.website.name}+'每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'。'"/>
<link href="favicon.ico" type="image/x-icon" rel="shortcut icon"/>
<link href="favicon.ico" type="image/x-icon" rel="Bookmark"/>
<link rel="stylesheet" href="/css/main.css"/>

View File

@ -3,7 +3,7 @@
<div class="copyright">
<ul >
<li class="menu"><a href="/?to=mobile">手机站</a><i class="line">|</i><a href="/">网站首页</a><i class="line">|</i><a href="/about/default.html" >关于我们</a><i class="line">|</i><a href="/about/contact.html" >联系我们</a><i class="line">|</i><a href="/user/feedback.html" >反馈留言</a><i class="line">|</i><a href="/author/index.html" >作家专区</a><i class="line">|</i><a href="/mobile/fiction_house.apk" >客户端</a></li>
<li th:text="'Copyright (C) '+#{website.domain}+' All rights reserved&nbsp;&nbsp;'+#{website.name}+'版权所有'"></li>
<li th:text="'Copyright (C) '+${application.website.domain}+' All rights reserved&nbsp;&nbsp;'+${application.website.name}+'版权所有'"></li>
</ul>
</div>

View File

@ -2,7 +2,7 @@
<div class="topBar" style="display: none">
<div class="box_center cf">
<div class="top_l">
<a href="/" class="on" th:text="#{website.name}"></a><i class="line">|</i><a
<a href="/" class="on" th:text="${application.website.name}"></a><i class="line">|</i><a
href="/?m=2">手机女生版</a><i class="line">|</i><a
href="/?m=1">手机男生版</a><i class="line">|</i><a
href="/">客户端下载</a>
@ -21,7 +21,7 @@
</div>
<div class="topMain">
<div class="box_center cf">
<a href="/?m=2" class="logo fl"><img src="/images/logo.png" th:alt="#{website.name}"/></a>
<a href="/?m=2" class="logo fl"><img src="/images/logo.png" th:alt="${application.website.name}"/></a>
<div class="searchBar fl">
<div class="search cf">
<input type="text" placeholder="书名作者关键字" class="s_int" name="searchKey" id="searchKey"/>

View File

@ -3,10 +3,10 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="#{website.name}+'_原创小说网站'"></title>
<meta name="keywords" th:content="#{website.name}+',小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学'"/>
<title th:text="${application.website.name}+'_原创小说网站'"></title>
<meta name="keywords" th:content="${application.website.keyword}"/>
<meta name="description"
th:content="#{website.name}+'每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'。'"/>
th:content="${application.website.description}"/>
<link href="favicon.ico" type="image/x-icon" rel="shortcut icon"/>
<link href="favicon.ico" type="image/x-icon" rel="Bookmark"/>
<link rel="stylesheet" href="/css/main.css"/>

View File

@ -204,9 +204,9 @@
</p>
<div class="indexDiv" style="height: 42px;line-height: 42px;text-align:center;background: #f2f2f2">
<a style="color: #333" th:href="${preBookIndexId!=0?'/book/'+book.id+'/'+preBookIndexId+'.html':'#'}">上一章</a>
<a style="color: #333" th:href="'javascript:enterPreIndexPage(\''+${book.id}+'\',\''+${preBookIndexId}+'\');'">上一章</a>
<a style="color: #333" th:href="'/book/indexList-'+${book.id}+'.html'">目录</a>
<a style="color: #333" th:href="${nextBookIndexId!=0?'/book/'+book.id+'/'+nextBookIndexId+'.html':'#'}">下一章</a>
<a style="color: #333" th:href="'javascript:enterNextIndexPage(\''+${book.id}+'\',\''+${nextBookIndexId}+'\');'">下一章</a>
</div>
<!--<div id="screenInput" class="screen_toolbar" style="display: none">
<div style="height: 5px" class="layui-col-xs2 layui-col-sm3 layui-col-md3 layui-col-lg3"></div>
@ -244,9 +244,9 @@
</div>
<div class="indexDiv" style="height: 42px;line-height: 42px;text-align:center;background: #f2f2f2">
<a style="color: #333" th:href="${preBookIndexId!=0?'/book/'+book.id+'/'+preBookIndexId+'.html':'#'}">上一章</a>
<a style="color: #333" th:href="'javascript:enterPreIndexPage(\''+${book.id}+'\',\''+${preBookIndexId}+'\');'">上一章</a>
<a style="color: #333" th:href="'/book/indexList-'+${book.id}+'.html'">目录</a>
<a style="color: #333" th:href="${nextBookIndexId!=0?'/book/'+book.id+'/'+nextBookIndexId+'.html':'#'}">下一章</a>
<a style="color: #333" th:href="'javascript:enterNextIndexPage(\''+${book.id}+'\',\''+${nextBookIndexId}+'\');'">下一章</a>
</div>
@ -341,6 +341,8 @@
} else if(data.code == 1001){
//未登录
location.href = '/user/login.html?originUrl='+decodeURIComponent(location.href);
}else {
layer.alert(data.msg);
@ -357,6 +359,24 @@
$.post("/book/addVisitCount", {"bookId": $("#bookIdHidden").val()}, function () {
});
function enterPreIndexPage(bookId,bookIndexId){
if(bookIndexId != 0){
window.location.href = '/book/'+bookId+'/'+bookIndexId+".html";
}else{
window.location.href = '/book/indexList-' + bookId + '.html';
}
}
function enterNextIndexPage(bookId,bookIndexId){
if(bookIndexId != 0){
window.location.href = '/book/'+bookId+'/'+bookIndexId+".html";
}else{
window.location.href = '/book/indexList-' + bookId + '.html';
}
}
</script>

View File

@ -5,13 +5,13 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title th:text="#{website.name}+'列表'"></title>
<title th:text="${application.website.name}+'列表'"></title>
<meta name="keywords"
th:content="#{website.name}+',精品小说,弹幕网站,弹幕,弹幕小说网站,免费小说,小说阅读,小说排行,轻小说,txt小说下载,电子书下载,动漫轻小说,日本轻小说'">
th:content="${application.website.name}+',精品小说,弹幕网站,弹幕,弹幕小说网站,免费小说,小说阅读,小说排行,轻小说,txt小说下载,电子书下载,动漫轻小说,日本轻小说'">
<meta name="description"
th:content="#{website.name}+'是国内优秀的小说弹幕网站,'+#{website.name}+'提供海量热门网络小说,日本轻小说,国产轻小说,动漫小说,轻小说在线阅读和TXT小说下载,致力于网络精品小说的收集,智能计算小说评分,打造小说精品排行榜,致力于无广告无弹窗的小说阅读环境。'">
th:content="${application.website.name}+'是国内优秀的小说弹幕网站,'+${application.website.name}+'提供海量热门网络小说,日本轻小说,国产轻小说,动漫小说,轻小说在线阅读和TXT小说下载,致力于网络精品小说的收集,智能计算小说评分,打造小说精品排行榜,致力于无广告无弹窗的小说阅读环境。'">
<div th:include="mobile/common/css :: css"></div>

View File

@ -6,17 +6,11 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title th:text="#{website.name}"></title>
<meta name="keywords" th:content="#{website.name}+',精品小说,弹幕网站,弹幕,弹幕小说网站,免费小说,小说阅读,小说排行,轻小说,txt小说下载,电子书下载,动漫轻小说,日本轻小说'">
<title th:text="${application.website.name}"></title>
<meta name="keywords" th:content="${application.website.keyword}"/>
<meta name="description"
th:content="#{website.name}+'是国内优秀的小说弹幕网站,'+#{website.name}+'提供海量热门网络小说,日本轻小说,国产轻小说,动漫小说,轻小说在线阅读和TXT小说下载,致力于网络精品小说的收集,智能计算小说评分,打造小说精品排行榜,致力于无广告无弹窗的小说阅读环境。'">
<meta property="og:type" content="novel_index"/>
<meta property="og:title" th:content="#{website.name}"/>
<meta property="og:description"
th:content="#{website.name}+'是国内优秀的小说弹幕网站,'+#{website.name}+'提供海量热门网络小说,日本轻小说,国产轻小说,动漫小说,轻小说在线阅读和TXT小说下载,致力于网络精品小说的收集,智能计算小说评分,打造小说精品排行榜,致力于无广告无弹窗的小说阅读环境。'"/>
th:content="${application.website.description}"/>
<div th:include="mobile/common/css :: css"></div>

View File

@ -3,7 +3,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'充值_'+#{website.name}"></title>
<title th:text="'充值_'+${application.website.name}"></title>
<link rel="stylesheet" href="/css/base.css"/>
<link rel="stylesheet" href="/css/main.css"/>
</head>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'我的书评_'+#{website.name}"></title>
<title th:text="'我的书评_'+${application.website.name}"></title>
<link rel="stylesheet" href="/css/user.css"/>
</head>
<body class="">

View File

@ -2,9 +2,9 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'我的书架_'+#{website.name}"></title>
<meta name="keywords" th:content="'我的书架,个人中心,'+#{website.name}+'小说,'+#{website.name}" />
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
<title th:text="'我的书架_'+${application.website.name}"></title>
<meta name="keywords" th:content="'我的书架,个人中心,'+${application.website.name}+'小说,'+${application.website.name}" />
<meta name="description" th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'小说!'" />
<link rel="stylesheet" href="/css/user.css" />
</head>
</head>

View File

@ -2,7 +2,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'反馈留言_'+#{website.name}"></title>
<title th:text="'反馈留言_'+${application.website.name}"></title>
<link rel="stylesheet" href="/css/user.css"/>
</head>
<body class="">

View File

@ -3,7 +3,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'我的反馈_'+#{website.name}"></title>
<title th:text="'我的反馈_'+${application.website.name}"></title>
<link rel="stylesheet" href="/css/user.css"/>
</head>
<body class="">

View File

@ -3,9 +3,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'会员登录_'+#{website.name}"></title>
<meta name="keywords" th:content="'会员登录,个人中心,'+#{website.name}+'小说,'+#{website.name}" />
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
<title th:text="'会员登录_'+${application.website.name}"></title>
<meta name="keywords" th:content="'会员登录,个人中心,'+${application.website.name}+'小说,'+${application.website.name}" />
<meta name="description" th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'小说!'" />
<link rel="stylesheet" href="/css/user.css" />
</head>
<body class="">
@ -26,7 +26,7 @@
<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="C93BE1AE" />
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEdAAXkRxK+hbBn9D6bVAXo8t/4qKSXUE1UN51mNFrIuw38c3Y2+Mc6SrnAqio3oCKbxYainihG6d/Xh3PZm3b5AoMQ2xnvcKe7Apj/DdmzfeCXoTjAjITeRewsBR3AmjdQ75+yP5bUUcdUUiZlMKONJDef" />
</div>
<h3 th:text="'登陆'+#{website.name}"></h3>
<h3 th:text="'登陆'+${application.website.name}"></h3>
<ul class="log_list">
<li><span id="LabErr"></span></li>
<li><input name="txtUName" type="text" id="txtUName" placeholder="手机号码" class="s_input icon_name" /></li>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'最近阅读_'+#{website.name}"></title>
<title th:text="'最近阅读_'+${application.website.name}"></title>
<link rel="stylesheet" href="/css/user.css"/>
</head>
<body class="">

View File

@ -2,10 +2,10 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'会员注册_'+#{website.name}"></title>
<meta name="keywords" th:content="'会员注册,个人中心,'+#{website.name}+'小说,'+#{website.name}"/>
<title th:text="'会员注册_'+${application.website.name}"></title>
<meta name="keywords" th:content="'会员注册,个人中心,'+${application.website.name}+'小说,'+${application.website.name}"/>
<meta name="description"
th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'"/>
th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'小说!'"/>
<link rel="stylesheet" href="/css/user.css" />
</head>
<body class="">
@ -28,7 +28,7 @@
value="/wEdAAVece19BIZ9HiByRfHz3pfnqKSXUE1UN51mNFrIuw38c3Y2+Mc6SrnAqio3oCKbxYZZ1lS+gZUZKpbsAea8j7ASAv40DHFcQ/NE7tJUnABeyQ3d9sFDIcFCYNqlVtprfLoh4JFy0U+R/CcMuyAiWTz7"/>
</div>
<div class="user_l">
<h3 th:text="'注册'+#{website.name}+'小说账号'"></h3>
<h3 th:text="'注册'+${application.website.name}+'小说账号'"></h3>
<ul class="log_list">
<li><span id="LabErr"></span></li>
<li><input name="txtUName" type="text" id="txtUName" class="s_input icon_name"

View File

@ -2,7 +2,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'修改昵称_'+#{website.name}"></title>
<title th:text="'修改昵称_'+${application.website.name}"></title>
<link rel="stylesheet" href="/css/user.css"/>
</head>
<body class="">

View File

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'修改密码_'+#{website.name}"></title>
<title th:text="'修改密码_'+${application.website.name}"></title>
<link rel="stylesheet" href="/css/user.css"/>
</head>
<body class="">

View File

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'修改性别_'+#{website.name}"></title>
<title th:text="'修改性别_'+${application.website.name}"></title>
<link rel="stylesheet" href="/css/user.css"/>
</head>
<body class="">

View File

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'账号设置_'+#{website.name}"></title>
<title th:text="'账号设置_'+${application.website.name}"></title>
<link rel="stylesheet" href="/css/user.css"/>
</head>
<body class="">
@ -25,7 +25,14 @@
<div class="my_info cf">
<div class="my_info_txt">
<ul class="mytab_list">
<li><i class="tit">我的头像</i><a href="javascript:void(0);"><img id="imgLogo" class="user_img" alt="我的头像" src="/images/man.png" /></a></li>
<li ><i class="tit">我的头像</i>
<a style="position: relative" >
<img id="imgLogo" class="user_img" alt="我的头像" src="/images/man.png" />
<input class="opacity" onchange="picChange()" type="file" id="file0" name="file" title="点击上传图片" style="z-index: 100;cursor: pointer;left: 0px; top: -25px; width: 60px; height: 80px; opacity: 0; position: absolute; "/>
</a>
</li>
<li><i class="tit">我的昵称</i><a href="/user/set_name.html" id="my_name"></a></li>
<li style="display:none"><i class="tit">电子邮箱</i><a href="javascript:void(0);"></a></li>
<li><i class="tit">我的性别</i><a href="/user/set_sex.html" id="my_sex"></a></li>
@ -42,6 +49,7 @@
</div>
<div th:replace="common/js :: js"></div>
<script src="/javascript/user.js" type="text/javascript"></script>
<script src="/javascript/ajaxfileupload.js" type="text/javascript"></script>
<script type="text/javascript">
//查询用户信息
$.ajax({
@ -82,6 +90,58 @@
layer.alert('网络异常');
}
})
function picChange() {
var file = $("#file0").val(); //文件名称
if (file != "") {
$.ajaxFileUpload({
url : "/file/upload", //用于文件上传的服务器端请求地址
secureuri : false, //是否需要安全协议一般设置为false
fileElementId : "file0", //文件上传域的ID
dataType : "json", //返回值类型 一般设置为json
type : "post",
success : function(data) { //服务器成功响应处理函数
if (data.code == 200) {
$.ajax({
type: "POST",
url: "/user/updateUserInfo",
data: {'userPhoto':data.data},
dataType: "json",
success: function (data) {
if (data.code == 200) {
window.location.href = '/user/setup.html';
} else if (data.code == 1001) {
//未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
}else {
layer.alert('图片上传失败');
}
}
});
} else {
alert("请选择上传文件!");
}
}
</script>
</body>
</html>

View File

@ -3,7 +3,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'个人中心_'+#{website.name}"></title>
<title th:text="'个人中心_'+${application.website.name}"></title>
<link rel="stylesheet" href="/css/user.css"/>
</head>
<body class="">

View File

@ -5,7 +5,7 @@
<groupId>com.java2nb</groupId>
<artifactId>novel</artifactId>
<version>3.3.0</version>
<version>3.5.1</version>
<modules>
<module>novel-common</module>
<module>novel-front</module>
@ -37,7 +37,7 @@
<orderbyhelper.version>1.0.2</orderbyhelper.version>
<commons-lang3.version>3.4</commons-lang3.version>
<jjwt.version>0.9.0</jjwt.version>
<elasticsearch.version>6.2.2</elasticsearch.version>
<elasticsearch.version>7.9.3</elasticsearch.version>
<jest.version>6.3.1</jest.version>
<redis.version>1.4.1.RELEASE</redis.version>
<redisson.version>3.12.5</redisson.version>

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Page Not Found</title>
<script>
setTimeout(function () {
location.href = '/';
},3000)
</script>
</head>
<body style="background: url(/images/404.jpeg) no-repeat;" >
</body>
</html>

View File

@ -0,0 +1,5 @@
<div th:fragment="footer" class="footer">
<div style="display: none"></div>
<p><a href="/" rel="index">小说精品屋</a>所有内容使用搜索引擎转码技术抓取自网络,如有侵犯版权,请来信告知,本站立即处理。</p>
<p>Copyright © 2019-2020 http://www.java2nb.com All rights reserved.</p>
</div>

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