mirror of
https://github.com/201206030/novel-plus.git
synced 2025-07-04 08:26:37 +00:00
Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
bb2d55dd42 | |||
16fdd1678e | |||
d960f94a59 | |||
4c3d3c67ee | |||
9773b73475 | |||
5543b905cd | |||
e273906441 | |||
83dc04c50b | |||
b4f5b18e93 | |||
fe80c21812 | |||
4c2a7f12c1 | |||
e24e87b546 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,3 +13,4 @@
|
|||||||
/novel-admin/target
|
/novel-admin/target
|
||||||
/*.iml
|
/*.iml
|
||||||
/novel-admin/*.iml
|
/novel-admin/*.iml
|
||||||
|
.DS_Store
|
||||||
|
@ -0,0 +1,135 @@
|
|||||||
|
package com.java2nb.novel.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.Model;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
||||||
|
|
||||||
|
import com.java2nb.novel.domain.BookDO;
|
||||||
|
import com.java2nb.novel.service.BookService;
|
||||||
|
import com.java2nb.common.utils.PageBean;
|
||||||
|
import com.java2nb.common.utils.Query;
|
||||||
|
import com.java2nb.common.utils.R;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小说表
|
||||||
|
*
|
||||||
|
* @author phacks
|
||||||
|
* @email 1179705413@qq.com
|
||||||
|
* @date 2020-05-16 15:08:34
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/novel/book")
|
||||||
|
public class BookController {
|
||||||
|
@Autowired
|
||||||
|
private BookService bookService;
|
||||||
|
|
||||||
|
@GetMapping()
|
||||||
|
@RequiresPermissions("novel:book:book")
|
||||||
|
String Book() {
|
||||||
|
return "novel/book/book";
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "获取小说表列表", notes = "获取小说表列表")
|
||||||
|
@ResponseBody
|
||||||
|
@GetMapping("/list")
|
||||||
|
@RequiresPermissions("novel:book:book")
|
||||||
|
public R list(@RequestParam Map<String, Object> params) {
|
||||||
|
//查询列表数据
|
||||||
|
Query query = new Query(params);
|
||||||
|
List<BookDO> bookList = bookService.list(query);
|
||||||
|
int total = bookService.count(query);
|
||||||
|
PageBean pageBean = new PageBean(bookList, total);
|
||||||
|
return R.ok().put("data", pageBean);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "新增小说表页面", notes = "新增小说表页面")
|
||||||
|
@GetMapping("/add")
|
||||||
|
@RequiresPermissions("novel:book:add")
|
||||||
|
String add() {
|
||||||
|
return "novel/book/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "修改小说表页面", notes = "修改小说表页面")
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
@RequiresPermissions("novel:book:edit")
|
||||||
|
String edit(@PathVariable("id") Long id, Model model) {
|
||||||
|
BookDO book = bookService.get(id);
|
||||||
|
model.addAttribute("book", book);
|
||||||
|
return "novel/book/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "查看小说表页面", notes = "查看小说表页面")
|
||||||
|
@GetMapping("/detail/{id}")
|
||||||
|
@RequiresPermissions("novel:book:detail")
|
||||||
|
String detail(@PathVariable("id") Long id, Model model) {
|
||||||
|
BookDO book = bookService.get(id);
|
||||||
|
model.addAttribute("book", book);
|
||||||
|
return "novel/book/detail";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "新增小说表", notes = "新增小说表")
|
||||||
|
@ResponseBody
|
||||||
|
@PostMapping("/save")
|
||||||
|
@RequiresPermissions("novel:book:add")
|
||||||
|
public R save( BookDO book) {
|
||||||
|
if (bookService.save(book) > 0) {
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
return R.error();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "修改小说表", notes = "修改小说表")
|
||||||
|
@ResponseBody
|
||||||
|
@RequestMapping("/update")
|
||||||
|
@RequiresPermissions("novel:book:edit")
|
||||||
|
public R update( BookDO book) {
|
||||||
|
bookService.update(book);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "删除小说表", notes = "删除小说表")
|
||||||
|
@PostMapping("/remove")
|
||||||
|
@ResponseBody
|
||||||
|
@RequiresPermissions("novel:book:remove")
|
||||||
|
public R remove( Long id) {
|
||||||
|
if (bookService.remove(id) > 0) {
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
return R.error();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "批量删除小说表", notes = "批量删除小说表")
|
||||||
|
@PostMapping("/batchRemove")
|
||||||
|
@ResponseBody
|
||||||
|
@RequiresPermissions("novel:book:batchRemove")
|
||||||
|
public R remove(@RequestParam("ids[]") Long[] ids) {
|
||||||
|
bookService.batchRemove(ids);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
32
novel-admin/src/main/java/com/java2nb/novel/dao/BookDao.java
Normal file
32
novel-admin/src/main/java/com/java2nb/novel/dao/BookDao.java
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
package com.java2nb.novel.dao;
|
||||||
|
|
||||||
|
import com.java2nb.novel.domain.BookDO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小说表
|
||||||
|
* @author phacks
|
||||||
|
* @email 1179705413@qq.com
|
||||||
|
* @date 2020-05-16 15:08:34
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface BookDao {
|
||||||
|
|
||||||
|
BookDO get(Long id);
|
||||||
|
|
||||||
|
List<BookDO> list(Map<String,Object> map);
|
||||||
|
|
||||||
|
int count(Map<String,Object> map);
|
||||||
|
|
||||||
|
int save(BookDO book);
|
||||||
|
|
||||||
|
int update(BookDO book);
|
||||||
|
|
||||||
|
int remove(Long id);
|
||||||
|
|
||||||
|
int batchRemove(Long[] ids);
|
||||||
|
}
|
395
novel-admin/src/main/java/com/java2nb/novel/domain/BookDO.java
Normal file
395
novel-admin/src/main/java/com/java2nb/novel/domain/BookDO.java
Normal file
@ -0,0 +1,395 @@
|
|||||||
|
package com.java2nb.novel.domain;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.java2nb.common.jsonserializer.LongToStringSerializer;
|
||||||
|
|
||||||
|
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小说表
|
||||||
|
*
|
||||||
|
* @author phacks
|
||||||
|
* @email 1179705413@qq.com
|
||||||
|
* @date 2020-05-16 15:08:34
|
||||||
|
*/
|
||||||
|
public class BookDO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
//主键
|
||||||
|
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||||
|
//所以通过序列化成字符串来解决
|
||||||
|
@JsonSerialize(using = LongToStringSerializer.class)
|
||||||
|
private Long id;
|
||||||
|
//作品方向,0:男频,1:女频'
|
||||||
|
private Integer workDirection;
|
||||||
|
//分类ID
|
||||||
|
private Integer catId;
|
||||||
|
//分类名
|
||||||
|
private String catName;
|
||||||
|
//小说封面
|
||||||
|
private String picUrl;
|
||||||
|
//小说名
|
||||||
|
private String bookName;
|
||||||
|
//作者id
|
||||||
|
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||||
|
//所以通过序列化成字符串来解决
|
||||||
|
@JsonSerialize(using = LongToStringSerializer.class)
|
||||||
|
private Long authorId;
|
||||||
|
//作者名
|
||||||
|
private String authorName;
|
||||||
|
//书籍描述
|
||||||
|
private String bookDesc;
|
||||||
|
//评分,预留字段
|
||||||
|
private Float score;
|
||||||
|
//书籍状态,0:连载中,1:已完结
|
||||||
|
private Integer bookStatus;
|
||||||
|
//点击量
|
||||||
|
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||||
|
//所以通过序列化成字符串来解决
|
||||||
|
@JsonSerialize(using = LongToStringSerializer.class)
|
||||||
|
private Long visitCount;
|
||||||
|
//总字数
|
||||||
|
private Integer wordCount;
|
||||||
|
//评论数
|
||||||
|
private Integer commentCount;
|
||||||
|
//最新目录ID
|
||||||
|
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
|
||||||
|
//所以通过序列化成字符串来解决
|
||||||
|
@JsonSerialize(using = LongToStringSerializer.class)
|
||||||
|
private Long lastIndexId;
|
||||||
|
//最新目录名
|
||||||
|
private String lastIndexName;
|
||||||
|
//最新目录更新时间
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date lastIndexUpdateTime;
|
||||||
|
//是否收费,1:收费,0:免费
|
||||||
|
private Integer isVip;
|
||||||
|
//状态,0:入库,1:上架
|
||||||
|
private Integer status;
|
||||||
|
//更新时间
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date updateTime;
|
||||||
|
//创建时间
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
//爬虫源站ID
|
||||||
|
private Integer crawlSourceId;
|
||||||
|
//抓取的源站小说ID
|
||||||
|
private String crawlBookId;
|
||||||
|
//最后一次的抓取时间
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date crawlLastTime;
|
||||||
|
//是否已停止更新,0:未停止,1:已停止
|
||||||
|
private Integer crawlIsStop;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置:主键
|
||||||
|
*/
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:主键
|
||||||
|
*/
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:作品方向,0:男频,1:女频'
|
||||||
|
*/
|
||||||
|
public void setWorkDirection(Integer workDirection) {
|
||||||
|
this.workDirection = workDirection;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:作品方向,0:男频,1:女频'
|
||||||
|
*/
|
||||||
|
public Integer getWorkDirection() {
|
||||||
|
return workDirection;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:分类ID
|
||||||
|
*/
|
||||||
|
public void setCatId(Integer catId) {
|
||||||
|
this.catId = catId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:分类ID
|
||||||
|
*/
|
||||||
|
public Integer getCatId() {
|
||||||
|
return catId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:分类名
|
||||||
|
*/
|
||||||
|
public void setCatName(String catName) {
|
||||||
|
this.catName = catName;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:分类名
|
||||||
|
*/
|
||||||
|
public String getCatName() {
|
||||||
|
return catName;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:小说封面
|
||||||
|
*/
|
||||||
|
public void setPicUrl(String picUrl) {
|
||||||
|
this.picUrl = picUrl;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:小说封面
|
||||||
|
*/
|
||||||
|
public String getPicUrl() {
|
||||||
|
return picUrl;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:小说名
|
||||||
|
*/
|
||||||
|
public void setBookName(String bookName) {
|
||||||
|
this.bookName = bookName;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:小说名
|
||||||
|
*/
|
||||||
|
public String getBookName() {
|
||||||
|
return bookName;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:作者id
|
||||||
|
*/
|
||||||
|
public void setAuthorId(Long authorId) {
|
||||||
|
this.authorId = authorId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:作者id
|
||||||
|
*/
|
||||||
|
public Long getAuthorId() {
|
||||||
|
return authorId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:作者名
|
||||||
|
*/
|
||||||
|
public void setAuthorName(String authorName) {
|
||||||
|
this.authorName = authorName;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:作者名
|
||||||
|
*/
|
||||||
|
public String getAuthorName() {
|
||||||
|
return authorName;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:书籍描述
|
||||||
|
*/
|
||||||
|
public void setBookDesc(String bookDesc) {
|
||||||
|
this.bookDesc = bookDesc;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:书籍描述
|
||||||
|
*/
|
||||||
|
public String getBookDesc() {
|
||||||
|
return bookDesc;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:评分,预留字段
|
||||||
|
*/
|
||||||
|
public void setScore(Float score) {
|
||||||
|
this.score = score;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:评分,预留字段
|
||||||
|
*/
|
||||||
|
public Float getScore() {
|
||||||
|
return score;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:书籍状态,0:连载中,1:已完结
|
||||||
|
*/
|
||||||
|
public void setBookStatus(Integer bookStatus) {
|
||||||
|
this.bookStatus = bookStatus;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:书籍状态,0:连载中,1:已完结
|
||||||
|
*/
|
||||||
|
public Integer getBookStatus() {
|
||||||
|
return bookStatus;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:点击量
|
||||||
|
*/
|
||||||
|
public void setVisitCount(Long visitCount) {
|
||||||
|
this.visitCount = visitCount;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:点击量
|
||||||
|
*/
|
||||||
|
public Long getVisitCount() {
|
||||||
|
return visitCount;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:总字数
|
||||||
|
*/
|
||||||
|
public void setWordCount(Integer wordCount) {
|
||||||
|
this.wordCount = wordCount;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:总字数
|
||||||
|
*/
|
||||||
|
public Integer getWordCount() {
|
||||||
|
return wordCount;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:评论数
|
||||||
|
*/
|
||||||
|
public void setCommentCount(Integer commentCount) {
|
||||||
|
this.commentCount = commentCount;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:评论数
|
||||||
|
*/
|
||||||
|
public Integer getCommentCount() {
|
||||||
|
return commentCount;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:最新目录ID
|
||||||
|
*/
|
||||||
|
public void setLastIndexId(Long lastIndexId) {
|
||||||
|
this.lastIndexId = lastIndexId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:最新目录ID
|
||||||
|
*/
|
||||||
|
public Long getLastIndexId() {
|
||||||
|
return lastIndexId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:最新目录名
|
||||||
|
*/
|
||||||
|
public void setLastIndexName(String lastIndexName) {
|
||||||
|
this.lastIndexName = lastIndexName;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:最新目录名
|
||||||
|
*/
|
||||||
|
public String getLastIndexName() {
|
||||||
|
return lastIndexName;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:最新目录更新时间
|
||||||
|
*/
|
||||||
|
public void setLastIndexUpdateTime(Date lastIndexUpdateTime) {
|
||||||
|
this.lastIndexUpdateTime = lastIndexUpdateTime;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:最新目录更新时间
|
||||||
|
*/
|
||||||
|
public Date getLastIndexUpdateTime() {
|
||||||
|
return lastIndexUpdateTime;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:是否收费,1:收费,0:免费
|
||||||
|
*/
|
||||||
|
public void setIsVip(Integer isVip) {
|
||||||
|
this.isVip = isVip;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:是否收费,1:收费,0:免费
|
||||||
|
*/
|
||||||
|
public Integer getIsVip() {
|
||||||
|
return isVip;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:状态,0:入库,1:上架
|
||||||
|
*/
|
||||||
|
public void setStatus(Integer status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:状态,0:入库,1:上架
|
||||||
|
*/
|
||||||
|
public Integer getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:更新时间
|
||||||
|
*/
|
||||||
|
public void setUpdateTime(Date updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:更新时间
|
||||||
|
*/
|
||||||
|
public Date getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:创建时间
|
||||||
|
*/
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:创建时间
|
||||||
|
*/
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:爬虫源站ID
|
||||||
|
*/
|
||||||
|
public void setCrawlSourceId(Integer crawlSourceId) {
|
||||||
|
this.crawlSourceId = crawlSourceId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:爬虫源站ID
|
||||||
|
*/
|
||||||
|
public Integer getCrawlSourceId() {
|
||||||
|
return crawlSourceId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:抓取的源站小说ID
|
||||||
|
*/
|
||||||
|
public void setCrawlBookId(String crawlBookId) {
|
||||||
|
this.crawlBookId = crawlBookId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:抓取的源站小说ID
|
||||||
|
*/
|
||||||
|
public String getCrawlBookId() {
|
||||||
|
return crawlBookId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:最后一次的抓取时间
|
||||||
|
*/
|
||||||
|
public void setCrawlLastTime(Date crawlLastTime) {
|
||||||
|
this.crawlLastTime = crawlLastTime;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:最后一次的抓取时间
|
||||||
|
*/
|
||||||
|
public Date getCrawlLastTime() {
|
||||||
|
return crawlLastTime;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置:是否已停止更新,0:未停止,1:已停止
|
||||||
|
*/
|
||||||
|
public void setCrawlIsStop(Integer crawlIsStop) {
|
||||||
|
this.crawlIsStop = crawlIsStop;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取:是否已停止更新,0:未停止,1:已停止
|
||||||
|
*/
|
||||||
|
public Integer getCrawlIsStop() {
|
||||||
|
return crawlIsStop;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.java2nb.novel.service;
|
||||||
|
|
||||||
|
import com.java2nb.novel.domain.BookDO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小说表
|
||||||
|
*
|
||||||
|
* @author phacks
|
||||||
|
* @email 1179705413@qq.com
|
||||||
|
* @date 2020-05-16 15:08:34
|
||||||
|
*/
|
||||||
|
public interface BookService {
|
||||||
|
|
||||||
|
BookDO get(Long id);
|
||||||
|
|
||||||
|
List<BookDO> list(Map<String, Object> map);
|
||||||
|
|
||||||
|
int count(Map<String, Object> map);
|
||||||
|
|
||||||
|
int save(BookDO book);
|
||||||
|
|
||||||
|
int update(BookDO book);
|
||||||
|
|
||||||
|
int remove(Long id);
|
||||||
|
|
||||||
|
int batchRemove(Long[] ids);
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
package com.java2nb.novel.service.impl;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.java2nb.novel.dao.BookDao;
|
||||||
|
import com.java2nb.novel.domain.BookDO;
|
||||||
|
import com.java2nb.novel.service.BookService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class BookServiceImpl implements BookService {
|
||||||
|
@Autowired
|
||||||
|
private BookDao bookDao;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BookDO get(Long id){
|
||||||
|
return bookDao.get(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BookDO> list(Map<String, Object> map){
|
||||||
|
return bookDao.list(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int count(Map<String, Object> map){
|
||||||
|
return bookDao.count(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int save(BookDO book){
|
||||||
|
return bookDao.save(book);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int update(BookDO book){
|
||||||
|
return bookDao.update(book);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int remove(Long id){
|
||||||
|
return bookDao.remove(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int batchRemove(Long[] ids){
|
||||||
|
return bookDao.batchRemove(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
241
novel-admin/src/main/resources/mybatis/novel/BookMapper.xml
Normal file
241
novel-admin/src/main/resources/mybatis/novel/BookMapper.xml
Normal file
@ -0,0 +1,241 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
|
<mapper namespace="com.java2nb.novel.dao.BookDao">
|
||||||
|
|
||||||
|
<select id="get" resultType="com.java2nb.novel.domain.BookDO">
|
||||||
|
select `id`,`work_direction`,`cat_id`,`cat_name`,`pic_url`,`book_name`,`author_id`,`author_name`,`book_desc`,`score`,`book_status`,`visit_count`,`word_count`,`comment_count`,`last_index_id`,`last_index_name`,`last_index_update_time`,`is_vip`,`status`,`update_time`,`create_time`,`crawl_source_id`,`crawl_book_id`,`crawl_last_time`,`crawl_is_stop` from book where id = #{value}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="list" resultType="com.java2nb.novel.domain.BookDO">
|
||||||
|
select `id`,`work_direction`,`cat_id`,`cat_name`,`pic_url`,`book_name`,`author_id`,`author_name`,`book_desc`,`score`,`book_status`,`visit_count`,`word_count`,`comment_count`,`last_index_id`,`last_index_name`,`last_index_update_time`,`is_vip`,`status`,`update_time`,`create_time`,`crawl_source_id`,`crawl_book_id`,`crawl_last_time`,`crawl_is_stop` from book
|
||||||
|
<where>
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="workDirection != null and workDirection != ''"> and work_direction = #{workDirection} </if>
|
||||||
|
<if test="catId != null and catId != ''"> and cat_id = #{catId} </if>
|
||||||
|
<if test="catName != null and catName != ''"> and cat_name = #{catName} </if>
|
||||||
|
<if test="picUrl != null and picUrl != ''"> and pic_url = #{picUrl} </if>
|
||||||
|
<if test="bookName != null and bookName != ''"> and book_name = #{bookName} </if>
|
||||||
|
<if test="authorId != null and authorId != ''"> and author_id = #{authorId} </if>
|
||||||
|
<if test="authorName != null and authorName != ''"> and author_name = #{authorName} </if>
|
||||||
|
<if test="bookDesc != null and bookDesc != ''"> and book_desc = #{bookDesc} </if>
|
||||||
|
<if test="score != null and score != ''"> and score = #{score} </if>
|
||||||
|
<if test="bookStatus != null and bookStatus != ''"> and book_status = #{bookStatus} </if>
|
||||||
|
<if test="visitCount != null and visitCount != ''"> and visit_count = #{visitCount} </if>
|
||||||
|
<if test="wordCount != null and wordCount != ''"> and word_count = #{wordCount} </if>
|
||||||
|
<if test="commentCount != null and commentCount != ''"> and comment_count = #{commentCount} </if>
|
||||||
|
<if test="lastIndexId != null and lastIndexId != ''"> and last_index_id = #{lastIndexId} </if>
|
||||||
|
<if test="lastIndexName != null and lastIndexName != ''"> and last_index_name = #{lastIndexName} </if>
|
||||||
|
<if test="lastIndexUpdateTime != null and lastIndexUpdateTime != ''"> and last_index_update_time = #{lastIndexUpdateTime} </if>
|
||||||
|
<if test="isVip != null and isVip != ''"> and is_vip = #{isVip} </if>
|
||||||
|
<if test="status != null and status != ''"> and status = #{status} </if>
|
||||||
|
<if test="updateTime != null and updateTime != ''"> and update_time = #{updateTime} </if>
|
||||||
|
<if test="createTime != null and createTime != ''"> and create_time = #{createTime} </if>
|
||||||
|
<if test="crawlSourceId != null and crawlSourceId != ''"> and crawl_source_id = #{crawlSourceId} </if>
|
||||||
|
<if test="crawlBookId != null and crawlBookId != ''"> and crawl_book_id = #{crawlBookId} </if>
|
||||||
|
<if test="crawlLastTime != null and crawlLastTime != ''"> and crawl_last_time = #{crawlLastTime} </if>
|
||||||
|
<if test="crawlIsStop != null and crawlIsStop != ''"> and crawl_is_stop = #{crawlIsStop} </if>
|
||||||
|
</where>
|
||||||
|
<choose>
|
||||||
|
<when test="sort != null and sort.trim() != ''">
|
||||||
|
order by ${sort} ${order}
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
order by id desc
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
<if test="offset != null and limit != null">
|
||||||
|
limit #{offset}, #{limit}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="count" resultType="int">
|
||||||
|
select count(*) from book
|
||||||
|
<where>
|
||||||
|
<if test="id != null and id != ''"> and id = #{id} </if>
|
||||||
|
<if test="workDirection != null and workDirection != ''"> and work_direction = #{workDirection} </if>
|
||||||
|
<if test="catId != null and catId != ''"> and cat_id = #{catId} </if>
|
||||||
|
<if test="catName != null and catName != ''"> and cat_name = #{catName} </if>
|
||||||
|
<if test="picUrl != null and picUrl != ''"> and pic_url = #{picUrl} </if>
|
||||||
|
<if test="bookName != null and bookName != ''"> and book_name = #{bookName} </if>
|
||||||
|
<if test="authorId != null and authorId != ''"> and author_id = #{authorId} </if>
|
||||||
|
<if test="authorName != null and authorName != ''"> and author_name = #{authorName} </if>
|
||||||
|
<if test="bookDesc != null and bookDesc != ''"> and book_desc = #{bookDesc} </if>
|
||||||
|
<if test="score != null and score != ''"> and score = #{score} </if>
|
||||||
|
<if test="bookStatus != null and bookStatus != ''"> and book_status = #{bookStatus} </if>
|
||||||
|
<if test="visitCount != null and visitCount != ''"> and visit_count = #{visitCount} </if>
|
||||||
|
<if test="wordCount != null and wordCount != ''"> and word_count = #{wordCount} </if>
|
||||||
|
<if test="commentCount != null and commentCount != ''"> and comment_count = #{commentCount} </if>
|
||||||
|
<if test="lastIndexId != null and lastIndexId != ''"> and last_index_id = #{lastIndexId} </if>
|
||||||
|
<if test="lastIndexName != null and lastIndexName != ''"> and last_index_name = #{lastIndexName} </if>
|
||||||
|
<if test="lastIndexUpdateTime != null and lastIndexUpdateTime != ''"> and last_index_update_time = #{lastIndexUpdateTime} </if>
|
||||||
|
<if test="isVip != null and isVip != ''"> and is_vip = #{isVip} </if>
|
||||||
|
<if test="status != null and status != ''"> and status = #{status} </if>
|
||||||
|
<if test="updateTime != null and updateTime != ''"> and update_time = #{updateTime} </if>
|
||||||
|
<if test="createTime != null and createTime != ''"> and create_time = #{createTime} </if>
|
||||||
|
<if test="crawlSourceId != null and crawlSourceId != ''"> and crawl_source_id = #{crawlSourceId} </if>
|
||||||
|
<if test="crawlBookId != null and crawlBookId != ''"> and crawl_book_id = #{crawlBookId} </if>
|
||||||
|
<if test="crawlLastTime != null and crawlLastTime != ''"> and crawl_last_time = #{crawlLastTime} </if>
|
||||||
|
<if test="crawlIsStop != null and crawlIsStop != ''"> and crawl_is_stop = #{crawlIsStop} </if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="save" parameterType="com.java2nb.novel.domain.BookDO" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into book
|
||||||
|
(
|
||||||
|
`work_direction`,
|
||||||
|
`cat_id`,
|
||||||
|
`cat_name`,
|
||||||
|
`pic_url`,
|
||||||
|
`book_name`,
|
||||||
|
`author_id`,
|
||||||
|
`author_name`,
|
||||||
|
`book_desc`,
|
||||||
|
`score`,
|
||||||
|
`book_status`,
|
||||||
|
`visit_count`,
|
||||||
|
`word_count`,
|
||||||
|
`comment_count`,
|
||||||
|
`last_index_id`,
|
||||||
|
`last_index_name`,
|
||||||
|
`last_index_update_time`,
|
||||||
|
`is_vip`,
|
||||||
|
`status`,
|
||||||
|
`update_time`,
|
||||||
|
`create_time`,
|
||||||
|
`crawl_source_id`,
|
||||||
|
`crawl_book_id`,
|
||||||
|
`crawl_last_time`,
|
||||||
|
`crawl_is_stop`
|
||||||
|
)
|
||||||
|
values
|
||||||
|
(
|
||||||
|
#{workDirection},
|
||||||
|
#{catId},
|
||||||
|
#{catName},
|
||||||
|
#{picUrl},
|
||||||
|
#{bookName},
|
||||||
|
#{authorId},
|
||||||
|
#{authorName},
|
||||||
|
#{bookDesc},
|
||||||
|
#{score},
|
||||||
|
#{bookStatus},
|
||||||
|
#{visitCount},
|
||||||
|
#{wordCount},
|
||||||
|
#{commentCount},
|
||||||
|
#{lastIndexId},
|
||||||
|
#{lastIndexName},
|
||||||
|
#{lastIndexUpdateTime},
|
||||||
|
#{isVip},
|
||||||
|
#{status},
|
||||||
|
#{updateTime},
|
||||||
|
#{createTime},
|
||||||
|
#{crawlSourceId},
|
||||||
|
#{crawlBookId},
|
||||||
|
#{crawlLastTime},
|
||||||
|
#{crawlIsStop}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="saveSelective" parameterType="com.java2nb.novel.domain.BookDO" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into book
|
||||||
|
(
|
||||||
|
<if test="id != null"> `id`, </if>
|
||||||
|
<if test="workDirection != null"> `work_direction`, </if>
|
||||||
|
<if test="catId != null"> `cat_id`, </if>
|
||||||
|
<if test="catName != null"> `cat_name`, </if>
|
||||||
|
<if test="picUrl != null"> `pic_url`, </if>
|
||||||
|
<if test="bookName != null"> `book_name`, </if>
|
||||||
|
<if test="authorId != null"> `author_id`, </if>
|
||||||
|
<if test="authorName != null"> `author_name`, </if>
|
||||||
|
<if test="bookDesc != null"> `book_desc`, </if>
|
||||||
|
<if test="score != null"> `score`, </if>
|
||||||
|
<if test="bookStatus != null"> `book_status`, </if>
|
||||||
|
<if test="visitCount != null"> `visit_count`, </if>
|
||||||
|
<if test="wordCount != null"> `word_count`, </if>
|
||||||
|
<if test="commentCount != null"> `comment_count`, </if>
|
||||||
|
<if test="lastIndexId != null"> `last_index_id`, </if>
|
||||||
|
<if test="lastIndexName != null"> `last_index_name`, </if>
|
||||||
|
<if test="lastIndexUpdateTime != null"> `last_index_update_time`, </if>
|
||||||
|
<if test="isVip != null"> `is_vip`, </if>
|
||||||
|
<if test="status != null"> `status`, </if>
|
||||||
|
<if test="updateTime != null"> `update_time`, </if>
|
||||||
|
<if test="createTime != null"> `create_time`, </if>
|
||||||
|
<if test="crawlSourceId != null"> `crawl_source_id`, </if>
|
||||||
|
<if test="crawlBookId != null"> `crawl_book_id`, </if>
|
||||||
|
<if test="crawlLastTime != null"> `crawl_last_time`, </if>
|
||||||
|
<if test="crawlIsStop != null"> `crawl_is_stop` </if>
|
||||||
|
)
|
||||||
|
values
|
||||||
|
(
|
||||||
|
<if test="id != null"> #{id}, </if>
|
||||||
|
<if test="workDirection != null"> #{workDirection}, </if>
|
||||||
|
<if test="catId != null"> #{catId}, </if>
|
||||||
|
<if test="catName != null"> #{catName}, </if>
|
||||||
|
<if test="picUrl != null"> #{picUrl}, </if>
|
||||||
|
<if test="bookName != null"> #{bookName}, </if>
|
||||||
|
<if test="authorId != null"> #{authorId}, </if>
|
||||||
|
<if test="authorName != null"> #{authorName}, </if>
|
||||||
|
<if test="bookDesc != null"> #{bookDesc}, </if>
|
||||||
|
<if test="score != null"> #{score}, </if>
|
||||||
|
<if test="bookStatus != null"> #{bookStatus}, </if>
|
||||||
|
<if test="visitCount != null"> #{visitCount}, </if>
|
||||||
|
<if test="wordCount != null"> #{wordCount}, </if>
|
||||||
|
<if test="commentCount != null"> #{commentCount}, </if>
|
||||||
|
<if test="lastIndexId != null"> #{lastIndexId}, </if>
|
||||||
|
<if test="lastIndexName != null"> #{lastIndexName}, </if>
|
||||||
|
<if test="lastIndexUpdateTime != null"> #{lastIndexUpdateTime}, </if>
|
||||||
|
<if test="isVip != null"> #{isVip}, </if>
|
||||||
|
<if test="status != null"> #{status}, </if>
|
||||||
|
<if test="updateTime != null"> #{updateTime}, </if>
|
||||||
|
<if test="createTime != null"> #{createTime}, </if>
|
||||||
|
<if test="crawlSourceId != null"> #{crawlSourceId}, </if>
|
||||||
|
<if test="crawlBookId != null"> #{crawlBookId}, </if>
|
||||||
|
<if test="crawlLastTime != null"> #{crawlLastTime}, </if>
|
||||||
|
<if test="crawlIsStop != null"> #{crawlIsStop} </if>
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="update" parameterType="com.java2nb.novel.domain.BookDO">
|
||||||
|
update book
|
||||||
|
<set>
|
||||||
|
<if test="workDirection != null">`work_direction` = #{workDirection}, </if>
|
||||||
|
<if test="catId != null">`cat_id` = #{catId}, </if>
|
||||||
|
<if test="catName != null">`cat_name` = #{catName}, </if>
|
||||||
|
<if test="picUrl != null">`pic_url` = #{picUrl}, </if>
|
||||||
|
<if test="bookName != null">`book_name` = #{bookName}, </if>
|
||||||
|
<if test="authorId != null">`author_id` = #{authorId}, </if>
|
||||||
|
<if test="authorName != null">`author_name` = #{authorName}, </if>
|
||||||
|
<if test="bookDesc != null">`book_desc` = #{bookDesc}, </if>
|
||||||
|
<if test="score != null">`score` = #{score}, </if>
|
||||||
|
<if test="bookStatus != null">`book_status` = #{bookStatus}, </if>
|
||||||
|
<if test="visitCount != null">`visit_count` = #{visitCount}, </if>
|
||||||
|
<if test="wordCount != null">`word_count` = #{wordCount}, </if>
|
||||||
|
<if test="commentCount != null">`comment_count` = #{commentCount}, </if>
|
||||||
|
<if test="lastIndexId != null">`last_index_id` = #{lastIndexId}, </if>
|
||||||
|
<if test="lastIndexName != null">`last_index_name` = #{lastIndexName}, </if>
|
||||||
|
<if test="lastIndexUpdateTime != null">`last_index_update_time` = #{lastIndexUpdateTime}, </if>
|
||||||
|
<if test="isVip != null">`is_vip` = #{isVip}, </if>
|
||||||
|
<if test="status != null">`status` = #{status}, </if>
|
||||||
|
<if test="updateTime != null">`update_time` = #{updateTime}, </if>
|
||||||
|
<if test="createTime != null">`create_time` = #{createTime}, </if>
|
||||||
|
<if test="crawlSourceId != null">`crawl_source_id` = #{crawlSourceId}, </if>
|
||||||
|
<if test="crawlBookId != null">`crawl_book_id` = #{crawlBookId}, </if>
|
||||||
|
<if test="crawlLastTime != null">`crawl_last_time` = #{crawlLastTime}, </if>
|
||||||
|
<if test="crawlIsStop != null">`crawl_is_stop` = #{crawlIsStop}</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="remove">
|
||||||
|
delete from book where id = #{value}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="batchRemove">
|
||||||
|
delete from book where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
107
novel-admin/src/main/resources/static/js/appjs/novel/book/add.js
Normal file
107
novel-admin/src/main/resources/static/js/appjs/novel/book/add.js
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
var E = window.wangEditor;
|
||||||
|
$("[id^='contentEditor']").each(function (index, ele) {
|
||||||
|
var relName = $(ele).attr("id").substring(13);
|
||||||
|
var editor = new E('#contentEditor' + relName);
|
||||||
|
// 自定义菜单配置
|
||||||
|
editor.customConfig.menus = [
|
||||||
|
'head', // 标题
|
||||||
|
'bold', // 粗体
|
||||||
|
'fontSize', // 字号
|
||||||
|
'fontName', // 字体
|
||||||
|
'italic', // 斜体
|
||||||
|
'underline', // 下划线
|
||||||
|
'strikeThrough', // 删除线
|
||||||
|
'foreColor', // 文字颜色
|
||||||
|
//'backColor', // 背景颜色
|
||||||
|
//'link', // 插入链接
|
||||||
|
'list', // 列表
|
||||||
|
'justify', // 对齐方式
|
||||||
|
'quote', // 引用
|
||||||
|
'emoticon', // 表情
|
||||||
|
'image', // 插入图片
|
||||||
|
//'table', // 表格
|
||||||
|
//'video', // 插入视频
|
||||||
|
//'code', // 插入代码
|
||||||
|
'undo', // 撤销
|
||||||
|
'redo' // 重复
|
||||||
|
];
|
||||||
|
editor.customConfig.onchange = function (html) {
|
||||||
|
// html 即变化之后的内容
|
||||||
|
$("#" + relName).val(html);
|
||||||
|
}
|
||||||
|
editor.customConfig.uploadImgShowBase64 = true;
|
||||||
|
editor.create();
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
$("[id^='picImage']").each(function (index, ele) {
|
||||||
|
var relName = $(ele).attr("id").substring(8);
|
||||||
|
layui.use('upload', function () {
|
||||||
|
var upload = layui.upload;
|
||||||
|
//执行实例
|
||||||
|
var uploadInst = upload.render({
|
||||||
|
elem: '#picImage' + relName, //绑定元素
|
||||||
|
url: '/common/sysFile/upload', //上传接口
|
||||||
|
size: 1000,
|
||||||
|
accept: 'file',
|
||||||
|
done: function (r) {
|
||||||
|
$("#picImage" + relName).attr("src", r.fileName);
|
||||||
|
$("#" + relName).val(r.fileName);
|
||||||
|
},
|
||||||
|
error: function (r) {
|
||||||
|
layer.msg(r.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$().ready(function () {
|
||||||
|
validateRule();
|
||||||
|
});
|
||||||
|
|
||||||
|
$.validator.setDefaults({
|
||||||
|
submitHandler: function () {
|
||||||
|
save();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function save() {
|
||||||
|
$.ajax({
|
||||||
|
cache: true,
|
||||||
|
type: "POST",
|
||||||
|
url: "/novel/book/save",
|
||||||
|
data: $('#signupForm').serialize(),// 你的formid
|
||||||
|
async: false,
|
||||||
|
error: function (request) {
|
||||||
|
parent.layer.alert("Connection error");
|
||||||
|
},
|
||||||
|
success: function (data) {
|
||||||
|
if (data.code == 0) {
|
||||||
|
parent.layer.msg("操作成功");
|
||||||
|
parent.reLoad();
|
||||||
|
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
|
||||||
|
parent.layer.close(index);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
parent.layer.alert(data.msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
function validateRule() {
|
||||||
|
var icon = "<i class='fa fa-times-circle'></i> ";
|
||||||
|
$("#signupForm").validate({
|
||||||
|
ignore: "",
|
||||||
|
rules: {
|
||||||
|
},
|
||||||
|
messages: {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
@ -0,0 +1,321 @@
|
|||||||
|
var prefix = "/novel/book"
|
||||||
|
$(function () {
|
||||||
|
load();
|
||||||
|
});
|
||||||
|
|
||||||
|
function load() {
|
||||||
|
$('#exampleTable')
|
||||||
|
.bootstrapTable(
|
||||||
|
{
|
||||||
|
method: 'get', // 服务器数据的请求方式 get or post
|
||||||
|
url: prefix + "/list", // 服务器数据的加载地址
|
||||||
|
// showRefresh : true,
|
||||||
|
// showToggle : true,
|
||||||
|
// showColumns : true,
|
||||||
|
iconSize: 'outline',
|
||||||
|
toolbar: '#exampleToolbar',
|
||||||
|
striped: true, // 设置为true会有隔行变色效果
|
||||||
|
dataType: "json", // 服务器返回的数据类型
|
||||||
|
pagination: true, // 设置为true会在底部显示分页条
|
||||||
|
// queryParamsType : "limit",
|
||||||
|
// //设置为limit则会发送符合RESTFull格式的参数
|
||||||
|
singleSelect: false, // 设置为true将禁止多选
|
||||||
|
// contentType : "application/x-www-form-urlencoded",
|
||||||
|
// //发送到服务器的数据编码类型
|
||||||
|
pageSize: 10, // 如果设置了分页,每页数据条数
|
||||||
|
pageNumber: 1, // 如果设置了分布,首页页码
|
||||||
|
//search : true, // 是否显示搜索框
|
||||||
|
showColumns: false, // 是否显示内容下拉框(选择显示的列)
|
||||||
|
sidePagination: "server", // 设置在哪里进行分页,可选值为"client" 或者 "server"
|
||||||
|
queryParams: function (params) {
|
||||||
|
//说明:传入后台的参数包括offset开始索引,limit步长,sort排序列,order:desc或者,以及所有列的键值对
|
||||||
|
var queryParams = getFormJson("searchForm");
|
||||||
|
queryParams.limit = params.limit;
|
||||||
|
queryParams.offset = params.offset;
|
||||||
|
return queryParams;
|
||||||
|
},
|
||||||
|
// //请求服务器数据时,你可以通过重写参数的方式添加一些额外的参数,例如 toolbar 中的参数 如果
|
||||||
|
// queryParamsType = 'limit' ,返回参数必须包含
|
||||||
|
// limit, offset, search, sort, order 否则, 需要包含:
|
||||||
|
// pageSize, pageNumber, searchText, sortName,
|
||||||
|
// sortOrder.
|
||||||
|
// 返回false将会终止请求
|
||||||
|
responseHandler: function (rs) {
|
||||||
|
|
||||||
|
if (rs.code == 0) {
|
||||||
|
return rs.data;
|
||||||
|
} else {
|
||||||
|
parent.layer.alert(rs.msg)
|
||||||
|
return {total: 0, rows: []};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
formatter: function () {
|
||||||
|
return arguments[2] + 1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
title: '主键'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'workDirection',
|
||||||
|
title: '作品方向,0:男频,1:女频'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'catId',
|
||||||
|
title: '分类ID'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'catName',
|
||||||
|
title: '分类名'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'picUrl',
|
||||||
|
title: '小说封面'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'bookName',
|
||||||
|
title: '小说名'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'authorId',
|
||||||
|
title: '作者id'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'authorName',
|
||||||
|
title: '作者名'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'bookDesc',
|
||||||
|
title: '书籍描述'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'score',
|
||||||
|
title: '评分,预留字段'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'bookStatus',
|
||||||
|
title: '书籍状态,0:连载中,1:已完结'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'visitCount',
|
||||||
|
title: '点击量'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'wordCount',
|
||||||
|
title: '总字数'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'commentCount',
|
||||||
|
title: '评论数'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'lastIndexId',
|
||||||
|
title: '最新目录ID'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'lastIndexName',
|
||||||
|
title: '最新目录名'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'lastIndexUpdateTime',
|
||||||
|
title: '最新目录更新时间'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'isVip',
|
||||||
|
title: '是否收费,1:收费,0:免费'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'status',
|
||||||
|
title: '状态,0:入库,1:上架'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'updateTime',
|
||||||
|
title: '更新时间'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'createTime',
|
||||||
|
title: '创建时间'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'crawlSourceId',
|
||||||
|
title: '爬虫源站ID'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'crawlBookId',
|
||||||
|
title: '抓取的源站小说ID'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'crawlLastTime',
|
||||||
|
title: '最后一次的抓取时间'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'crawlIsStop',
|
||||||
|
title: '是否已停止更新,0:未停止,1:已停止'
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
field: 'id',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
var d = '<a class="btn btn-primary btn-sm ' + s_detail_h + '" href="#" mce_href="#" title="详情" onclick="detail(\''
|
||||||
|
+ row.id
|
||||||
|
+ '\')"><i class="fa fa-file"></i></a> ';
|
||||||
|
var e = '<a class="btn btn-primary btn-sm ' + s_edit_h + '" href="#" mce_href="#" title="编辑" onclick="edit(\''
|
||||||
|
+ row.id
|
||||||
|
+ '\')"><i class="fa fa-edit"></i></a> ';
|
||||||
|
var r = '<a class="btn btn-warning btn-sm ' + s_remove_h + '" href="#" title="删除" mce_href="#" onclick="remove(\''
|
||||||
|
+ row.id
|
||||||
|
+ '\')"><i class="fa fa-remove"></i></a> ';
|
||||||
|
return d + e + r;
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function reLoad() {
|
||||||
|
$('#exampleTable').bootstrapTable('refresh');
|
||||||
|
}
|
||||||
|
function add() {
|
||||||
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
title: '增加',
|
||||||
|
maxmin: true,
|
||||||
|
shadeClose: false, // 点击遮罩关闭层
|
||||||
|
area: ['800px', '520px'],
|
||||||
|
content: prefix + '/add' // iframe的url
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function detail(id) {
|
||||||
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
title: '详情',
|
||||||
|
maxmin: true,
|
||||||
|
shadeClose: false, // 点击遮罩关闭层
|
||||||
|
area: ['800px', '520px'],
|
||||||
|
content: prefix + '/detail/' + id // iframe的url
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function edit(id) {
|
||||||
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
title: '编辑',
|
||||||
|
maxmin: true,
|
||||||
|
shadeClose: false, // 点击遮罩关闭层
|
||||||
|
area: ['800px', '520px'],
|
||||||
|
content: prefix + '/edit/' + id // iframe的url
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function remove(id) {
|
||||||
|
layer.confirm('确定要删除选中的记录?', {
|
||||||
|
btn: ['确定', '取消']
|
||||||
|
}, function () {
|
||||||
|
$.ajax({
|
||||||
|
url: prefix + "/remove",
|
||||||
|
type: "post",
|
||||||
|
data: {
|
||||||
|
'id': id
|
||||||
|
},
|
||||||
|
success: function (r) {
|
||||||
|
if (r.code == 0) {
|
||||||
|
layer.msg(r.msg);
|
||||||
|
reLoad();
|
||||||
|
} else {
|
||||||
|
layer.msg(r.msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function resetPwd(id) {
|
||||||
|
}
|
||||||
|
function batchRemove() {
|
||||||
|
var rows = $('#exampleTable').bootstrapTable('getSelections'); // 返回所有选择的行,当没有选择的记录时,返回一个空数组
|
||||||
|
if (rows.length == 0) {
|
||||||
|
layer.msg("请选择要删除的数据");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
layer.confirm("确认要删除选中的'" + rows.length + "'条数据吗?", {
|
||||||
|
btn: ['确定', '取消']
|
||||||
|
// 按钮
|
||||||
|
}, function () {
|
||||||
|
var ids = new Array();
|
||||||
|
// 遍历所有选择的行数据,取每条数据对应的ID
|
||||||
|
$.each(rows, function (i, row) {
|
||||||
|
ids[i] = row['id'];
|
||||||
|
});
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
data: {
|
||||||
|
"ids": ids
|
||||||
|
},
|
||||||
|
url: prefix + '/batchRemove',
|
||||||
|
success: function (r) {
|
||||||
|
if (r.code == 0) {
|
||||||
|
layer.msg(r.msg);
|
||||||
|
reLoad();
|
||||||
|
} else {
|
||||||
|
layer.msg(r.msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, function () {
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
@ -0,0 +1,103 @@
|
|||||||
|
var E = window.wangEditor;
|
||||||
|
$("[id^='contentEditor']").each(function (index, ele) {
|
||||||
|
var relName = $(ele).attr("id").substring(13);
|
||||||
|
var editor = new E('#contentEditor' + relName);
|
||||||
|
// 自定义菜单配置
|
||||||
|
editor.customConfig.menus = [
|
||||||
|
'head', // 标题
|
||||||
|
'bold', // 粗体
|
||||||
|
'fontSize', // 字号
|
||||||
|
'fontName', // 字体
|
||||||
|
'italic', // 斜体
|
||||||
|
'underline', // 下划线
|
||||||
|
'strikeThrough', // 删除线
|
||||||
|
'foreColor', // 文字颜色
|
||||||
|
//'backColor', // 背景颜色
|
||||||
|
//'link', // 插入链接
|
||||||
|
'list', // 列表
|
||||||
|
'justify', // 对齐方式
|
||||||
|
'quote', // 引用
|
||||||
|
'emoticon', // 表情
|
||||||
|
'image', // 插入图片
|
||||||
|
//'table', // 表格
|
||||||
|
//'video', // 插入视频
|
||||||
|
//'code', // 插入代码
|
||||||
|
'undo', // 撤销
|
||||||
|
'redo' // 重复
|
||||||
|
];
|
||||||
|
editor.customConfig.onchange = function (html) {
|
||||||
|
// html 即变化之后的内容
|
||||||
|
$("#" + relName).val(html);
|
||||||
|
}
|
||||||
|
editor.customConfig.uploadImgShowBase64 = true;
|
||||||
|
editor.create();
|
||||||
|
editor.txt.html($("#" + relName).val());
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
$("[id^='picImage']").each(function (index, ele) {
|
||||||
|
var relName = $(ele).attr("id").substring(8);
|
||||||
|
layui.use('upload', function () {
|
||||||
|
var upload = layui.upload;
|
||||||
|
//执行实例
|
||||||
|
var uploadInst = upload.render({
|
||||||
|
elem: '#picImage' + relName, //绑定元素
|
||||||
|
url: '/common/sysFile/upload', //上传接口
|
||||||
|
size: 1000,
|
||||||
|
accept: 'file',
|
||||||
|
done: function (r) {
|
||||||
|
$("#picImage" + relName).attr("src", r.fileName);
|
||||||
|
$("#" + relName).val(r.fileName);
|
||||||
|
},
|
||||||
|
error: function (r) {
|
||||||
|
layer.msg(r.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$().ready(function () {
|
||||||
|
validateRule();
|
||||||
|
});
|
||||||
|
|
||||||
|
$.validator.setDefaults({
|
||||||
|
submitHandler: function () {
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function update() {
|
||||||
|
$.ajax({
|
||||||
|
cache: true,
|
||||||
|
type: "POST",
|
||||||
|
url: "/novel/book/update",
|
||||||
|
data: $('#signupForm').serialize(),// 你的formid
|
||||||
|
async: false,
|
||||||
|
error: function (request) {
|
||||||
|
parent.layer.alert("Connection error");
|
||||||
|
},
|
||||||
|
success: function (data) {
|
||||||
|
if (data.code == 0) {
|
||||||
|
parent.layer.msg("操作成功");
|
||||||
|
parent.reLoad();
|
||||||
|
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
|
||||||
|
parent.layer.close(index);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
parent.layer.alert(data.msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
function validateRule() {
|
||||||
|
var icon = "<i class='fa fa-times-circle'></i> ";
|
||||||
|
$("#signupForm").validate({
|
||||||
|
ignore: "",
|
||||||
|
rules: {
|
||||||
|
},
|
||||||
|
messages: {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
18
novel-admin/src/main/resources/static/sql/novel/book/menu.js
Normal file
18
novel-admin/src/main/resources/static/sql/novel/book/menu.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
-- 菜单SQL
|
||||||
|
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||||
|
VALUES ('1', '小说表', 'novel/book', 'novel:book:book', '1', 'fa', '6');
|
||||||
|
|
||||||
|
-- 按钮父菜单ID
|
||||||
|
set @parentId = @@identity;
|
||||||
|
|
||||||
|
-- 菜单对应按钮SQL
|
||||||
|
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||||
|
SELECT @parentId, '查看', null, 'novel:book:detail', '2', null, '6';
|
||||||
|
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||||
|
SELECT @parentId, '新增', null, 'novel:book:add', '2', null, '6';
|
||||||
|
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||||
|
SELECT @parentId, '修改', null, 'novel:book:edit', '2', null, '6';
|
||||||
|
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||||
|
SELECT @parentId, '删除', null, 'novel:book:remove', '2', null, '6';
|
||||||
|
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
|
||||||
|
SELECT @parentId, '批量删除', null, 'novel:book:batchRemove', '2', null, '6';
|
252
novel-admin/src/main/resources/templates/novel/book/add.html
Normal file
252
novel-admin/src/main/resources/templates/novel/book/add.html
Normal file
@ -0,0 +1,252 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<head th:include="include :: header"></head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="wrapper wrapper-content ">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="ibox float-e-margins">
|
||||||
|
<div class="ibox-content">
|
||||||
|
<form class="form-horizontal m-t" id="signupForm">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">作品方向,0:男频,1:女频:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="workDirection" name="workDirection"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">分类ID:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="catId" name="catId"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">分类名:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="catName" name="catName"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">小说封面:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="picUrl" name="picUrl"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">小说名:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="bookName" name="bookName"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">作者id:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="authorId" name="authorId"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">作者名:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="authorName" name="authorName"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">书籍描述:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="bookDesc" name="bookDesc"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">评分,预留字段:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="score" name="score"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">书籍状态,0:连载中,1:已完结:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="bookStatus" name="bookStatus"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">点击量:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="visitCount" name="visitCount"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">总字数:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="wordCount" name="wordCount"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">评论数:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="commentCount" name="commentCount"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">最新目录ID:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="lastIndexId" name="lastIndexId"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">最新目录名:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="lastIndexName" name="lastIndexName"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">最新目录更新时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" class="laydate-icon layer-date form-control"
|
||||||
|
id="lastIndexUpdateTime"
|
||||||
|
name="lastIndexUpdateTime"
|
||||||
|
onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
|
||||||
|
style="background-color: #fff;" readonly="readonly"/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">是否收费,1:收费,0:免费:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="isVip" name="isVip"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">状态,0:入库,1:上架:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="status" name="status"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">更新时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" class="laydate-icon layer-date form-control"
|
||||||
|
id="updateTime"
|
||||||
|
name="updateTime"
|
||||||
|
onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
|
||||||
|
style="background-color: #fff;" readonly="readonly"/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">创建时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" class="laydate-icon layer-date form-control"
|
||||||
|
id="createTime"
|
||||||
|
name="createTime"
|
||||||
|
onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
|
||||||
|
style="background-color: #fff;" readonly="readonly"/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">爬虫源站ID:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="crawlSourceId" name="crawlSourceId"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">抓取的源站小说ID:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="crawlBookId" name="crawlBookId"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">最后一次的抓取时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" class="laydate-icon layer-date form-control"
|
||||||
|
id="crawlLastTime"
|
||||||
|
name="crawlLastTime"
|
||||||
|
onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
|
||||||
|
style="background-color: #fff;" readonly="readonly"/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">是否已停止更新,0:未停止,1:已停止:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="crawlIsStop" name="crawlIsStop"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-8 col-sm-offset-3">
|
||||||
|
<button type="submit" class="btn btn-primary">提交</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div th:include="include::footer"></div>
|
||||||
|
<script type="text/javascript" src="/wangEditor/release/wangEditor.js"></script>
|
||||||
|
<script type="text/javascript" src="/js/appjs/novel/book/add.js">
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,66 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<head th:include="include :: header"></head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="wrapper wrapper-content ">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="ibox">
|
||||||
|
<div class="ibox-body">
|
||||||
|
<div class="fixed-table-toolbar">
|
||||||
|
<div class="columns pull-left">
|
||||||
|
<button shiro:hasPermission="novel:book:add" type="button"
|
||||||
|
class="btn btn-primary" onclick="add()">
|
||||||
|
<i class="fa fa-plus" aria-hidden="true"></i>添加
|
||||||
|
</button>
|
||||||
|
<button shiro:hasPermission="novel:book:batchRemove" type="button"
|
||||||
|
class="btn btn-danger"
|
||||||
|
onclick="batchRemove()">
|
||||||
|
<i class="fa fa-trash" aria-hidden="true"></i>删除
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="columns pull-right">
|
||||||
|
<button class="btn btn-success" onclick="reLoad()">查询</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form id="searchForm">
|
||||||
|
<div class="columns pull-right col-md-2">
|
||||||
|
<input id="id" name="id" type="text" class="form-control"
|
||||||
|
placeholder="主键">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<table id="exampleTable" data-mobile-responsive="true">
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--shiro控制bootstraptable行内按钮看见性 -->
|
||||||
|
<div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var s_detail_h = 'hidden';
|
||||||
|
var s_edit_h = 'hidden';
|
||||||
|
var s_remove_h = 'hidden';
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
<div shiro:hasPermission="test:order:detail">
|
||||||
|
<script type="text/javascript">
|
||||||
|
s_detail_h = '';
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
<div shiro:hasPermission="novel:book:edit">
|
||||||
|
<script type="text/javascript">
|
||||||
|
s_edit_h = '';
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
<div shiro:hasPermission="novel:book:remove">
|
||||||
|
<script type="text/javascript">
|
||||||
|
var s_remove_h = '';
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
<div th:include="include :: footer"></div>
|
||||||
|
<script type="text/javascript" src="/js/appjs/novel/book/book.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
258
novel-admin/src/main/resources/templates/novel/book/detail.html
Normal file
258
novel-admin/src/main/resources/templates/novel/book/detail.html
Normal file
@ -0,0 +1,258 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<head th:include="include :: header"></head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="wrapper wrapper-content ">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="ibox float-e-margins">
|
||||||
|
<div class="ibox-content">
|
||||||
|
<form class="form-horizontal m-t" id="signupForm">
|
||||||
|
<input id="id" name="id" th:value="${book.id}"
|
||||||
|
type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">作品方向,0:男频,1:女频:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.workDirection}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">分类ID:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.catId}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">分类名:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.catName}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">小说封面:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.picUrl}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">小说名:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.bookName}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">作者id:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.authorId}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">作者名:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.authorName}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">书籍描述:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.bookDesc}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">评分,预留字段:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.score}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">书籍状态,0:连载中,1:已完结:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.bookStatus}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">点击量:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.visitCount}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">总字数:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.wordCount}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">评论数:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.commentCount}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">最新目录ID:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.lastIndexId}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">最新目录名:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.lastIndexName}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">最新目录更新时间:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.lastIndexUpdateTime}==null?null:${#dates.format(book.lastIndexUpdateTime,'yyyy-MM-dd HH:mm:ss')}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">是否收费,1:收费,0:免费:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.isVip}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">状态,0:入库,1:上架:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.status}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">更新时间:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.updateTime}==null?null:${#dates.format(book.updateTime,'yyyy-MM-dd HH:mm:ss')}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">创建时间:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.createTime}==null?null:${#dates.format(book.createTime,'yyyy-MM-dd HH:mm:ss')}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">爬虫源站ID:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.crawlSourceId}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">抓取的源站小说ID:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.crawlBookId}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">最后一次的抓取时间:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.crawlLastTime}==null?null:${#dates.format(book.crawlLastTime,'yyyy-MM-dd HH:mm:ss')}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">是否已停止更新,0:未停止,1:已停止:</label>
|
||||||
|
|
||||||
|
<div style="padding-top:8px" class="col-sm-8"
|
||||||
|
th:text="${book.crawlIsStop}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div th:include="include::footer"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
254
novel-admin/src/main/resources/templates/novel/book/edit.html
Normal file
254
novel-admin/src/main/resources/templates/novel/book/edit.html
Normal file
@ -0,0 +1,254 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<head th:include="include :: header"></head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="wrapper wrapper-content ">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="ibox float-e-margins">
|
||||||
|
<div class="ibox-content">
|
||||||
|
<form class="form-horizontal m-t" id="signupForm">
|
||||||
|
<input id="id" name="id" th:value="${book.id}"
|
||||||
|
type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">作品方向,0:男频,1:女频:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="workDirection" name="workDirection"
|
||||||
|
th:value="${book.workDirection}"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">分类ID:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="catId" name="catId"
|
||||||
|
th:value="${book.catId}"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">分类名:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="catName" name="catName"
|
||||||
|
th:value="${book.catName}"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">小说封面:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="picUrl" name="picUrl"
|
||||||
|
th:value="${book.picUrl}"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">小说名:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="bookName" name="bookName"
|
||||||
|
th:value="${book.bookName}"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">作者id:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="authorId" name="authorId"
|
||||||
|
th:value="${book.authorId}"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">作者名:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="authorName" name="authorName"
|
||||||
|
th:value="${book.authorName}"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">书籍描述:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="bookDesc" name="bookDesc"
|
||||||
|
th:value="${book.bookDesc}"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">评分,预留字段:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="score" name="score"
|
||||||
|
th:value="${book.score}"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">书籍状态,0:连载中,1:已完结:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="bookStatus" name="bookStatus"
|
||||||
|
th:value="${book.bookStatus}"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">点击量:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="visitCount" name="visitCount"
|
||||||
|
th:value="${book.visitCount}"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">总字数:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="wordCount" name="wordCount"
|
||||||
|
th:value="${book.wordCount}"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">评论数:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="commentCount" name="commentCount"
|
||||||
|
th:value="${book.commentCount}"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">最新目录ID:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="lastIndexId" name="lastIndexId"
|
||||||
|
th:value="${book.lastIndexId}"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">最新目录名:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="lastIndexName" name="lastIndexName"
|
||||||
|
th:value="${book.lastIndexName}"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">最新目录更新时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" class="laydate-icon layer-date form-control"
|
||||||
|
id="lastIndexUpdateTime"
|
||||||
|
name="lastIndexUpdateTime"
|
||||||
|
th:value="${book.lastIndexUpdateTime}==null?null:${#dates.format(book.lastIndexUpdateTime,'yyyy-MM-dd HH:mm:ss')}"
|
||||||
|
onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
|
||||||
|
style="background-color: #fff;" readonly="readonly"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">是否收费,1:收费,0:免费:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="isVip" name="isVip"
|
||||||
|
th:value="${book.isVip}"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">状态,0:入库,1:上架:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="status" name="status"
|
||||||
|
th:value="${book.status}"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">更新时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" class="laydate-icon layer-date form-control"
|
||||||
|
id="updateTime"
|
||||||
|
name="updateTime"
|
||||||
|
th:value="${book.updateTime}==null?null:${#dates.format(book.updateTime,'yyyy-MM-dd HH:mm:ss')}"
|
||||||
|
onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
|
||||||
|
style="background-color: #fff;" readonly="readonly"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">创建时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" class="laydate-icon layer-date form-control"
|
||||||
|
id="createTime"
|
||||||
|
name="createTime"
|
||||||
|
th:value="${book.createTime}==null?null:${#dates.format(book.createTime,'yyyy-MM-dd HH:mm:ss')}"
|
||||||
|
onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
|
||||||
|
style="background-color: #fff;" readonly="readonly"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">爬虫源站ID:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="crawlSourceId" name="crawlSourceId"
|
||||||
|
th:value="${book.crawlSourceId}"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">抓取的源站小说ID:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="crawlBookId" name="crawlBookId"
|
||||||
|
th:value="${book.crawlBookId}"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">最后一次的抓取时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" class="laydate-icon layer-date form-control"
|
||||||
|
id="crawlLastTime"
|
||||||
|
name="crawlLastTime"
|
||||||
|
th:value="${book.crawlLastTime}==null?null:${#dates.format(book.crawlLastTime,'yyyy-MM-dd HH:mm:ss')}"
|
||||||
|
onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
|
||||||
|
style="background-color: #fff;" readonly="readonly"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">是否已停止更新,0:未停止,1:已停止:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="crawlIsStop" name="crawlIsStop"
|
||||||
|
th:value="${book.crawlIsStop}"
|
||||||
|
class="form-control"
|
||||||
|
type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-sm-8 col-sm-offset-3">
|
||||||
|
<button type="submit" class="btn btn-primary">提交</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div th:include="include::footer"></div>
|
||||||
|
<script type="text/javascript" src="/wangEditor/release/wangEditor.js"></script>
|
||||||
|
<script type="text/javascript" src="/js/appjs/novel/book/edit.js">
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>novel</artifactId>
|
<artifactId>novel</artifactId>
|
||||||
<groupId>com.java2nb</groupId>
|
<groupId>com.java2nb</groupId>
|
||||||
<version>2.0.0</version>
|
<version>2.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
@ -98,7 +98,12 @@
|
|||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!--druid -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>druid</artifactId>
|
||||||
|
<version>1.0.28</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>novel</artifactId>
|
<artifactId>novel</artifactId>
|
||||||
<groupId>com.java2nb</groupId>
|
<groupId>com.java2nb</groupId>
|
||||||
<version>2.0.0</version>
|
<version>2.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>novel</artifactId>
|
<artifactId>novel</artifactId>
|
||||||
<groupId>com.java2nb</groupId>
|
<groupId>com.java2nb</groupId>
|
||||||
<version>2.0.0</version>
|
<version>2.0.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -101,7 +101,9 @@ public class UserController extends BaseController {
|
|||||||
token = jwtTokenUtil.refreshToken(token);
|
token = jwtTokenUtil.refreshToken(token);
|
||||||
Map<String, Object> data = new HashMap<>(2);
|
Map<String, Object> data = new HashMap<>(2);
|
||||||
data.put("token", token);
|
data.put("token", token);
|
||||||
data.put("username", jwtTokenUtil.getUserDetailsFromToken(token).getUsername());
|
UserDetails userDetail = jwtTokenUtil.getUserDetailsFromToken(token);
|
||||||
|
data.put("username", userDetail.getUsername());
|
||||||
|
data.put("nickName", userDetail.getNickName());
|
||||||
return ResultBean.ok(data);
|
return ResultBean.ok(data);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -232,6 +234,12 @@ public class UserController extends BaseController {
|
|||||||
return ResultBean.fail(ResponseStatus.NO_LOGIN);
|
return ResultBean.fail(ResponseStatus.NO_LOGIN);
|
||||||
}
|
}
|
||||||
userService.updateUserInfo(userDetails.getId(),user);
|
userService.updateUserInfo(userDetails.getId(),user);
|
||||||
|
if(user.getNickName() != null){
|
||||||
|
userDetails.setNickName(user.getNickName());
|
||||||
|
Map<String, Object> data = new HashMap<>(1);
|
||||||
|
data.put("token", jwtTokenUtil.generateToken(userDetails));
|
||||||
|
return ResultBean.ok(data);
|
||||||
|
}
|
||||||
return ResultBean.ok();
|
return ResultBean.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,4 +11,6 @@ public class UserDetails {
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
private String username;
|
private String username;
|
||||||
|
|
||||||
|
private String nickName;
|
||||||
}
|
}
|
||||||
|
@ -1,37 +1,42 @@
|
|||||||
package com.java2nb.novel.core.wrapper;
|
package com.java2nb.novel.core.wrapper;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletRequestWrapper;
|
import javax.servlet.http.HttpServletRequestWrapper;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* XSS过滤处理
|
* XSS过滤处理
|
||||||
|
*
|
||||||
* @author Administrator
|
* @author Administrator
|
||||||
*/
|
*/
|
||||||
public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper
|
public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
|
||||||
{
|
|
||||||
|
/**
|
||||||
|
* 假如有有html 代码是自己传来的 需要设定对应的name 不过滤
|
||||||
|
*/
|
||||||
|
private static final List<String> noFilterNames = Arrays.asList("content");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param request
|
* @param request
|
||||||
*/
|
*/
|
||||||
public XssHttpServletRequestWrapper(HttpServletRequest request)
|
public XssHttpServletRequestWrapper(HttpServletRequest request) {
|
||||||
{
|
|
||||||
super(request);
|
super(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getParameterValues(String name)
|
public String[] getParameterValues(String name) {
|
||||||
{
|
|
||||||
String[] values = super.getParameterValues(name);
|
String[] values = super.getParameterValues(name);
|
||||||
if (values != null)
|
if (!noFilterNames.contains(name) && values != null) {
|
||||||
{
|
|
||||||
int length = values.length;
|
int length = values.length;
|
||||||
String[] escapseValues = new String[length];
|
String[] escapseValues = new String[length];
|
||||||
for (int i = 0; i < length; i++)
|
for (int i = 0; i < length; i++) {
|
||||||
{
|
escapseValues[i] = values[i].replaceAll("<", "<").replaceAll(">", ">");
|
||||||
// 防xss攻击和过滤前后空格
|
|
||||||
escapseValues[i] = values[i].replaceAll("<","<").replaceAll(">",">");
|
|
||||||
}
|
}
|
||||||
return escapseValues;
|
return escapseValues;
|
||||||
}
|
}
|
||||||
return super.getParameterValues(name);
|
return values;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,13 +86,14 @@ public class UserServiceImpl implements UserService {
|
|||||||
UserDetails userDetails = new UserDetails();
|
UserDetails userDetails = new UserDetails();
|
||||||
userDetails.setId(id);
|
userDetails.setId(id);
|
||||||
userDetails.setUsername(entity.getUsername());
|
userDetails.setUsername(entity.getUsername());
|
||||||
|
userDetails.setNickName(entity.getNickName());
|
||||||
return userDetails;
|
return userDetails;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UserDetails login(UserForm form) {
|
public UserDetails login(UserForm form) {
|
||||||
//根据用户名密码查询记录
|
//根据用户名密码查询记录
|
||||||
SelectStatementProvider selectStatement = select(id, username)
|
SelectStatementProvider selectStatement = select(id, username,nickName)
|
||||||
.from(user)
|
.from(user)
|
||||||
.where(username, isEqualTo(form.getUsername()))
|
.where(username, isEqualTo(form.getUsername()))
|
||||||
.and(password, isEqualTo(MD5Util.MD5Encode(form.getPassword(), Charsets.UTF_8.name())))
|
.and(password, isEqualTo(MD5Util.MD5Encode(form.getPassword(), Charsets.UTF_8.name())))
|
||||||
@ -104,7 +105,9 @@ public class UserServiceImpl implements UserService {
|
|||||||
}
|
}
|
||||||
//生成UserDetail对象并返回
|
//生成UserDetail对象并返回
|
||||||
UserDetails userDetails = new UserDetails();
|
UserDetails userDetails = new UserDetails();
|
||||||
userDetails.setId(users.get(0).getId());
|
User user = users.get(0);
|
||||||
|
userDetails.setId(user.getId());
|
||||||
|
userDetails.setNickName(user.getNickName());
|
||||||
userDetails.setUsername(form.getUsername());
|
userDetails.setUsername(form.getUsername());
|
||||||
return userDetails;
|
return userDetails;
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ xss:
|
|||||||
# 排除链接(多个用逗号分隔)
|
# 排除链接(多个用逗号分隔)
|
||||||
excludes: /system/notice/*
|
excludes: /system/notice/*
|
||||||
# 匹配链接 (多个用逗号分隔)
|
# 匹配链接 (多个用逗号分隔)
|
||||||
urlPatterns: /book/addBookComment,/user/addFeedBack
|
urlPatterns: /book/addBookComment,/user/addFeedBack,/author/addBook,/author/addBookContent,/author/register.html
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ if(!token){
|
|||||||
success: function(data){
|
success: function(data){
|
||||||
if(data.code == 200){
|
if(data.code == 200){
|
||||||
$(".user_link").html("<i class=\"line mr20\">|</i>" +
|
$(".user_link").html("<i class=\"line mr20\">|</i>" +
|
||||||
"<a href=\"/user/userinfo.html\" class=\"mr15\">"+data.data.username+"</a>" +
|
"<a href=\"/user/userinfo.html\" class=\"mr15\">"+data.data.nickName+"</a>" +
|
||||||
"<a href=\"javascript:logout()\" >退出</a>");
|
"<a href=\"javascript:logout()\" >退出</a>");
|
||||||
;
|
;
|
||||||
if("/user/login.html" == window.location.pathname){
|
if("/user/login.html" == window.location.pathname){
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!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">
|
<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:text="${book.bookName}+'_'+${bookIndex.indexName}+'_'+#{website.name}"></title>
|
<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="keywords" th:content="${book.bookName}+'官方首发,'+${book.bookName}+'小说,'+${book.bookName}+'最新章节,'+${book.bookName}+'txt下载,'+${book.bookName}+'无弹窗,'+${book.bookName}+'吧,'+${book.bookName}+'离线完本'" />
|
||||||
<meta name="description" th:content="${book.bookName}+','+${book.bookName}+'小说阅读,'+#{website.name}+'提供'+${book.bookName}+'首发最新章节及txt下载,'+${book.bookName}+'最新更新章节,精彩尽在'+#{website.name}+'。'" />
|
<meta name="description" th:content="${book.bookName}+','+${book.bookName}+'小说阅读,'+#{website.name}+'提供'+${book.bookName}+'首发最新章节及txt下载,'+${book.bookName}+'最新更新章节,精彩尽在'+#{website.name}+'。'" />
|
||||||
<link rel="stylesheet" href="/css/read.css" />
|
<link rel="stylesheet" href="/css/read.css" />
|
||||||
@ -74,7 +74,7 @@
|
|||||||
<div class="readWrap">
|
<div class="readWrap">
|
||||||
<div class="bookNav">
|
<div class="bookNav">
|
||||||
<a href="/" >首页 </a>> <a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}">
|
<a href="/" >首页 </a>> <a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}">
|
||||||
</a>> <a th:href="'/book/'+${book.id}+'.html'" th:text="${book.bookName}">
|
</a>> <a th:href="'/book/'+${book.id}+'.html'" th:utext="${book.bookName}">
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -82,11 +82,11 @@
|
|||||||
<div class="textbox cf">
|
<div class="textbox cf">
|
||||||
|
|
||||||
<div class="book_title">
|
<div class="book_title">
|
||||||
<h1 th:text="${bookIndex.indexName}">
|
<h1 th:utext="${bookIndex.indexName}">
|
||||||
</h1>
|
</h1>
|
||||||
<div class="textinfo">
|
<div class="textinfo">
|
||||||
类别:<a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>
|
类别:<a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>
|
||||||
作者:<a th:href="'javascript:searchByK(\''+${book.authorName}+'\')'" th:text="${book.authorName}"></a><span th:text="'字数:'+${bookIndex.wordCount}"></span><span th:text="'更新时间:'+${#dates.format(bookIndex.updateTime, 'yy/MM/dd HH:mm:ss')}"></span>
|
作者:<a th:href="'javascript:searchByK(\''+${book.authorName}+'\')'" th:utext="${book.authorName}"></a><span th:text="'字数:'+${bookIndex.wordCount}"></span><span th:text="'更新时间:'+${#dates.format(bookIndex.updateTime, 'yy/MM/dd HH:mm:ss')}"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="txtwrap" th:if="${needBuy}">
|
<div class="txtwrap" th:if="${needBuy}">
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<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}+'_'+${book.authorName}+'_'+${book.bookName}+'txt下载'+'_'+${book.bookName}+'无弹窗_'+#{website.name}"></title>
|
<title th:utext="${book.bookName}+'_'+${book.authorName}+'_'+${book.bookName}+'txt下载'+'_'+${book.bookName}+'无弹窗_'+#{website.name}"></title>
|
||||||
<meta name="keywords"
|
<meta name="keywords"
|
||||||
th:content="${book.bookName}+'官方首发,'+${book.bookName}+'小说,'+${book.bookName}+'最新章节'+${book.bookName}+'txt下载,'+${book.bookName}+'无弹窗,'+${book.bookName}+'吧,'+${book.bookName}+'离线完本'"/>
|
th:content="${book.bookName}+'官方首发,'+${book.bookName}+'小说,'+${book.bookName}+'最新章节'+${book.bookName}+'txt下载,'+${book.bookName}+'无弹窗,'+${book.bookName}+'吧,'+${book.bookName}+'离线完本'"/>
|
||||||
<meta name="description"
|
<meta name="description"
|
||||||
@ -23,7 +23,7 @@
|
|||||||
<div class="main box_center cf mb50">
|
<div class="main box_center cf mb50">
|
||||||
<div class="nav_sub">
|
<div class="nav_sub">
|
||||||
<a href="/" th:text="#{website.name}"></a>><a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>><a
|
<a href="/" th:text="#{website.name}"></a>><a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>><a
|
||||||
th:href="'/book/'+${book.id}+'.html'" th:text="${book.bookName}"></a>
|
th:href="'/book/'+${book.id}+'.html'" th:utext="${book.bookName}"></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="channelWrap channelBookInfo cf">
|
<div class="channelWrap channelBookInfo cf">
|
||||||
<div class="bookCover cf">
|
<div class="bookCover cf">
|
||||||
@ -31,8 +31,8 @@
|
|||||||
th:attr="alt=${book.bookName}"/></a>
|
th:attr="alt=${book.bookName}"/></a>
|
||||||
<div class="book_info">
|
<div class="book_info">
|
||||||
<div class="tit">
|
<div class="tit">
|
||||||
<h1 th:text="${book.bookName}"></h1><!--<i class="vip_b">VIP</i>--><a class="author"
|
<h1 th:utext="${book.bookName}"></h1><!--<i class="vip_b">VIP</i>--><a class="author"
|
||||||
th:text="${book.authorName}+' 著'"></a>
|
th:utext="${book.authorName}+' 著'"></a>
|
||||||
</div>
|
</div>
|
||||||
<ul class="list">
|
<ul class="list">
|
||||||
<li><span class="item">类别:<em th:text="${book.catName}"></em></span>
|
<li><span class="item">类别:<em th:text="${book.catName}"></em></span>
|
||||||
@ -70,7 +70,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<ul class="list cf">
|
<ul class="list cf">
|
||||||
<li>
|
<li>
|
||||||
<span class="fl font16"> <a th:href="'/book/'+${book.id}+'/'+${book.lastIndexId}+'.html'" th:text="${book.lastIndexName}"><!--<i class="vip">VIP</i>--></a></span>
|
<span class="fl font16"> <a th:href="'/book/'+${book.id}+'/'+${book.lastIndexId}+'.html'" th:utext="${book.lastIndexName}"><!--<i class="vip">VIP</i>--></a></span>
|
||||||
<span class="black9 fr"
|
<span class="black9 fr"
|
||||||
th:text="'更新时间:'+${#dates.format(book.lastIndexUpdateTime, 'yy/MM/dd HH:mm:ss')}"></span>
|
th:text="'更新时间:'+${#dates.format(book.lastIndexUpdateTime, 'yy/MM/dd HH:mm:ss')}"></span>
|
||||||
</li>
|
</li>
|
||||||
@ -143,7 +143,7 @@
|
|||||||
<div class="msg">
|
<div class="msg">
|
||||||
<span class="icon_qyzz">签约作家</span>
|
<span class="icon_qyzz">签约作家</span>
|
||||||
<h4><a th:href="'javascript:searchByK(\''+${book.authorName}+'\')'"
|
<h4><a th:href="'javascript:searchByK(\''+${book.authorName}+'\')'"
|
||||||
th:text="${book.authorName}"></a></h4>
|
th:utext="${book.authorName}"></a></h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="author_intro cf">
|
<div class="author_intro cf">
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<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}+'目录,'+${book.bookName}+'最新章节列表_'+#{website.name}"></title>
|
<title th:utext="${book.bookName}+'目录,'+${book.bookName}+'最新章节列表_'+#{website.name}"></title>
|
||||||
<meta name="keywords" th:content="${book.bookName}+','+${book.bookName}+'目录,'+${book.bookName}+'最新章节列表'"/>
|
<meta name="keywords" th:content="${book.bookName}+','+${book.bookName}+'目录,'+${book.bookName}+'最新章节列表'"/>
|
||||||
<meta name="description"
|
<meta name="description"
|
||||||
th:content="#{website.name}+'小说为您提供'+${book.bookName}+'目录,'+${book.bookName}+'最新章节列表,'+${book.bookName}+'全文阅读,'+${book.bookName}+'免费阅读,'+${book.bookName}+'下载'"/>
|
th:content="#{website.name}+'小说为您提供'+${book.bookName}+'目录,'+${book.bookName}+'最新章节列表,'+${book.bookName}+'全文阅读,'+${book.bookName}+'免费阅读,'+${book.bookName}+'下载'"/>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
<div class="main box_center cf">
|
<div class="main box_center cf">
|
||||||
<div class="nav_sub">
|
<div class="nav_sub">
|
||||||
<a href="/" th:text="#{website.name}"></a>><a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>><a
|
<a href="/" th:text="#{website.name}"></a>><a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>><a
|
||||||
th:href="'/book/'+${book.id}+'.html'" th:text="${book.bookName}"></a>><a
|
th:href="'/book/'+${book.id}+'.html'" th:utext="${book.bookName}"></a>><a
|
||||||
th:href="'/book/indexList-'+${book.id}+'.html'">作品目录</a>
|
th:href="'/book/indexList-'+${book.id}+'.html'">作品目录</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="channelWrap channelChapterlist cf mb50">
|
<div class="channelWrap channelChapterlist cf mb50">
|
||||||
@ -26,11 +26,11 @@
|
|||||||
<div class="bookCover cf">
|
<div class="bookCover cf">
|
||||||
<div class="book_info1">
|
<div class="book_info1">
|
||||||
<div class="tit">
|
<div class="tit">
|
||||||
<h1 th:text="${book.bookName}"></h1><!--<i class="vip_b">VIP</i>-->
|
<h1 th:utext="${book.bookName}"></h1><!--<i class="vip_b">VIP</i>-->
|
||||||
</div>
|
</div>
|
||||||
<ul class="list">
|
<ul class="list">
|
||||||
<li>
|
<li>
|
||||||
<span>作者:<a href="javascript:void(0)" th:text="${book.authorName}"></a></span>
|
<span>作者:<a href="javascript:void(0)" th:utext="${book.authorName}"></a></span>
|
||||||
<span>类别:<a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a></span>
|
<span>类别:<a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a></span>
|
||||||
<span th:switch="${book.bookStatus}">状态:<em class="black3" th:case="'0'">连载中</em><em class="black3"
|
<span th:switch="${book.bookStatus}">状态:<em class="black3" th:case="'0'">连载中</em><em class="black3"
|
||||||
th:case="*">已完结</em></span>
|
th:case="*">已完结</em></span>
|
||||||
@ -45,9 +45,9 @@
|
|||||||
<div class="dirList">
|
<div class="dirList">
|
||||||
<ul th:each="bookIndex : ${bookIndexList}">
|
<ul th:each="bookIndex : ${bookIndexList}">
|
||||||
<li><a th:if="${bookIndex.isVip} != '1'" th:href="'/book/'+${book.id}+'/'+${bookIndex.id}+'.html'" >
|
<li><a th:if="${bookIndex.isVip} != '1'" th:href="'/book/'+${book.id}+'/'+${bookIndex.id}+'.html'" >
|
||||||
<span th:text="${bookIndex.indexName}"></span><i class="red" > [免费]</i>
|
<span th:utext="${bookIndex.indexName}"></span><i class="red" > [免费]</i>
|
||||||
</a>
|
</a>
|
||||||
<a th:if="${bookIndex.isVip} == '1'" th:href="'/book/'+${book.id}+'/'+${bookIndex.id}+'.html'" th:text="${bookIndex.indexName}">
|
<a th:if="${bookIndex.isVip} == '1'" th:href="'/book/'+${book.id}+'/'+${bookIndex.id}+'.html'" th:utext="${bookIndex.indexName}">
|
||||||
</a></li>
|
</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="box_center cf">
|
<div class="box_center cf">
|
||||||
<div class="copyright">
|
<div class="copyright">
|
||||||
<ul >
|
<ul >
|
||||||
<li class="menu"><a href="/?to=mobile">手机站</a><i class="line">|</i><a href="/">网站首页</a><i class="line">|</i><a href="/about/default.html" >关于我们</a><i class="line">|</i><a href="/about/contact.html" >联系我们</a><i class="line">|</i><a href="/user/feedback.html" >反馈留言</a><i class="line">|</i><a href="javascript:layer.alert('待开通,敬请期待!');" >作家专区</a></li>
|
<li class="menu"><a href="/?to=mobile">手机站</a><i class="line">|</i><a href="/">网站首页</a><i class="line">|</i><a href="/about/default.html" >关于我们</a><i class="line">|</i><a href="/about/contact.html" >联系我们</a><i class="line">|</i><a href="/user/feedback.html" >反馈留言</a><i class="line">|</i><a href="/author/index.html" >作家专区</a></li>
|
||||||
<li th:text="'Copyright (C) '+#{website.domain}+' All rights reserved '+#{website.name}+'版权所有'"></li>
|
<li th:text="'Copyright (C) '+#{website.domain}+' All rights reserved '+#{website.name}+'版权所有'"></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta th:if="${catId == 9}" name="viewport" content="width=device-width, initial-scale=0.5, maximum-scale=1">
|
<meta th:if="${catId == 9}" name="viewport" content="width=device-width, initial-scale=0.5, maximum-scale=1">
|
||||||
<meta th:if="${catId != 9}" name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
<meta th:if="${catId != 9}" name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||||
<title th:text="${book.bookName}+${bookIndex.indexName}"></title>
|
<title th:utext="${book.bookName}+${bookIndex.indexName}"></title>
|
||||||
|
|
||||||
<meta name="keywords" th:content="${book.bookName}+','+${bookIndex.indexName}">
|
<meta name="keywords" th:content="${book.bookName}+','+${bookIndex.indexName}">
|
||||||
|
|
||||||
@ -183,7 +183,7 @@
|
|||||||
<a href="javascript:history.go(-1)">
|
<a href="javascript:history.go(-1)">
|
||||||
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i></a>
|
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<a style="color: #ffffff;" th:href="'/book/'+ ${book.id} + '.html'"><b style="padding-left: 5%;float: left;width: 69%" class="line-limit-length" th:text="${bookIndex.indexName}+' '+${book.bookName}"></b></a>
|
<a style="color: #ffffff;" th:href="'/book/'+ ${book.id} + '.html'"><b style="padding-left: 5%;float: left;width: 69%" class="line-limit-length" th:utext="${bookIndex.indexName}+' '+${book.bookName}"></b></a>
|
||||||
<div style="width:10%;float: right;margin-right: 10px"><a href="/">
|
<div style="width:10%;float: right;margin-right: 10px"><a href="/">
|
||||||
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i>
|
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||||
<title th:text="${book.bookName}+'小说最新章节免费阅读和下载'"></title>
|
<title th:utext="${book.bookName}+'小说最新章节免费阅读和下载'"></title>
|
||||||
|
|
||||||
<meta name="keywords" th:content="${book.bookName}+','+${book.bookName}+'最新章节,'+${book.bookName}+'免费阅读,'+${book.bookName}+'TXT下载'">
|
<meta name="keywords" th:content="${book.bookName}+','+${book.bookName}+'最新章节,'+${book.bookName}+'免费阅读,'+${book.bookName}+'TXT下载'">
|
||||||
|
|
||||||
@ -121,7 +121,7 @@
|
|||||||
<a href="javascript:history.go(-1)">
|
<a href="javascript:history.go(-1)">
|
||||||
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i></a>
|
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<b class="layui-icon" th:text="${book.bookName}"></b>
|
<b class="layui-icon" th:utext="${book.bookName}"></b>
|
||||||
<div style="float: right;margin-right: 10px">
|
<div style="float: right;margin-right: 10px">
|
||||||
<a href="/"><i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i></a>
|
<a href="/"><i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i></a>
|
||||||
</div>
|
</div>
|
||||||
@ -133,7 +133,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div style="position:relative;padding: 10px 20px" class="layui-col-xs8 layui-col-sm8 layui-col-md8 layui-col-lg8">
|
<div style="position:relative;padding: 10px 20px" class="layui-col-xs8 layui-col-sm8 layui-col-md8 layui-col-lg8">
|
||||||
<a th:href="'javascript:searchBooks(\''+ ${book.authorName}+'\')'"><div style=";color: #4c6978;" th:text="'作者:'+ ${book.authorName}"></div></a>
|
<a th:href="'javascript:searchBooks(\''+ ${book.authorName}+'\')'"><div style=";color: #4c6978;" th:utext="'作者:'+ ${book.authorName}"></div></a>
|
||||||
<a th:href="'/book/book_ranking.html?catId='+${book.catId}"><div style="margin-top: 5px;color: #4c6978;" th:text="'类别:'+ ${book.catName}"></div></a>
|
<a th:href="'/book/book_ranking.html?catId='+${book.catId}"><div style="margin-top: 5px;color: #4c6978;" th:text="'类别:'+ ${book.catName}"></div></a>
|
||||||
<div style="margin-top: 5px;color: #4c6978;" th:text="'状态:'+ ${book.bookStatus==0?'连载':'完结'}"></div>
|
<div style="margin-top: 5px;color: #4c6978;" th:text="'状态:'+ ${book.bookStatus==0?'连载':'完结'}"></div>
|
||||||
<div style="margin-top: 5px;color: #4c6978;">更新:<i th:text="${#dates.format(book.lastIndexUpdateTime, 'yy-MM-dd')}"></i></div>
|
<div style="margin-top: 5px;color: #4c6978;">更新:<i th:text="${#dates.format(book.lastIndexUpdateTime, 'yy-MM-dd')}"></i></div>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||||
<title th:text="${book.bookName}+'最新免费章节目录列表'"></title>
|
<title th:utext="${book.bookName}+'最新免费章节目录列表'"></title>
|
||||||
|
|
||||||
<meta name="keywords" th:content="${book.bookName}+','+${book.bookName}+'最新章节'">
|
<meta name="keywords" th:content="${book.bookName}+','+${book.bookName}+'最新章节'">
|
||||||
|
|
||||||
@ -48,7 +48,7 @@
|
|||||||
<a href="javascript:history.go(-1)">
|
<a href="javascript:history.go(-1)">
|
||||||
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i></a>
|
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<a style="color: #ffffff;" th:href="'/book/'+ ${book.id} + '.html'"><b class="layui-icon" th:text="${book.bookName}"></b></a>
|
<a style="color: #ffffff;" th:href="'/book/'+ ${book.id} + '.html'"><b class="layui-icon" th:utext="${book.bookName}"></b></a>
|
||||||
<div style="float: right;margin-right: 10px">
|
<div style="float: right;margin-right: 10px">
|
||||||
<a href="/"><i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i></a>
|
<a href="/"><i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i></a>
|
||||||
</div>
|
</div>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
|
|
||||||
<div class="layui-colla-content layui-show indexP layui-row">
|
<div class="layui-colla-content layui-show indexP layui-row">
|
||||||
<p class="line-limit-length layui-col-xs12 layui-col-sm4 layui-col-md3 layui-col-lg2" style="padding-left:10px;height: 50px;line-height: 50px;" th:each="index : ${bookIndexList}">
|
<p class="line-limit-length layui-col-xs12 layui-col-sm4 layui-col-md3 layui-col-lg2" style="padding-left:10px;height: 50px;line-height: 50px;" th:each="index : ${bookIndexList}">
|
||||||
<a th:href="'/book/'+${index.bookId}+'/'+${index.id}+'.html'" th:text="${index.indexName}">
|
<a th:href="'/book/'+${index.bookId}+'/'+${index.id}+'.html'" th:utext="${index.indexName}">
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!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">
|
<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>
|
<title th:text="'修改昵称_'+#{website.name}"></title>
|
||||||
@ -24,21 +25,26 @@
|
|||||||
<div class="my_r">
|
<div class="my_r">
|
||||||
<div class="my_info cf">
|
<div class="my_info cf">
|
||||||
<div class="my_info_txt">
|
<div class="my_info_txt">
|
||||||
<div class="aspNetHidden">
|
<div class="aspNetHidden">
|
||||||
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTI5MzkzMzQyMw9kFgJmD2QWAmYPFgIeBFRleHQFqAE8YSBocmVmPSIvc2VhcmNoLmFzcHg/c2VhcmNoS2V5PeWWu+Wuiembr++8jOeLhOazve+8jOeBteW8gu+8jOWJjeS4luS7iueUn++8jOWGpeeOi+msvOWkqyIgdGFyZ2V0PSJfYmxhbmsiPuWWu+Wuiembr++8jOeLhOazve+8jOeBteW8gu+8jOWJjeS4luS7iueUn++8jOWGpeeOi+msvOWkqzwvYT5kZLj1Uo6akAHRsP9HH/tJWCPmjwlzm9tv02sZRfbbCnBA" />
|
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
|
||||||
</div>
|
value="/wEPDwUKMTI5MzkzMzQyMw9kFgJmD2QWAmYPFgIeBFRleHQFqAE8YSBocmVmPSIvc2VhcmNoLmFzcHg/c2VhcmNoS2V5PeWWu+Wuiembr++8jOeLhOazve+8jOeBteW8gu+8jOWJjeS4luS7iueUn++8jOWGpeeOi+msvOWkqyIgdGFyZ2V0PSJfYmxhbmsiPuWWu+Wuiembr++8jOeLhOazve+8jOeBteW8gu+8jOWJjeS4luS7iueUn++8jOWGpeeOi+msvOWkqzwvYT5kZLj1Uo6akAHRsP9HH/tJWCPmjwlzm9tv02sZRfbbCnBA"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="aspNetHidden">
|
<div class="aspNetHidden">
|
||||||
|
|
||||||
<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="6C876674" />
|
<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="6C876674"/>
|
||||||
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEdAAO8SPdUDpH0Q7nHjeqbvI7ld2C+OxfjpZOniBJbql7XdnRgTJ25FWigbeFr84Vgoxdi/cg2vS37N0KER6F1nyr1wKHztnXmDR5zls+9dCeAZg==" />
|
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION"
|
||||||
</div>
|
value="/wEdAAO8SPdUDpH0Q7nHjeqbvI7ld2C+OxfjpZOniBJbql7XdnRgTJ25FWigbeFr84Vgoxdi/cg2vS37N0KER6F1nyr1wKHztnXmDR5zls+9dCeAZg=="/>
|
||||||
<ul class="mytab_list">
|
</div>
|
||||||
<li><i class="tit">我的昵称</i><input name="txtNiceName" type="text" value="15171695474" maxlength="20" id="txtNiceName" class="s_input" placeholder="" /></li>
|
<ul class="mytab_list">
|
||||||
<li><i class="tit"> </i>用户名只能包括汉字、英文字母、数字和下划线</li>
|
<li><i class="tit">我的昵称</i><input name="txtNiceName" type="text" value="15171695474"
|
||||||
<li><i class="tit"> </i><input type="button" onclick="updateName()" name="btn" value="修改" id="btn" class="s_btn btn_red" /></li>
|
maxlength="20" id="txtNiceName" class="s_input"
|
||||||
<li><i class="tit"> </i><span id="LabErr"></span></li>
|
placeholder=""/></li>
|
||||||
</ul>
|
<li><i class="tit"> </i>用户名只能包括汉字、英文字母、数字和下划线</li>
|
||||||
|
<li><i class="tit"> </i><input type="button" onclick="updateName()" name="btn" value="修改"
|
||||||
|
id="btn" class="s_btn btn_red"/></li>
|
||||||
|
<li><i class="tit"> </i><span id="LabErr"></span></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -57,14 +63,13 @@
|
|||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data.code == 200) {
|
if (data.code == 200) {
|
||||||
if(data.data.nickName){
|
if (data.data.nickName) {
|
||||||
$("#txtNiceName").val(data.data.nickName);
|
$("#txtNiceName").val(data.data.nickName);
|
||||||
}else{
|
} else {
|
||||||
$("#txtNiceName").val(data.data.username);
|
$("#txtNiceName").val(data.data.username);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else if (data.code == 1001) {
|
} else if (data.code == 1001) {
|
||||||
//未登录
|
//未登录
|
||||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||||
@ -78,23 +83,26 @@
|
|||||||
layer.alert('网络异常');
|
layer.alert('网络异常');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
function updateName() {
|
function updateName() {
|
||||||
var nickname = $("#txtNiceName").val();
|
var nickname = $("#txtNiceName").val();
|
||||||
if(nickname.isBlank()){
|
if (nickname.isBlank()) {
|
||||||
$("#LabErr").html("昵称不能为空!");
|
$("#LabErr").html("昵称不能为空!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!nickname.isNickName()){
|
if (!nickname.isNickName()) {
|
||||||
$("#LabErr").html("昵称格式不正确!");
|
$("#LabErr").html("昵称格式不正确!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "/user/updateUserInfo",
|
url: "/user/updateUserInfo",
|
||||||
data: {'nickName':nickname},
|
data: {'nickName': nickname},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data.code == 200) {
|
if (data.code == 200) {
|
||||||
|
|
||||||
|
$.cookie('Authorization', data.data.token, {path: '/'});
|
||||||
window.location.href = '/user/setup.html';
|
window.location.href = '/user/setup.html';
|
||||||
|
|
||||||
} else if (data.code == 1001) {
|
} else if (data.code == 1001) {
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data.code == 200) {
|
if (data.code == 200) {
|
||||||
if(data.data.userSex === 0){
|
if(data.data.userSex === '0'){
|
||||||
$("input[name=sex]").eq(0).attr("checked",true);
|
$("input[name=sex]").eq(0).attr("checked",true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,9 +59,9 @@
|
|||||||
}else{
|
}else{
|
||||||
$("#my_name").html(data.data.username+"<em class=\"ml10\">[修改]</em>");
|
$("#my_name").html(data.data.username+"<em class=\"ml10\">[修改]</em>");
|
||||||
}
|
}
|
||||||
if(data.data.userSex === 0){
|
if(data.data.userSex === '0'){
|
||||||
$("#my_sex").html("男<em class=\"ml10\">[修改]</em>");
|
$("#my_sex").html("男<em class=\"ml10\">[修改]</em>");
|
||||||
}else if(data.data.userSex === 1){
|
}else if(data.data.userSex === '1'){
|
||||||
$("#my_sex").html("女<em class=\"ml10\">[修改]</em>");
|
$("#my_sex").html("女<em class=\"ml10\">[修改]</em>");
|
||||||
}else{
|
}else{
|
||||||
$("#my_sex").html("请选择");
|
$("#my_sex").html("请选择");
|
||||||
|
3
pom.xml
3
pom.xml
@ -5,11 +5,12 @@
|
|||||||
|
|
||||||
<groupId>com.java2nb</groupId>
|
<groupId>com.java2nb</groupId>
|
||||||
<artifactId>novel</artifactId>
|
<artifactId>novel</artifactId>
|
||||||
<version>2.0.0</version>
|
<version>2.0.1</version>
|
||||||
<modules>
|
<modules>
|
||||||
<module>novel-common</module>
|
<module>novel-common</module>
|
||||||
<module>novel-front</module>
|
<module>novel-front</module>
|
||||||
<module>novel-crawl</module>
|
<module>novel-crawl</module>
|
||||||
|
<module>novel-admin</module>
|
||||||
</modules>
|
</modules>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
@ -641,7 +641,13 @@ INSERT INTO `sys_menu` VALUES ('230', '228', '新增', null, 'novel:authorCode:a
|
|||||||
INSERT INTO `sys_menu` VALUES ('231', '228', '修改', null, 'novel:authorCode:edit', '2', null, '6', null, null);
|
INSERT INTO `sys_menu` VALUES ('231', '228', '修改', null, 'novel:authorCode:edit', '2', null, '6', null, null);
|
||||||
INSERT INTO `sys_menu` VALUES ('232', '228', '删除', null, 'novel:authorCode:remove', '2', null, '6', null, null);
|
INSERT INTO `sys_menu` VALUES ('232', '228', '删除', null, 'novel:authorCode:remove', '2', null, '6', null, null);
|
||||||
INSERT INTO `sys_menu` VALUES ('233', '228', '批量删除', null, 'novel:authorCode:batchRemove', '2', null, '6', null, null);
|
INSERT INTO `sys_menu` VALUES ('233', '228', '批量删除', null, 'novel:authorCode:batchRemove', '2', null, '6', null, null);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`,`gmt_modified`) VALUES ('234', '0', '小说管理', '', '', '0', 'fa fa-book', null, null, null);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`,`gmt_modified`) VALUES ('235', '234', '小说列表', 'novel/book', 'novel:book:book', '1', 'fa fa-bars', null, null, null);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`,`gmt_modified`) VALUES ('236', '234', '查看', '/novel/book/detail', 'novel:book:detail', '2', '', '6', null, null);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`,`gmt_modified`) VALUES ('237', '234', '新增', '/novel/book/add', 'novel:book:add', '2', '', '6', null, null);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`,`gmt_modified`) VALUES ('238', '234', '修改', null, 'novel:book:edit', '2', null, '6', null, null);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES ('239', '234', '删除', null, 'novel:book:remove', '2', null, '6', null, null);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`,`gmt_modified`) VALUES ('240', '234', '批量删除', 'novel/book/batchRemove', 'novel:book:batchRemove', '2', '', '6', null, null);
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for sys_role
|
-- Table structure for sys_role
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -1080,6 +1086,15 @@ INSERT INTO `sys_role_menu` VALUES ('4826', '1', '230');
|
|||||||
INSERT INTO `sys_role_menu` VALUES ('4827', '1', '229');
|
INSERT INTO `sys_role_menu` VALUES ('4827', '1', '229');
|
||||||
INSERT INTO `sys_role_menu` VALUES ('4828', '1', '221');
|
INSERT INTO `sys_role_menu` VALUES ('4828', '1', '221');
|
||||||
INSERT INTO `sys_role_menu` VALUES ('4829', '1', '-1');
|
INSERT INTO `sys_role_menu` VALUES ('4829', '1', '-1');
|
||||||
|
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES ('4830', '1', '234');
|
||||||
|
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES ('4831', '1', '240');
|
||||||
|
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES ('4832', '1', '239');
|
||||||
|
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES ('4833', '1', '238');
|
||||||
|
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES ('4834', '1', '237');
|
||||||
|
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES ('4935', '1', '236');
|
||||||
|
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES ('4936', '1', '235');
|
||||||
|
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES ('4937', '1', '-1');
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for sys_user
|
-- Table structure for sys_user
|
||||||
|
@ -886,6 +886,13 @@ INSERT INTO `sys_menu` VALUES ('211', '209', '新增', null, 'system:dataPerm:ad
|
|||||||
INSERT INTO `sys_menu` VALUES ('212', '209', '修改', null, 'system:dataPerm:edit', '2', null, '6', null, null);
|
INSERT INTO `sys_menu` VALUES ('212', '209', '修改', null, 'system:dataPerm:edit', '2', null, '6', null, null);
|
||||||
INSERT INTO `sys_menu` VALUES ('213', '209', '删除', null, 'system:dataPerm:remove', '2', null, '6', null, null);
|
INSERT INTO `sys_menu` VALUES ('213', '209', '删除', null, 'system:dataPerm:remove', '2', null, '6', null, null);
|
||||||
INSERT INTO `sys_menu` VALUES ('214', '209', '批量删除', null, 'system:dataPerm:batchRemove', '2', null, '6', null, null);
|
INSERT INTO `sys_menu` VALUES ('214', '209', '批量删除', null, 'system:dataPerm:batchRemove', '2', null, '6', null, null);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES ('215', '0', '小说管理', '', '', '0', 'fa fa-book', null, null, null);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES ('216', '215', '小说列表', 'novel/book', 'novel:book:book', '1', 'fa fa-bars', null, null, null);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES ('217', '215', '查看', '/novel/book/detail', 'novel:book:detail', '2', '', '6', null, null);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES ('218', '215', '新增', '/novel/book/add', 'novel:book:add', '2', '', '6', null, null);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES ('219', '215', '修改', null, 'novel:book:edit', '2', null, '6', null, null);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES ('220', '215', '删除', null, 'novel:book:remove', '2', null, '6', null, null);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES ('221', '215', '批量删除', 'novel/book/batchRemove', 'novel:book:batchRemove', '2', '', '6', null, null);
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for sys_role
|
-- Table structure for sys_role
|
||||||
|
Reference in New Issue
Block a user