mirror of
https://github.com/201206030/novel-plus.git
synced 2025-07-01 07:16:39 +00:00
Compare commits
1 Commits
release_v2
...
release_v2
Author | SHA1 | Date | |
---|---|---|---|
f6a3510c1a |
42
README.md
42
README.md
@ -10,19 +10,9 @@ Gitee仓库地址: https://gitee.com/xiongxyang/novel-cloud
|
||||
|
||||
GitHub仓库地址: https://github.com/201206030/novel-cloud
|
||||
|
||||
#### 示例网站
|
||||
#### 演示地址
|
||||
|
||||
[网站1,点击前往](http://www.bqmfxs.cn)
|
||||
|
||||
[网站2,点击前往](http://iyuedu.space)
|
||||
|
||||
[网站3,点击前往](http://suxiange.com)
|
||||
|
||||
[网站4,点击前往](http://ruoshu.com)
|
||||
|
||||
[网站5,点击前往](https://www.jingjiao.net)
|
||||
|
||||
[网站6,点击前往](http://www.shucheng.in)
|
||||
[点击前往](http://www.java2nb.com)(前台门户)
|
||||
|
||||
#### 前言
|
||||
|
||||
@ -30,9 +20,9 @@ GitHub仓库地址: https://github.com/201206030/novel-cloud
|
||||
|
||||
#### 项目介绍
|
||||
|
||||
小说精品屋-plus是在[小说精品屋](https://github.com/201206030/fiction_house)的基础上,去除了漫画和弹幕模块,专注于小说,是一个多端(PC、移动)阅读、功能完善的小说原创/爬虫网站项目,既包含了作家专区供原创作者上传小说,又提供了爬虫工具通过规则多线程全自动采集任意小说网站数据(已兼容99%的小说网站),新书自动入库,老书自动更新。
|
||||
[小说精品屋](https://github.com/201206030/fiction_house)是一个多平台(web、安卓app、微信小程序)、功能完善的小说弹幕网站,包含精品小说专区、轻小说专区和漫画专区。包括小说/漫画分类、小说/漫画搜索、小说/漫画排行、完本小说/漫画、小说/漫画评分、小说/漫画在线阅读、小说/漫画书架、小说/漫画阅读记录、小说下载、小说弹幕、小说/漫画自动爬取、小说内容自动分享到微博、邮件自动推广、链接自动推送到百度搜索引擎等功能。包含电脑端、移动端、微信小程序等多个平台,现已开源web端、安卓端、小程序端源码。
|
||||
|
||||
小说精品屋-plus重新进行了数据库设计、代码重构和功能增强,提升了程序整体的可读性和性能,增加了很多商用特性。主要升级如下:
|
||||
小说精品屋-plus是在小说精品屋的基础上,重新进行了数据库设计、代码重构和功能增强,提升了程序整体的可读性和性能,增加了很多商用特性。主要升级如下:
|
||||
|
||||
- [x] 数据库重新设计,结构调整。
|
||||
- [x] 服务端代码重构,MyBatis3升级为MyBatis3DynamicSql。
|
||||
@ -44,7 +34,6 @@ GitHub仓库地址: https://github.com/201206030/novel-cloud
|
||||
- [x] 阅读主题模块。
|
||||
- [x] 作家专区。
|
||||
- [x] 充值。
|
||||
- [x] 订阅。
|
||||
- [x] 后台管理系统。
|
||||
- [x] 爬虫管理系统。
|
||||
|
||||
@ -127,11 +116,7 @@ novel-plus -- 父工程
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
10. 购买
|
||||
|
||||
@ -159,9 +144,7 @@ novel-plus -- 父工程
|
||||
|
||||
#### 爬虫管理系统截图
|
||||
|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
#### 后台管理系统截图
|
||||
|
||||
@ -210,21 +193,12 @@ docker安装教程:[点击前往](https://my.oschina.net/java2nb/blog/4271989)
|
||||
|
||||

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

|
||||
|
||||
### 免责声明
|
||||
|
||||
本项目提供的爬虫工具仅用于采集项目初期的测试数据,请勿用于商业盈利。
|
||||
用户使用本系统从事任何违法违规的事情,一切后果由用户自行承担,作者不承担任何责任。
|
||||
|
||||
#### 备注
|
||||
|
||||
精品小说屋所有相关项目均已在开源中国公开,感兴趣的可进入[开源中国](https://www.oschina.net/p/fiction_house)按关键字`精品小说屋`搜索。
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>novel</artifactId>
|
||||
<groupId>com.java2nb</groupId>
|
||||
<version>2.9.0</version>
|
||||
<version>2.6.4</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -1,62 +0,0 @@
|
||||
package com.java2nb.novel.core.converter;
|
||||
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 表单形式的全局时间类型转换器
|
||||
* @author xiongxiaoyang
|
||||
*/
|
||||
public class DateConverter implements Converter<String, Date> {
|
||||
|
||||
private static final List<String> formats = new ArrayList<>(4);
|
||||
|
||||
static {
|
||||
formats.add("yyyy-MM");
|
||||
formats.add("yyyy-MM-dd");
|
||||
formats.add("yyyy-MM-dd HH:mm");
|
||||
formats.add("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date convert(String source) {
|
||||
String value = source.trim();
|
||||
if ("".equals(value)) {
|
||||
return null;
|
||||
}
|
||||
if (source.matches("^\\d{4}-\\d{1,2}$")) {
|
||||
return parseDate(source, formats.get(0));
|
||||
} else if (source.matches("^\\d{4}-\\d{1,2}-\\d{1,2}$")) {
|
||||
return parseDate(source, formats.get(1));
|
||||
} else if (source.matches("^\\d{4}-\\d{1,2}-\\d{1,2} {1}\\d{1,2}:\\d{1,2}$")) {
|
||||
return parseDate(source, formats.get(2));
|
||||
} else if (source.matches("^\\d{4}-\\d{1,2}-\\d{1,2} {1}\\d{1,2}:\\d{1,2}:\\d{1,2}$")) {
|
||||
return parseDate(source, formats.get(3));
|
||||
} else {
|
||||
throw new IllegalArgumentException("Invalid boolean value '" + source + "'");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化日期
|
||||
*
|
||||
* @param dateStr String 字符型日期
|
||||
* @param format String 格式
|
||||
* @return Date 日期
|
||||
*/
|
||||
private Date parseDate(String dateStr, String format) {
|
||||
Date date = null;
|
||||
try {
|
||||
DateFormat dateFormat = new SimpleDateFormat(format);
|
||||
date = dateFormat.parse(dateStr);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return date;
|
||||
}
|
||||
}
|
@ -1,119 +0,0 @@
|
||||
package com.java2nb.novel.core.utils;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.GregorianCalendar;
|
||||
import java.util.TimeZone;
|
||||
|
||||
/**
|
||||
* 日期工具
|
||||
* @author cd
|
||||
*/
|
||||
public class DateUtil {
|
||||
|
||||
public static final String DATE_PATTERN = "yyyy-MM-dd";
|
||||
public static final String DATE_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss";
|
||||
public static final String TIME_PATTERN = "HH:mm:ss";
|
||||
|
||||
/**
|
||||
* 获取昨天的日期时间
|
||||
* */
|
||||
public static Date getYesterday(){
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.add(Calendar.DATE, -1);
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据日期,获取当天开始时间
|
||||
* */
|
||||
public static Date getDateStartTime(Date date){
|
||||
Calendar calendar = new GregorianCalendar();
|
||||
calendar.setTime(date);
|
||||
/*
|
||||
* Calendar.HOUR_OF_DAY:是指获取24小时制的小时,取值范围:0-23;
|
||||
* Calendar.HOUR:是指获取12小时制的小时,取值范围:0-12,凌晨和中午都是0,不是12;
|
||||
* 需要配合Calendar.AM_PM使用;
|
||||
* */
|
||||
calendar.set(Calendar.HOUR_OF_DAY,0);
|
||||
calendar.set(Calendar.MINUTE,0);
|
||||
calendar.set(Calendar.SECOND,0);
|
||||
calendar.set(Calendar.MILLISECOND,0);
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据日期,获取当天结束时间
|
||||
* */
|
||||
public static Date getDateEndTime(Date date){
|
||||
Calendar calendar = new GregorianCalendar();
|
||||
calendar.setTime(date);
|
||||
calendar.set(Calendar.HOUR_OF_DAY,23);
|
||||
calendar.set(Calendar.MINUTE,59);
|
||||
calendar.set(Calendar.SECOND,59);
|
||||
calendar.set(Calendar.MILLISECOND,999);
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取上个月开始时间
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Date getLastMonthStartTime(){
|
||||
// 获取当前日期
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.add(Calendar.YEAR, 0);
|
||||
calendar.add(Calendar.MONTH, -1);
|
||||
// 设置为1号,当前日期既为本月第一天
|
||||
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取上个月结束时间
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Date getLastMonthEndTime(){
|
||||
// 获取当前日期
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.add(Calendar.YEAR, 0);
|
||||
calendar.add(Calendar.MONTH, -1);
|
||||
// 获取当前月最后一天
|
||||
calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 23);
|
||||
calendar.set(Calendar.MINUTE, 59);
|
||||
calendar.set(Calendar.SECOND, 59);
|
||||
calendar.set(Calendar.MILLISECOND, 999);
|
||||
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 格式化日期
|
||||
* */
|
||||
public static String formatDate(Date date,String patten){
|
||||
|
||||
return new SimpleDateFormat(patten).format(date);
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println(formatDate(getYesterday(),DATE_TIME_PATTERN));
|
||||
System.out.println(formatDate(getDateStartTime(getYesterday()),DATE_TIME_PATTERN));
|
||||
System.out.println(formatDate(getDateEndTime(getYesterday()),DATE_TIME_PATTERN));
|
||||
System.out.println(formatDate(getLastMonthStartTime(),DATE_TIME_PATTERN));
|
||||
System.out.println(formatDate(getLastMonthEndTime(),DATE_TIME_PATTERN));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -3,10 +3,6 @@ package com.java2nb.novel.core.utils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static java.util.regex.Pattern.*;
|
||||
|
||||
/**
|
||||
* @author xiongxiaoyang
|
||||
@ -74,83 +70,4 @@ public class StringUtil {
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字符串有效汉字
|
||||
* */
|
||||
public static String getChineseValidWord(String origStr){
|
||||
|
||||
//可以替换大部分空白字符, 不限于空格 . 说明:\s 可以匹配空格、制表符、换页符等空白字符的其中任意一个
|
||||
origStr = origStr.replaceAll("\\s*","");
|
||||
|
||||
/* //完全清除标点
|
||||
origStr = origStr.replaceAll("\\pP","");*/
|
||||
|
||||
//清除所有符号,只留下字母 数字 汉字 共3类.
|
||||
origStr = origStr.replaceAll("[\\pP\\p{Punct}]","");
|
||||
|
||||
//去除字母和数字
|
||||
origStr = origStr.replaceAll("[A-Za-z0-9]*","");
|
||||
|
||||
return origStr;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字符串英文单词数量
|
||||
* */
|
||||
public static int getEnglishWordCount(String origStr){
|
||||
Pattern pattern = compile("\\b\\w+\\b");
|
||||
Matcher matcher = pattern.matcher(origStr);
|
||||
int count = 0;
|
||||
while (matcher.find()) {
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字符串中文汉字数量
|
||||
* */
|
||||
public static int getChineseWordCount(String origStr){
|
||||
Pattern pattern = compile("[\u4e00-\u9fa5]");
|
||||
Matcher matcher = pattern.matcher(origStr);
|
||||
int count = 0;
|
||||
while (matcher.find()) {
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字符串有效数字数量
|
||||
* */
|
||||
public static int getNumberWordCount(String origStr){
|
||||
Pattern pattern = compile("\\d+");
|
||||
Matcher matcher = pattern.matcher(origStr);
|
||||
int count = 0;
|
||||
while (matcher.find()) {
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字符串有效字数
|
||||
* */
|
||||
public static int getStrValidWordCount(String origStr){
|
||||
return getChineseWordCount(origStr) + getEnglishWordCount(origStr) + getNumberWordCount(origStr);
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String str = "Welcome to China. 你好呀!中国人,我是1123号程序员, 来给你服务23天. Hello Word";
|
||||
System.out.println(getChineseWordCount(str));
|
||||
System.out.println(getEnglishWordCount(str));
|
||||
System.out.println(getNumberWordCount(str));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,152 +0,0 @@
|
||||
package com.java2nb.novel.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
public class AuthorIncome {
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Long id;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Long userId;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Long authorId;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Long bookId;
|
||||
|
||||
@JsonFormat(pattern = "yyyy年MM月", timezone = "GMT+8")
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Date incomeMonth;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Long preTaxIncome;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Long afterTaxIncome;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Byte payStatus;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Byte confirmStatus;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private String detail;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Date createTime;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Long getAuthorId() {
|
||||
return authorId;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setAuthorId(Long authorId) {
|
||||
this.authorId = authorId;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Long getBookId() {
|
||||
return bookId;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setBookId(Long bookId) {
|
||||
this.bookId = bookId;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Date getIncomeMonth() {
|
||||
return incomeMonth;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setIncomeMonth(Date incomeMonth) {
|
||||
this.incomeMonth = incomeMonth;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Long getPreTaxIncome() {
|
||||
return preTaxIncome;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setPreTaxIncome(Long preTaxIncome) {
|
||||
this.preTaxIncome = preTaxIncome;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Long getAfterTaxIncome() {
|
||||
return afterTaxIncome;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setAfterTaxIncome(Long afterTaxIncome) {
|
||||
this.afterTaxIncome = afterTaxIncome;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Byte getPayStatus() {
|
||||
return payStatus;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setPayStatus(Byte payStatus) {
|
||||
this.payStatus = payStatus;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Byte getConfirmStatus() {
|
||||
return confirmStatus;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setConfirmStatus(Byte confirmStatus) {
|
||||
this.confirmStatus = confirmStatus;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public String getDetail() {
|
||||
return detail;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setDetail(String detail) {
|
||||
this.detail = detail == null ? null : detail.trim();
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
@ -1,126 +0,0 @@
|
||||
package com.java2nb.novel.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
public class AuthorIncomeDetail {
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Long id;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Long userId;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Long authorId;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Long bookId;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Date incomeDate;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Integer incomeAccount;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Integer incomeCount;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Integer incomeNumber;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Date createTime;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Long getAuthorId() {
|
||||
return authorId;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setAuthorId(Long authorId) {
|
||||
this.authorId = authorId;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Long getBookId() {
|
||||
return bookId;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setBookId(Long bookId) {
|
||||
this.bookId = bookId;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Date getIncomeDate() {
|
||||
return incomeDate;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setIncomeDate(Date incomeDate) {
|
||||
this.incomeDate = incomeDate;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Integer getIncomeAccount() {
|
||||
return incomeAccount;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setIncomeAccount(Integer incomeAccount) {
|
||||
this.incomeAccount = incomeAccount;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Integer getIncomeCount() {
|
||||
return incomeCount;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setIncomeCount(Integer incomeCount) {
|
||||
this.incomeCount = incomeCount;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Integer getIncomeNumber() {
|
||||
return incomeNumber;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setIncomeNumber(Integer incomeNumber) {
|
||||
this.incomeNumber = incomeNumber;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
@ -47,9 +47,6 @@ public class Book implements Serializable{
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Integer commentCount;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Integer yesterdayBuy;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Long lastIndexId;
|
||||
|
||||
@ -223,16 +220,6 @@ public class Book implements Serializable{
|
||||
this.commentCount = commentCount;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Integer getYesterdayBuy() {
|
||||
return yesterdayBuy;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setYesterdayBuy(Integer yesterdayBuy) {
|
||||
this.yesterdayBuy = yesterdayBuy;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Long getLastIndexId() {
|
||||
return lastIndexId;
|
||||
|
@ -22,9 +22,6 @@ public class BookIndex {
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Byte isVip;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Integer bookPrice;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
private Date createTime;
|
||||
|
||||
@ -91,16 +88,6 @@ public class BookIndex {
|
||||
this.isVip = isVip;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Integer getBookPrice() {
|
||||
return bookPrice;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public void setBookPrice(Integer bookPrice) {
|
||||
this.bookPrice = bookPrice;
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
|
@ -1,64 +0,0 @@
|
||||
package com.java2nb.novel.mapper;
|
||||
|
||||
import java.sql.JDBCType;
|
||||
import java.util.Date;
|
||||
import javax.annotation.Generated;
|
||||
import org.mybatis.dynamic.sql.SqlColumn;
|
||||
import org.mybatis.dynamic.sql.SqlTable;
|
||||
|
||||
public final class AuthorIncomeDetailDynamicSqlSupport {
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final AuthorIncomeDetail authorIncomeDetail = new AuthorIncomeDetail();
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Long> id = authorIncomeDetail.id;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Long> userId = authorIncomeDetail.userId;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Long> authorId = authorIncomeDetail.authorId;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Long> bookId = authorIncomeDetail.bookId;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Date> incomeDate = authorIncomeDetail.incomeDate;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Integer> incomeAccount = authorIncomeDetail.incomeAccount;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Integer> incomeCount = authorIncomeDetail.incomeCount;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Integer> incomeNumber = authorIncomeDetail.incomeNumber;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Date> createTime = authorIncomeDetail.createTime;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final class AuthorIncomeDetail extends SqlTable {
|
||||
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> userId = column("user_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> authorId = column("author_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> bookId = column("book_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Date> incomeDate = column("income_date", JDBCType.DATE);
|
||||
|
||||
public final SqlColumn<Integer> incomeAccount = column("income_account", JDBCType.INTEGER);
|
||||
|
||||
public final SqlColumn<Integer> incomeCount = column("income_count", JDBCType.INTEGER);
|
||||
|
||||
public final SqlColumn<Integer> incomeNumber = column("income_number", JDBCType.INTEGER);
|
||||
|
||||
public final SqlColumn<Date> createTime = column("create_time", JDBCType.TIMESTAMP);
|
||||
|
||||
public AuthorIncomeDetail() {
|
||||
super("author_income_detail");
|
||||
}
|
||||
}
|
||||
}
|
@ -1,222 +0,0 @@
|
||||
package com.java2nb.novel.mapper;
|
||||
|
||||
import static com.java2nb.novel.mapper.AuthorIncomeDetailDynamicSqlSupport.*;
|
||||
import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
||||
|
||||
import com.java2nb.novel.entity.AuthorIncomeDetail;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
import org.apache.ibatis.annotations.*;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
import org.mybatis.dynamic.sql.BasicColumn;
|
||||
import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter;
|
||||
import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider;
|
||||
import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider;
|
||||
import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider;
|
||||
import org.mybatis.dynamic.sql.select.CountDSLCompleter;
|
||||
import org.mybatis.dynamic.sql.select.SelectDSLCompleter;
|
||||
import org.mybatis.dynamic.sql.select.render.SelectStatementProvider;
|
||||
import org.mybatis.dynamic.sql.update.UpdateDSL;
|
||||
import org.mybatis.dynamic.sql.update.UpdateDSLCompleter;
|
||||
import org.mybatis.dynamic.sql.update.UpdateModel;
|
||||
import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider;
|
||||
import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
|
||||
import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils;
|
||||
|
||||
@Mapper
|
||||
public interface AuthorIncomeDetailMapper {
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
BasicColumn[] selectList = BasicColumn.columnList(id, userId, authorId, bookId, incomeDate, incomeAccount, incomeCount, incomeNumber, createTime);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
long count(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
|
||||
int delete(DeleteStatementProvider deleteStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
|
||||
int insert(InsertStatementProvider<AuthorIncomeDetail> insertStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple")
|
||||
int insertMultiple(MultiRowInsertStatementProvider<AuthorIncomeDetail> multipleInsertStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ResultMap("AuthorIncomeDetailResult")
|
||||
Optional<AuthorIncomeDetail> selectOne(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@Results(id="AuthorIncomeDetailResult", value = {
|
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
|
||||
@Result(column="author_id", property="authorId", jdbcType=JdbcType.BIGINT),
|
||||
@Result(column="book_id", property="bookId", jdbcType=JdbcType.BIGINT),
|
||||
@Result(column="income_date", property="incomeDate", jdbcType=JdbcType.DATE),
|
||||
@Result(column="income_account", property="incomeAccount", jdbcType=JdbcType.INTEGER),
|
||||
@Result(column="income_count", property="incomeCount", jdbcType=JdbcType.INTEGER),
|
||||
@Result(column="income_number", property="incomeNumber", jdbcType=JdbcType.INTEGER),
|
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP)
|
||||
})
|
||||
List<AuthorIncomeDetail> selectMany(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
|
||||
int update(UpdateStatementProvider updateStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default long count(CountDSLCompleter completer) {
|
||||
return MyBatis3Utils.countFrom(this::count, authorIncomeDetail, completer);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int delete(DeleteDSLCompleter completer) {
|
||||
return MyBatis3Utils.deleteFrom(this::delete, authorIncomeDetail, completer);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int deleteByPrimaryKey(Long id_) {
|
||||
return delete(c ->
|
||||
c.where(id, isEqualTo(id_))
|
||||
);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int insert(AuthorIncomeDetail record) {
|
||||
return MyBatis3Utils.insert(this::insert, record, authorIncomeDetail, c ->
|
||||
c.map(id).toProperty("id")
|
||||
.map(userId).toProperty("userId")
|
||||
.map(authorId).toProperty("authorId")
|
||||
.map(bookId).toProperty("bookId")
|
||||
.map(incomeDate).toProperty("incomeDate")
|
||||
.map(incomeAccount).toProperty("incomeAccount")
|
||||
.map(incomeCount).toProperty("incomeCount")
|
||||
.map(incomeNumber).toProperty("incomeNumber")
|
||||
.map(createTime).toProperty("createTime")
|
||||
);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int insertMultiple(Collection<AuthorIncomeDetail> records) {
|
||||
return MyBatis3Utils.insertMultiple(this::insertMultiple, records, authorIncomeDetail, c ->
|
||||
c.map(id).toProperty("id")
|
||||
.map(userId).toProperty("userId")
|
||||
.map(authorId).toProperty("authorId")
|
||||
.map(bookId).toProperty("bookId")
|
||||
.map(incomeDate).toProperty("incomeDate")
|
||||
.map(incomeAccount).toProperty("incomeAccount")
|
||||
.map(incomeCount).toProperty("incomeCount")
|
||||
.map(incomeNumber).toProperty("incomeNumber")
|
||||
.map(createTime).toProperty("createTime")
|
||||
);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int insertSelective(AuthorIncomeDetail record) {
|
||||
return MyBatis3Utils.insert(this::insert, record, authorIncomeDetail, c ->
|
||||
c.map(id).toPropertyWhenPresent("id", record::getId)
|
||||
.map(userId).toPropertyWhenPresent("userId", record::getUserId)
|
||||
.map(authorId).toPropertyWhenPresent("authorId", record::getAuthorId)
|
||||
.map(bookId).toPropertyWhenPresent("bookId", record::getBookId)
|
||||
.map(incomeDate).toPropertyWhenPresent("incomeDate", record::getIncomeDate)
|
||||
.map(incomeAccount).toPropertyWhenPresent("incomeAccount", record::getIncomeAccount)
|
||||
.map(incomeCount).toPropertyWhenPresent("incomeCount", record::getIncomeCount)
|
||||
.map(incomeNumber).toPropertyWhenPresent("incomeNumber", record::getIncomeNumber)
|
||||
.map(createTime).toPropertyWhenPresent("createTime", record::getCreateTime)
|
||||
);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default Optional<AuthorIncomeDetail> selectOne(SelectDSLCompleter completer) {
|
||||
return MyBatis3Utils.selectOne(this::selectOne, selectList, authorIncomeDetail, completer);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default List<AuthorIncomeDetail> select(SelectDSLCompleter completer) {
|
||||
return MyBatis3Utils.selectList(this::selectMany, selectList, authorIncomeDetail, completer);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default List<AuthorIncomeDetail> selectDistinct(SelectDSLCompleter completer) {
|
||||
return MyBatis3Utils.selectDistinct(this::selectMany, selectList, authorIncomeDetail, completer);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default Optional<AuthorIncomeDetail> selectByPrimaryKey(Long id_) {
|
||||
return selectOne(c ->
|
||||
c.where(id, isEqualTo(id_))
|
||||
);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int update(UpdateDSLCompleter completer) {
|
||||
return MyBatis3Utils.update(this::update, authorIncomeDetail, completer);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
static UpdateDSL<UpdateModel> updateAllColumns(AuthorIncomeDetail record, UpdateDSL<UpdateModel> dsl) {
|
||||
return dsl.set(id).equalTo(record::getId)
|
||||
.set(userId).equalTo(record::getUserId)
|
||||
.set(authorId).equalTo(record::getAuthorId)
|
||||
.set(bookId).equalTo(record::getBookId)
|
||||
.set(incomeDate).equalTo(record::getIncomeDate)
|
||||
.set(incomeAccount).equalTo(record::getIncomeAccount)
|
||||
.set(incomeCount).equalTo(record::getIncomeCount)
|
||||
.set(incomeNumber).equalTo(record::getIncomeNumber)
|
||||
.set(createTime).equalTo(record::getCreateTime);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
static UpdateDSL<UpdateModel> updateSelectiveColumns(AuthorIncomeDetail record, UpdateDSL<UpdateModel> dsl) {
|
||||
return dsl.set(id).equalToWhenPresent(record::getId)
|
||||
.set(userId).equalToWhenPresent(record::getUserId)
|
||||
.set(authorId).equalToWhenPresent(record::getAuthorId)
|
||||
.set(bookId).equalToWhenPresent(record::getBookId)
|
||||
.set(incomeDate).equalToWhenPresent(record::getIncomeDate)
|
||||
.set(incomeAccount).equalToWhenPresent(record::getIncomeAccount)
|
||||
.set(incomeCount).equalToWhenPresent(record::getIncomeCount)
|
||||
.set(incomeNumber).equalToWhenPresent(record::getIncomeNumber)
|
||||
.set(createTime).equalToWhenPresent(record::getCreateTime);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int updateByPrimaryKey(AuthorIncomeDetail record) {
|
||||
return update(c ->
|
||||
c.set(userId).equalTo(record::getUserId)
|
||||
.set(authorId).equalTo(record::getAuthorId)
|
||||
.set(bookId).equalTo(record::getBookId)
|
||||
.set(incomeDate).equalTo(record::getIncomeDate)
|
||||
.set(incomeAccount).equalTo(record::getIncomeAccount)
|
||||
.set(incomeCount).equalTo(record::getIncomeCount)
|
||||
.set(incomeNumber).equalTo(record::getIncomeNumber)
|
||||
.set(createTime).equalTo(record::getCreateTime)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int updateByPrimaryKeySelective(AuthorIncomeDetail record) {
|
||||
return update(c ->
|
||||
c.set(userId).equalToWhenPresent(record::getUserId)
|
||||
.set(authorId).equalToWhenPresent(record::getAuthorId)
|
||||
.set(bookId).equalToWhenPresent(record::getBookId)
|
||||
.set(incomeDate).equalToWhenPresent(record::getIncomeDate)
|
||||
.set(incomeAccount).equalToWhenPresent(record::getIncomeAccount)
|
||||
.set(incomeCount).equalToWhenPresent(record::getIncomeCount)
|
||||
.set(incomeNumber).equalToWhenPresent(record::getIncomeNumber)
|
||||
.set(createTime).equalToWhenPresent(record::getCreateTime)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
);
|
||||
}
|
||||
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ResultType(value = Long.class)
|
||||
Long selectStatistic(SelectStatementProvider selectStatement);
|
||||
}
|
@ -1,74 +0,0 @@
|
||||
package com.java2nb.novel.mapper;
|
||||
|
||||
import java.sql.JDBCType;
|
||||
import java.util.Date;
|
||||
import javax.annotation.Generated;
|
||||
import org.mybatis.dynamic.sql.SqlColumn;
|
||||
import org.mybatis.dynamic.sql.SqlTable;
|
||||
|
||||
public final class AuthorIncomeDynamicSqlSupport {
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final AuthorIncome authorIncome = new AuthorIncome();
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Long> id = authorIncome.id;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Long> userId = authorIncome.userId;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Long> authorId = authorIncome.authorId;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Long> bookId = authorIncome.bookId;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Date> incomeMonth = authorIncome.incomeMonth;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Long> preTaxIncome = authorIncome.preTaxIncome;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Long> afterTaxIncome = authorIncome.afterTaxIncome;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Byte> payStatus = authorIncome.payStatus;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Byte> confirmStatus = authorIncome.confirmStatus;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<String> detail = authorIncome.detail;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Date> createTime = authorIncome.createTime;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final class AuthorIncome extends SqlTable {
|
||||
public final SqlColumn<Long> id = column("id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> userId = column("user_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> authorId = column("author_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> bookId = column("book_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Date> incomeMonth = column("income_month", JDBCType.DATE);
|
||||
|
||||
public final SqlColumn<Long> preTaxIncome = column("pre_tax_income", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Long> afterTaxIncome = column("after_tax_income", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<Byte> payStatus = column("pay_status", JDBCType.TINYINT);
|
||||
|
||||
public final SqlColumn<Byte> confirmStatus = column("confirm_status", JDBCType.TINYINT);
|
||||
|
||||
public final SqlColumn<String> detail = column("detail", JDBCType.VARCHAR);
|
||||
|
||||
public final SqlColumn<Date> createTime = column("create_time", JDBCType.TIMESTAMP);
|
||||
|
||||
public AuthorIncome() {
|
||||
super("author_income");
|
||||
}
|
||||
}
|
||||
}
|
@ -1,240 +0,0 @@
|
||||
package com.java2nb.novel.mapper;
|
||||
|
||||
import static com.java2nb.novel.mapper.AuthorIncomeDynamicSqlSupport.*;
|
||||
import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
||||
|
||||
import com.java2nb.novel.entity.AuthorIncome;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Generated;
|
||||
import org.apache.ibatis.annotations.DeleteProvider;
|
||||
import org.apache.ibatis.annotations.InsertProvider;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Result;
|
||||
import org.apache.ibatis.annotations.ResultMap;
|
||||
import org.apache.ibatis.annotations.Results;
|
||||
import org.apache.ibatis.annotations.SelectProvider;
|
||||
import org.apache.ibatis.annotations.UpdateProvider;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
import org.mybatis.dynamic.sql.BasicColumn;
|
||||
import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter;
|
||||
import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider;
|
||||
import org.mybatis.dynamic.sql.insert.render.InsertStatementProvider;
|
||||
import org.mybatis.dynamic.sql.insert.render.MultiRowInsertStatementProvider;
|
||||
import org.mybatis.dynamic.sql.select.CountDSLCompleter;
|
||||
import org.mybatis.dynamic.sql.select.SelectDSLCompleter;
|
||||
import org.mybatis.dynamic.sql.select.render.SelectStatementProvider;
|
||||
import org.mybatis.dynamic.sql.update.UpdateDSL;
|
||||
import org.mybatis.dynamic.sql.update.UpdateDSLCompleter;
|
||||
import org.mybatis.dynamic.sql.update.UpdateModel;
|
||||
import org.mybatis.dynamic.sql.update.render.UpdateStatementProvider;
|
||||
import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
|
||||
import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils;
|
||||
|
||||
@Mapper
|
||||
public interface AuthorIncomeMapper {
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
BasicColumn[] selectList = BasicColumn.columnList(id, userId, authorId, bookId, incomeMonth, preTaxIncome, afterTaxIncome, payStatus, confirmStatus, detail, createTime);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
long count(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
|
||||
int delete(DeleteStatementProvider deleteStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
|
||||
int insert(InsertStatementProvider<AuthorIncome> insertStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple")
|
||||
int insertMultiple(MultiRowInsertStatementProvider<AuthorIncome> multipleInsertStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ResultMap("AuthorIncomeResult")
|
||||
Optional<AuthorIncome> selectOne(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@Results(id="AuthorIncomeResult", value = {
|
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
|
||||
@Result(column="author_id", property="authorId", jdbcType=JdbcType.BIGINT),
|
||||
@Result(column="book_id", property="bookId", jdbcType=JdbcType.BIGINT),
|
||||
@Result(column="income_month", property="incomeMonth", jdbcType=JdbcType.DATE),
|
||||
@Result(column="pre_tax_income", property="preTaxIncome", jdbcType=JdbcType.BIGINT),
|
||||
@Result(column="after_tax_income", property="afterTaxIncome", jdbcType=JdbcType.BIGINT),
|
||||
@Result(column="pay_status", property="payStatus", jdbcType=JdbcType.TINYINT),
|
||||
@Result(column="confirm_status", property="confirmStatus", jdbcType=JdbcType.TINYINT),
|
||||
@Result(column="detail", property="detail", jdbcType=JdbcType.VARCHAR),
|
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP)
|
||||
})
|
||||
List<AuthorIncome> selectMany(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
|
||||
int update(UpdateStatementProvider updateStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default long count(CountDSLCompleter completer) {
|
||||
return MyBatis3Utils.countFrom(this::count, authorIncome, completer);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int delete(DeleteDSLCompleter completer) {
|
||||
return MyBatis3Utils.deleteFrom(this::delete, authorIncome, completer);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int deleteByPrimaryKey(Long id_) {
|
||||
return delete(c ->
|
||||
c.where(id, isEqualTo(id_))
|
||||
);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int insert(AuthorIncome record) {
|
||||
return MyBatis3Utils.insert(this::insert, record, authorIncome, c ->
|
||||
c.map(id).toProperty("id")
|
||||
.map(userId).toProperty("userId")
|
||||
.map(authorId).toProperty("authorId")
|
||||
.map(bookId).toProperty("bookId")
|
||||
.map(incomeMonth).toProperty("incomeMonth")
|
||||
.map(preTaxIncome).toProperty("preTaxIncome")
|
||||
.map(afterTaxIncome).toProperty("afterTaxIncome")
|
||||
.map(payStatus).toProperty("payStatus")
|
||||
.map(confirmStatus).toProperty("confirmStatus")
|
||||
.map(detail).toProperty("detail")
|
||||
.map(createTime).toProperty("createTime")
|
||||
);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int insertMultiple(Collection<AuthorIncome> records) {
|
||||
return MyBatis3Utils.insertMultiple(this::insertMultiple, records, authorIncome, c ->
|
||||
c.map(id).toProperty("id")
|
||||
.map(userId).toProperty("userId")
|
||||
.map(authorId).toProperty("authorId")
|
||||
.map(bookId).toProperty("bookId")
|
||||
.map(incomeMonth).toProperty("incomeMonth")
|
||||
.map(preTaxIncome).toProperty("preTaxIncome")
|
||||
.map(afterTaxIncome).toProperty("afterTaxIncome")
|
||||
.map(payStatus).toProperty("payStatus")
|
||||
.map(confirmStatus).toProperty("confirmStatus")
|
||||
.map(detail).toProperty("detail")
|
||||
.map(createTime).toProperty("createTime")
|
||||
);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int insertSelective(AuthorIncome record) {
|
||||
return MyBatis3Utils.insert(this::insert, record, authorIncome, c ->
|
||||
c.map(id).toPropertyWhenPresent("id", record::getId)
|
||||
.map(userId).toPropertyWhenPresent("userId", record::getUserId)
|
||||
.map(authorId).toPropertyWhenPresent("authorId", record::getAuthorId)
|
||||
.map(bookId).toPropertyWhenPresent("bookId", record::getBookId)
|
||||
.map(incomeMonth).toPropertyWhenPresent("incomeMonth", record::getIncomeMonth)
|
||||
.map(preTaxIncome).toPropertyWhenPresent("preTaxIncome", record::getPreTaxIncome)
|
||||
.map(afterTaxIncome).toPropertyWhenPresent("afterTaxIncome", record::getAfterTaxIncome)
|
||||
.map(payStatus).toPropertyWhenPresent("payStatus", record::getPayStatus)
|
||||
.map(confirmStatus).toPropertyWhenPresent("confirmStatus", record::getConfirmStatus)
|
||||
.map(detail).toPropertyWhenPresent("detail", record::getDetail)
|
||||
.map(createTime).toPropertyWhenPresent("createTime", record::getCreateTime)
|
||||
);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default Optional<AuthorIncome> selectOne(SelectDSLCompleter completer) {
|
||||
return MyBatis3Utils.selectOne(this::selectOne, selectList, authorIncome, completer);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default List<AuthorIncome> select(SelectDSLCompleter completer) {
|
||||
return MyBatis3Utils.selectList(this::selectMany, selectList, authorIncome, completer);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default List<AuthorIncome> selectDistinct(SelectDSLCompleter completer) {
|
||||
return MyBatis3Utils.selectDistinct(this::selectMany, selectList, authorIncome, completer);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default Optional<AuthorIncome> selectByPrimaryKey(Long id_) {
|
||||
return selectOne(c ->
|
||||
c.where(id, isEqualTo(id_))
|
||||
);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int update(UpdateDSLCompleter completer) {
|
||||
return MyBatis3Utils.update(this::update, authorIncome, completer);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
static UpdateDSL<UpdateModel> updateAllColumns(AuthorIncome record, UpdateDSL<UpdateModel> dsl) {
|
||||
return dsl.set(id).equalTo(record::getId)
|
||||
.set(userId).equalTo(record::getUserId)
|
||||
.set(authorId).equalTo(record::getAuthorId)
|
||||
.set(bookId).equalTo(record::getBookId)
|
||||
.set(incomeMonth).equalTo(record::getIncomeMonth)
|
||||
.set(preTaxIncome).equalTo(record::getPreTaxIncome)
|
||||
.set(afterTaxIncome).equalTo(record::getAfterTaxIncome)
|
||||
.set(payStatus).equalTo(record::getPayStatus)
|
||||
.set(confirmStatus).equalTo(record::getConfirmStatus)
|
||||
.set(detail).equalTo(record::getDetail)
|
||||
.set(createTime).equalTo(record::getCreateTime);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
static UpdateDSL<UpdateModel> updateSelectiveColumns(AuthorIncome record, UpdateDSL<UpdateModel> dsl) {
|
||||
return dsl.set(id).equalToWhenPresent(record::getId)
|
||||
.set(userId).equalToWhenPresent(record::getUserId)
|
||||
.set(authorId).equalToWhenPresent(record::getAuthorId)
|
||||
.set(bookId).equalToWhenPresent(record::getBookId)
|
||||
.set(incomeMonth).equalToWhenPresent(record::getIncomeMonth)
|
||||
.set(preTaxIncome).equalToWhenPresent(record::getPreTaxIncome)
|
||||
.set(afterTaxIncome).equalToWhenPresent(record::getAfterTaxIncome)
|
||||
.set(payStatus).equalToWhenPresent(record::getPayStatus)
|
||||
.set(confirmStatus).equalToWhenPresent(record::getConfirmStatus)
|
||||
.set(detail).equalToWhenPresent(record::getDetail)
|
||||
.set(createTime).equalToWhenPresent(record::getCreateTime);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int updateByPrimaryKey(AuthorIncome record) {
|
||||
return update(c ->
|
||||
c.set(userId).equalTo(record::getUserId)
|
||||
.set(authorId).equalTo(record::getAuthorId)
|
||||
.set(bookId).equalTo(record::getBookId)
|
||||
.set(incomeMonth).equalTo(record::getIncomeMonth)
|
||||
.set(preTaxIncome).equalTo(record::getPreTaxIncome)
|
||||
.set(afterTaxIncome).equalTo(record::getAfterTaxIncome)
|
||||
.set(payStatus).equalTo(record::getPayStatus)
|
||||
.set(confirmStatus).equalTo(record::getConfirmStatus)
|
||||
.set(detail).equalTo(record::getDetail)
|
||||
.set(createTime).equalTo(record::getCreateTime)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int updateByPrimaryKeySelective(AuthorIncome record) {
|
||||
return update(c ->
|
||||
c.set(userId).equalToWhenPresent(record::getUserId)
|
||||
.set(authorId).equalToWhenPresent(record::getAuthorId)
|
||||
.set(bookId).equalToWhenPresent(record::getBookId)
|
||||
.set(incomeMonth).equalToWhenPresent(record::getIncomeMonth)
|
||||
.set(preTaxIncome).equalToWhenPresent(record::getPreTaxIncome)
|
||||
.set(afterTaxIncome).equalToWhenPresent(record::getAfterTaxIncome)
|
||||
.set(payStatus).equalToWhenPresent(record::getPayStatus)
|
||||
.set(confirmStatus).equalToWhenPresent(record::getConfirmStatus)
|
||||
.set(detail).equalToWhenPresent(record::getDetail)
|
||||
.set(createTime).equalToWhenPresent(record::getCreateTime)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
);
|
||||
}
|
||||
}
|
@ -52,9 +52,6 @@ public final class BookDynamicSqlSupport {
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Integer> commentCount = book.commentCount;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Integer> yesterdayBuy = book.yesterdayBuy;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Long> lastIndexId = book.lastIndexId;
|
||||
|
||||
@ -118,8 +115,6 @@ public final class BookDynamicSqlSupport {
|
||||
|
||||
public final SqlColumn<Integer> commentCount = column("comment_count", JDBCType.INTEGER);
|
||||
|
||||
public final SqlColumn<Integer> yesterdayBuy = column("yesterday_buy", JDBCType.INTEGER);
|
||||
|
||||
public final SqlColumn<Long> lastIndexId = column("last_index_id", JDBCType.BIGINT);
|
||||
|
||||
public final SqlColumn<String> lastIndexName = column("last_index_name", JDBCType.VARCHAR);
|
||||
|
@ -28,9 +28,6 @@ public final class BookIndexDynamicSqlSupport {
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Byte> isVip = bookIndex.isVip;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Integer> bookPrice = bookIndex.bookPrice;
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
public static final SqlColumn<Date> createTime = bookIndex.createTime;
|
||||
|
||||
@ -51,8 +48,6 @@ public final class BookIndexDynamicSqlSupport {
|
||||
|
||||
public final SqlColumn<Byte> isVip = column("is_vip", JDBCType.TINYINT);
|
||||
|
||||
public final SqlColumn<Integer> bookPrice = column("book_price", JDBCType.INTEGER);
|
||||
|
||||
public final SqlColumn<Date> createTime = column("create_time", JDBCType.TIMESTAMP);
|
||||
|
||||
public final SqlColumn<Date> updateTime = column("update_time", JDBCType.TIMESTAMP);
|
||||
|
@ -4,12 +4,10 @@ import static com.java2nb.novel.mapper.BookIndexDynamicSqlSupport.*;
|
||||
import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
||||
|
||||
import com.java2nb.novel.entity.BookIndex;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
import org.apache.ibatis.annotations.DeleteProvider;
|
||||
import org.apache.ibatis.annotations.InsertProvider;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@ -37,46 +35,45 @@ import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils;
|
||||
@Mapper
|
||||
public interface BookIndexMapper {
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
BasicColumn[] selectList = BasicColumn.columnList(id, bookId, indexNum, indexName, wordCount, isVip, bookPrice, createTime, updateTime);
|
||||
BasicColumn[] selectList = BasicColumn.columnList(id, bookId, indexNum, indexName, wordCount, isVip, createTime, updateTime);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@SelectProvider(type = SqlProviderAdapter.class, method = "select")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
long count(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@DeleteProvider(type = SqlProviderAdapter.class, method = "delete")
|
||||
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
|
||||
int delete(DeleteStatementProvider deleteStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@InsertProvider(type = SqlProviderAdapter.class, method = "insert")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
|
||||
int insert(InsertStatementProvider<BookIndex> insertStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@InsertProvider(type = SqlProviderAdapter.class, method = "insertMultiple")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple")
|
||||
int insertMultiple(MultiRowInsertStatementProvider<BookIndex> multipleInsertStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@SelectProvider(type = SqlProviderAdapter.class, method = "select")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ResultMap("BookIndexResult")
|
||||
Optional<BookIndex> selectOne(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@SelectProvider(type = SqlProviderAdapter.class, method = "select")
|
||||
@Results(id = "BookIndexResult", value = {
|
||||
@Result(column = "id", property = "id", jdbcType = JdbcType.BIGINT, id = true),
|
||||
@Result(column = "book_id", property = "bookId", jdbcType = JdbcType.BIGINT),
|
||||
@Result(column = "index_num", property = "indexNum", jdbcType = JdbcType.INTEGER),
|
||||
@Result(column = "index_name", property = "indexName", jdbcType = JdbcType.VARCHAR),
|
||||
@Result(column = "word_count", property = "wordCount", jdbcType = JdbcType.INTEGER),
|
||||
@Result(column = "is_vip", property = "isVip", jdbcType = JdbcType.TINYINT),
|
||||
@Result(column = "book_price", property = "bookPrice", jdbcType = JdbcType.INTEGER),
|
||||
@Result(column = "create_time", property = "createTime", jdbcType = JdbcType.TIMESTAMP),
|
||||
@Result(column = "update_time", property = "updateTime", jdbcType = JdbcType.TIMESTAMP)
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@Results(id="BookIndexResult", value = {
|
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Result(column="book_id", property="bookId", jdbcType=JdbcType.BIGINT),
|
||||
@Result(column="index_num", property="indexNum", jdbcType=JdbcType.INTEGER),
|
||||
@Result(column="index_name", property="indexName", jdbcType=JdbcType.VARCHAR),
|
||||
@Result(column="word_count", property="wordCount", jdbcType=JdbcType.INTEGER),
|
||||
@Result(column="is_vip", property="isVip", jdbcType=JdbcType.TINYINT),
|
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
|
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
|
||||
})
|
||||
List<BookIndex> selectMany(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@UpdateProvider(type = SqlProviderAdapter.class, method = "update")
|
||||
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
|
||||
int update(UpdateStatementProvider updateStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@ -91,53 +88,50 @@ public interface BookIndexMapper {
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int deleteByPrimaryKey(Long id_) {
|
||||
return delete(c ->
|
||||
c.where(id, isEqualTo(id_))
|
||||
return delete(c ->
|
||||
c.where(id, isEqualTo(id_))
|
||||
);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int insert(BookIndex record) {
|
||||
return MyBatis3Utils.insert(this::insert, record, bookIndex, c ->
|
||||
c.map(id).toProperty("id")
|
||||
.map(bookId).toProperty("bookId")
|
||||
.map(indexNum).toProperty("indexNum")
|
||||
.map(indexName).toProperty("indexName")
|
||||
.map(wordCount).toProperty("wordCount")
|
||||
.map(isVip).toProperty("isVip")
|
||||
.map(bookPrice).toProperty("bookPrice")
|
||||
.map(createTime).toProperty("createTime")
|
||||
.map(updateTime).toProperty("updateTime")
|
||||
c.map(id).toProperty("id")
|
||||
.map(bookId).toProperty("bookId")
|
||||
.map(indexNum).toProperty("indexNum")
|
||||
.map(indexName).toProperty("indexName")
|
||||
.map(wordCount).toProperty("wordCount")
|
||||
.map(isVip).toProperty("isVip")
|
||||
.map(createTime).toProperty("createTime")
|
||||
.map(updateTime).toProperty("updateTime")
|
||||
);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int insertMultiple(Collection<BookIndex> records) {
|
||||
return MyBatis3Utils.insertMultiple(this::insertMultiple, records, bookIndex, c ->
|
||||
c.map(id).toProperty("id")
|
||||
.map(bookId).toProperty("bookId")
|
||||
.map(indexNum).toProperty("indexNum")
|
||||
.map(indexName).toProperty("indexName")
|
||||
.map(wordCount).toProperty("wordCount")
|
||||
.map(isVip).toProperty("isVip")
|
||||
.map(bookPrice).toProperty("bookPrice")
|
||||
.map(createTime).toProperty("createTime")
|
||||
.map(updateTime).toProperty("updateTime")
|
||||
c.map(id).toProperty("id")
|
||||
.map(bookId).toProperty("bookId")
|
||||
.map(indexNum).toProperty("indexNum")
|
||||
.map(indexName).toProperty("indexName")
|
||||
.map(wordCount).toProperty("wordCount")
|
||||
.map(isVip).toProperty("isVip")
|
||||
.map(createTime).toProperty("createTime")
|
||||
.map(updateTime).toProperty("updateTime")
|
||||
);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int insertSelective(BookIndex record) {
|
||||
return MyBatis3Utils.insert(this::insert, record, bookIndex, c ->
|
||||
c.map(id).toPropertyWhenPresent("id", record::getId)
|
||||
.map(bookId).toPropertyWhenPresent("bookId", record::getBookId)
|
||||
.map(indexNum).toPropertyWhenPresent("indexNum", record::getIndexNum)
|
||||
.map(indexName).toPropertyWhenPresent("indexName", record::getIndexName)
|
||||
.map(wordCount).toPropertyWhenPresent("wordCount", record::getWordCount)
|
||||
.map(isVip).toPropertyWhenPresent("isVip", record::getIsVip)
|
||||
.map(bookPrice).toPropertyWhenPresent("bookPrice", record::getBookPrice)
|
||||
.map(createTime).toPropertyWhenPresent("createTime", record::getCreateTime)
|
||||
.map(updateTime).toPropertyWhenPresent("updateTime", record::getUpdateTime)
|
||||
c.map(id).toPropertyWhenPresent("id", record::getId)
|
||||
.map(bookId).toPropertyWhenPresent("bookId", record::getBookId)
|
||||
.map(indexNum).toPropertyWhenPresent("indexNum", record::getIndexNum)
|
||||
.map(indexName).toPropertyWhenPresent("indexName", record::getIndexName)
|
||||
.map(wordCount).toPropertyWhenPresent("wordCount", record::getWordCount)
|
||||
.map(isVip).toPropertyWhenPresent("isVip", record::getIsVip)
|
||||
.map(createTime).toPropertyWhenPresent("createTime", record::getCreateTime)
|
||||
.map(updateTime).toPropertyWhenPresent("updateTime", record::getUpdateTime)
|
||||
);
|
||||
}
|
||||
|
||||
@ -159,7 +153,7 @@ public interface BookIndexMapper {
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default Optional<BookIndex> selectByPrimaryKey(Long id_) {
|
||||
return selectOne(c ->
|
||||
c.where(id, isEqualTo(id_))
|
||||
c.where(id, isEqualTo(id_))
|
||||
);
|
||||
}
|
||||
|
||||
@ -176,7 +170,6 @@ public interface BookIndexMapper {
|
||||
.set(indexName).equalTo(record::getIndexName)
|
||||
.set(wordCount).equalTo(record::getWordCount)
|
||||
.set(isVip).equalTo(record::getIsVip)
|
||||
.set(bookPrice).equalTo(record::getBookPrice)
|
||||
.set(createTime).equalTo(record::getCreateTime)
|
||||
.set(updateTime).equalTo(record::getUpdateTime);
|
||||
}
|
||||
@ -189,7 +182,6 @@ public interface BookIndexMapper {
|
||||
.set(indexName).equalToWhenPresent(record::getIndexName)
|
||||
.set(wordCount).equalToWhenPresent(record::getWordCount)
|
||||
.set(isVip).equalToWhenPresent(record::getIsVip)
|
||||
.set(bookPrice).equalToWhenPresent(record::getBookPrice)
|
||||
.set(createTime).equalToWhenPresent(record::getCreateTime)
|
||||
.set(updateTime).equalToWhenPresent(record::getUpdateTime);
|
||||
}
|
||||
@ -197,30 +189,28 @@ public interface BookIndexMapper {
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int updateByPrimaryKey(BookIndex record) {
|
||||
return update(c ->
|
||||
c.set(bookId).equalTo(record::getBookId)
|
||||
.set(indexNum).equalTo(record::getIndexNum)
|
||||
.set(indexName).equalTo(record::getIndexName)
|
||||
.set(wordCount).equalTo(record::getWordCount)
|
||||
.set(isVip).equalTo(record::getIsVip)
|
||||
.set(bookPrice).equalTo(record::getBookPrice)
|
||||
.set(createTime).equalTo(record::getCreateTime)
|
||||
.set(updateTime).equalTo(record::getUpdateTime)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
c.set(bookId).equalTo(record::getBookId)
|
||||
.set(indexNum).equalTo(record::getIndexNum)
|
||||
.set(indexName).equalTo(record::getIndexName)
|
||||
.set(wordCount).equalTo(record::getWordCount)
|
||||
.set(isVip).equalTo(record::getIsVip)
|
||||
.set(createTime).equalTo(record::getCreateTime)
|
||||
.set(updateTime).equalTo(record::getUpdateTime)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int updateByPrimaryKeySelective(BookIndex record) {
|
||||
return update(c ->
|
||||
c.set(bookId).equalToWhenPresent(record::getBookId)
|
||||
.set(indexNum).equalToWhenPresent(record::getIndexNum)
|
||||
.set(indexName).equalToWhenPresent(record::getIndexName)
|
||||
.set(wordCount).equalToWhenPresent(record::getWordCount)
|
||||
.set(isVip).equalToWhenPresent(record::getIsVip)
|
||||
.set(bookPrice).equalToWhenPresent(record::getBookPrice)
|
||||
.set(createTime).equalToWhenPresent(record::getCreateTime)
|
||||
.set(updateTime).equalToWhenPresent(record::getUpdateTime)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
c.set(bookId).equalToWhenPresent(record::getBookId)
|
||||
.set(indexNum).equalToWhenPresent(record::getIndexNum)
|
||||
.set(indexName).equalToWhenPresent(record::getIndexName)
|
||||
.set(wordCount).equalToWhenPresent(record::getWordCount)
|
||||
.set(isVip).equalToWhenPresent(record::getIsVip)
|
||||
.set(createTime).equalToWhenPresent(record::getCreateTime)
|
||||
.set(updateTime).equalToWhenPresent(record::getUpdateTime)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
);
|
||||
}
|
||||
}
|
@ -4,12 +4,10 @@ import static com.java2nb.novel.mapper.BookDynamicSqlSupport.*;
|
||||
import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
||||
|
||||
import com.java2nb.novel.entity.Book;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
import org.apache.ibatis.annotations.DeleteProvider;
|
||||
import org.apache.ibatis.annotations.InsertProvider;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@ -37,63 +35,62 @@ import org.mybatis.dynamic.sql.util.mybatis3.MyBatis3Utils;
|
||||
@Mapper
|
||||
public interface BookMapper {
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
BasicColumn[] selectList = BasicColumn.columnList(id, workDirection, catId, catName, picUrl, bookName, authorId, authorName, bookDesc, score, bookStatus, visitCount, wordCount, commentCount, yesterdayBuy, lastIndexId, lastIndexName, lastIndexUpdateTime, isVip, status, updateTime, createTime, crawlSourceId, crawlBookId, crawlLastTime, crawlIsStop);
|
||||
BasicColumn[] selectList = BasicColumn.columnList(id, workDirection, catId, catName, picUrl, bookName, authorId, authorName, bookDesc, score, bookStatus, visitCount, wordCount, commentCount, lastIndexId, lastIndexName, lastIndexUpdateTime, isVip, status, updateTime, createTime, crawlSourceId, crawlBookId, crawlLastTime, crawlIsStop);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@SelectProvider(type = SqlProviderAdapter.class, method = "select")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
long count(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@DeleteProvider(type = SqlProviderAdapter.class, method = "delete")
|
||||
@DeleteProvider(type=SqlProviderAdapter.class, method="delete")
|
||||
int delete(DeleteStatementProvider deleteStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@InsertProvider(type = SqlProviderAdapter.class, method = "insert")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insert")
|
||||
int insert(InsertStatementProvider<Book> insertStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@InsertProvider(type = SqlProviderAdapter.class, method = "insertMultiple")
|
||||
@InsertProvider(type=SqlProviderAdapter.class, method="insertMultiple")
|
||||
int insertMultiple(MultiRowInsertStatementProvider<Book> multipleInsertStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@SelectProvider(type = SqlProviderAdapter.class, method = "select")
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ResultMap("BookResult")
|
||||
Optional<Book> selectOne(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@SelectProvider(type = SqlProviderAdapter.class, method = "select")
|
||||
@Results(id = "BookResult", value = {
|
||||
@Result(column = "id", property = "id", jdbcType = JdbcType.BIGINT, id = true),
|
||||
@Result(column = "work_direction", property = "workDirection", jdbcType = JdbcType.TINYINT),
|
||||
@Result(column = "cat_id", property = "catId", jdbcType = JdbcType.INTEGER),
|
||||
@Result(column = "cat_name", property = "catName", jdbcType = JdbcType.VARCHAR),
|
||||
@Result(column = "pic_url", property = "picUrl", jdbcType = JdbcType.VARCHAR),
|
||||
@Result(column = "book_name", property = "bookName", jdbcType = JdbcType.VARCHAR),
|
||||
@Result(column = "author_id", property = "authorId", jdbcType = JdbcType.BIGINT),
|
||||
@Result(column = "author_name", property = "authorName", jdbcType = JdbcType.VARCHAR),
|
||||
@Result(column = "book_desc", property = "bookDesc", jdbcType = JdbcType.VARCHAR),
|
||||
@Result(column = "score", property = "score", jdbcType = JdbcType.REAL),
|
||||
@Result(column = "book_status", property = "bookStatus", jdbcType = JdbcType.TINYINT),
|
||||
@Result(column = "visit_count", property = "visitCount", jdbcType = JdbcType.BIGINT),
|
||||
@Result(column = "word_count", property = "wordCount", jdbcType = JdbcType.INTEGER),
|
||||
@Result(column = "comment_count", property = "commentCount", jdbcType = JdbcType.INTEGER),
|
||||
@Result(column="yesterday_buy", property="yesterdayBuy", jdbcType=JdbcType.INTEGER),
|
||||
@Result(column = "last_index_id", property = "lastIndexId", jdbcType = JdbcType.BIGINT),
|
||||
@Result(column = "last_index_name", property = "lastIndexName", jdbcType = JdbcType.VARCHAR),
|
||||
@Result(column = "last_index_update_time", property = "lastIndexUpdateTime", jdbcType = JdbcType.TIMESTAMP),
|
||||
@Result(column = "is_vip", property = "isVip", jdbcType = JdbcType.TINYINT),
|
||||
@Result(column = "status", property = "status", jdbcType = JdbcType.TINYINT),
|
||||
@Result(column = "update_time", property = "updateTime", jdbcType = JdbcType.TIMESTAMP),
|
||||
@Result(column = "create_time", property = "createTime", jdbcType = JdbcType.TIMESTAMP),
|
||||
@Result(column = "crawl_source_id", property = "crawlSourceId", jdbcType = JdbcType.INTEGER),
|
||||
@Result(column = "crawl_book_id", property = "crawlBookId", jdbcType = JdbcType.VARCHAR),
|
||||
@Result(column = "crawl_last_time", property = "crawlLastTime", jdbcType = JdbcType.TIMESTAMP),
|
||||
@Result(column = "crawl_is_stop", property = "crawlIsStop", jdbcType = JdbcType.TINYINT)
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@Results(id="BookResult", value = {
|
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
|
||||
@Result(column="work_direction", property="workDirection", jdbcType=JdbcType.TINYINT),
|
||||
@Result(column="cat_id", property="catId", jdbcType=JdbcType.INTEGER),
|
||||
@Result(column="cat_name", property="catName", jdbcType=JdbcType.VARCHAR),
|
||||
@Result(column="pic_url", property="picUrl", jdbcType=JdbcType.VARCHAR),
|
||||
@Result(column="book_name", property="bookName", jdbcType=JdbcType.VARCHAR),
|
||||
@Result(column="author_id", property="authorId", jdbcType=JdbcType.BIGINT),
|
||||
@Result(column="author_name", property="authorName", jdbcType=JdbcType.VARCHAR),
|
||||
@Result(column="book_desc", property="bookDesc", jdbcType=JdbcType.VARCHAR),
|
||||
@Result(column="score", property="score", jdbcType=JdbcType.REAL),
|
||||
@Result(column="book_status", property="bookStatus", jdbcType=JdbcType.TINYINT),
|
||||
@Result(column="visit_count", property="visitCount", jdbcType=JdbcType.BIGINT),
|
||||
@Result(column="word_count", property="wordCount", jdbcType=JdbcType.INTEGER),
|
||||
@Result(column="comment_count", property="commentCount", jdbcType=JdbcType.INTEGER),
|
||||
@Result(column="last_index_id", property="lastIndexId", jdbcType=JdbcType.BIGINT),
|
||||
@Result(column="last_index_name", property="lastIndexName", jdbcType=JdbcType.VARCHAR),
|
||||
@Result(column="last_index_update_time", property="lastIndexUpdateTime", jdbcType=JdbcType.TIMESTAMP),
|
||||
@Result(column="is_vip", property="isVip", jdbcType=JdbcType.TINYINT),
|
||||
@Result(column="status", property="status", jdbcType=JdbcType.TINYINT),
|
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
|
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
|
||||
@Result(column="crawl_source_id", property="crawlSourceId", jdbcType=JdbcType.INTEGER),
|
||||
@Result(column="crawl_book_id", property="crawlBookId", jdbcType=JdbcType.VARCHAR),
|
||||
@Result(column="crawl_last_time", property="crawlLastTime", jdbcType=JdbcType.TIMESTAMP),
|
||||
@Result(column="crawl_is_stop", property="crawlIsStop", jdbcType=JdbcType.TINYINT)
|
||||
})
|
||||
List<Book> selectMany(SelectStatementProvider selectStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@UpdateProvider(type = SqlProviderAdapter.class, method = "update")
|
||||
@UpdateProvider(type=SqlProviderAdapter.class, method="update")
|
||||
int update(UpdateStatementProvider updateStatement);
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
@ -108,104 +105,101 @@ public interface BookMapper {
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int deleteByPrimaryKey(Long id_) {
|
||||
return delete(c ->
|
||||
c.where(id, isEqualTo(id_))
|
||||
return delete(c ->
|
||||
c.where(id, isEqualTo(id_))
|
||||
);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int insert(Book record) {
|
||||
return MyBatis3Utils.insert(this::insert, record, book, c ->
|
||||
c.map(id).toProperty("id")
|
||||
.map(workDirection).toProperty("workDirection")
|
||||
.map(catId).toProperty("catId")
|
||||
.map(catName).toProperty("catName")
|
||||
.map(picUrl).toProperty("picUrl")
|
||||
.map(bookName).toProperty("bookName")
|
||||
.map(authorId).toProperty("authorId")
|
||||
.map(authorName).toProperty("authorName")
|
||||
.map(bookDesc).toProperty("bookDesc")
|
||||
.map(score).toProperty("score")
|
||||
.map(bookStatus).toProperty("bookStatus")
|
||||
.map(visitCount).toProperty("visitCount")
|
||||
.map(wordCount).toProperty("wordCount")
|
||||
.map(commentCount).toProperty("commentCount")
|
||||
.map(yesterdayBuy).toProperty("yesterdayBuy")
|
||||
.map(lastIndexId).toProperty("lastIndexId")
|
||||
.map(lastIndexName).toProperty("lastIndexName")
|
||||
.map(lastIndexUpdateTime).toProperty("lastIndexUpdateTime")
|
||||
.map(isVip).toProperty("isVip")
|
||||
.map(status).toProperty("status")
|
||||
.map(updateTime).toProperty("updateTime")
|
||||
.map(createTime).toProperty("createTime")
|
||||
.map(crawlSourceId).toProperty("crawlSourceId")
|
||||
.map(crawlBookId).toProperty("crawlBookId")
|
||||
.map(crawlLastTime).toProperty("crawlLastTime")
|
||||
.map(crawlIsStop).toProperty("crawlIsStop")
|
||||
c.map(id).toProperty("id")
|
||||
.map(workDirection).toProperty("workDirection")
|
||||
.map(catId).toProperty("catId")
|
||||
.map(catName).toProperty("catName")
|
||||
.map(picUrl).toProperty("picUrl")
|
||||
.map(bookName).toProperty("bookName")
|
||||
.map(authorId).toProperty("authorId")
|
||||
.map(authorName).toProperty("authorName")
|
||||
.map(bookDesc).toProperty("bookDesc")
|
||||
.map(score).toProperty("score")
|
||||
.map(bookStatus).toProperty("bookStatus")
|
||||
.map(visitCount).toProperty("visitCount")
|
||||
.map(wordCount).toProperty("wordCount")
|
||||
.map(commentCount).toProperty("commentCount")
|
||||
.map(lastIndexId).toProperty("lastIndexId")
|
||||
.map(lastIndexName).toProperty("lastIndexName")
|
||||
.map(lastIndexUpdateTime).toProperty("lastIndexUpdateTime")
|
||||
.map(isVip).toProperty("isVip")
|
||||
.map(status).toProperty("status")
|
||||
.map(updateTime).toProperty("updateTime")
|
||||
.map(createTime).toProperty("createTime")
|
||||
.map(crawlSourceId).toProperty("crawlSourceId")
|
||||
.map(crawlBookId).toProperty("crawlBookId")
|
||||
.map(crawlLastTime).toProperty("crawlLastTime")
|
||||
.map(crawlIsStop).toProperty("crawlIsStop")
|
||||
);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int insertMultiple(Collection<Book> records) {
|
||||
return MyBatis3Utils.insertMultiple(this::insertMultiple, records, book, c ->
|
||||
c.map(id).toProperty("id")
|
||||
.map(workDirection).toProperty("workDirection")
|
||||
.map(catId).toProperty("catId")
|
||||
.map(catName).toProperty("catName")
|
||||
.map(picUrl).toProperty("picUrl")
|
||||
.map(bookName).toProperty("bookName")
|
||||
.map(authorId).toProperty("authorId")
|
||||
.map(authorName).toProperty("authorName")
|
||||
.map(bookDesc).toProperty("bookDesc")
|
||||
.map(score).toProperty("score")
|
||||
.map(bookStatus).toProperty("bookStatus")
|
||||
.map(visitCount).toProperty("visitCount")
|
||||
.map(wordCount).toProperty("wordCount")
|
||||
.map(commentCount).toProperty("commentCount")
|
||||
.map(yesterdayBuy).toProperty("yesterdayBuy")
|
||||
.map(lastIndexId).toProperty("lastIndexId")
|
||||
.map(lastIndexName).toProperty("lastIndexName")
|
||||
.map(lastIndexUpdateTime).toProperty("lastIndexUpdateTime")
|
||||
.map(isVip).toProperty("isVip")
|
||||
.map(status).toProperty("status")
|
||||
.map(updateTime).toProperty("updateTime")
|
||||
.map(createTime).toProperty("createTime")
|
||||
.map(crawlSourceId).toProperty("crawlSourceId")
|
||||
.map(crawlBookId).toProperty("crawlBookId")
|
||||
.map(crawlLastTime).toProperty("crawlLastTime")
|
||||
.map(crawlIsStop).toProperty("crawlIsStop")
|
||||
c.map(id).toProperty("id")
|
||||
.map(workDirection).toProperty("workDirection")
|
||||
.map(catId).toProperty("catId")
|
||||
.map(catName).toProperty("catName")
|
||||
.map(picUrl).toProperty("picUrl")
|
||||
.map(bookName).toProperty("bookName")
|
||||
.map(authorId).toProperty("authorId")
|
||||
.map(authorName).toProperty("authorName")
|
||||
.map(bookDesc).toProperty("bookDesc")
|
||||
.map(score).toProperty("score")
|
||||
.map(bookStatus).toProperty("bookStatus")
|
||||
.map(visitCount).toProperty("visitCount")
|
||||
.map(wordCount).toProperty("wordCount")
|
||||
.map(commentCount).toProperty("commentCount")
|
||||
.map(lastIndexId).toProperty("lastIndexId")
|
||||
.map(lastIndexName).toProperty("lastIndexName")
|
||||
.map(lastIndexUpdateTime).toProperty("lastIndexUpdateTime")
|
||||
.map(isVip).toProperty("isVip")
|
||||
.map(status).toProperty("status")
|
||||
.map(updateTime).toProperty("updateTime")
|
||||
.map(createTime).toProperty("createTime")
|
||||
.map(crawlSourceId).toProperty("crawlSourceId")
|
||||
.map(crawlBookId).toProperty("crawlBookId")
|
||||
.map(crawlLastTime).toProperty("crawlLastTime")
|
||||
.map(crawlIsStop).toProperty("crawlIsStop")
|
||||
);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int insertSelective(Book record) {
|
||||
return MyBatis3Utils.insert(this::insert, record, book, c ->
|
||||
c.map(id).toPropertyWhenPresent("id", record::getId)
|
||||
.map(workDirection).toPropertyWhenPresent("workDirection", record::getWorkDirection)
|
||||
.map(catId).toPropertyWhenPresent("catId", record::getCatId)
|
||||
.map(catName).toPropertyWhenPresent("catName", record::getCatName)
|
||||
.map(picUrl).toPropertyWhenPresent("picUrl", record::getPicUrl)
|
||||
.map(bookName).toPropertyWhenPresent("bookName", record::getBookName)
|
||||
.map(authorId).toPropertyWhenPresent("authorId", record::getAuthorId)
|
||||
.map(authorName).toPropertyWhenPresent("authorName", record::getAuthorName)
|
||||
.map(bookDesc).toPropertyWhenPresent("bookDesc", record::getBookDesc)
|
||||
.map(score).toPropertyWhenPresent("score", record::getScore)
|
||||
.map(bookStatus).toPropertyWhenPresent("bookStatus", record::getBookStatus)
|
||||
.map(visitCount).toPropertyWhenPresent("visitCount", record::getVisitCount)
|
||||
.map(wordCount).toPropertyWhenPresent("wordCount", record::getWordCount)
|
||||
.map(commentCount).toPropertyWhenPresent("commentCount", record::getCommentCount)
|
||||
.map(yesterdayBuy).toPropertyWhenPresent("yesterdayBuy", record::getYesterdayBuy)
|
||||
.map(lastIndexId).toPropertyWhenPresent("lastIndexId", record::getLastIndexId)
|
||||
.map(lastIndexName).toPropertyWhenPresent("lastIndexName", record::getLastIndexName)
|
||||
.map(lastIndexUpdateTime).toPropertyWhenPresent("lastIndexUpdateTime", record::getLastIndexUpdateTime)
|
||||
.map(isVip).toPropertyWhenPresent("isVip", record::getIsVip)
|
||||
.map(status).toPropertyWhenPresent("status", record::getStatus)
|
||||
.map(updateTime).toPropertyWhenPresent("updateTime", record::getUpdateTime)
|
||||
.map(createTime).toPropertyWhenPresent("createTime", record::getCreateTime)
|
||||
.map(crawlSourceId).toPropertyWhenPresent("crawlSourceId", record::getCrawlSourceId)
|
||||
.map(crawlBookId).toPropertyWhenPresent("crawlBookId", record::getCrawlBookId)
|
||||
.map(crawlLastTime).toPropertyWhenPresent("crawlLastTime", record::getCrawlLastTime)
|
||||
.map(crawlIsStop).toPropertyWhenPresent("crawlIsStop", record::getCrawlIsStop)
|
||||
c.map(id).toPropertyWhenPresent("id", record::getId)
|
||||
.map(workDirection).toPropertyWhenPresent("workDirection", record::getWorkDirection)
|
||||
.map(catId).toPropertyWhenPresent("catId", record::getCatId)
|
||||
.map(catName).toPropertyWhenPresent("catName", record::getCatName)
|
||||
.map(picUrl).toPropertyWhenPresent("picUrl", record::getPicUrl)
|
||||
.map(bookName).toPropertyWhenPresent("bookName", record::getBookName)
|
||||
.map(authorId).toPropertyWhenPresent("authorId", record::getAuthorId)
|
||||
.map(authorName).toPropertyWhenPresent("authorName", record::getAuthorName)
|
||||
.map(bookDesc).toPropertyWhenPresent("bookDesc", record::getBookDesc)
|
||||
.map(score).toPropertyWhenPresent("score", record::getScore)
|
||||
.map(bookStatus).toPropertyWhenPresent("bookStatus", record::getBookStatus)
|
||||
.map(visitCount).toPropertyWhenPresent("visitCount", record::getVisitCount)
|
||||
.map(wordCount).toPropertyWhenPresent("wordCount", record::getWordCount)
|
||||
.map(commentCount).toPropertyWhenPresent("commentCount", record::getCommentCount)
|
||||
.map(lastIndexId).toPropertyWhenPresent("lastIndexId", record::getLastIndexId)
|
||||
.map(lastIndexName).toPropertyWhenPresent("lastIndexName", record::getLastIndexName)
|
||||
.map(lastIndexUpdateTime).toPropertyWhenPresent("lastIndexUpdateTime", record::getLastIndexUpdateTime)
|
||||
.map(isVip).toPropertyWhenPresent("isVip", record::getIsVip)
|
||||
.map(status).toPropertyWhenPresent("status", record::getStatus)
|
||||
.map(updateTime).toPropertyWhenPresent("updateTime", record::getUpdateTime)
|
||||
.map(createTime).toPropertyWhenPresent("createTime", record::getCreateTime)
|
||||
.map(crawlSourceId).toPropertyWhenPresent("crawlSourceId", record::getCrawlSourceId)
|
||||
.map(crawlBookId).toPropertyWhenPresent("crawlBookId", record::getCrawlBookId)
|
||||
.map(crawlLastTime).toPropertyWhenPresent("crawlLastTime", record::getCrawlLastTime)
|
||||
.map(crawlIsStop).toPropertyWhenPresent("crawlIsStop", record::getCrawlIsStop)
|
||||
);
|
||||
}
|
||||
|
||||
@ -227,7 +221,7 @@ public interface BookMapper {
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default Optional<Book> selectByPrimaryKey(Long id_) {
|
||||
return selectOne(c ->
|
||||
c.where(id, isEqualTo(id_))
|
||||
c.where(id, isEqualTo(id_))
|
||||
);
|
||||
}
|
||||
|
||||
@ -252,7 +246,6 @@ public interface BookMapper {
|
||||
.set(visitCount).equalTo(record::getVisitCount)
|
||||
.set(wordCount).equalTo(record::getWordCount)
|
||||
.set(commentCount).equalTo(record::getCommentCount)
|
||||
.set(yesterdayBuy).equalTo(record::getYesterdayBuy)
|
||||
.set(lastIndexId).equalTo(record::getLastIndexId)
|
||||
.set(lastIndexName).equalTo(record::getLastIndexName)
|
||||
.set(lastIndexUpdateTime).equalTo(record::getLastIndexUpdateTime)
|
||||
@ -282,7 +275,6 @@ public interface BookMapper {
|
||||
.set(visitCount).equalToWhenPresent(record::getVisitCount)
|
||||
.set(wordCount).equalToWhenPresent(record::getWordCount)
|
||||
.set(commentCount).equalToWhenPresent(record::getCommentCount)
|
||||
.set(yesterdayBuy).equalToWhenPresent(record::getYesterdayBuy)
|
||||
.set(lastIndexId).equalToWhenPresent(record::getLastIndexId)
|
||||
.set(lastIndexName).equalToWhenPresent(record::getLastIndexName)
|
||||
.set(lastIndexUpdateTime).equalToWhenPresent(record::getLastIndexUpdateTime)
|
||||
@ -299,64 +291,62 @@ public interface BookMapper {
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int updateByPrimaryKey(Book record) {
|
||||
return update(c ->
|
||||
c.set(workDirection).equalTo(record::getWorkDirection)
|
||||
.set(catId).equalTo(record::getCatId)
|
||||
.set(catName).equalTo(record::getCatName)
|
||||
.set(picUrl).equalTo(record::getPicUrl)
|
||||
.set(bookName).equalTo(record::getBookName)
|
||||
.set(authorId).equalTo(record::getAuthorId)
|
||||
.set(authorName).equalTo(record::getAuthorName)
|
||||
.set(bookDesc).equalTo(record::getBookDesc)
|
||||
.set(score).equalTo(record::getScore)
|
||||
.set(bookStatus).equalTo(record::getBookStatus)
|
||||
.set(visitCount).equalTo(record::getVisitCount)
|
||||
.set(wordCount).equalTo(record::getWordCount)
|
||||
.set(commentCount).equalTo(record::getCommentCount)
|
||||
.set(yesterdayBuy).equalTo(record::getYesterdayBuy)
|
||||
.set(lastIndexId).equalTo(record::getLastIndexId)
|
||||
.set(lastIndexName).equalTo(record::getLastIndexName)
|
||||
.set(lastIndexUpdateTime).equalTo(record::getLastIndexUpdateTime)
|
||||
.set(isVip).equalTo(record::getIsVip)
|
||||
.set(status).equalTo(record::getStatus)
|
||||
.set(updateTime).equalTo(record::getUpdateTime)
|
||||
.set(createTime).equalTo(record::getCreateTime)
|
||||
.set(crawlSourceId).equalTo(record::getCrawlSourceId)
|
||||
.set(crawlBookId).equalTo(record::getCrawlBookId)
|
||||
.set(crawlLastTime).equalTo(record::getCrawlLastTime)
|
||||
.set(crawlIsStop).equalTo(record::getCrawlIsStop)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
c.set(workDirection).equalTo(record::getWorkDirection)
|
||||
.set(catId).equalTo(record::getCatId)
|
||||
.set(catName).equalTo(record::getCatName)
|
||||
.set(picUrl).equalTo(record::getPicUrl)
|
||||
.set(bookName).equalTo(record::getBookName)
|
||||
.set(authorId).equalTo(record::getAuthorId)
|
||||
.set(authorName).equalTo(record::getAuthorName)
|
||||
.set(bookDesc).equalTo(record::getBookDesc)
|
||||
.set(score).equalTo(record::getScore)
|
||||
.set(bookStatus).equalTo(record::getBookStatus)
|
||||
.set(visitCount).equalTo(record::getVisitCount)
|
||||
.set(wordCount).equalTo(record::getWordCount)
|
||||
.set(commentCount).equalTo(record::getCommentCount)
|
||||
.set(lastIndexId).equalTo(record::getLastIndexId)
|
||||
.set(lastIndexName).equalTo(record::getLastIndexName)
|
||||
.set(lastIndexUpdateTime).equalTo(record::getLastIndexUpdateTime)
|
||||
.set(isVip).equalTo(record::getIsVip)
|
||||
.set(status).equalTo(record::getStatus)
|
||||
.set(updateTime).equalTo(record::getUpdateTime)
|
||||
.set(createTime).equalTo(record::getCreateTime)
|
||||
.set(crawlSourceId).equalTo(record::getCrawlSourceId)
|
||||
.set(crawlBookId).equalTo(record::getCrawlBookId)
|
||||
.set(crawlLastTime).equalTo(record::getCrawlLastTime)
|
||||
.set(crawlIsStop).equalTo(record::getCrawlIsStop)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
);
|
||||
}
|
||||
|
||||
@Generated("org.mybatis.generator.api.MyBatisGenerator")
|
||||
default int updateByPrimaryKeySelective(Book record) {
|
||||
return update(c ->
|
||||
c.set(workDirection).equalToWhenPresent(record::getWorkDirection)
|
||||
.set(catId).equalToWhenPresent(record::getCatId)
|
||||
.set(catName).equalToWhenPresent(record::getCatName)
|
||||
.set(picUrl).equalToWhenPresent(record::getPicUrl)
|
||||
.set(bookName).equalToWhenPresent(record::getBookName)
|
||||
.set(authorId).equalToWhenPresent(record::getAuthorId)
|
||||
.set(authorName).equalToWhenPresent(record::getAuthorName)
|
||||
.set(bookDesc).equalToWhenPresent(record::getBookDesc)
|
||||
.set(score).equalToWhenPresent(record::getScore)
|
||||
.set(bookStatus).equalToWhenPresent(record::getBookStatus)
|
||||
.set(visitCount).equalToWhenPresent(record::getVisitCount)
|
||||
.set(wordCount).equalToWhenPresent(record::getWordCount)
|
||||
.set(commentCount).equalToWhenPresent(record::getCommentCount)
|
||||
.set(yesterdayBuy).equalToWhenPresent(record::getYesterdayBuy)
|
||||
.set(lastIndexId).equalToWhenPresent(record::getLastIndexId)
|
||||
.set(lastIndexName).equalToWhenPresent(record::getLastIndexName)
|
||||
.set(lastIndexUpdateTime).equalToWhenPresent(record::getLastIndexUpdateTime)
|
||||
.set(isVip).equalToWhenPresent(record::getIsVip)
|
||||
.set(status).equalToWhenPresent(record::getStatus)
|
||||
.set(updateTime).equalToWhenPresent(record::getUpdateTime)
|
||||
.set(createTime).equalToWhenPresent(record::getCreateTime)
|
||||
.set(crawlSourceId).equalToWhenPresent(record::getCrawlSourceId)
|
||||
.set(crawlBookId).equalToWhenPresent(record::getCrawlBookId)
|
||||
.set(crawlLastTime).equalToWhenPresent(record::getCrawlLastTime)
|
||||
.set(crawlIsStop).equalToWhenPresent(record::getCrawlIsStop)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
c.set(workDirection).equalToWhenPresent(record::getWorkDirection)
|
||||
.set(catId).equalToWhenPresent(record::getCatId)
|
||||
.set(catName).equalToWhenPresent(record::getCatName)
|
||||
.set(picUrl).equalToWhenPresent(record::getPicUrl)
|
||||
.set(bookName).equalToWhenPresent(record::getBookName)
|
||||
.set(authorId).equalToWhenPresent(record::getAuthorId)
|
||||
.set(authorName).equalToWhenPresent(record::getAuthorName)
|
||||
.set(bookDesc).equalToWhenPresent(record::getBookDesc)
|
||||
.set(score).equalToWhenPresent(record::getScore)
|
||||
.set(bookStatus).equalToWhenPresent(record::getBookStatus)
|
||||
.set(visitCount).equalToWhenPresent(record::getVisitCount)
|
||||
.set(wordCount).equalToWhenPresent(record::getWordCount)
|
||||
.set(commentCount).equalToWhenPresent(record::getCommentCount)
|
||||
.set(lastIndexId).equalToWhenPresent(record::getLastIndexId)
|
||||
.set(lastIndexName).equalToWhenPresent(record::getLastIndexName)
|
||||
.set(lastIndexUpdateTime).equalToWhenPresent(record::getLastIndexUpdateTime)
|
||||
.set(isVip).equalToWhenPresent(record::getIsVip)
|
||||
.set(status).equalToWhenPresent(record::getStatus)
|
||||
.set(updateTime).equalToWhenPresent(record::getUpdateTime)
|
||||
.set(createTime).equalToWhenPresent(record::getCreateTime)
|
||||
.set(crawlSourceId).equalToWhenPresent(record::getCrawlSourceId)
|
||||
.set(crawlBookId).equalToWhenPresent(record::getCrawlBookId)
|
||||
.set(crawlLastTime).equalToWhenPresent(record::getCrawlLastTime)
|
||||
.set(crawlIsStop).equalToWhenPresent(record::getCrawlIsStop)
|
||||
.where(id, isEqualTo(record::getId))
|
||||
);
|
||||
}
|
||||
}
|
@ -8,8 +8,14 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
import org.apache.ibatis.annotations.*;
|
||||
import org.apache.ibatis.annotations.DeleteProvider;
|
||||
import org.apache.ibatis.annotations.InsertProvider;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Result;
|
||||
import org.apache.ibatis.annotations.ResultMap;
|
||||
import org.apache.ibatis.annotations.Results;
|
||||
import org.apache.ibatis.annotations.SelectProvider;
|
||||
import org.apache.ibatis.annotations.UpdateProvider;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
import org.mybatis.dynamic.sql.BasicColumn;
|
||||
import org.mybatis.dynamic.sql.delete.DeleteDSLCompleter;
|
||||
@ -223,8 +229,4 @@ public interface UserMapper {
|
||||
.where(id, isEqualTo(record::getId))
|
||||
);
|
||||
}
|
||||
|
||||
@SelectProvider(type=SqlProviderAdapter.class, method="select")
|
||||
@ResultType(value = Integer.class)
|
||||
Integer selectStatistic(SelectStatementProvider selectStatement);
|
||||
}
|
@ -44,7 +44,7 @@
|
||||
</javaClientGenerator>
|
||||
|
||||
<!--生成全部表tableName设为%-->
|
||||
<table tableName="book"/>
|
||||
<table tableName="crawl_single_task"/>
|
||||
|
||||
<!-- 指定数据库表 -->
|
||||
<!--<table schema="jly" tableName="job_position" domainObjectName="JobPositionTest"/>-->
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>novel</artifactId>
|
||||
<groupId>com.java2nb</groupId>
|
||||
<version>2.9.0</version>
|
||||
<version>2.6.4</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -224,9 +224,6 @@ public class CrawlServiceImpl implements CrawlService {
|
||||
boolean isFindBookId = bookIdMatcher.find();
|
||||
while (isFindBookId) {
|
||||
try {
|
||||
//1.阻塞过程(使用了 sleep,同步锁的 wait,socket 中的 receiver,accept 等方法时)
|
||||
//捕获中断异常InterruptedException来退出线程。
|
||||
//2.非阻塞过程中通过判断中断标志来退出线程。
|
||||
if(Thread.currentThread().isInterrupted()){
|
||||
return;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
<select id="queryNeedUpdateBook" resultType="com.java2nb.novel.entity.Book">
|
||||
|
||||
select id,crawl_source_id,crawl_book_id,crawl_last_time,pic_url
|
||||
from book where last_index_update_time > #{startDate} and crawl_source_id is not null
|
||||
from book where last_index_update_time > #{startDate}
|
||||
order by crawl_last_time
|
||||
limit ${limit}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>novel</artifactId>
|
||||
<groupId>com.java2nb</groupId>
|
||||
<version>2.9.0</version>
|
||||
<version>2.6.4</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -2,9 +2,7 @@ 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.enums.ResponseStatus;
|
||||
import com.java2nb.novel.core.exception.BusinessException;
|
||||
import com.java2nb.novel.core.utils.BeanUtil;
|
||||
import com.java2nb.novel.entity.Author;
|
||||
import com.java2nb.novel.entity.Book;
|
||||
@ -20,7 +18,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author 11797
|
||||
@ -60,7 +57,15 @@ public class AuthorController extends BaseController{
|
||||
@PostMapping("addBook")
|
||||
public ResultBean addBook(@RequestParam("bookDesc") String bookDesc,Book book,HttpServletRequest request){
|
||||
|
||||
Author author = checkAuthor(request);
|
||||
//查询作家信息
|
||||
Author author = authorService.queryAuthor(getUserDetails(request).getId());
|
||||
|
||||
//判断作者状态是否正常
|
||||
if(author.getStatus()==1){
|
||||
//封禁状态,不能发布小说
|
||||
return ResultBean.fail(ResponseStatus.AUTHOR_STATUS_FORBIDDEN);
|
||||
|
||||
}
|
||||
|
||||
//bookDesc不能使用book对象来接收,否则会自动去掉前面的空格
|
||||
book.setBookDesc(bookDesc
|
||||
@ -77,7 +82,14 @@ public class AuthorController extends BaseController{
|
||||
* */
|
||||
@PostMapping("updateBookStatus")
|
||||
public ResultBean updateBookStatus(Long bookId,Byte status,HttpServletRequest request){
|
||||
Author author = checkAuthor(request);
|
||||
//查询作家信息
|
||||
Author author = authorService.queryAuthor(getUserDetails(request).getId());
|
||||
|
||||
//判断作者状态是否正常
|
||||
if(author.getStatus()==1){
|
||||
//封禁状态,不能发布小说
|
||||
return ResultBean.fail(ResponseStatus.AUTHOR_STATUS_FORBIDDEN);
|
||||
}
|
||||
|
||||
//更新小说状态,上架或下架
|
||||
bookService.updateBookStatus(bookId,status,author.getId());
|
||||
@ -87,132 +99,26 @@ public class AuthorController extends BaseController{
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除章节
|
||||
*/
|
||||
@PostMapping("deleteIndex")
|
||||
public ResultBean deleteIndex(Long indexId, HttpServletRequest request) {
|
||||
|
||||
Author author = checkAuthor(request);
|
||||
|
||||
//删除章节
|
||||
bookService.deleteIndex(indexId, author.getId());
|
||||
|
||||
return ResultBean.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新章节名
|
||||
*/
|
||||
@PostMapping("updateIndexName")
|
||||
public ResultBean updateIndexName(Long indexId, String indexName, HttpServletRequest request) {
|
||||
|
||||
Author author = checkAuthor(request);
|
||||
|
||||
//更新章节名
|
||||
bookService.updateIndexName(indexId, indexName, author.getId());
|
||||
|
||||
return ResultBean.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 发布章节内容
|
||||
*/
|
||||
* */
|
||||
@PostMapping("addBookContent")
|
||||
public ResultBean addBookContent(Long bookId, String indexName, String content,Byte isVip, HttpServletRequest request) {
|
||||
Author author = checkAuthor(request);
|
||||
|
||||
content = content.replaceAll("\\n", "<br>")
|
||||
.replaceAll("\\s", " ");
|
||||
//发布章节内容
|
||||
bookService.addBookContent(bookId, indexName, content,isVip, author.getId());
|
||||
|
||||
return ResultBean.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询章节内容
|
||||
*/
|
||||
@PostMapping("queryIndexContent")
|
||||
public ResultBean queryIndexContent(Long indexId, HttpServletRequest request) {
|
||||
|
||||
Author author = checkAuthor(request);
|
||||
|
||||
String content = bookService.queryIndexContent(indexId, author.getId());
|
||||
|
||||
content = content.replaceAll("<br>", "\n")
|
||||
.replaceAll(" ", " ");
|
||||
|
||||
return ResultBean.ok(content);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新章节内容
|
||||
*/
|
||||
@PostMapping("updateBookContent")
|
||||
public ResultBean updateBookContent(Long indexId, String indexName, String content, HttpServletRequest request) {
|
||||
Author author = checkAuthor(request);
|
||||
|
||||
content = content.replaceAll("\\n", "<br>")
|
||||
.replaceAll("\\s", " ");
|
||||
//更新章节内容
|
||||
bookService.updateBookContent(indexId, indexName, content, author.getId());
|
||||
|
||||
return ResultBean.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 作家日收入统计数据分页列表查询
|
||||
* */
|
||||
@PostMapping("listIncomeDailyByPage")
|
||||
public ResultBean listIncomeDailyByPage(@RequestParam(value = "curr", defaultValue = "1") int page,
|
||||
@RequestParam(value = "limit", defaultValue = "10") int pageSize ,
|
||||
@RequestParam(value = "bookId", defaultValue = "0") Long bookId,
|
||||
@RequestParam(value = "startTime",defaultValue = "2020-05-01") Date startTime,
|
||||
@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)
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 作家月收入统计数据分页列表查询
|
||||
* */
|
||||
@PostMapping("listIncomeMonthByPage")
|
||||
public ResultBean listIncomeMonthByPage(@RequestParam(value = "curr", defaultValue = "1") int page,
|
||||
@RequestParam(value = "limit", defaultValue = "10") int pageSize ,
|
||||
@RequestParam(value = "bookId", defaultValue = "0") Long bookId,
|
||||
HttpServletRequest request){
|
||||
|
||||
return ResultBean.ok(new PageInfo<>(authorService.listIncomeMonthByPage(page,pageSize,getUserDetails(request).getId(),bookId)
|
||||
));
|
||||
}
|
||||
|
||||
private Author checkAuthor(HttpServletRequest request) {
|
||||
|
||||
UserDetails userDetails = getUserDetails(request);
|
||||
if (userDetails == null) {
|
||||
throw new BusinessException(ResponseStatus.NO_LOGIN);
|
||||
}
|
||||
|
||||
public ResultBean addBookContent(Long bookId,String indexName,String content,HttpServletRequest request){
|
||||
//查询作家信息
|
||||
Author author = authorService.queryAuthor(userDetails.getId());
|
||||
Author author = authorService.queryAuthor(getUserDetails(request).getId());
|
||||
|
||||
//判断作者状态是否正常
|
||||
if (author.getStatus() == 1) {
|
||||
if(author.getStatus()==1){
|
||||
//封禁状态,不能发布小说
|
||||
throw new BusinessException(ResponseStatus.AUTHOR_STATUS_FORBIDDEN);
|
||||
return ResultBean.fail(ResponseStatus.AUTHOR_STATUS_FORBIDDEN);
|
||||
}
|
||||
|
||||
content = content.replaceAll("\\n","<br>")
|
||||
.replaceAll("\\s"," ");
|
||||
//发布章节内容
|
||||
bookService.addBookContent(bookId,indexName,content,author.getId());
|
||||
|
||||
return author;
|
||||
|
||||
|
||||
return ResultBean.ok();
|
||||
}
|
||||
|
||||
|
||||
|
@ -167,15 +167,7 @@ public class BookController extends BaseController{
|
||||
* */
|
||||
@PostMapping("queryNewIndexList")
|
||||
public ResultBean queryNewIndexList(Long bookId){
|
||||
return ResultBean.ok(bookService.queryIndexList(bookId,"index_num desc",1,10));
|
||||
}
|
||||
|
||||
/**
|
||||
* 目录页
|
||||
* */
|
||||
@PostMapping("/queryIndexList")
|
||||
public ResultBean indexList(Long bookId,@RequestParam(value = "curr", defaultValue = "1") int page, @RequestParam(value = "limit", defaultValue = "5") int pageSize,@RequestParam(value = "orderBy") String orderBy) {
|
||||
return ResultBean.ok(new PageInfo<>(bookService.queryIndexList(bookId,orderBy,page,pageSize)));
|
||||
return ResultBean.ok(bookService.queryIndexList(bookId,"index_num desc",10));
|
||||
}
|
||||
|
||||
|
||||
|
@ -101,11 +101,9 @@ public class PageController extends BaseController{
|
||||
public String bookDetail(@PathVariable("bookId") Long bookId, Model model) {
|
||||
Book book = bookService.queryBookDetail(bookId);
|
||||
model.addAttribute("book",book);
|
||||
if(book.getLastIndexId() != null) {
|
||||
//查询首章目录ID
|
||||
Long firstBookIndexId = bookService.queryFirstBookIndexId(bookId);
|
||||
model.addAttribute("firstBookIndexId", firstBookIndexId);
|
||||
}
|
||||
//查询首章目录ID
|
||||
Long firstBookIndexId = bookService.queryFirstBookIndexId(bookId);
|
||||
model.addAttribute("firstBookIndexId",firstBookIndexId);
|
||||
return ThreadLocalUtil.getTemplateDir()+"book/book_detail";
|
||||
}
|
||||
|
||||
@ -116,7 +114,7 @@ public class PageController extends BaseController{
|
||||
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);
|
||||
List<BookIndex> bookIndexList = bookService.queryIndexList(bookId,null,null);
|
||||
model.addAttribute("bookIndexList",bookIndexList);
|
||||
model.addAttribute("bookIndexCount",bookIndexList.size());
|
||||
return ThreadLocalUtil.getTemplateDir()+"book/book_index";
|
||||
@ -142,8 +140,6 @@ public class PageController extends BaseController{
|
||||
//查询内容
|
||||
BookContent bookContent = bookService.queryBookContent(bookIndex.getId());
|
||||
model.addAttribute("bookContent",bookContent);
|
||||
|
||||
boolean needBuy = false;
|
||||
//判断该目录是否收费
|
||||
if(bookIndex.getIsVip()!=null && bookIndex.getIsVip() == 1 ){
|
||||
UserDetails user = getUserDetails(request);
|
||||
@ -156,10 +152,11 @@ public class PageController extends BaseController{
|
||||
if(!isBuy){
|
||||
//没有购买过,需要购买
|
||||
bookContent.setContent(null);
|
||||
needBuy = true;
|
||||
model.addAttribute("needBuy",true);
|
||||
return "book/book_content";
|
||||
}
|
||||
}
|
||||
model.addAttribute("needBuy",needBuy);
|
||||
model.addAttribute("needBuy",false);
|
||||
return ThreadLocalUtil.getTemplateDir()+"book/book_content";
|
||||
}
|
||||
|
||||
|
@ -282,7 +282,6 @@ public class UserController extends BaseController {
|
||||
if (userDetails == null) {
|
||||
return ResultBean.fail(ResponseStatus.NO_LOGIN);
|
||||
}
|
||||
buyRecord.setBuyAmount(bookService.queryBookIndex(buyRecord.getBookIndexId()).getBookPrice());
|
||||
userService.buyBookIndex(userDetails.getId(),buyRecord);
|
||||
return ResultBean.ok();
|
||||
}
|
||||
|
@ -1,24 +0,0 @@
|
||||
package com.java2nb.novel.core.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 作家收入配置
|
||||
* @author cd
|
||||
*/
|
||||
@Component
|
||||
@Data
|
||||
@ConfigurationProperties(prefix = "author.income")
|
||||
public class AuthorIncomeConfig {
|
||||
|
||||
private BigDecimal taxRate;
|
||||
|
||||
private BigDecimal shareProportion;
|
||||
|
||||
private BigDecimal exchangeProportion;
|
||||
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
package com.java2nb.novel.core.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 章节费用配置
|
||||
* @author cd
|
||||
*/
|
||||
@Component
|
||||
@Data
|
||||
@ConfigurationProperties(prefix = "book.price")
|
||||
public class BookPriceConfig {
|
||||
|
||||
private BigDecimal wordCount;
|
||||
|
||||
private BigDecimal value;
|
||||
|
||||
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
package com.java2nb.novel.core.config;
|
||||
|
||||
import com.java2nb.novel.core.converter.DateConverter;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.format.FormatterRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
|
||||
|
||||
/**
|
||||
* @author xiongxiaoyang
|
||||
*/
|
||||
@Configuration
|
||||
public class WebMvcConfig extends WebMvcConfigurerAdapter {
|
||||
@Override
|
||||
public void addFormatters(FormatterRegistry registry) {
|
||||
registry.addConverter(new DateConverter());
|
||||
}
|
||||
}
|
@ -1,142 +0,0 @@
|
||||
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;
|
||||
import com.java2nb.novel.entity.Book;
|
||||
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.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作家日收入统计任务
|
||||
*
|
||||
* @author cd
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class DailyIncomeStaSchedule {
|
||||
|
||||
private final AuthorService authorService;
|
||||
|
||||
private final UserService userService;
|
||||
|
||||
private final BookService bookService;
|
||||
|
||||
|
||||
/**
|
||||
* 每天凌晨0点统计上一天数据
|
||||
*/
|
||||
@Scheduled(cron = "0 0 0 * * ?")
|
||||
public void statistics() {
|
||||
|
||||
//获取昨天的日期时间
|
||||
Date yesterday = DateUtil.getYesterday();
|
||||
//获取昨天的开始时间
|
||||
Date startTime = DateUtil.getDateStartTime(yesterday);
|
||||
//获取昨天的结束时间
|
||||
Date endTime = DateUtil.getDateEndTime(yesterday);
|
||||
|
||||
//每次查询的作家数量
|
||||
int needAuthorNumber = 10;
|
||||
//查询出来的真实作家数量
|
||||
int realAuthorNumber;
|
||||
//每次查询最大申请时间
|
||||
Date maxAuthorCreateTime = new Date();
|
||||
do {
|
||||
//1.查询作家列表
|
||||
List<Author> authors = authorService.queryAuthorList(needAuthorNumber, maxAuthorCreateTime);
|
||||
realAuthorNumber = authors.size();
|
||||
for (Author author : authors) {
|
||||
maxAuthorCreateTime = author.getCreateTime();
|
||||
Long authorId = author.getId();
|
||||
Long userId = author.getUserId();
|
||||
//2.查询作家作品
|
||||
List<Book> books = bookService.queryBookList(authorId);
|
||||
|
||||
int buyTotalMember = 0;
|
||||
int buyTotalCount = 0;
|
||||
int buyTotalAccount = 0;
|
||||
List<Long> bookIds = new ArrayList<>(books.size());
|
||||
for (Book book : books) {
|
||||
|
||||
Long bookId = book.getId();
|
||||
|
||||
//3.查询该作家作品昨日的订阅人数
|
||||
int buyMember = userService.queryBuyMember(bookId, startTime, endTime);
|
||||
|
||||
int buyCount = 0;
|
||||
|
||||
int buyAccount = 0;
|
||||
|
||||
|
||||
if (buyMember > 0) {
|
||||
//4.查询该作家作品昨日的订阅次数
|
||||
buyCount = userService.queryBuyCount(bookId, startTime, endTime);
|
||||
//5.查询该作家作品昨日的订阅总额
|
||||
buyAccount = userService.queryBuyAccount(bookId, startTime, endTime);
|
||||
}
|
||||
|
||||
//6.判断该作家作品昨日收入数据是否统计入库
|
||||
boolean isStatistics = authorService.queryIsStatisticsDaily(bookId, yesterday);
|
||||
if (!isStatistics) {
|
||||
//7.该作家作品昨日收入数据未统计入库,分作品统计数据入库
|
||||
AuthorIncomeDetail authorIncomeDetail = new AuthorIncomeDetail();
|
||||
authorIncomeDetail.setAuthorId(authorId);
|
||||
authorIncomeDetail.setUserId(userId);
|
||||
authorIncomeDetail.setBookId(bookId);
|
||||
authorIncomeDetail.setIncomeDate(yesterday);
|
||||
authorIncomeDetail.setIncomeNumber(buyMember);
|
||||
authorIncomeDetail.setIncomeCount(buyCount);
|
||||
authorIncomeDetail.setIncomeAccount(buyAccount);
|
||||
authorIncomeDetail.setCreateTime(new Date());
|
||||
authorService.saveDailyIncomeSta(authorIncomeDetail);
|
||||
}
|
||||
|
||||
|
||||
buyTotalCount += buyCount;
|
||||
buyTotalAccount += buyAccount;
|
||||
bookIds.add(bookId);
|
||||
|
||||
}
|
||||
|
||||
//8.判断该作家所有作品昨日收入数据是否统计入库
|
||||
boolean isStatistics = authorService.queryIsStatisticsDaily(authorId,0L, yesterday);
|
||||
if (!isStatistics) {
|
||||
if (buyTotalCount > 0) {
|
||||
//总订阅次数大于0,则订阅人数也大于0
|
||||
buyTotalMember = userService.queryBuyTotalMember(bookIds, startTime, endTime);
|
||||
}
|
||||
|
||||
//9.作家所有作品昨日收入数据统计入库
|
||||
AuthorIncomeDetail authorIncomeAllDetail = new AuthorIncomeDetail();
|
||||
authorIncomeAllDetail.setAuthorId(authorId);
|
||||
authorIncomeAllDetail.setUserId(userId);
|
||||
authorIncomeAllDetail.setBookId(0L);
|
||||
authorIncomeAllDetail.setIncomeDate(yesterday);
|
||||
authorIncomeAllDetail.setIncomeNumber(buyTotalMember);
|
||||
authorIncomeAllDetail.setIncomeCount(buyTotalCount);
|
||||
authorIncomeAllDetail.setIncomeAccount(buyTotalAccount);
|
||||
authorIncomeAllDetail.setCreateTime(new Date());
|
||||
authorService.saveDailyIncomeSta(authorIncomeAllDetail);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} while (needAuthorNumber == realAuthorNumber);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,129 +0,0 @@
|
||||
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.*;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 作家日收入统计任务
|
||||
*
|
||||
* @author cd
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class MonthIncomeStaSchedule {
|
||||
|
||||
private final AuthorService authorService;
|
||||
|
||||
private final BookService bookService;
|
||||
|
||||
private final AuthorIncomeConfig authorIncomeConfig;
|
||||
|
||||
/**
|
||||
* 每个月1号凌晨2点统计上个月数据
|
||||
*/
|
||||
@Scheduled(cron = "0 0 2 1 * ?")
|
||||
public void statistics() {
|
||||
|
||||
//获取上个月的开始时间和结束时间
|
||||
Date startTime = DateUtil.getLastMonthStartTime();
|
||||
Date endTime = DateUtil.getLastMonthEndTime();
|
||||
|
||||
//每次查询的作家数量
|
||||
int needAuthorNumber = 10;
|
||||
//查询出来的真实作家数量
|
||||
int realAuthorNumber;
|
||||
//每次查询最大申请时间
|
||||
Date maxAuthorCreateTime = new Date();
|
||||
do {
|
||||
//1.查询作家列表
|
||||
List<Author> authors = authorService.queryAuthorList(needAuthorNumber, maxAuthorCreateTime);
|
||||
realAuthorNumber = authors.size();
|
||||
for (Author author : authors) {
|
||||
maxAuthorCreateTime = author.getCreateTime();
|
||||
Long authorId = author.getId();
|
||||
Long userId = author.getUserId();
|
||||
//2.查询作家作品
|
||||
List<Book> books = bookService.queryBookList(authorId);
|
||||
|
||||
Long totalPreTaxIncome = 0L;
|
||||
Long totalAfterTaxIncome = 0L;
|
||||
for (Book book : books) {
|
||||
|
||||
Long bookId = book.getId();
|
||||
|
||||
|
||||
//3.月收入数据未统计入库,分作品统计数据入库
|
||||
Long monthIncome = authorService.queryTotalAccount(userId, bookId, startTime, endTime);
|
||||
|
||||
BigDecimal monthIncomeShare = new BigDecimal(monthIncome)
|
||||
.multiply(authorIncomeConfig.getShareProportion());
|
||||
Long preTaxIncome = monthIncomeShare
|
||||
.multiply(authorIncomeConfig.getExchangeProportion())
|
||||
.multiply(new BigDecimal(100))
|
||||
.longValue();
|
||||
|
||||
totalPreTaxIncome += preTaxIncome;
|
||||
|
||||
Long afterTaxIncome = monthIncomeShare
|
||||
.multiply(authorIncomeConfig.getTaxRate())
|
||||
.multiply(authorIncomeConfig.getExchangeProportion())
|
||||
.multiply(new BigDecimal(100))
|
||||
.longValue();
|
||||
|
||||
totalAfterTaxIncome += afterTaxIncome;
|
||||
|
||||
//4.查询月收入统计是否入库
|
||||
if (monthIncome > 0 && !authorService.queryIsStatisticsMonth(bookId, endTime)) {
|
||||
AuthorIncome authorIncome = new AuthorIncome();
|
||||
authorIncome.setAuthorId(authorId);
|
||||
authorIncome.setUserId(userId);
|
||||
authorIncome.setBookId(bookId);
|
||||
authorIncome.setPreTaxIncome(preTaxIncome);
|
||||
authorIncome.setAfterTaxIncome(afterTaxIncome);
|
||||
authorIncome.setIncomeMonth(endTime);
|
||||
authorIncome.setCreateTime(new Date());
|
||||
|
||||
authorService.saveAuthorIncomeSta(authorIncome);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (totalPreTaxIncome > 0 && !authorService.queryIsStatisticsMonth(0L, endTime)) {
|
||||
|
||||
AuthorIncome authorIncome = new AuthorIncome();
|
||||
authorIncome.setAuthorId(authorId);
|
||||
authorIncome.setUserId(userId);
|
||||
authorIncome.setBookId(0L);
|
||||
authorIncome.setPreTaxIncome(totalPreTaxIncome);
|
||||
authorIncome.setAfterTaxIncome(totalAfterTaxIncome);
|
||||
authorIncome.setIncomeMonth(endTime);
|
||||
authorIncome.setCreateTime(new Date());
|
||||
|
||||
authorService.saveAuthorIncomeSta(authorIncome);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
} while (needAuthorNumber == realAuthorNumber);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -2,11 +2,8 @@ package com.java2nb.novel.service;
|
||||
|
||||
|
||||
import com.java2nb.novel.entity.Author;
|
||||
import com.java2nb.novel.entity.AuthorIncome;
|
||||
import com.java2nb.novel.entity.AuthorIncomeDetail;
|
||||
import com.java2nb.novel.entity.FriendLink;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -42,87 +39,4 @@ public interface AuthorService {
|
||||
* @return 作家对象
|
||||
* */
|
||||
Author queryAuthor(Long userId);
|
||||
|
||||
/**
|
||||
* 查询作家列表
|
||||
* @return 作家列表
|
||||
* @param limit 查询条数
|
||||
* @param maxAuthorCreateTime 最大申请时间
|
||||
*/
|
||||
List<Author> queryAuthorList(int limit, Date maxAuthorCreateTime);
|
||||
|
||||
/**
|
||||
* 查询收入日统计是否入库
|
||||
* @param bookId 作品ID
|
||||
* @param date 收入时间
|
||||
* @return true:已入库,false:未入库
|
||||
*/
|
||||
boolean queryIsStatisticsDaily(Long bookId, Date date);
|
||||
|
||||
|
||||
/**
|
||||
* 保存日收入统计(按作品)
|
||||
* @param authorIncomeDetail 收入详情
|
||||
* */
|
||||
void saveDailyIncomeSta(AuthorIncomeDetail authorIncomeDetail);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询月收入统计是否入库
|
||||
* @param bookId 作品ID
|
||||
* @param incomeDate 收入时间
|
||||
* @return true:已入库,false:未入库
|
||||
* */
|
||||
boolean queryIsStatisticsMonth(Long bookId, Date incomeDate);
|
||||
|
||||
/**
|
||||
* 查询时间段内总订阅额
|
||||
*
|
||||
* @param userId
|
||||
* @param bookId 作品ID
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 订阅额(屋币)
|
||||
* */
|
||||
Long queryTotalAccount(Long userId, Long bookId, Date startTime, Date endTime);
|
||||
|
||||
|
||||
/**
|
||||
* 保存月收入统计
|
||||
* @param authorIncome 收入详情
|
||||
* */
|
||||
void saveAuthorIncomeSta(AuthorIncome authorIncome);
|
||||
|
||||
/**
|
||||
* 查询收入日统计是否入库
|
||||
* @param authorId 作家ID
|
||||
* @param bookId 作品ID
|
||||
* @param date 收入时间
|
||||
* @return true:已入库,false:未入库
|
||||
*/
|
||||
boolean queryIsStatisticsDaily(Long authorId, Long bookId, Date date);
|
||||
|
||||
/**
|
||||
*作家日收入统计数据分页列表查询
|
||||
* @param userId
|
||||
* @param page 页码
|
||||
* @param pageSize 分页大小
|
||||
* @param bookId 小说ID
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 日收入统计数据列表
|
||||
*/
|
||||
List<AuthorIncomeDetail> listIncomeDailyByPage(int page, int pageSize, Long userId, Long bookId, Date startTime, Date endTime);
|
||||
|
||||
|
||||
/**
|
||||
* 作家月收入统计数据分页列表查询
|
||||
* @param page 页码
|
||||
* @param pageSize 分页大小
|
||||
* @param userId 用户ID
|
||||
* @param bookId 小说ID
|
||||
* @return
|
||||
* */
|
||||
List<AuthorIncome> listIncomeMonthByPage(int page, int pageSize, Long userId, Long bookId);
|
||||
}
|
||||
|
@ -66,12 +66,10 @@ public interface BookService {
|
||||
* 查询目录列表
|
||||
* @param bookId 书籍ID
|
||||
* @param orderBy 排序
|
||||
* @param page 查询页码
|
||||
*@param pageSize 分页大小
|
||||
*@param limit 查询条数
|
||||
*@return 目录集合
|
||||
* */
|
||||
List<BookIndex> queryIndexList(Long bookId, String orderBy, Integer page, Integer pageSize);
|
||||
|
||||
List<BookIndex> queryIndexList(Long bookId, String orderBy, Integer limit);
|
||||
|
||||
/**
|
||||
* 查询目录
|
||||
@ -227,9 +225,9 @@ public interface BookService {
|
||||
* @param bookId 小说ID
|
||||
* @param indexName 章节名
|
||||
* @param content 章节内容
|
||||
* @param isVip 是否收费
|
||||
* @param authorId 作者ID */
|
||||
void addBookContent(Long bookId, String indexName, String content, Byte isVip, Long authorId);
|
||||
* @param authorId 作者ID
|
||||
* */
|
||||
void addBookContent(Long bookId, String indexName, String content, Long authorId);
|
||||
|
||||
|
||||
/**
|
||||
@ -239,43 +237,4 @@ public interface BookService {
|
||||
* @return 书籍列表
|
||||
* */
|
||||
List<Book> queryBookByUpdateTimeByPage(Date startDate, int limit);
|
||||
|
||||
/**
|
||||
* 查询作品列表
|
||||
* @param authorId 作家ID
|
||||
* @return 作品列表
|
||||
*/
|
||||
List<Book> queryBookList(Long authorId);
|
||||
|
||||
/**
|
||||
* 删除章节
|
||||
* @param indexId
|
||||
* @param authorId 作家ID
|
||||
*/
|
||||
void deleteIndex(Long indexId, Long authorId);
|
||||
|
||||
/**
|
||||
* 更新章节名
|
||||
* @param indexId
|
||||
* @param indexName
|
||||
* @param authorId
|
||||
*/
|
||||
void updateIndexName(Long indexId, String indexName, Long authorId);
|
||||
|
||||
/**
|
||||
* 查询章节内容
|
||||
* @param indexId
|
||||
* @param authorId
|
||||
* @return
|
||||
*/
|
||||
String queryIndexContent(Long indexId, Long authorId);
|
||||
|
||||
/**
|
||||
* 更新章节内容
|
||||
* @param indexId
|
||||
* @param indexName
|
||||
* @param content
|
||||
* @param authorId
|
||||
*/
|
||||
void updateBookContent( Long indexId, String indexName, String content, Long authorId);
|
||||
}
|
||||
|
@ -9,7 +9,6 @@ import com.java2nb.novel.vo.BookShelfVO;
|
||||
import com.java2nb.novel.entity.User;
|
||||
import com.java2nb.novel.vo.UserFeedbackVO;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -139,40 +138,4 @@ public interface UserService {
|
||||
* @param buyRecord 购买信息
|
||||
* */
|
||||
void buyBookIndex(Long userId, UserBuyRecord buyRecord);
|
||||
|
||||
/**
|
||||
* 查询作品时间段内的订阅人数
|
||||
* @param bookId 作品ID
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 订阅人数
|
||||
*/
|
||||
int queryBuyMember(Long bookId, Date startTime, Date endTime);
|
||||
|
||||
/**
|
||||
* 查询作品时间段内的订阅次数
|
||||
* @param bookId 作品ID
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 订阅次数
|
||||
*/
|
||||
int queryBuyCount(Long bookId, Date startTime, Date endTime);
|
||||
|
||||
/**
|
||||
* 查询作品时间段内的订阅总额(屋币)
|
||||
* @param bookId 作品ID
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 订阅总额(屋币)
|
||||
*/
|
||||
int queryBuyAccount(Long bookId, Date startTime, Date endTime);
|
||||
|
||||
/**
|
||||
* 查询作者时间段内的订阅人数
|
||||
* @param bookIds z作者的所有作品ID
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 订阅人数
|
||||
*/
|
||||
int queryBuyTotalMember(List<Long> bookIds, Date startTime, Date endTime);
|
||||
}
|
||||
|
@ -1,13 +1,10 @@
|
||||
package com.java2nb.novel.service.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.java2nb.novel.core.cache.CacheKey;
|
||||
import com.java2nb.novel.core.cache.CacheService;
|
||||
import com.java2nb.novel.core.enums.ResponseStatus;
|
||||
import com.java2nb.novel.core.exception.BusinessException;
|
||||
import com.java2nb.novel.entity.Author;
|
||||
import com.java2nb.novel.entity.AuthorIncome;
|
||||
import com.java2nb.novel.entity.AuthorIncomeDetail;
|
||||
import com.java2nb.novel.entity.FriendLink;
|
||||
import com.java2nb.novel.mapper.*;
|
||||
import com.java2nb.novel.service.AuthorService;
|
||||
@ -41,11 +38,6 @@ public class AuthorServiceImpl implements AuthorService {
|
||||
|
||||
private final AuthorCodeMapper authorCodeMapper;
|
||||
|
||||
private final AuthorIncomeDetailMapper authorIncomeDetailMapper;
|
||||
|
||||
|
||||
private final AuthorIncomeMapper authorIncomeMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean checkPenName(String penName) {
|
||||
@ -97,108 +89,4 @@ public class AuthorServiceImpl implements AuthorService {
|
||||
.build()
|
||||
.render(RenderingStrategies.MYBATIS3)).get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Author> queryAuthorList(int needAuthorNumber, Date maxAuthorCreateTime) {
|
||||
return authorMapper.selectMany(select(AuthorDynamicSqlSupport.id, AuthorDynamicSqlSupport.userId)
|
||||
.from(AuthorDynamicSqlSupport.author)
|
||||
.where(AuthorDynamicSqlSupport.createTime, isLessThan(maxAuthorCreateTime))
|
||||
.orderBy(AuthorDynamicSqlSupport.createTime.descending())
|
||||
.limit(needAuthorNumber)
|
||||
.build()
|
||||
.render(RenderingStrategies.MYBATIS3));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean queryIsStatisticsDaily(Long bookId, Date date) {
|
||||
|
||||
return authorIncomeDetailMapper.selectMany(select(AuthorIncomeDetailDynamicSqlSupport.id)
|
||||
.from(AuthorIncomeDetailDynamicSqlSupport.authorIncomeDetail)
|
||||
.where(AuthorIncomeDetailDynamicSqlSupport.bookId, isEqualTo(bookId))
|
||||
.and(AuthorIncomeDetailDynamicSqlSupport.incomeDate, isEqualTo(date))
|
||||
.build()
|
||||
.render(RenderingStrategies.MYBATIS3)).size() > 0;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveDailyIncomeSta(AuthorIncomeDetail authorIncomeDetail) {
|
||||
authorIncomeDetailMapper.insertSelective(authorIncomeDetail);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean queryIsStatisticsMonth(Long bookId, Date incomeDate) {
|
||||
return authorIncomeMapper.selectMany(select(AuthorIncomeDynamicSqlSupport.id)
|
||||
.from(AuthorIncomeDynamicSqlSupport.authorIncome)
|
||||
.where(AuthorIncomeDynamicSqlSupport.bookId, isEqualTo(bookId))
|
||||
.and(AuthorIncomeDynamicSqlSupport.incomeMonth, isEqualTo(incomeDate))
|
||||
.build()
|
||||
.render(RenderingStrategies.MYBATIS3)).size() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long queryTotalAccount(Long userId, Long bookId, Date startTime, Date endTime) {
|
||||
|
||||
return authorIncomeDetailMapper.selectStatistic(select(sum(AuthorIncomeDetailDynamicSqlSupport.incomeAccount))
|
||||
.from(AuthorIncomeDetailDynamicSqlSupport.authorIncomeDetail)
|
||||
.where(AuthorIncomeDetailDynamicSqlSupport.userId, isEqualTo(userId))
|
||||
.and(AuthorIncomeDetailDynamicSqlSupport.bookId, isEqualTo(bookId))
|
||||
.and(AuthorIncomeDetailDynamicSqlSupport.incomeDate, isGreaterThanOrEqualTo(startTime))
|
||||
.and(AuthorIncomeDetailDynamicSqlSupport.incomeDate, isLessThanOrEqualTo(endTime))
|
||||
.build()
|
||||
.render(RenderingStrategies.MYBATIS3));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void saveAuthorIncomeSta(AuthorIncome authorIncome) {
|
||||
authorIncomeMapper.insertSelective(authorIncome);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean queryIsStatisticsDaily(Long authorId, Long bookId, Date date) {
|
||||
return authorIncomeDetailMapper.selectMany(select(AuthorIncomeDetailDynamicSqlSupport.id)
|
||||
.from(AuthorIncomeDetailDynamicSqlSupport.authorIncomeDetail)
|
||||
.where(AuthorIncomeDetailDynamicSqlSupport.authorId, isEqualTo(authorId))
|
||||
.and(AuthorIncomeDetailDynamicSqlSupport.bookId, isEqualTo(bookId))
|
||||
.and(AuthorIncomeDetailDynamicSqlSupport.incomeDate, isEqualTo(date))
|
||||
.build()
|
||||
.render(RenderingStrategies.MYBATIS3)).size() > 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<AuthorIncomeDetail> listIncomeDailyByPage(int page, int pageSize, Long userId, Long bookId, Date startTime, Date endTime) {
|
||||
PageHelper.startPage(page, pageSize);
|
||||
return authorIncomeDetailMapper.selectMany(
|
||||
select(AuthorIncomeDetailDynamicSqlSupport.incomeDate, AuthorIncomeDetailDynamicSqlSupport.incomeAccount
|
||||
, AuthorIncomeDetailDynamicSqlSupport.incomeCount, AuthorIncomeDetailDynamicSqlSupport.incomeNumber)
|
||||
.from(AuthorIncomeDetailDynamicSqlSupport.authorIncomeDetail)
|
||||
.where(AuthorIncomeDetailDynamicSqlSupport.userId, isEqualTo(userId))
|
||||
.and(AuthorIncomeDetailDynamicSqlSupport.bookId, isEqualTo(bookId))
|
||||
.and(AuthorIncomeDetailDynamicSqlSupport.incomeDate, isGreaterThanOrEqualTo(startTime))
|
||||
.and(AuthorIncomeDetailDynamicSqlSupport.incomeDate, isLessThanOrEqualTo(endTime))
|
||||
.orderBy(AuthorIncomeDetailDynamicSqlSupport.incomeDate.descending())
|
||||
.build()
|
||||
.render(RenderingStrategies.MYBATIS3));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<AuthorIncome> listIncomeMonthByPage(int page, int pageSize, Long userId, Long bookId) {
|
||||
PageHelper.startPage(page, pageSize);
|
||||
return authorIncomeMapper.selectMany(select(AuthorIncomeDynamicSqlSupport.incomeMonth
|
||||
, AuthorIncomeDynamicSqlSupport.preTaxIncome
|
||||
, AuthorIncomeDynamicSqlSupport.afterTaxIncome
|
||||
, AuthorIncomeDynamicSqlSupport.payStatus
|
||||
, AuthorIncomeDynamicSqlSupport.confirmStatus)
|
||||
.from(AuthorIncomeDynamicSqlSupport.authorIncome)
|
||||
.where(AuthorIncomeDynamicSqlSupport.userId, isEqualTo(userId))
|
||||
.and(AuthorIncomeDynamicSqlSupport.bookId, isEqualTo(bookId))
|
||||
.orderBy(AuthorIncomeDynamicSqlSupport.incomeMonth.descending())
|
||||
.build()
|
||||
.render(RenderingStrategies.MYBATIS3));
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
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.enums.ResponseStatus;
|
||||
import com.java2nb.novel.core.exception.BusinessException;
|
||||
import com.java2nb.novel.core.utils.*;
|
||||
@ -26,7 +25,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.mybatis.dynamic.sql.SortSpecification;
|
||||
import org.mybatis.dynamic.sql.render.RenderingStrategies;
|
||||
import org.mybatis.dynamic.sql.render.RenderingStrategy;
|
||||
import org.mybatis.dynamic.sql.select.render.SelectStatementProvider;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@ -34,7 +32,6 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import tk.mybatis.orderbyhelper.OrderByHelper;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@ -44,7 +41,6 @@ import java.util.stream.Collectors;
|
||||
import static com.java2nb.novel.mapper.BookCategoryDynamicSqlSupport.bookCategory;
|
||||
import static com.java2nb.novel.mapper.BookCommentDynamicSqlSupport.bookComment;
|
||||
import static com.java2nb.novel.mapper.BookContentDynamicSqlSupport.bookContent;
|
||||
import static com.java2nb.novel.mapper.BookContentDynamicSqlSupport.content;
|
||||
import static com.java2nb.novel.mapper.BookDynamicSqlSupport.*;
|
||||
import static com.java2nb.novel.mapper.BookIndexDynamicSqlSupport.bookIndex;
|
||||
import static org.mybatis.dynamic.sql.SqlBuilder.*;
|
||||
@ -89,8 +85,6 @@ public class BookServiceImpl implements BookService {
|
||||
|
||||
private final FileService fileService;
|
||||
|
||||
private final BookPriceConfig bookPriceConfig;
|
||||
|
||||
|
||||
@SneakyThrows
|
||||
@Override
|
||||
@ -239,12 +233,12 @@ public class BookServiceImpl implements BookService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BookIndex> queryIndexList(Long bookId, String orderBy, Integer page, Integer pageSize) {
|
||||
public List<BookIndex> queryIndexList(Long bookId, String orderBy, Integer limit) {
|
||||
if (StringUtils.isNotBlank(orderBy)) {
|
||||
OrderByHelper.orderBy(orderBy);
|
||||
}
|
||||
if (page != null && pageSize != null) {
|
||||
PageHelper.startPage(page, pageSize);
|
||||
if (limit != null) {
|
||||
PageHelper.startPage(1, limit);
|
||||
}
|
||||
|
||||
SelectStatementProvider selectStatement = select(BookIndexDynamicSqlSupport.id, BookIndexDynamicSqlSupport.bookId, BookIndexDynamicSqlSupport.indexNum, BookIndexDynamicSqlSupport.indexName, BookIndexDynamicSqlSupport.updateTime, BookIndexDynamicSqlSupport.isVip)
|
||||
@ -256,10 +250,9 @@ public class BookServiceImpl implements BookService {
|
||||
return bookIndexMapper.selectMany(selectStatement);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BookIndex queryBookIndex(Long bookIndexId) {
|
||||
SelectStatementProvider selectStatement = select(BookIndexDynamicSqlSupport.id, BookIndexDynamicSqlSupport.bookId, BookIndexDynamicSqlSupport.indexNum, BookIndexDynamicSqlSupport.indexName, BookIndexDynamicSqlSupport.wordCount,BookIndexDynamicSqlSupport.bookPrice, BookIndexDynamicSqlSupport.updateTime, BookIndexDynamicSqlSupport.isVip)
|
||||
SelectStatementProvider selectStatement = select(BookIndexDynamicSqlSupport.id, BookIndexDynamicSqlSupport.bookId, BookIndexDynamicSqlSupport.indexNum, BookIndexDynamicSqlSupport.indexName, BookIndexDynamicSqlSupport.wordCount, BookIndexDynamicSqlSupport.updateTime, BookIndexDynamicSqlSupport.isVip)
|
||||
.from(bookIndex)
|
||||
.where(BookIndexDynamicSqlSupport.id, isEqualTo(bookIndexId))
|
||||
.build()
|
||||
@ -495,7 +488,7 @@ public class BookServiceImpl implements BookService {
|
||||
|
||||
PageHelper.startPage(page, pageSize);
|
||||
|
||||
SelectStatementProvider selectStatement = select(id, bookName, picUrl, catName, visitCount, yesterdayBuy, lastIndexUpdateTime, updateTime, wordCount, lastIndexName, status)
|
||||
SelectStatementProvider selectStatement = select(id, bookName, visitCount, lastIndexName, status)
|
||||
.from(book)
|
||||
.where(authorId, isEqualTo(authorService.queryAuthor(userId).getId()))
|
||||
.orderBy(BookDynamicSqlSupport.createTime.descending())
|
||||
@ -538,7 +531,7 @@ public class BookServiceImpl implements BookService {
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void addBookContent(Long bookId, String indexName, String content, Byte isVip, Long authorId) {
|
||||
public void addBookContent(Long bookId, String indexName, String content, Long authorId) {
|
||||
|
||||
Book book = queryBookDetail(bookId);
|
||||
if (!authorId.equals(book.getAuthorId())) {
|
||||
@ -547,7 +540,7 @@ public class BookServiceImpl implements BookService {
|
||||
}
|
||||
Long lastIndexId = new IdWorker().nextId();
|
||||
Date currentDate = new Date();
|
||||
int wordCount = StringUtil.getStrValidWordCount(content);
|
||||
int wordCount = content.length();
|
||||
|
||||
//更新小说主表信息
|
||||
bookMapper.update(update(BookDynamicSqlSupport.book)
|
||||
@ -563,10 +556,6 @@ public class BookServiceImpl implements BookService {
|
||||
.and(BookDynamicSqlSupport.authorId, isEqualTo(authorId))
|
||||
.build()
|
||||
.render(RenderingStrategies.MYBATIS3));
|
||||
|
||||
//计算价格
|
||||
int bookPrice = new BigDecimal(wordCount).divide(bookPriceConfig.getWordCount()).multiply(bookPriceConfig.getValue()).intValue();
|
||||
|
||||
//更新小说目录表
|
||||
int indexNum = 0;
|
||||
if (book.getLastIndexId() != null) {
|
||||
@ -578,8 +567,7 @@ public class BookServiceImpl implements BookService {
|
||||
lastBookIndex.setIndexName(indexName);
|
||||
lastBookIndex.setIndexNum(indexNum);
|
||||
lastBookIndex.setBookId(bookId);
|
||||
lastBookIndex.setIsVip(isVip);
|
||||
lastBookIndex.setBookPrice(bookPrice);
|
||||
lastBookIndex.setIsVip(book.getStatus());
|
||||
lastBookIndex.setCreateTime(currentDate);
|
||||
lastBookIndex.setUpdateTime(currentDate);
|
||||
bookIndexMapper.insertSelective(lastBookIndex);
|
||||
@ -606,227 +594,5 @@ public class BookServiceImpl implements BookService {
|
||||
.render(RenderingStrategies.MYBATIS3));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Book> queryBookList(Long authorId) {
|
||||
|
||||
return bookMapper.selectMany(select(id, bookName)
|
||||
.from(book)
|
||||
.where(BookDynamicSqlSupport.authorId,isEqualTo(authorId))
|
||||
.build()
|
||||
.render(RenderingStrategies.MYBATIS3));
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void deleteIndex(Long indexId, Long authorId) {
|
||||
|
||||
//查询小说章节表信息
|
||||
List<BookIndex> bookIndices = bookIndexMapper.selectMany(
|
||||
select(BookIndexDynamicSqlSupport.bookId, BookIndexDynamicSqlSupport.wordCount)
|
||||
.from(bookIndex)
|
||||
.where(BookIndexDynamicSqlSupport.id, isEqualTo(indexId)).build().render(RenderingStrategy.MYBATIS3));
|
||||
if (bookIndices.size() > 0) {
|
||||
BookIndex bookIndex = bookIndices.get(0);
|
||||
//获取小说ID
|
||||
Long bookId = bookIndex.getBookId();
|
||||
//查询小说表信息
|
||||
List<Book> books = bookMapper.selectMany(
|
||||
select(wordCount, BookDynamicSqlSupport.authorId)
|
||||
.from(book)
|
||||
.where(id, isEqualTo(bookId))
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
if (books.size() > 0) {
|
||||
Book book = books.get(0);
|
||||
int wordCount = book.getWordCount();
|
||||
//作者ID相同,表明该小说是登录用户发布,可以删除
|
||||
if (book.getAuthorId().equals(authorId)) {
|
||||
//删除目录表和内容表记录
|
||||
bookIndexMapper.deleteByPrimaryKey(indexId);
|
||||
bookContentMapper.delete(deleteFrom(bookContent).where(BookContentDynamicSqlSupport.indexId, isEqualTo(indexId)).build()
|
||||
.render(RenderingStrategies.MYBATIS3));
|
||||
//更新总字数
|
||||
wordCount = wordCount - bookIndex.getWordCount();
|
||||
//更新最新章节
|
||||
Long lastIndexId = null;
|
||||
String lastIndexName = null;
|
||||
Date lastIndexUpdateTime = null;
|
||||
List<BookIndex> lastBookIndices = bookIndexMapper.selectMany(
|
||||
select(BookIndexDynamicSqlSupport.id, BookIndexDynamicSqlSupport.indexName, BookIndexDynamicSqlSupport.createTime)
|
||||
.from(BookIndexDynamicSqlSupport.bookIndex)
|
||||
.where(BookIndexDynamicSqlSupport.bookId, isEqualTo(bookId))
|
||||
.orderBy(BookIndexDynamicSqlSupport.indexNum.descending())
|
||||
.limit(1)
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
if (lastBookIndices.size() > 0) {
|
||||
BookIndex lastBookIndex = lastBookIndices.get(0);
|
||||
lastIndexId = lastBookIndex.getId();
|
||||
lastIndexName = lastBookIndex.getIndexName();
|
||||
lastIndexUpdateTime = lastBookIndex.getCreateTime();
|
||||
|
||||
}
|
||||
//更新小说主表信息
|
||||
bookMapper.update(update(BookDynamicSqlSupport.book)
|
||||
.set(BookDynamicSqlSupport.wordCount)
|
||||
.equalTo(wordCount)
|
||||
.set(updateTime)
|
||||
.equalTo(new Date())
|
||||
.set(BookDynamicSqlSupport.lastIndexId)
|
||||
.equalTo(lastIndexId)
|
||||
.set(BookDynamicSqlSupport.lastIndexName)
|
||||
.equalTo(lastIndexName)
|
||||
.set(BookDynamicSqlSupport.lastIndexUpdateTime)
|
||||
.equalTo(lastIndexUpdateTime)
|
||||
.where(id, isEqualTo(bookId))
|
||||
.build()
|
||||
.render(RenderingStrategies.MYBATIS3));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateIndexName(Long indexId, String indexName, Long authorId) {
|
||||
//查询小说章节表信息
|
||||
List<BookIndex> bookIndices = bookIndexMapper.selectMany(
|
||||
select(BookIndexDynamicSqlSupport.bookId, BookIndexDynamicSqlSupport.wordCount)
|
||||
.from(bookIndex)
|
||||
.where(BookIndexDynamicSqlSupport.id, isEqualTo(indexId)).build().render(RenderingStrategy.MYBATIS3));
|
||||
if (bookIndices.size() > 0) {
|
||||
BookIndex bookIndex = bookIndices.get(0);
|
||||
//获取小说ID
|
||||
Long bookId = bookIndex.getBookId();
|
||||
//查询小说表信息
|
||||
List<Book> books = bookMapper.selectMany(
|
||||
select(wordCount, BookDynamicSqlSupport.authorId)
|
||||
.from(book)
|
||||
.where(id, isEqualTo(bookId))
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
if (books.size() > 0) {
|
||||
Book book = books.get(0);
|
||||
//作者ID相同,表明该小说是登录用户发布,可以修改
|
||||
if (book.getAuthorId().equals(authorId)) {
|
||||
|
||||
bookIndexMapper.update(
|
||||
update(BookIndexDynamicSqlSupport.bookIndex)
|
||||
.set(BookIndexDynamicSqlSupport.indexName)
|
||||
.equalTo(indexName)
|
||||
.set(BookIndexDynamicSqlSupport.updateTime)
|
||||
.equalTo(new Date())
|
||||
.where(BookIndexDynamicSqlSupport.id, isEqualTo(indexId))
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String queryIndexContent(Long indexId, Long authorId) {
|
||||
//查询小说章节表信息
|
||||
List<BookIndex> bookIndices = bookIndexMapper.selectMany(
|
||||
select(BookIndexDynamicSqlSupport.bookId, BookIndexDynamicSqlSupport.wordCount)
|
||||
.from(bookIndex)
|
||||
.where(BookIndexDynamicSqlSupport.id, isEqualTo(indexId)).build().render(RenderingStrategy.MYBATIS3));
|
||||
if (bookIndices.size() > 0) {
|
||||
BookIndex bookIndex = bookIndices.get(0);
|
||||
//获取小说ID
|
||||
Long bookId = bookIndex.getBookId();
|
||||
//查询小说表信息
|
||||
List<Book> books = bookMapper.selectMany(
|
||||
select(wordCount, BookDynamicSqlSupport.authorId)
|
||||
.from(book)
|
||||
.where(id, isEqualTo(bookId))
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
if (books.size() > 0) {
|
||||
Book book = books.get(0);
|
||||
//作者ID相同,表明该小说是登录用户发布
|
||||
if (book.getAuthorId().equals(authorId)) {
|
||||
return bookContentMapper.selectMany(
|
||||
select(content)
|
||||
.from(bookContent)
|
||||
.where(BookContentDynamicSqlSupport.indexId, isEqualTo(indexId))
|
||||
.limit(1)
|
||||
.build().render(RenderingStrategy.MYBATIS3))
|
||||
.get(0).getContent();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void updateBookContent(Long indexId, String indexName, String content, Long authorId) {
|
||||
|
||||
//查询小说章节表信息
|
||||
List<BookIndex> bookIndices = bookIndexMapper.selectMany(
|
||||
select(BookIndexDynamicSqlSupport.bookId, BookIndexDynamicSqlSupport.wordCount)
|
||||
.from(bookIndex)
|
||||
.where(BookIndexDynamicSqlSupport.id, isEqualTo(indexId)).build().render(RenderingStrategy.MYBATIS3));
|
||||
if (bookIndices.size() > 0) {
|
||||
BookIndex bookIndex = bookIndices.get(0);
|
||||
//获取小说ID
|
||||
Long bookId = bookIndex.getBookId();
|
||||
//查询小说表信息
|
||||
List<Book> books = bookMapper.selectMany(
|
||||
select(wordCount, BookDynamicSqlSupport.authorId)
|
||||
.from(book)
|
||||
.where(id, isEqualTo(bookId))
|
||||
.build()
|
||||
.render(RenderingStrategy.MYBATIS3));
|
||||
if (books.size() > 0) {
|
||||
Book book = books.get(0);
|
||||
//作者ID相同,表明该小说是登录用户发布,可以修改
|
||||
if (book.getAuthorId().equals(authorId)) {
|
||||
Date currentDate = new Date();
|
||||
int wordCount = StringUtil.getStrValidWordCount(content);
|
||||
|
||||
//计算价格
|
||||
int bookPrice = new BigDecimal(wordCount).divide(bookPriceConfig.getWordCount()).multiply(bookPriceConfig.getValue()).intValue();
|
||||
|
||||
|
||||
//更新小说目录表
|
||||
int update = bookIndexMapper.update(
|
||||
update(BookIndexDynamicSqlSupport.bookIndex)
|
||||
.set(BookIndexDynamicSqlSupport.indexName)
|
||||
.equalTo(indexName)
|
||||
.set(BookIndexDynamicSqlSupport.wordCount)
|
||||
.equalTo(wordCount)
|
||||
.set(BookIndexDynamicSqlSupport.bookPrice)
|
||||
.equalTo(bookPrice)
|
||||
.set(BookIndexDynamicSqlSupport.updateTime)
|
||||
.equalTo(currentDate)
|
||||
.where(BookIndexDynamicSqlSupport.id, isEqualTo(indexId))
|
||||
.build().render(RenderingStrategy.MYBATIS3));
|
||||
|
||||
//更新小说内容表
|
||||
bookContentMapper.update(
|
||||
update(BookContentDynamicSqlSupport.bookContent)
|
||||
.set(BookContentDynamicSqlSupport.content)
|
||||
.equalTo(content)
|
||||
.where(BookContentDynamicSqlSupport.indexId, isEqualTo(indexId))
|
||||
.build().render(RenderingStrategy.MYBATIS3));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -284,69 +284,25 @@ public class UserServiceImpl implements UserService {
|
||||
public void buyBookIndex(Long userId, UserBuyRecord buyRecord) {
|
||||
//查询用户余额
|
||||
long balance = userInfo(userId).getAccountBalance();
|
||||
if(balance<buyRecord.getBuyAmount()){
|
||||
if(balance<10){
|
||||
//余额不足
|
||||
throw new BusinessException(ResponseStatus.USER_NO_BALANCE);
|
||||
}
|
||||
buyRecord.setUserId(userId);
|
||||
buyRecord.setCreateTime(new Date());
|
||||
buyRecord.setBuyAmount(10);
|
||||
//生成购买记录
|
||||
userBuyRecordMapper.insertSelective(buyRecord);
|
||||
|
||||
//减少用户余额
|
||||
userMapper.update(update(user)
|
||||
.set(UserDynamicSqlSupport.accountBalance)
|
||||
.equalTo(balance-buyRecord.getBuyAmount())
|
||||
.equalTo(balance-10)
|
||||
.where(id,isEqualTo(userId))
|
||||
.build()
|
||||
.render(RenderingStrategies.MYBATIS3));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int queryBuyMember(Long bookId, Date startTime, Date endTime) {
|
||||
return userMapper.selectStatistic(select(countDistinct(UserBuyRecordDynamicSqlSupport.userId))
|
||||
.from(UserBuyRecordDynamicSqlSupport.userBuyRecord)
|
||||
.where(UserBuyRecordDynamicSqlSupport.bookId,isEqualTo(bookId))
|
||||
.and(UserBuyRecordDynamicSqlSupport.createTime,isGreaterThanOrEqualTo(startTime))
|
||||
.and(UserBuyRecordDynamicSqlSupport.createTime,isLessThanOrEqualTo(endTime))
|
||||
.build()
|
||||
.render(RenderingStrategies.MYBATIS3));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int queryBuyCount(Long bookId, Date startTime, Date endTime) {
|
||||
return userMapper.selectStatistic(select(count(UserBuyRecordDynamicSqlSupport.id))
|
||||
.from(UserBuyRecordDynamicSqlSupport.userBuyRecord)
|
||||
.where(UserBuyRecordDynamicSqlSupport.bookId,isEqualTo(bookId))
|
||||
.and(UserBuyRecordDynamicSqlSupport.createTime,isGreaterThanOrEqualTo(startTime))
|
||||
.and(UserBuyRecordDynamicSqlSupport.createTime,isLessThanOrEqualTo(endTime))
|
||||
.build()
|
||||
.render(RenderingStrategies.MYBATIS3));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int queryBuyAccount(Long bookId, Date startTime, Date endTime) {
|
||||
return userMapper.selectStatistic(select(sum(UserBuyRecordDynamicSqlSupport.buyAmount))
|
||||
.from(UserBuyRecordDynamicSqlSupport.userBuyRecord)
|
||||
.where(UserBuyRecordDynamicSqlSupport.bookId,isEqualTo(bookId))
|
||||
.and(UserBuyRecordDynamicSqlSupport.createTime,isGreaterThanOrEqualTo(startTime))
|
||||
.and(UserBuyRecordDynamicSqlSupport.createTime,isLessThanOrEqualTo(endTime))
|
||||
.build()
|
||||
.render(RenderingStrategies.MYBATIS3));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int queryBuyTotalMember(List<Long> bookIds, Date startTime, Date endTime) {
|
||||
return userMapper.selectStatistic(select(countDistinct(UserBuyRecordDynamicSqlSupport.userId))
|
||||
.from(UserBuyRecordDynamicSqlSupport.userBuyRecord)
|
||||
.where(UserBuyRecordDynamicSqlSupport.bookId,isIn(bookIds))
|
||||
.and(UserBuyRecordDynamicSqlSupport.createTime,isGreaterThanOrEqualTo(startTime))
|
||||
.and(UserBuyRecordDynamicSqlSupport.createTime,isLessThanOrEqualTo(endTime))
|
||||
.build()
|
||||
.render(RenderingStrategies.MYBATIS3));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -49,19 +49,4 @@ xss:
|
||||
urlPatterns: /book/addBookComment,/user/addFeedBack,/author/addBook,/author/addBookContent,/author/register.html
|
||||
|
||||
|
||||
author:
|
||||
income:
|
||||
#税率(扣税后所得比率)
|
||||
tax-rate: 0.9
|
||||
#分佣比例
|
||||
share-proportion: 0.7
|
||||
#兑换比率(人民币)
|
||||
exchange-proportion: 0.01
|
||||
|
||||
#小说章节定价规则
|
||||
book:
|
||||
price:
|
||||
#字数
|
||||
word-count: 1000
|
||||
#价值(屋币)
|
||||
value: 5
|
@ -1,5 +0,0 @@
|
||||
#网站配置
|
||||
#网站名
|
||||
website.name=小说精品屋
|
||||
#PC站网站域名
|
||||
website.domain=www.java2nb.com
|
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB |
@ -238,17 +238,17 @@
|
||||
if (preId > 0) {
|
||||
location.href = '/book/' + bid + '/' + preId + '.html';
|
||||
} else {
|
||||
location.href = '/book/indexList-' + bid + '.html';
|
||||
location.href = '/book/chapterlist-' + bid + '.html';
|
||||
}
|
||||
} else if (e.keyCode == 39) {
|
||||
if (nextId > 0) {
|
||||
location.href = '/book/' + bid + '/' + nextId + '.html';
|
||||
} else {
|
||||
location.href = '/book/indexList-' + bid + '.html';
|
||||
location.href = '/book/chapterlist-' + bid + '.html';
|
||||
}
|
||||
}
|
||||
});
|
||||
//BookDetail.SetReadHistory(bid, cid, crank);
|
||||
BookDetail.SetReadHistory(bid, cid, crank);
|
||||
},
|
||||
SetReadHistory: function (bid, cid, crank) {
|
||||
var strHistory = jQuery.cookie("wapviewhistory");
|
||||
|
@ -1,16 +0,0 @@
|
||||
//格式化时间函数
|
||||
Date.prototype.Format = function (fmt) {
|
||||
var o = {
|
||||
"M+": this.getMonth() + 1, //月份
|
||||
"d+": this.getDate(), //日
|
||||
"h+": this.getHours(), //小时
|
||||
"m+": this.getMinutes(), //分
|
||||
"s+": this.getSeconds(), //秒
|
||||
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
|
||||
"S": this.getMilliseconds() //毫秒
|
||||
};
|
||||
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
||||
for (var k in o)
|
||||
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
||||
return fmt;
|
||||
};
|
@ -2,7 +2,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},~{::meta},~{::link},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'联系我们_'+#{website.name}"></title>
|
||||
<meta name="keywords" content="联系我们,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学" />
|
||||
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
|
||||
|
@ -2,7 +2,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},~{::meta},~{::link},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'版权声明_'+#{website.name}"></title>
|
||||
<meta name="keywords" content="版权声明,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学" />
|
||||
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!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},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'关于我们_'+#{website.name}"></title>
|
||||
<meta name="keywords" content="关于我们,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学" />
|
||||
<meta name="description" th:content="#{website.name}+'每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
|
||||
|
@ -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},~{::meta},~{::link},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'新闻公共_'+#{website.name}"></title>
|
||||
<meta name="keywords" content="新闻公告,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学"/>
|
||||
<meta name="description"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!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},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'新闻公告_'+#{website.name}"></title>
|
||||
<meta name="keywords" content="新闻公告,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学"/>
|
||||
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
|
||||
|
@ -2,7 +2,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},~{::meta},~{::link},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'投稿说明_'+#{website.name}"></title>
|
||||
<meta name="keywords" content="投稿说明,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学" />
|
||||
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
|
||||
|
@ -2,7 +2,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},~{::meta},~{::link},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'用户协议_'+#{website.name}"></title>
|
||||
<meta name="keywords" content="用户协议,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学" />
|
||||
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
|
||||
|
@ -1,227 +0,0 @@
|
||||
|
||||
<!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>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<title>作家管理系统-小说精品屋</title>
|
||||
<link rel="stylesheet" href="/css/base.css?v=1"/>
|
||||
<link rel="stylesheet" href="/css/user.css" />
|
||||
</head>
|
||||
</head>
|
||||
<body class="">
|
||||
|
||||
<div class="header">
|
||||
<div class="mainNav" id="mainNav">
|
||||
<div class="box_center cf" style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
|
||||
|
||||
小说精品屋作家管理
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<div class="my_l">
|
||||
|
||||
<ul class="log_list">
|
||||
<li><a class="link_4" href="/author/index.html">小说管理</a></li>
|
||||
<li><a class="link_2 on" href="/author/author_income_detail.html">稿费收入</a></li>
|
||||
<!-- <li><a class="link_1 " href="/user/userinfo.html">批量小说爬取</a></li>
|
||||
<li><a class="link_4 " href="/user/favorites.html">单本小说爬取</a></li>-->
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="my_r">
|
||||
<div class="my_bookshelf">
|
||||
<div class="title cf">
|
||||
<h2 class="fl ml10"><a href="/author/author_income_detail.html">订阅明细</a></h2><i class="fl ml20 mr20 font16">|</i><h2 class="fl"><a href="/author/author_income.html" class="red">稿费汇总</a></h2>
|
||||
</div>
|
||||
|
||||
<div id="divData" class="updateTable">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="goread">
|
||||
月份
|
||||
</th>
|
||||
<th class="goread">
|
||||
税前收入
|
||||
</th>
|
||||
<th class="goread">
|
||||
税后收入
|
||||
</th>
|
||||
<th class="goread">
|
||||
支付状态
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<tbody id="bookList">
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="pageBox cf" id="shellPage">
|
||||
</div>
|
||||
</div>
|
||||
<!--<div id="divData" class="updateTable">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th class="name">
|
||||
爬虫源(已开启的爬虫源)
|
||||
</th>
|
||||
<th class="chapter">
|
||||
成功爬取数量(websocket实现)
|
||||
</th>
|
||||
<th class="time">
|
||||
目标爬取数量
|
||||
</th>
|
||||
<th class="goread">
|
||||
状态(正在运行,已停止)(一次只能运行一个爬虫源)
|
||||
</th>
|
||||
<th class="goread">
|
||||
操作(启动,停止)
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="bookShelfList">
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="pageBox cf" id="shellPage">
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
<script src="/javascript/jquery-1.8.0.min.js" type="text/javascript"></script>
|
||||
<script src="/layui/layui.all.js" type="text/javascript"></script>
|
||||
<script src="/javascript/header.js" type="text/javascript"></script>
|
||||
<script src="/javascript/user.js" type="text/javascript"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
search(1, 10);
|
||||
|
||||
function search(curr, limit) {
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/author/listIncomeMonthByPage",
|
||||
data: {'curr':curr,'limit':limit},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var bookList = data.data.list;
|
||||
if (bookList.length > 0) {
|
||||
var bookListHtml = "";
|
||||
for(var i=0;i<bookList.length;i++){
|
||||
var book = bookList[i];
|
||||
bookListHtml+=(" <tr class=\"book_list\" >\n" +
|
||||
" <td class=\"goread\">\n" +
|
||||
" "+book.incomeMonth+"</td>\n" +
|
||||
" <td class=\"goread\" >"
|
||||
+book.preTaxIncome/100+"</td>\n" +
|
||||
" <td class=\"goread\">\n" +
|
||||
" "+book.afterTaxIncome/100+"\n" +
|
||||
" </td>\n" +
|
||||
" <td class=\"goread\">"+(book.payStatus == 1 ? '已支付' : '待支付')+
|
||||
" </td>\n" +
|
||||
|
||||
" </tr>");
|
||||
}
|
||||
$("#bookList").html(bookListHtml);
|
||||
|
||||
layui.use('laypage', function () {
|
||||
var laypage = layui.laypage;
|
||||
|
||||
//执行一个laypage实例
|
||||
laypage.render({
|
||||
elem: 'shellPage' //注意,这里的 test1 是 ID,不用加 # 号
|
||||
, count: data.data.total //数据总数,从服务端得到,
|
||||
, curr: data.data.pageNum
|
||||
, limit: data.data.pageSize
|
||||
, jump: function (obj, first) {
|
||||
|
||||
|
||||
//obj包含了当前分页的所有参数,比如:
|
||||
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
|
||||
console.log(obj.limit); //得到每页显示的条数
|
||||
|
||||
|
||||
//首次不执行
|
||||
if (!first) {
|
||||
search(obj.curr, obj.limit);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
}else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
function updateBookStatus(bookId,status) {
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/author/updateBookStatus",
|
||||
data: {'bookId':bookId,'status':status==0?1:0},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
|
||||
location.reload();
|
||||
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
}else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
</html>
|
@ -1,233 +0,0 @@
|
||||
|
||||
<!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>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<title>作家管理系统-小说精品屋</title>
|
||||
<link rel="stylesheet" href="/css/base.css?v=1"/>
|
||||
<link rel="stylesheet" href="/css/user.css" />
|
||||
</head>
|
||||
</head>
|
||||
<body class="">
|
||||
|
||||
<div class="header">
|
||||
<div class="mainNav" id="mainNav">
|
||||
<div class="box_center cf" style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
|
||||
|
||||
小说精品屋作家管理
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<div class="my_l">
|
||||
|
||||
<ul class="log_list">
|
||||
<li><a class="link_4" href="/author/index.html">小说管理</a></li>
|
||||
<li><a class="link_2 on" href="/author/author_income_detail.html">稿费收入</a></li>
|
||||
<!-- <li><a class="link_1 " href="/user/userinfo.html">批量小说爬取</a></li>
|
||||
<li><a class="link_4 " href="/user/favorites.html">单本小说爬取</a></li>-->
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="my_r">
|
||||
<div class="my_bookshelf">
|
||||
<div class="title cf">
|
||||
<h2 class="fl ml10"><a href="/author/author_income_detail.html" class="red">订阅明细</a></h2><i class="fl ml20 mr20 font16">|</i><h2 class="fl"><a href="/author/author_income.html">稿费汇总</a></h2>
|
||||
</div>
|
||||
|
||||
<div id="divData" class="updateTable">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="goread">
|
||||
日期
|
||||
</th>
|
||||
<th class="goread">
|
||||
订阅总额
|
||||
</th>
|
||||
<th class="goread">
|
||||
订阅次数
|
||||
</th>
|
||||
<th class="goread">
|
||||
订阅人数
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="bookList">
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="pageBox cf" id="shellPage">
|
||||
</div>
|
||||
</div>
|
||||
<!--<div id="divData" class="updateTable">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th class="name">
|
||||
爬虫源(已开启的爬虫源)
|
||||
</th>
|
||||
<th class="chapter">
|
||||
成功爬取数量(websocket实现)
|
||||
</th>
|
||||
<th class="time">
|
||||
目标爬取数量
|
||||
</th>
|
||||
<th class="goread">
|
||||
状态(正在运行,已停止)(一次只能运行一个爬虫源)
|
||||
</th>
|
||||
<th class="goread">
|
||||
操作(启动,停止)
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="bookShelfList">
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="pageBox cf" id="shellPage">
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
<script src="/javascript/jquery-1.8.0.min.js" type="text/javascript"></script>
|
||||
<script src="/layui/layui.all.js" type="text/javascript"></script>
|
||||
<script src="/javascript/header.js" type="text/javascript"></script>
|
||||
<script src="/javascript/user.js" type="text/javascript"></script>
|
||||
<script src="/javascript/common.js" type="text/javascript"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
var bookId = getSearchString("bookId");
|
||||
search(1, 10);
|
||||
|
||||
function search(curr, limit) {
|
||||
|
||||
var data = {'curr':curr,'limit':limit};
|
||||
|
||||
if(bookId){
|
||||
data.bookId = bookId;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/author/listIncomeDailyByPage",
|
||||
data: data,
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var bookList = data.data.list;
|
||||
if (bookList.length > 0) {
|
||||
var bookListHtml = "";
|
||||
for(var i=0;i<bookList.length;i++){
|
||||
var book = bookList[i];
|
||||
bookListHtml+=(" <tr class=\"book_list\" >\n" +
|
||||
" <td class=\"goread\">\n" +
|
||||
" "+book.incomeDate+"</td>\n" +
|
||||
" <td class=\"goread\" >"
|
||||
+book.incomeAccount+"</td>\n" +
|
||||
" <td class=\"goread\">\n" +
|
||||
" "+book.incomeCount+"\n" +
|
||||
" </td>\n" +
|
||||
" <td class=\"goread\">"+book.incomeNumber+
|
||||
" </td>\n" +
|
||||
|
||||
" </tr>");
|
||||
}
|
||||
$("#bookList").html(bookListHtml);
|
||||
|
||||
layui.use('laypage', function () {
|
||||
var laypage = layui.laypage;
|
||||
|
||||
//执行一个laypage实例
|
||||
laypage.render({
|
||||
elem: 'shellPage' //注意,这里的 test1 是 ID,不用加 # 号
|
||||
, count: data.data.total //数据总数,从服务端得到,
|
||||
, curr: data.data.pageNum
|
||||
, limit: data.data.pageSize
|
||||
, jump: function (obj, first) {
|
||||
|
||||
|
||||
//obj包含了当前分页的所有参数,比如:
|
||||
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
|
||||
console.log(obj.limit); //得到每页显示的条数
|
||||
|
||||
|
||||
//首次不执行
|
||||
if (!first) {
|
||||
search(obj.curr, obj.limit);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
}else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
function updateBookStatus(bookId,status) {
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/author/updateBookStatus",
|
||||
data: {'bookId':bookId,'status':status==0?1:0},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
|
||||
location.reload();
|
||||
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
}else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
</html>
|
@ -31,10 +31,9 @@
|
||||
<div class="my_l">
|
||||
|
||||
<ul class="log_list">
|
||||
<li><a class="link_4 on" href="/author/index.html">小说管理</a></li>
|
||||
<li><a class="link_2 " href="/author/author_income_detail.html">稿费收入</a></li>
|
||||
<li><a class="link_1 on" href="/author/index.html">小说管理</a></li>
|
||||
<!--<li><a class="link_1 " href="/user/userinfo.html">批量小说爬取</a></li>
|
||||
<li><a class="link_4 " href="/user/favorites.html">单本小说爬取</a></li>-->
|
||||
<li><a class="link_4 " href="/user/favorites.html">单本小说爬取</a></li>-->
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
@ -85,7 +84,7 @@
|
||||
title="点击更换图片"
|
||||
style="z-index: 100;cursor: pointer;left: 0px; top: 0px; width: 100px; height: 130px; opacity: 0; position: absolute; "
|
||||
/>
|
||||
<img style="width:100px;height: 130px" id="picImage" src="/images/pic_upload.png" alt="">
|
||||
<img style="width:100px;height: 130px" id="picImage" src="/images/default.gif" alt="">
|
||||
<input type="hidden" id="picUrl" name="picUrl" class="s_input" value="/images/default.gif"></li>
|
||||
<b>小说介绍:</b>
|
||||
|
||||
|
@ -28,10 +28,9 @@
|
||||
<div class="my_l">
|
||||
|
||||
<ul class="log_list">
|
||||
<li><a class="link_4 on" href="/author/index.html">小说管理</a></li>
|
||||
<li><a class="link_2 " href="/author/author_income_detail.html">稿费收入</a></li>
|
||||
<li><a class="link_1 on" href="/author/index.html">小说管理</a></li>
|
||||
<!--<li><a class="link_1 " href="/user/userinfo.html">批量小说爬取</a></li>
|
||||
<li><a class="link_4 " href="/user/favorites.html">单本小说爬取</a></li>-->
|
||||
<li><a class="link_4 " href="/user/favorites.html">单本小说爬取</a></li>-->
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
@ -58,15 +57,9 @@
|
||||
<li><span id="LabErr"></span></li>
|
||||
<b>章节名:</b>
|
||||
<li><input type="text" id="bookIndex" name="bookIndex" class="s_input" ></li>
|
||||
<b>章节内容:</b><li id="contentLi">
|
||||
<b>章节内容:</b>
|
||||
<textarea name="bookContent" rows="30" cols="80" id="bookContent"
|
||||
class="textarea"></textarea></li><br/>
|
||||
|
||||
<b>是否收费:</b>
|
||||
<li><input type="radio" name="isVip" value="0" checked >免费
|
||||
<input type="radio" name="isVip" value="1" >收费</li>
|
||||
|
||||
|
||||
class="textarea"></textarea>
|
||||
<li style="margin-top: 10px"><input type="button" onclick="addBookContent()" name="btnRegister" value="提交"
|
||||
id="btnRegister" class="btn_red">
|
||||
|
||||
@ -150,20 +143,17 @@
|
||||
}
|
||||
|
||||
|
||||
var isVip = $("input:checked[name=isVip]").val();
|
||||
|
||||
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/author/addBookContent",
|
||||
data: {'bookId':bookId,'indexName':indexName,'content':content,'isVip':isVip},
|
||||
data: {'bookId':bookId,'indexName':indexName,'content':content},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
|
||||
window.location.href = '/author/index_list.html?bookId='+bookId;
|
||||
window.location.href = '/author/index.html';
|
||||
|
||||
|
||||
} else {
|
||||
|
@ -1,220 +0,0 @@
|
||||
<!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>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<title>作家管理系统-小说精品屋</title>
|
||||
<link rel="stylesheet" href="/css/base.css?v=1"/>
|
||||
<link rel="stylesheet" href="/css/user.css"/>
|
||||
</head>
|
||||
</head>
|
||||
<body class="">
|
||||
|
||||
<div class="header">
|
||||
<div class="mainNav" id="mainNav">
|
||||
<div class="box_center cf"
|
||||
style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
|
||||
|
||||
小说精品屋作家管理
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<div class="my_l">
|
||||
|
||||
<ul class="log_list">
|
||||
<li><a class="link_4 on" href="/author/index.html">作品管理</a></li>
|
||||
<li><a class="link_2 " href="/author/author_income_detail.html">稿费收入</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="my_r">
|
||||
<div class="my_bookshelf">
|
||||
|
||||
<div class="userBox cf">
|
||||
<form method="post" action="./register.html" id="form2">
|
||||
<div class="aspNetHidden">
|
||||
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
|
||||
value="/wEPDwUKLTIzNjMxNDQxNw9kFgJmD2QWAmYPFgIeBFRleHQFqAE8YSBocmVmPSIvc2VhcmNoLmFzcHg/c2VhcmNoS2V5PeWWu+Wuiembr++8jOeLhOazve+8jOeBteW8gu+8jOWJjeS4luS7iueUn++8jOWGpeeOi+msvOWkqyIgdGFyZ2V0PSJfYmxhbmsiPuWWu+Wuiembr++8jOeLhOazve+8jOeBteW8gu+8jOWJjeS4luS7iueUn++8jOWGpeeOi+msvOWkqzwvYT5kZOquoASBvnvPbc/TYIQiLhSPJ8GKnYQrmk7jGhb5AC5Q">
|
||||
</div>
|
||||
|
||||
<div class="aspNetHidden">
|
||||
|
||||
<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="23AA6834">
|
||||
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION"
|
||||
value="/wEdAAVece19BIZ9HiByRfHz3pfnqKSXUE1UN51mNFrIuw38c3Y2+Mc6SrnAqio3oCKbxYZZ1lS+gZUZKpbsAea8j7ASAv40DHFcQ/NE7tJUnABeyQ3d9sFDIcFCYNqlVtprfLoh4JFy0U+R/CcMuyAiWTz7">
|
||||
</div>
|
||||
<div class="user_l">
|
||||
<div></div>
|
||||
<h3>小说章节内容填写</h3>
|
||||
<ul class="log_list">
|
||||
<li><span id="LabErr"></span></li>
|
||||
<b>章节名:</b>
|
||||
<li><input type="text" id="bookIndex" name="bookIndex" class="s_input" ></li>
|
||||
<b>章节内容:</b>
|
||||
<li id="contentLi">
|
||||
<textarea name="bookContent" rows="30" cols="80" id="bookContent"
|
||||
class="textarea"></textarea>
|
||||
</li>
|
||||
<li style="margin-top: 10px"><input type="button" onclick="addBookContent()" name="btnRegister" value="提交"
|
||||
id="btnRegister" class="btn_red">
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!--<div id="divData" class="updateTable">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th class="name">
|
||||
爬虫源(已开启的爬虫源)
|
||||
</th>
|
||||
<th class="chapter">
|
||||
成功爬取数量(websocket实现)
|
||||
</th>
|
||||
<th class="time">
|
||||
目标爬取数量
|
||||
</th>
|
||||
<th class="goread">
|
||||
状态(正在运行,已停止)(一次只能运行一个爬虫源)
|
||||
</th>
|
||||
<th class="goread">
|
||||
操作(启动,停止)
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="bookShelfList">
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="pageBox cf" id="shellPage">
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
<script src="/javascript/jquery-1.8.0.min.js" type="text/javascript"></script>
|
||||
<script src="/layui/layui.all.js" type="text/javascript"></script>
|
||||
<script src="/javascript/header.js" type="text/javascript"></script>
|
||||
<script src="/javascript/user.js" type="text/javascript"></script>
|
||||
<script src="/javascript/common.js" type="text/javascript"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
var bookId = getSearchString("bookId");
|
||||
var indexId = getSearchString("indexId");
|
||||
var indexName = decodeURI(decodeURI(getSearchString("indexName")));
|
||||
var isVip = getSearchString("isVip");
|
||||
|
||||
$("#bookIndex").val(indexName);
|
||||
if(isVip == 1){
|
||||
$("#contentLi").after("<b>是否收费:</b>\n" +
|
||||
" <li><input type=\"radio\" disabled name=\"isVip\" value=\"0\" >免费\n" +
|
||||
" <input type=\"radio\" disabled name=\"isVip\" value=\"1\" checked >收费</li><br/>");
|
||||
}else{
|
||||
$("#contentLi").after("<b>是否收费:</b>\n" +
|
||||
" <li><input type=\"radio\" disabled name=\"isVip\" value=\"0\" checked >免费\n" +
|
||||
" <input type=\"radio\" disabled name=\"isVip\" value=\"1\" >收费</li><br/>");
|
||||
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/author/queryIndexContent",
|
||||
data: {'indexId':indexId},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
|
||||
$("#bookContent").html(data.data);
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
lock = false;
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var lock = false;
|
||||
function addBookContent() {
|
||||
|
||||
if(lock){
|
||||
return;
|
||||
}
|
||||
lock = true;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var indexName = $("#bookIndex").val();
|
||||
if(!indexName){
|
||||
$("#LabErr").html("章节名不能为空!");
|
||||
lock = false;
|
||||
return;
|
||||
}
|
||||
|
||||
var content = $("#bookContent").val();
|
||||
if(!content){
|
||||
$("#LabErr").html("章节内容不能为空!");
|
||||
lock = false;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/author/updateBookContent",
|
||||
data: {'indexId':indexId,'indexName':indexName,'content':content},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
|
||||
window.location.href = '/author/index_list.html?bookId='+bookId;
|
||||
|
||||
|
||||
} else {
|
||||
lock = false;
|
||||
$("#LabErr").html(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
lock = false;
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</html>
|
@ -8,19 +8,6 @@
|
||||
<title>作家管理系统-小说精品屋</title>
|
||||
<link rel="stylesheet" href="/css/base.css?v=1"/>
|
||||
<link rel="stylesheet" href="/css/user.css" />
|
||||
<style type="text/css">
|
||||
.redBtn{
|
||||
padding: 5px;
|
||||
border-radius: 20px;
|
||||
border: 1px solid #f80;
|
||||
background: #f80;
|
||||
color: #fff;
|
||||
}
|
||||
a.redBtn:hover{
|
||||
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
</head>
|
||||
<body class="">
|
||||
@ -40,19 +27,14 @@
|
||||
<div class="my_l">
|
||||
|
||||
<ul class="log_list">
|
||||
<li><a class="link_4 on" href="/author/index.html">小说管理</a></li>
|
||||
<li><a class="link_2 " href="/author/author_income_detail.html">稿费收入</a></li>
|
||||
<li><a class="link_1 on" href="/author/index.html">小说管理</a></li>
|
||||
<!-- <li><a class="link_1 " href="/user/userinfo.html">批量小说爬取</a></li>
|
||||
<li><a class="link_4 " href="/user/favorites.html">单本小说爬取</a></li>-->
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="my_r">
|
||||
<div id="noContentDiv" >
|
||||
<div class="tc" style="margin-top: 200px"><a href="/author/book_add.html" class="btn_red">创建作品</a></div>
|
||||
|
||||
</div>
|
||||
<div class="my_bookshelf" id="hasContentDiv" style="display: none">
|
||||
<div class="my_bookshelf">
|
||||
<div class="title cf">
|
||||
<h2 class="fl">小说列表</h2>
|
||||
<div class="fr"><a href="/author/book_add.html" class="btn_red">发布小说</a></div>
|
||||
@ -62,23 +44,20 @@
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="goread">
|
||||
书名
|
||||
<th class="style">
|
||||
序号
|
||||
</th>
|
||||
<th class="goread">
|
||||
分类
|
||||
<th class="name">
|
||||
小说名
|
||||
</th>
|
||||
<th class="goread">
|
||||
点击量
|
||||
</th>
|
||||
<th class="goread">
|
||||
昨日订阅数
|
||||
<th class="name">
|
||||
最新章节
|
||||
</th>
|
||||
<th class="goread">
|
||||
更新时间
|
||||
</th>
|
||||
<th class="goread">
|
||||
总字数
|
||||
状态
|
||||
</th>
|
||||
<th class="goread">
|
||||
操作
|
||||
@ -136,10 +115,9 @@
|
||||
<script src="/layui/layui.all.js" type="text/javascript"></script>
|
||||
<script src="/javascript/header.js" type="text/javascript"></script>
|
||||
<script src="/javascript/user.js" type="text/javascript"></script>
|
||||
<script src="/javascript/date.js" type="text/javascript"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
search(1, 5);
|
||||
search(1, 10);
|
||||
|
||||
function search(curr, limit) {
|
||||
|
||||
@ -152,41 +130,26 @@
|
||||
if (data.code == 200) {
|
||||
var bookList = data.data.list;
|
||||
if (bookList.length > 0) {
|
||||
$("#hasContentDiv").css("display","block");
|
||||
$("#noContentDiv").css("display","none");
|
||||
var bookListHtml = "";
|
||||
for(var i=0;i<bookList.length;i++){
|
||||
var book = bookList[i];
|
||||
bookListHtml+=(" <tr class=\"book_list\" vals=\"291\">\n" +
|
||||
/* " <td class=\"style bookclass\">\n" +
|
||||
" ["+(i+1)+"]\n" +
|
||||
" </td>\n" +*/
|
||||
|
||||
" <td class=\"goread\">\n" +
|
||||
"<img width='50' height='70' src='"+book.picUrl+"'/><br/>" +
|
||||
" <td class=\"style bookclass\">\n" +
|
||||
" ["+(i+1)+"]\n" +
|
||||
" </td>\n" +
|
||||
" <td class=\"name\">\n" +
|
||||
" "+book.bookName+"</td>\n" +
|
||||
|
||||
|
||||
" <td class=\"goread\" >"
|
||||
+book.catName+"</td>\n" +
|
||||
|
||||
" <td class=\"goread\" valsc=\"291|2037554|1\">"
|
||||
+book.visitCount+"</td>\n" +
|
||||
|
||||
" <td class=\"goread\" valsc=\"291|2037554|1\">"
|
||||
+book.yesterdayBuy+"</td>\n" +
|
||||
|
||||
" <td class=\"goread\">\n" +
|
||||
" "+new Date(Date.parse(book.lastIndexUpdateTime?book.lastIndexUpdateTime:book.updateTime)).Format("yyyy-MM-dd hh:mm")+"更新\n" +
|
||||
" <td class=\"name\">\n" +
|
||||
" "+book.lastIndexName+"\n" +
|
||||
" </td>\n" +
|
||||
" <td class=\"goread\" id='bookStatus"+book.id+"'>"+(book.status==0?'免费':'上架')+
|
||||
" </td>\n" +
|
||||
|
||||
" <td class=\"goread\" valsc=\"291|2037554|1\">"
|
||||
+book.wordCount+"</td>\n" +
|
||||
|
||||
" <td class=\"goread\" id='opt"+book.id+"'>" +
|
||||
"<a target='_blank' class='redBtn' href='/author/index_list.html?bookId="+book.id+"'>章节管理 </a><br/>" +
|
||||
"<a target='_blank' href='/author/author_income_detail.html?bookId="+book.id+"'>薪酬查询 </a><br/>"+
|
||||
"<a target='_blank' href='/book/"+book.id+".html'>作品信息</a>"+
|
||||
"<a href='javascript:updateBookStatus(\""+book.id+"\","+book.status+")'>"+(book.status==0?'上架':'下架')+" </a>" +
|
||||
"<a href='/author/content_add.html?bookId="+book.id+"'>发布章节 </a>" +
|
||||
"</td> </tr>");
|
||||
}
|
||||
$("#bookList").html(bookListHtml);
|
||||
|
@ -1,330 +0,0 @@
|
||||
<!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>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<title>作家管理系统-小说精品屋</title>
|
||||
<link rel="stylesheet" href="/css/base.css?v=1"/>
|
||||
<link rel="stylesheet" href="/css/user.css"/>
|
||||
<style type="text/css">
|
||||
.redBtn {
|
||||
padding: 5px;
|
||||
border-radius: 20px;
|
||||
border: 1px solid #f80;
|
||||
background: #f80;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
a.redBtn:hover {
|
||||
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
</head>
|
||||
<body class="">
|
||||
|
||||
<div class="header">
|
||||
<div class="mainNav" id="mainNav">
|
||||
<div class="box_center cf"
|
||||
style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
|
||||
|
||||
小说精品屋作家管理
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<div class="my_l">
|
||||
|
||||
<ul class="log_list">
|
||||
<li><a class="link_4 on" href="/author/index.html">作品管理</a></li>
|
||||
<li><a class="link_2 " href="/author/author_income_detail.html">稿费收入</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="my_r">
|
||||
<div id="noContentDiv">
|
||||
<div class="tc" style="margin-top: 200px"><a href="javascript:addContent()" class="btn_red">新建章节</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="my_bookshelf" id="hasContentDiv" style="display: none">
|
||||
<div class="title cf">
|
||||
<h2 class="fl">章节列表</h2>
|
||||
<div class="fr"><a href="javascript:addContent()" class="btn_red">新建章节</a></div>
|
||||
</div>
|
||||
|
||||
<div id="divData" class="updateTable">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<!-- <th class="style">
|
||||
序号
|
||||
</th>-->
|
||||
<th class="name">
|
||||
章节名
|
||||
</th>
|
||||
<th class="goread">
|
||||
更新时间
|
||||
</th>
|
||||
<th class="goread">
|
||||
是否收费
|
||||
</th>
|
||||
<th class="goread">
|
||||
操作
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="bookList">
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="pageBox cf" id="shellPage">
|
||||
</div>
|
||||
</div>
|
||||
<!--<div id="divData" class="updateTable">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th class="name">
|
||||
爬虫源(已开启的爬虫源)
|
||||
</th>
|
||||
<th class="chapter">
|
||||
成功爬取数量(websocket实现)
|
||||
</th>
|
||||
<th class="time">
|
||||
目标爬取数量
|
||||
</th>
|
||||
<th class="goread">
|
||||
状态(正在运行,已停止)(一次只能运行一个爬虫源)
|
||||
</th>
|
||||
<th class="goread">
|
||||
操作(启动,停止)
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="bookShelfList">
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="pageBox cf" id="shellPage">
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
<script src="/javascript/jquery-1.8.0.min.js" type="text/javascript"></script>
|
||||
<script src="/layui/layui.all.js" type="text/javascript"></script>
|
||||
<script src="/javascript/header.js" type="text/javascript"></script>
|
||||
<script src="/javascript/user.js" type="text/javascript"></script>
|
||||
<script src="/javascript/date.js" type="text/javascript"></script>
|
||||
<script src="/javascript/common.js" type="text/javascript"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
var bookId = getSearchString("bookId");
|
||||
|
||||
var indexCount = 0;
|
||||
|
||||
search(1, 5);
|
||||
|
||||
function search(curr, limit) {
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/book/queryIndexList",
|
||||
data: {'bookId': bookId, 'curr': curr, 'limit': limit, 'orderBy': 'index_num desc'},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var bookList = data.data.list;
|
||||
if (bookList.length > 0) {
|
||||
indexCount = bookList.length;
|
||||
$("#hasContentDiv").css("display", "block");
|
||||
$("#noContentDiv").css("display", "none");
|
||||
var bookListHtml = "";
|
||||
for (var i = 0; i < bookList.length; i++) {
|
||||
var book = bookList[i];
|
||||
bookListHtml += (" <tr class=\"book_list\" vals=\"291\">\n" +
|
||||
/* " <td class=\"style bookclass\">\n" +
|
||||
" ["+(i+1)+"]\n" +
|
||||
" </td>\n" +*/
|
||||
|
||||
" <td id='name" + book.id + "' class=\"name\">\n" +
|
||||
" " + book.indexName + "</td>\n" +
|
||||
|
||||
|
||||
" <td class=\"goread\">\n" +
|
||||
" " + new Date(Date.parse(book.updateTime)).Format("yyyy-MM-dd hh:mm") + "<br/>更新\n" +
|
||||
" </td>\n" +
|
||||
|
||||
" <td class=\"goread\" valsc=\"291|2037554|1\">"
|
||||
+ (book.isVip == 1 ? '收费' : '免费') + "</td>\n" +
|
||||
|
||||
" <td class=\"goread\" id='opt" + book.id + "'>" +
|
||||
"<a class='redBtn' href='javascript:updateIndex(\"" + book.id + "\"," + book.isVip + ")'>修改 </a><br/>" +
|
||||
"<a href='javascript:deleteIndex(\"" + book.id + "\")'>删除 </a><br/>" +
|
||||
"</td> </tr>");
|
||||
}
|
||||
$("#bookList").html(bookListHtml);
|
||||
|
||||
layui.use('laypage', function () {
|
||||
var laypage = layui.laypage;
|
||||
|
||||
//执行一个laypage实例
|
||||
laypage.render({
|
||||
elem: 'shellPage' //注意,这里的 test1 是 ID,不用加 # 号
|
||||
, count: data.data.total //数据总数,从服务端得到,
|
||||
, curr: data.data.pageNum
|
||||
, limit: data.data.pageSize
|
||||
, jump: function (obj, first) {
|
||||
|
||||
|
||||
//obj包含了当前分页的所有参数,比如:
|
||||
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
|
||||
console.log(obj.limit); //得到每页显示的条数
|
||||
|
||||
|
||||
//首次不执行
|
||||
if (!first) {
|
||||
search(obj.curr, obj.limit);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function addContent() {
|
||||
location.href = "/author/content_add.html?indexCount=" + indexCount + "&bookId=" + bookId;
|
||||
|
||||
}
|
||||
|
||||
function updateIndex(indexId, isVip) {
|
||||
|
||||
var indexName = $.trim($("#name" + indexId).text());
|
||||
|
||||
|
||||
location.href = "/author/content_update.html?bookId=" + bookId
|
||||
+ "&indexId=" + indexId
|
||||
+ "&indexName=" + encodeURI(encodeURI(indexName))
|
||||
+ "&isVip=" + isVip;
|
||||
|
||||
|
||||
/*
|
||||
var indexName = $("#name"+indexId).text();
|
||||
|
||||
var htmlStr = "<input type=\"text\" value=\""+$.trim(indexName)+"\">";
|
||||
|
||||
$("#name"+indexId).html(htmlStr);
|
||||
$("#name"+indexId).find("input").focus();
|
||||
$("#name"+indexId).find("input").select();
|
||||
|
||||
$("#name"+indexId).find("input").keyup(function(event){
|
||||
if(event.keyCode ==13){
|
||||
$(this).blur();
|
||||
}
|
||||
});
|
||||
|
||||
$("#name"+indexId).find("input").blur(function () {
|
||||
var indexName = $(this).val();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/author/updateIndexName",
|
||||
data: {'indexId':indexId,'indexName':indexName},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
|
||||
$("#name"+indexId).html(indexName);
|
||||
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
}else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
});*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function deleteIndex(indexId) {
|
||||
|
||||
layer.confirm('确认要删除吗?删除后数据无法找回!', {
|
||||
btn: ['确定', '取消']//按钮
|
||||
}, function (index) {
|
||||
|
||||
layer.close(index);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/author/deleteIndex",
|
||||
data: {'indexId': indexId},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
|
||||
location.reload();
|
||||
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
</html>
|
@ -2,7 +2,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},~{::meta},~{::link},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="${book.bookName}+'作品评论区_'+#{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}+'。'" />
|
||||
|
@ -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" xmlns:th="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:utext="${book.bookName}+'_'+${bookIndex.indexName}+'_'+#{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}+'。'" />
|
||||
@ -40,8 +40,6 @@
|
||||
<input type="hidden" id="preIndexName" th:value="${bookIndex.indexName}"/>
|
||||
|
||||
<input type="hidden" id="preContentId" th:value="${bookIndex.id}"/>
|
||||
<input type="hidden" id="preIndexId" th:value="${preBookIndexId}"/>
|
||||
<input type="hidden" id="nextIndexId" th:value="${nextBookIndexId}"/>
|
||||
|
||||
<div th:replace="common/top :: top('10')">
|
||||
</div>
|
||||
@ -116,7 +114,7 @@
|
||||
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEdAAX4WEeZOhVYVmRzc9paH9JSy/08L4LdXX0bnEtd0tA2crFh4MPja1O/9L0Y0B5Q7Mkw2OnJlkYmOh3/iyqfPkkn99UiP/cCDJ38/2cPKg8P57VHEmkKJr8/tJbwExBtkfhGxxoA1kMIQUaw59BH5iPe">
|
||||
</div>
|
||||
<ul class="order_list">
|
||||
<li>价格:<span class="red" th:text="${bookIndex.bookPrice}+'屋币(1元=100屋币)'"></span></li>
|
||||
<li>价格:<span class="red">10屋币(1元=100屋币)</span></li>
|
||||
<li id="panelPay" class="btns"><a class="btn_red" href="javascript:buyBookIndex()" >购买</a></li>
|
||||
|
||||
</ul>
|
||||
@ -271,12 +269,11 @@
|
||||
})
|
||||
|
||||
|
||||
var bookId = $("#bookId").val();
|
||||
var indexId = $("#preContentId").val();
|
||||
var preIndexId = $("#preIndexId").val();
|
||||
var nextIndexId = $("#nextIndexId").val();
|
||||
var currentBId =37, usfltotal = 0, spmymoney = 0;
|
||||
$(function () {
|
||||
BookDetail.GetReadSet(bookId,indexId,preIndexId,nextIndexId,1);
|
||||
BookDetail.GetReadSet(37,1959973,0,1959974,1);
|
||||
BookDetail.ClickChapter(37,1959973,0);
|
||||
BookDetail.GetFavorites(37);
|
||||
$(".ico_setup").click(function () {
|
||||
|
||||
$(".maskBox,.setupBox").show();
|
||||
@ -321,7 +318,7 @@
|
||||
if(bookIndexId != 0){
|
||||
window.location.href = '/book/'+bookId+'/'+bookIndexId+".html";
|
||||
}else{
|
||||
window.location.href = '/book/indexList-' + bookId + '.html';
|
||||
layer.alert("已经是第一章了!");
|
||||
}
|
||||
|
||||
}
|
||||
@ -329,7 +326,7 @@
|
||||
if(bookIndexId != 0){
|
||||
window.location.href = '/book/'+bookId+'/'+bookIndexId+".html";
|
||||
}else{
|
||||
window.location.href = '/book/indexList-' + bookId + '.html';
|
||||
layer.alert("已经是最新章节了!");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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},~{::meta},~{::link},~{})">
|
||||
<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>
|
||||
<meta name="keywords"
|
||||
th:content="${book.bookName}+'官方首发,'+${book.bookName}+'小说,'+${book.bookName}+'最新章节'+${book.bookName}+'txt下载,'+${book.bookName}+'无弹窗,'+${book.bookName}+'吧,'+${book.bookName}+'离线完本'"/>
|
||||
@ -45,7 +45,7 @@
|
||||
<a class="icon_hide" href="javascript:void(0)" onclick=""><i></i>收起</a>
|
||||
<a class="icon_show" href="javascript:void(0)" onclick=""><i></i>展开</a>
|
||||
</div>
|
||||
<div class="btns" id="optBtn">
|
||||
<div class="btns">
|
||||
<a th:href="'/book/'+${book.id}+'/'+${firstBookIndexId}+'.html'" class="btn_ora">点击阅读</a>
|
||||
<span id="cFavs"><a href="javascript:void(0);" class="btn_ora_white btn_addsj"
|
||||
onclick="javascript:BookDetail.AddFavorites(37,0,0);">加入书架</a>
|
||||
@ -196,32 +196,27 @@
|
||||
var pathname = window.location.pathname;
|
||||
var bookId = pathname.substring(pathname.lastIndexOf("/") + 1, pathname.lastIndexOf("."))
|
||||
//查询章节信息
|
||||
var lastBookIndexId = $("#lastBookIndexId").val();
|
||||
if(lastBookIndexId){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/book/queryBookIndexAbout",
|
||||
data: {'bookId': bookId, 'lastBookIndexId': lastBookIndexId},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var bookIndexData = data.data;
|
||||
$("#bookIndexCount").html("(" + bookIndexData.bookIndexCount + "章)");
|
||||
$("#lastBookContent").html(bookIndexData.lastBookContent + "...");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/book/queryBookIndexAbout",
|
||||
data: {'bookId': bookId, 'lastBookIndexId': $("#lastBookIndexId").val()},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var bookIndexData = data.data;
|
||||
$("#bookIndexCount").html("(" + bookIndexData.bookIndexCount + "章)");
|
||||
$("#lastBookContent").html(bookIndexData.lastBookContent + "...");
|
||||
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
$("#optBtn").remove();
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
//查询是否在书架
|
||||
|
@ -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},~{::meta},~{::link},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:utext="${book.bookName}+'目录,'+${book.bookName}+'最新章节列表_'+#{website.name}"></title>
|
||||
<meta name="keywords" th:content="${book.bookName}+','+${book.bookName}+'目录,'+${book.bookName}+'最新章节列表'"/>
|
||||
<meta name="description"
|
||||
|
@ -2,7 +2,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},~{::meta},~{::link},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'小说排行榜_'+#{website.name}"></title>
|
||||
<meta name="keywords" content="小说排行榜,热门小说榜,小说排行榜完结版,完结小说排行榜,完本小说排行榜,最新小说排行榜,网络小说排行榜,排行榜,点击榜,新书榜,推荐榜" />
|
||||
<meta name="description" th:content="'最新热门网络小说排行榜,包含各类热门小说榜,小说排行榜上都是受用户喜爱的小说作品,精彩尽在'+#{website.name}+'。'" />
|
||||
|
@ -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},~{::meta},~{::link},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'全部作品_'+#{website.name}"></title>
|
||||
<meta name="keywords" th:content="#{website.name}+',小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学'"/>
|
||||
<meta name="description"
|
||||
|
@ -1,13 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head th:fragment="common_head(title,meta,links,script)">
|
||||
<head th:fragment="common_head(title,meta,links)">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<title th:replace="${title}">小说精品屋</title>
|
||||
<link rel="stylesheet" href="/css/base.css?v=1"/>
|
||||
<th:block th:replace="${meta}"/>
|
||||
<th:block th:replace="${links}"/>
|
||||
<th:block th:replace="${script}"/>
|
||||
<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
|
@ -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},~{::meta},~{::link},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="#{website.name}+'_原创小说网站'"></title>
|
||||
<meta name="keywords" th:content="#{website.name}+',小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学'"/>
|
||||
<meta name="description"
|
||||
@ -153,6 +153,7 @@
|
||||
|
||||
</body>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/header.js" type="text/javascript"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
$(function () {
|
||||
//加载首页书籍设置数据
|
||||
|
@ -169,12 +169,8 @@
|
||||
|
||||
<input type="hidden" id="bookIdHidden" th:value="${book.id}"/>
|
||||
|
||||
<input type="hidden" id="bookNameHidden" th:value="${book.bookName}"/>
|
||||
|
||||
<input type="hidden" id="contentIdHidden" th:value="${bookIndex.id}"/>
|
||||
|
||||
<input type="hidden" id="indexNameHidden" th:value="${bookIndex.indexName}"/>
|
||||
|
||||
<input type="hidden" id="indexNumHidden" th:value="${bookIndex.indexNum}"/>
|
||||
|
||||
<script>
|
||||
@ -230,18 +226,11 @@
|
||||
<div th:replace="mobile/common/js :: js">
|
||||
</div>
|
||||
<div id="chaptercontent" class="Readarea ReadAjax_content screen_container"
|
||||
style="color: rgb(0, 0, 0); font-size: 25px;" th:if="${!needBuy}">
|
||||
style="color: rgb(0, 0, 0); font-size: 25px;">
|
||||
<p style="width:100%;text-alight:center; overflow: auto;-webkit-overflow-scrolling:touch;" >
|
||||
<span
|
||||
th:utext="${bookContent.content}"></span></p>
|
||||
</div>
|
||||
<div class="Readarea ReadAjax_content screen_container"
|
||||
style="color: rgb(0, 0, 0); font-size: 10px;background-color: #fff" th:if="${needBuy}">
|
||||
<h5>此章为VIP章节,需要订阅后才能继续阅读</h5>
|
||||
价格:<span style="color: red" th:text="${bookIndex.bookPrice}+'屋币(1元=100屋币)'"></span><br/>
|
||||
<a href="javascript:buyBookIndex()" type="button" class="layui-btn layui-btn-sm layui-btn-radius">购买</a>
|
||||
|
||||
</div>
|
||||
<div class="indexDiv" style="height: 42px;line-height: 42px;text-align:center;background: #f2f2f2">
|
||||
|
||||
<a th:href="${preBookIndexId!=0?'/book/'+book.id+'/'+preBookIndexId+'.html':'#'}">上一章</a>
|
||||
@ -327,38 +316,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
function buyBookIndex(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/buyBookIndex",
|
||||
data: {'bookId':$("#bookIdHidden").val(),"bookName":$("#bookNameHidden").val(),
|
||||
"bookIndexId":$("#contentIdHidden").val(),"bookIndexName":$("#indexNameHidden").val()},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
location.reload();
|
||||
|
||||
|
||||
} else if(data.code == 1001){
|
||||
//未登录
|
||||
|
||||
}else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
$.post("/book/addVisitCount", {"bookId": $("#bookIdHidden").val()}, function () {
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</html>
|
@ -2,7 +2,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},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link})">
|
||||
<title th:text="'充值_'+#{website.name}"></title>
|
||||
<link rel="stylesheet" href="/css/base.css"/>
|
||||
<link rel="stylesheet" href="/css/main.css"/>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!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},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link})">
|
||||
<title th:text="'我的书评_'+#{website.name}"></title>
|
||||
<link rel="stylesheet" href="/css/user.css"/>
|
||||
</head>
|
||||
|
@ -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>
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
|
||||
<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}+'小说!'" />
|
||||
|
@ -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},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link})">
|
||||
<title th:text="'反馈留言_'+#{website.name}"></title>
|
||||
<link rel="stylesheet" href="/css/user.css"/>
|
||||
</head>
|
||||
|
@ -2,7 +2,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},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link})">
|
||||
<title th:text="'我的反馈_'+#{website.name}"></title>
|
||||
<link rel="stylesheet" href="/css/user.css"/>
|
||||
</head>
|
||||
|
@ -2,7 +2,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},~{::meta},~{::link},~{})">
|
||||
<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}+'小说!'" />
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!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},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link})">
|
||||
<title th:text="'最近阅读_'+#{website.name}"></title>
|
||||
<link rel="stylesheet" href="/css/user.css"/>
|
||||
</head>
|
||||
|
@ -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},~{::meta},~{::link},~{})">
|
||||
<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"
|
||||
|
@ -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},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link})">
|
||||
<title th:text="'修改昵称_'+#{website.name}"></title>
|
||||
<link rel="stylesheet" href="/css/user.css"/>
|
||||
</head>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!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},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link})">
|
||||
<title th:text="'修改密码_'+#{website.name}"></title>
|
||||
<link rel="stylesheet" href="/css/user.css"/>
|
||||
</head>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!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},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link})">
|
||||
<title th:text="'修改性别_'+#{website.name}"></title>
|
||||
<link rel="stylesheet" href="/css/user.css"/>
|
||||
</head>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!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},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link})">
|
||||
<title th:text="'账号设置_'+#{website.name}"></title>
|
||||
<link rel="stylesheet" href="/css/user.css"/>
|
||||
</head>
|
||||
|
@ -2,7 +2,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},~{})">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link})">
|
||||
<title th:text="'个人中心_'+#{website.name}"></title>
|
||||
<link rel="stylesheet" href="/css/user.css"/>
|
||||
</head>
|
||||
|
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>com.java2nb</groupId>
|
||||
<artifactId>novel</artifactId>
|
||||
<version>2.9.0</version>
|
||||
<version>2.6.4</version>
|
||||
<modules>
|
||||
<module>novel-common</module>
|
||||
<module>novel-front</module>
|
||||
|
@ -1,27 +0,0 @@
|
||||
CREATE TABLE `author_income_detail` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
|
||||
`author_id` bigint(20) NOT NULL COMMENT '作家ID',
|
||||
`book_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '作品ID,0表示全部作品',
|
||||
`income_date` date NOT NULL COMMENT '收入日期',
|
||||
`income_account` int(11) NOT NULL DEFAULT '0' COMMENT '订阅总额',
|
||||
`income_count` int(11) NOT NULL DEFAULT '0' COMMENT '订阅次数',
|
||||
`income_number` int(11) NOT NULL DEFAULT '0' COMMENT '订阅人数',
|
||||
`create_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='稿费收入明细统计表';
|
||||
|
||||
CREATE TABLE `author_income` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
|
||||
`author_id` bigint(20) NOT NULL COMMENT '作家ID',
|
||||
`book_id` bigint(20) NOT NULL COMMENT '作品ID',
|
||||
`income_month` date NOT NULL COMMENT '收入月份',
|
||||
`pre_tax_income` bigint(20) NOT NULL DEFAULT '0' COMMENT '税前收入(分)',
|
||||
`after_tax_income` bigint(20) NOT NULL DEFAULT '0' COMMENT '税后收入(分)',
|
||||
`pay_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '支付状态,0:待支付,1:已支付',
|
||||
`confirm_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '稿费确认状态,0:待确认,1:已确认',
|
||||
`detail` varchar(255) DEFAULT NULL COMMENT '详情',
|
||||
`create_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='稿费收入统计表';
|
@ -1 +0,0 @@
|
||||
alter table book add column `yesterday_buy` int(11) DEFAULT '0' COMMENT '昨日订阅数' after comment_count;
|
@ -1 +0,0 @@
|
||||
alter table book_index add column `book_price` int(3) DEFAULT 0 COMMENT '章节费用(屋币)' after `is_vip`;
|
@ -1835,38 +1835,4 @@ UPDATE `crawl_source` SET `source_name` = '书趣阁', `crawl_rule` = '{\n \"boo
|
||||
|
||||
INSERT INTO `friend_link` ( `link_name`, `link_url`, `sort`, `is_open`, `create_user_id`, `create_time`, `update_user_id`, `update_time`) VALUES
|
||||
('小羊影视', 'http://video.java2nb.com/', 11, 1, NULL, NULL, NULL, NULL),
|
||||
('官方论坛', 'http://bbs.java2nb.com', 21, 1, NULL, NULL, NULL, NULL);
|
||||
|
||||
|
||||
CREATE TABLE `author_income_detail` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
|
||||
`author_id` bigint(20) NOT NULL COMMENT '作家ID',
|
||||
`book_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '作品ID,0表示全部作品',
|
||||
`income_date` date NOT NULL COMMENT '收入日期',
|
||||
`income_account` int(11) NOT NULL DEFAULT '0' COMMENT '订阅总额',
|
||||
`income_count` int(11) NOT NULL DEFAULT '0' COMMENT '订阅次数',
|
||||
`income_number` int(11) NOT NULL DEFAULT '0' COMMENT '订阅人数',
|
||||
`create_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='稿费收入明细统计表';
|
||||
|
||||
CREATE TABLE `author_income` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
|
||||
`author_id` bigint(20) NOT NULL COMMENT '作家ID',
|
||||
`book_id` bigint(20) NOT NULL COMMENT '作品ID',
|
||||
`income_month` date NOT NULL COMMENT '收入月份',
|
||||
`pre_tax_income` bigint(20) NOT NULL DEFAULT '0' COMMENT '税前收入(分)',
|
||||
`after_tax_income` bigint(20) NOT NULL DEFAULT '0' COMMENT '税后收入(分)',
|
||||
`pay_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '支付状态,0:待支付,1:已支付',
|
||||
`confirm_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '稿费确认状态,0:待确认,1:已确认',
|
||||
`detail` varchar(255) DEFAULT NULL COMMENT '详情',
|
||||
`create_time` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='稿费收入统计表';
|
||||
|
||||
|
||||
alter table book add column `yesterday_buy` int(11) DEFAULT '0' COMMENT '昨日订阅数' after comment_count;
|
||||
|
||||
alter table book_index add column `book_price` int(3) DEFAULT 0 COMMENT '章节费用(屋币)' after `is_vip`;
|
||||
('官方论坛', 'http://bbs.java2nb.com', 21, 1, NULL, NULL, NULL, NULL);
|
Reference in New Issue
Block a user