Compare commits

...

12 Commits

Author SHA1 Message Date
2ce51d5fc0 图片更新 2020-12-04 17:06:53 +08:00
2f4b671d84 修改版本号 2020-12-04 16:50:44 +08:00
6ffd8d90d7 样式优化 2020-12-04 16:43:12 +08:00
1e2b6f4103 样式优化 2020-12-04 16:21:33 +08:00
24c7175872 新增微信公众号 2020-12-03 08:38:06 +08:00
a6b009cc84 v3.0.1发布 2020-12-03 03:02:44 +08:00
04afa759a7 v3.0.1发布 2020-12-03 02:56:54 +08:00
1be39a0f13 手机端UI更新 2020-12-03 02:01:48 +08:00
2fd0349a80 v2.11.0发布 2020-12-02 11:42:59 +08:00
79fd85ab9b v2.11.0发布 2020-12-02 11:41:06 +08:00
0b22bbb111 文档更新 2020-12-01 12:15:56 +08:00
7f4d315f25 后台新闻模块开发完成 2020-12-01 12:14:25 +08:00
47 changed files with 2769 additions and 101 deletions

View File

@ -10,19 +10,10 @@ Gitee仓库地址 https://gitee.com/xiongxyang/novel-cloud
GitHub仓库地址 https://github.com/201206030/novel-cloud
#### 示例网站
#### 演示地址
[网站1点击前往](http://www.bqmfxs.cn)
[点击前往](http://47.106.243.172:8888/)
[网站2点击前往](http://iyuedu.space)
[网站3点击前往](http://suxiange.com)
[网站4点击前往](http://ruoshu.com)
[网站5点击前往](https://www.jingjiao.net)
[网站6点击前往](http://www.shucheng.in)
#### 前言
@ -143,19 +134,19 @@ novel-plus -- 父工程
1. 首页
![index](https://gitee.com/xiongxyang/novel-plus/raw/release_v2.1.0/assets/QQ%E5%9B%BE%E7%89%8720191018162208.jpg)
<img src="https://s3.ax1x.com/2020/12/04/DbsSoj.jpg" alt="index" style="zoom:33%;" />
2. 小说详情
2. 小说列表
![微信图片_20190904181558](https://gitee.com/xiongxyang/novel-plus/raw/release_v2.1.0/assets/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190904181558.png)
<img src="https://s3.ax1x.com/2020/12/04/DbrfsO.jpg" alt="微信图片_20190904181558" style="zoom: 33%;" />
3. 目录
3. 小说详情
![QQ图片20191018161901](https://gitee.com/xiongxyang/novel-plus/raw/release_v2.1.0/assets/QQ%E5%9B%BE%E7%89%8720191108022250.png)
<img src="https://s3.ax1x.com/2020/12/04/DbsklV.jpg" alt="QQ图片20191018161901" style="zoom:33%;" />
4. 小说阅读页
![QQ图片20191018161901](https://gitee.com/xiongxyang/novel-plus/raw/release_v2.1.0/assets/QQ%E5%9B%BE%E7%89%8720191018161901.png)
<img src="https://s3.ax1x.com/2020/12/04/Dbsew4.jpg" alt="QQ图片20191018161901" style="zoom:33%;" />
#### 爬虫管理系统截图
@ -169,6 +160,8 @@ novel-plus -- 父工程
![img](https://s3.ax1x.com/2020/12/01/DWgLNT.png)
![img](https://s3.ax1x.com/2020/12/01/DfmRCd.png)
![img](https://oscimg.oschina.net/oscnet/up-faf5dda7320674c29a1772bc0c81d74762e.png)
#### 安装步骤
@ -212,6 +205,10 @@ docker安装教程[点击前往](https://my.oschina.net/java2nb/blog/4271989)
![mini-code](https://s1.ax1x.com/2020/10/31/BUQVeI.png)
#### 微信公众号发布最新更新资讯
![mini-code](https://s3.ax1x.com/2020/12/03/DoImOx.png)
#### 赞赏支持
开源项目不易若此项目能得到你的青睐那么你可以赞赏支持作者持续开发与维护

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,32 @@
package com.java2nb.novel.dao;
import com.java2nb.novel.domain.CategoryDO;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
/**
* 新闻类别表
* @author xiongxy
* @email 1179705413@qq.com
* @date 2020-12-01 10:03:41
*/
@Mapper
public interface CategoryDao {
CategoryDO get(Integer id);
List<CategoryDO> list(Map<String,Object> map);
int count(Map<String,Object> map);
int save(CategoryDO category);
int update(CategoryDO category);
int remove(Integer id);
int batchRemove(Integer[] ids);
}

View File

@ -0,0 +1,32 @@
package com.java2nb.novel.dao;
import com.java2nb.novel.domain.NewsDO;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
/**
* 新闻表
* @author xiongxy
* @email 1179705413@qq.com
* @date 2020-12-01 10:05:51
*/
@Mapper
public interface NewsDao {
NewsDO get(Long id);
List<NewsDO> list(Map<String,Object> map);
int count(Map<String,Object> map);
int save(NewsDO news);
int update(NewsDO news);
int remove(Long id);
int batchRemove(Long[] ids);
}

View File

@ -0,0 +1,135 @@
package com.java2nb.novel.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.java2nb.common.jsonserializer.LongToStringSerializer;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* 新闻类别表
*
* @author xiongxy
* @email 1179705413@qq.com
* @date 2020-12-01 10:03:41
*/
public class CategoryDO implements Serializable {
private static final long serialVersionUID = 1L;
//主键
private Integer id;
//分类名
private String name;
//排序
private Integer sort;
//
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
//所以通过序列化成字符串来解决
@JsonSerialize(using = LongToStringSerializer.class)
private Long createUserId;
//
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
//
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
//所以通过序列化成字符串来解决
@JsonSerialize(using = LongToStringSerializer.class)
private Long updateUserId;
//
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**
* 设置:主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取:主键
*/
public Integer getId() {
return id;
}
/**
* 设置:分类名
*/
public void setName(String name) {
this.name = name;
}
/**
* 获取:分类名
*/
public String getName() {
return name;
}
/**
* 设置:排序
*/
public void setSort(Integer sort) {
this.sort = sort;
}
/**
* 获取:排序
*/
public Integer getSort() {
return sort;
}
/**
* 设置:
*/
public void setCreateUserId(Long createUserId) {
this.createUserId = createUserId;
}
/**
* 获取:
*/
public Long getCreateUserId() {
return createUserId;
}
/**
* 设置:
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* 获取:
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置:
*/
public void setUpdateUserId(Long updateUserId) {
this.updateUserId = updateUserId;
}
/**
* 获取:
*/
public Long getUpdateUserId() {
return updateUserId;
}
/**
* 设置:
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* 获取:
*/
public Date getUpdateTime() {
return updateTime;
}
}

View File

@ -0,0 +1,180 @@
package com.java2nb.novel.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.java2nb.common.jsonserializer.LongToStringSerializer;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* 新闻表
*
* @author xiongxy
* @email 1179705413@qq.com
* @date 2020-12-01 10:05:51
*/
public class NewsDO implements Serializable {
private static final long serialVersionUID = 1L;
//主键
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
//所以通过序列化成字符串来解决
@JsonSerialize(using = LongToStringSerializer.class)
private Long id;
//类别ID
private Integer catId;
//分类名
private String catName;
//来源
private String sourceName;
//标题
private String title;
//内容
private String content;
//发布时间
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
//发布人ID
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
//所以通过序列化成字符串来解决
@JsonSerialize(using = LongToStringSerializer.class)
private Long createUserId;
//更新时间
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
//更新人ID
//java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值)
//所以通过序列化成字符串来解决
@JsonSerialize(using = LongToStringSerializer.class)
private Long updateUserId;
/**
* 设置:主键
*/
public void setId(Long id) {
this.id = id;
}
/**
* 获取:主键
*/
public Long getId() {
return id;
}
/**
* 设置类别ID
*/
public void setCatId(Integer catId) {
this.catId = catId;
}
/**
* 获取类别ID
*/
public Integer getCatId() {
return catId;
}
/**
* 设置:分类名
*/
public void setCatName(String catName) {
this.catName = catName;
}
/**
* 获取:分类名
*/
public String getCatName() {
return catName;
}
/**
* 设置:来源
*/
public void setSourceName(String sourceName) {
this.sourceName = sourceName;
}
/**
* 获取:来源
*/
public String getSourceName() {
return sourceName;
}
/**
* 设置:标题
*/
public void setTitle(String title) {
this.title = title;
}
/**
* 获取:标题
*/
public String getTitle() {
return title;
}
/**
* 设置:内容
*/
public void setContent(String content) {
this.content = content;
}
/**
* 获取:内容
*/
public String getContent() {
return content;
}
/**
* 设置:发布时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* 获取:发布时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置发布人ID
*/
public void setCreateUserId(Long createUserId) {
this.createUserId = createUserId;
}
/**
* 获取发布人ID
*/
public Long getCreateUserId() {
return createUserId;
}
/**
* 设置:更新时间
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* 获取:更新时间
*/
public Date getUpdateTime() {
return updateTime;
}
/**
* 设置更新人ID
*/
public void setUpdateUserId(Long updateUserId) {
this.updateUserId = updateUserId;
}
/**
* 获取更新人ID
*/
public Long getUpdateUserId() {
return updateUserId;
}
}

View File

@ -0,0 +1,30 @@
package com.java2nb.novel.service;
import com.java2nb.novel.domain.CategoryDO;
import java.util.List;
import java.util.Map;
/**
* 新闻类别表
*
* @author xiongxy
* @email 1179705413@qq.com
* @date 2020-12-01 10:03:41
*/
public interface CategoryService {
CategoryDO get(Integer id);
List<CategoryDO> list(Map<String, Object> map);
int count(Map<String, Object> map);
int save(CategoryDO category);
int update(CategoryDO category);
int remove(Integer id);
int batchRemove(Integer[] ids);
}

View File

@ -0,0 +1,30 @@
package com.java2nb.novel.service;
import com.java2nb.novel.domain.NewsDO;
import java.util.List;
import java.util.Map;
/**
* 新闻表
*
* @author xiongxy
* @email 1179705413@qq.com
* @date 2020-12-01 10:05:51
*/
public interface NewsService {
NewsDO get(Long id);
List<NewsDO> list(Map<String, Object> map);
int count(Map<String, Object> map);
int save(NewsDO news);
int update(NewsDO news);
int remove(Long id);
int batchRemove(Long[] ids);
}

View File

@ -0,0 +1,58 @@
package com.java2nb.novel.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.java2nb.novel.dao.CategoryDao;
import com.java2nb.novel.domain.CategoryDO;
import com.java2nb.novel.service.CategoryService;
@Service
public class CategoryServiceImpl implements CategoryService {
@Autowired
private CategoryDao categoryDao;
@Override
public CategoryDO get(Integer id){
return categoryDao.get(id);
}
@Override
public List<CategoryDO> list(Map<String, Object> map){
return categoryDao.list(map);
}
@Override
public int count(Map<String, Object> map){
return categoryDao.count(map);
}
@Override
public int save(CategoryDO category){
category.setCreateTime(new Date());
return categoryDao.save(category);
}
@Override
public int update(CategoryDO category){
category.setUpdateTime(new Date());
return categoryDao.update(category);
}
@Override
public int remove(Integer id){
return categoryDao.remove(id);
}
@Override
public int batchRemove(Integer[] ids){
return categoryDao.batchRemove(ids);
}
}

View File

@ -0,0 +1,58 @@
package com.java2nb.novel.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.java2nb.novel.dao.NewsDao;
import com.java2nb.novel.domain.NewsDO;
import com.java2nb.novel.service.NewsService;
@Service
public class NewsServiceImpl implements NewsService {
@Autowired
private NewsDao newsDao;
@Override
public NewsDO get(Long id){
return newsDao.get(id);
}
@Override
public List<NewsDO> list(Map<String, Object> map){
return newsDao.list(map);
}
@Override
public int count(Map<String, Object> map){
return newsDao.count(map);
}
@Override
public int save(NewsDO news){
news.setCreateTime(new Date());
return newsDao.save(news);
}
@Override
public int update(NewsDO news){
news.setUpdateTime(new Date());
return newsDao.update(news);
}
@Override
public int remove(Long id){
return newsDao.remove(id);
}
@Override
public int batchRemove(Long[] ids){
return newsDao.batchRemove(ids);
}
}

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.java2nb.novel.dao.CategoryDao">
<select id="get" resultType="com.java2nb.novel.domain.CategoryDO">
select `id`,`name`,`sort`,`create_user_id`,`create_time`,`update_user_id`,`update_time` from news_category where id = #{value}
</select>
<select id="list" resultType="com.java2nb.novel.domain.CategoryDO">
select `id`,`name`,`sort`,`create_user_id`,`create_time`,`update_user_id`,`update_time` from news_category
<where>
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="name != null and name != ''"> and name = #{name} </if>
<if test="sort != null and sort != ''"> and sort = #{sort} </if>
<if test="createUserId != null and createUserId != ''"> and create_user_id = #{createUserId} </if>
<if test="createTime != null and createTime != ''"> and create_time = #{createTime} </if>
<if test="updateUserId != null and updateUserId != ''"> and update_user_id = #{updateUserId} </if>
<if test="updateTime != null and updateTime != ''"> and update_time = #{updateTime} </if>
</where>
<choose>
<when test="sort != null and sort.trim() != ''">
order by ${sort} ${order}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<if test="offset != null and limit != null">
limit #{offset}, #{limit}
</if>
</select>
<select id="count" resultType="int">
select count(*) from news_category
<where>
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="name != null and name != ''"> and name = #{name} </if>
<if test="sort != null and sort != ''"> and sort = #{sort} </if>
<if test="createUserId != null and createUserId != ''"> and create_user_id = #{createUserId} </if>
<if test="createTime != null and createTime != ''"> and create_time = #{createTime} </if>
<if test="updateUserId != null and updateUserId != ''"> and update_user_id = #{updateUserId} </if>
<if test="updateTime != null and updateTime != ''"> and update_time = #{updateTime} </if>
</where>
</select>
<insert id="save" parameterType="com.java2nb.novel.domain.CategoryDO">
insert into news_category
(
`id`,
`name`,
`sort`,
`create_user_id`,
`create_time`,
`update_user_id`,
`update_time`
)
values
(
#{id},
#{name},
#{sort},
#{createUserId},
#{createTime},
#{updateUserId},
#{updateTime}
)
</insert>
<insert id="saveSelective" parameterType="com.java2nb.novel.domain.CategoryDO">
insert into news_category
(
<if test="id != null"> `id`, </if>
<if test="name != null"> `name`, </if>
<if test="sort != null"> `sort`, </if>
<if test="createUserId != null"> `create_user_id`, </if>
<if test="createTime != null"> `create_time`, </if>
<if test="updateUserId != null"> `update_user_id`, </if>
<if test="updateTime != null"> `update_time` </if>
)
values
(
<if test="id != null"> #{id}, </if>
<if test="name != null"> #{name}, </if>
<if test="sort != null"> #{sort}, </if>
<if test="createUserId != null"> #{createUserId}, </if>
<if test="createTime != null"> #{createTime}, </if>
<if test="updateUserId != null"> #{updateUserId}, </if>
<if test="updateTime != null"> #{updateTime} </if>
)
</insert>
<update id="update" parameterType="com.java2nb.novel.domain.CategoryDO">
update news_category
<set>
<if test="name != null">`name` = #{name}, </if>
<if test="sort != null">`sort` = #{sort}, </if>
<if test="createUserId != null">`create_user_id` = #{createUserId}, </if>
<if test="createTime != null">`create_time` = #{createTime}, </if>
<if test="updateUserId != null">`update_user_id` = #{updateUserId}, </if>
<if test="updateTime != null">`update_time` = #{updateTime}</if>
</set>
where id = #{id}
</update>
<delete id="remove">
delete from news_category where id = #{value}
</delete>
<delete id="batchRemove">
delete from news_category where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.java2nb.novel.dao.NewsDao">
<select id="get" resultType="com.java2nb.novel.domain.NewsDO">
select `id`,`cat_id`,`cat_name`,`source_name`,`title`,`content`,`create_time`,`create_user_id`,`update_time`,`update_user_id` from news where id = #{value}
</select>
<select id="list" resultType="com.java2nb.novel.domain.NewsDO">
select `id`,`cat_id`,`cat_name`,`source_name`,`title`,`content`,`create_time`,`create_user_id`,`update_time`,`update_user_id` from news
<where>
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="catId != null and catId != ''"> and cat_id = #{catId} </if>
<if test="catName != null and catName != ''"> and cat_name = #{catName} </if>
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
<if test="title != null and title != ''"> and title like concat('%',#{title},'%') </if>
<if test="content != null and content != ''"> and content = #{content} </if>
<if test="createTime != null and createTime != ''"> and create_time = #{createTime} </if>
<if test="createUserId != null and createUserId != ''"> and create_user_id = #{createUserId} </if>
<if test="updateTime != null and updateTime != ''"> and update_time = #{updateTime} </if>
<if test="updateUserId != null and updateUserId != ''"> and update_user_id = #{updateUserId} </if>
</where>
<choose>
<when test="sort != null and sort.trim() != ''">
order by ${sort} ${order}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<if test="offset != null and limit != null">
limit #{offset}, #{limit}
</if>
</select>
<select id="count" resultType="int">
select count(*) from news
<where>
<if test="id != null and id != ''"> and id = #{id} </if>
<if test="catId != null and catId != ''"> and cat_id = #{catId} </if>
<if test="catName != null and catName != ''"> and cat_name = #{catName} </if>
<if test="sourceName != null and sourceName != ''"> and source_name = #{sourceName} </if>
<if test="title != null and title != ''"> and title = #{title} </if>
<if test="content != null and content != ''"> and content = #{content} </if>
<if test="createTime != null and createTime != ''"> and create_time = #{createTime} </if>
<if test="createUserId != null and createUserId != ''"> and create_user_id = #{createUserId} </if>
<if test="updateTime != null and updateTime != ''"> and update_time = #{updateTime} </if>
<if test="updateUserId != null and updateUserId != ''"> and update_user_id = #{updateUserId} </if>
</where>
</select>
<insert id="save" parameterType="com.java2nb.novel.domain.NewsDO">
insert into news
(
`id`,
`cat_id`,
`cat_name`,
`source_name`,
`title`,
`content`,
`create_time`,
`create_user_id`,
`update_time`,
`update_user_id`
)
values
(
#{id},
#{catId},
#{catName},
#{sourceName},
#{title},
#{content},
#{createTime},
#{createUserId},
#{updateTime},
#{updateUserId}
)
</insert>
<insert id="saveSelective" parameterType="com.java2nb.novel.domain.NewsDO">
insert into news
(
<if test="id != null"> `id`, </if>
<if test="catId != null"> `cat_id`, </if>
<if test="catName != null"> `cat_name`, </if>
<if test="sourceName != null"> `source_name`, </if>
<if test="title != null"> `title`, </if>
<if test="content != null"> `content`, </if>
<if test="createTime != null"> `create_time`, </if>
<if test="createUserId != null"> `create_user_id`, </if>
<if test="updateTime != null"> `update_time`, </if>
<if test="updateUserId != null"> `update_user_id` </if>
)
values
(
<if test="id != null"> #{id}, </if>
<if test="catId != null"> #{catId}, </if>
<if test="catName != null"> #{catName}, </if>
<if test="sourceName != null"> #{sourceName}, </if>
<if test="title != null"> #{title}, </if>
<if test="content != null"> #{content}, </if>
<if test="createTime != null"> #{createTime}, </if>
<if test="createUserId != null"> #{createUserId}, </if>
<if test="updateTime != null"> #{updateTime}, </if>
<if test="updateUserId != null"> #{updateUserId} </if>
)
</insert>
<update id="update" parameterType="com.java2nb.novel.domain.NewsDO">
update news
<set>
<if test="catId != null">`cat_id` = #{catId}, </if>
<if test="catName != null">`cat_name` = #{catName}, </if>
<if test="sourceName != null">`source_name` = #{sourceName}, </if>
<if test="title != null">`title` = #{title}, </if>
<if test="content != null">`content` = #{content}, </if>
<if test="createTime != null">`create_time` = #{createTime}, </if>
<if test="createUserId != null">`create_user_id` = #{createUserId}, </if>
<if test="updateTime != null">`update_time` = #{updateTime}, </if>
<if test="updateUserId != null">`update_user_id` = #{updateUserId}</if>
</set>
where id = #{id}
</update>
<delete id="remove">
delete from news where id = #{value}
</delete>
<delete id="batchRemove">
delete from news where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,111 @@
var E = window.wangEditor;
$("[id^='contentEditor']").each(function (index, ele) {
var relName = $(ele).attr("id").substring(13);
var editor = new E('#contentEditor' + relName);
// 自定义菜单配置
editor.customConfig.menus = [
'head', // 标题
'bold', // 粗体
'fontSize', // 字号
'fontName', // 字体
'italic', // 斜体
'underline', // 下划线
'strikeThrough', // 删除线
'foreColor', // 文字颜色
//'backColor', // 背景颜色
//'link', // 插入链接
'list', // 列表
'justify', // 对齐方式
'quote', // 引用
'emoticon', // 表情
'image', // 插入图片
//'table', // 表格
//'video', // 插入视频
//'code', // 插入代码
'undo', // 撤销
'redo' // 重复
];
editor.customConfig.onchange = function (html) {
// html 即变化之后的内容
$("#" + relName).val(html);
}
editor.customConfig.uploadImgShowBase64 = true;
editor.create();
})
$("[id^='picImage']").each(function (index, ele) {
var relName = $(ele).attr("id").substring(8);
layui.use('upload', function () {
var upload = layui.upload;
//执行实例
var uploadInst = upload.render({
elem: '#picImage' + relName, //绑定元素
url: '/common/sysFile/upload', //上传接口
size: 1000,
accept: 'file',
done: function (r) {
$("#picImage" + relName).attr("src", r.fileName);
$("#" + relName).val(r.fileName);
},
error: function (r) {
layer.msg(r.msg);
}
});
});
});
$().ready(function () {
validateRule();
});
$.validator.setDefaults({
submitHandler: function () {
save();
}
});
function save() {
$.ajax({
cache: true,
type: "POST",
url: "/novel/category/save",
data: $('#signupForm').serialize(),// 你的formid
async: false,
error: function (request) {
parent.layer.alert("Connection error");
},
success: function (data) {
if (data.code == 0) {
parent.layer.msg("操作成功");
parent.reLoad();
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
parent.layer.close(index);
} else {
parent.layer.alert(data.msg)
}
}
});
}
function validateRule() {
var icon = "<i class='fa fa-times-circle'></i> ";
$("#signupForm").validate({
ignore: "",
rules: {
name: {
required: true
}, },
messages: {
name: {
required: icon + "请选择分类名"
}, }
})
}

View File

@ -0,0 +1,193 @@
var prefix = "/novel/category"
$(function () {
load();
});
function load() {
$('#exampleTable')
.bootstrapTable(
{
method: 'get', // 服务器数据的请求方式 get or post
url: prefix + "/list", // 服务器数据的加载地址
// showRefresh : true,
// showToggle : true,
// showColumns : true,
iconSize: 'outline',
toolbar: '#exampleToolbar',
striped: true, // 设置为true会有隔行变色效果
dataType: "json", // 服务器返回的数据类型
pagination: true, // 设置为true会在底部显示分页条
// queryParamsType : "limit",
// //设置为limit则会发送符合RESTFull格式的参数
singleSelect: false, // 设置为true将禁止多选
// contentType : "application/x-www-form-urlencoded",
// //发送到服务器的数据编码类型
pageSize: 10, // 如果设置了分页,每页数据条数
pageNumber: 1, // 如果设置了分布,首页页码
//search : true, // 是否显示搜索框
showColumns: false, // 是否显示内容下拉框(选择显示的列)
sidePagination: "server", // 设置在哪里进行分页,可选值为"client" 或者 "server"
queryParams: function (params) {
//说明传入后台的参数包括offset开始索引limit步长sort排序列orderdesc或者,以及所有列的键值对
var queryParams = getFormJson("searchForm");
queryParams.limit = params.limit;
queryParams.offset = params.offset;
return queryParams;
},
// //请求服务器数据时,你可以通过重写参数的方式添加一些额外的参数,例如 toolbar 中的参数 如果
// queryParamsType = 'limit' ,返回参数必须包含
// limit, offset, search, sort, order 否则, 需要包含:
// pageSize, pageNumber, searchText, sortName,
// sortOrder.
// 返回false将会终止请求
responseHandler: function (rs) {
if (rs.code == 0) {
return rs.data;
} else {
parent.layer.alert(rs.msg)
return {total: 0, rows: []};
}
},
columns: [
{
checkbox: true
},
{
title: '序号',
formatter: function () {
return arguments[2] + 1;
}
},
{
field: 'name',
title: '分类名'
},
{
field: 'sort',
title: '排序'
},
{
title: '操作',
field: 'id',
align: 'center',
formatter: function (value, row, index) {
var d = '<a class="btn btn-primary btn-sm ' + s_detail_h + '" href="#" mce_href="#" title="详情" onclick="detail(\''
+ row.id
+ '\')"><i class="fa fa-file"></i></a> ';
var e = '<a class="btn btn-primary btn-sm ' + s_edit_h + '" href="#" mce_href="#" title="编辑" onclick="edit(\''
+ row.id
+ '\')"><i class="fa fa-edit"></i></a> ';
var r = '<a class="btn btn-warning btn-sm ' + s_remove_h + '" href="#" title="删除" mce_href="#" onclick="remove(\''
+ row.id
+ '\')"><i class="fa fa-remove"></i></a> ';
return e + r;
}
}]
});
}
function reLoad() {
$('#exampleTable').bootstrapTable('refresh');
}
function add() {
layer.open({
type: 2,
title: '增加',
maxmin: true,
shadeClose: false, // 点击遮罩关闭层
area: ['800px', '520px'],
content: prefix + '/add' // iframe的url
});
}
function detail(id) {
layer.open({
type: 2,
title: '详情',
maxmin: true,
shadeClose: false, // 点击遮罩关闭层
area: ['800px', '520px'],
content: prefix + '/detail/' + id // iframe的url
});
}
function edit(id) {
layer.open({
type: 2,
title: '编辑',
maxmin: true,
shadeClose: false, // 点击遮罩关闭层
area: ['800px', '520px'],
content: prefix + '/edit/' + id // iframe的url
});
}
function remove(id) {
layer.confirm('确定要删除选中的记录?', {
btn: ['确定', '取消']
}, function () {
$.ajax({
url: prefix + "/remove",
type: "post",
data: {
'id': id
},
success: function (r) {
if (r.code == 0) {
layer.msg(r.msg);
reLoad();
} else {
layer.msg(r.msg);
}
}
});
})
}
function resetPwd(id) {
}
function batchRemove() {
var rows = $('#exampleTable').bootstrapTable('getSelections'); // 返回所有选择的行,当没有选择的记录时,返回一个空数组
if (rows.length == 0) {
layer.msg("请选择要删除的数据");
return;
}
layer.confirm("确认要删除选中的'" + rows.length + "'条数据吗?", {
btn: ['确定', '取消']
// 按钮
}, function () {
var ids = new Array();
// 遍历所有选择的行数据取每条数据对应的ID
$.each(rows, function (i, row) {
ids[i] = row['id'];
});
$.ajax({
type: 'POST',
data: {
"ids": ids
},
url: prefix + '/batchRemove',
success: function (r) {
if (r.code == 0) {
layer.msg(r.msg);
reLoad();
} else {
layer.msg(r.msg);
}
}
});
}, function () {
});
}

View File

@ -0,0 +1,109 @@
var E = window.wangEditor;
$("[id^='contentEditor']").each(function (index, ele) {
var relName = $(ele).attr("id").substring(13);
var editor = new E('#contentEditor' + relName);
// 自定义菜单配置
editor.customConfig.menus = [
'head', // 标题
'bold', // 粗体
'fontSize', // 字号
'fontName', // 字体
'italic', // 斜体
'underline', // 下划线
'strikeThrough', // 删除线
'foreColor', // 文字颜色
//'backColor', // 背景颜色
//'link', // 插入链接
'list', // 列表
'justify', // 对齐方式
'quote', // 引用
'emoticon', // 表情
'image', // 插入图片
//'table', // 表格
//'video', // 插入视频
//'code', // 插入代码
'undo', // 撤销
'redo' // 重复
];
editor.customConfig.onchange = function (html) {
// html 即变化之后的内容
$("#" + relName).val(html);
}
editor.customConfig.uploadImgShowBase64 = true;
editor.create();
editor.txt.html($("#" + relName).val());
})
$("[id^='picImage']").each(function (index, ele) {
var relName = $(ele).attr("id").substring(8);
layui.use('upload', function () {
var upload = layui.upload;
//执行实例
var uploadInst = upload.render({
elem: '#picImage' + relName, //绑定元素
url: '/common/sysFile/upload', //上传接口
size: 1000,
accept: 'file',
done: function (r) {
$("#picImage" + relName).attr("src", r.fileName);
$("#" + relName).val(r.fileName);
},
error: function (r) {
layer.msg(r.msg);
}
});
});
});
$().ready(function () {
validateRule();
});
$.validator.setDefaults({
submitHandler: function () {
update();
}
});
function update() {
$.ajax({
cache: true,
type: "POST",
url: "/novel/category/update",
data: $('#signupForm').serialize(),// 你的formid
async: false,
error: function (request) {
parent.layer.alert("Connection error");
},
success: function (data) {
if (data.code == 0) {
parent.layer.msg("操作成功");
parent.reLoad();
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
parent.layer.close(index);
} else {
parent.layer.alert(data.msg)
}
}
});
}
function validateRule() {
var icon = "<i class='fa fa-times-circle'></i> ";
$("#signupForm").validate({
ignore: "",
rules: {
name:
{
required: true
}, },
messages: {
name:
{
required: icon + "请选择分类名"
}, }
})
}

View File

@ -0,0 +1,123 @@
var E = window.wangEditor;
$("[id^='contentEditor']").each(function (index, ele) {
var relName = $(ele).attr("id").substring(13);
var editor = new E('#contentEditor' + relName);
// 自定义菜单配置
editor.customConfig.menus = [
'head', // 标题
'bold', // 粗体
'fontSize', // 字号
'fontName', // 字体
'italic', // 斜体
'underline', // 下划线
'strikeThrough', // 删除线
'foreColor', // 文字颜色
//'backColor', // 背景颜色
//'link', // 插入链接
'list', // 列表
'justify', // 对齐方式
'quote', // 引用
'emoticon', // 表情
'image', // 插入图片
//'table', // 表格
//'video', // 插入视频
//'code', // 插入代码
'undo', // 撤销
'redo' // 重复
];
editor.customConfig.onchange = function (html) {
// html 即变化之后的内容
$("#" + relName).val(html);
}
editor.customConfig.uploadImgShowBase64 = true;
editor.create();
})
$("[id^='picImage']").each(function (index, ele) {
var relName = $(ele).attr("id").substring(8);
layui.use('upload', function () {
var upload = layui.upload;
//执行实例
var uploadInst = upload.render({
elem: '#picImage' + relName, //绑定元素
url: '/common/sysFile/upload', //上传接口
size: 1000,
accept: 'file',
done: function (r) {
$("#picImage" + relName).attr("src", r.fileName);
$("#" + relName).val(r.fileName);
},
error: function (r) {
layer.msg(r.msg);
}
});
});
});
$().ready(function () {
validateRule();
});
$.validator.setDefaults({
submitHandler: function () {
save();
}
});
function save() {
$.ajax({
cache: true,
type: "POST",
url: "/novel/news/save",
data: $('#signupForm').serialize(),// 你的formid
async: false,
error: function (request) {
parent.layer.alert("Connection error");
},
success: function (data) {
if (data.code == 0) {
parent.layer.msg("操作成功");
parent.reLoad();
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
parent.layer.close(index);
} else {
parent.layer.alert(data.msg)
}
}
});
}
function validateRule() {
var icon = "<i class='fa fa-times-circle'></i> ";
$("#signupForm").validate({
ignore: "",
rules: {
catId: {
required: true
}, catName: {
required: true
}, title: {
required: true
}, content: {
required: true
}, },
messages: {
catId: {
required: icon + "请选择类别ID"
}, catName: {
required: icon + "请选择分类名"
}, title: {
required: icon + "请选择标题"
}, content: {
required: icon + "请选择内容"
}, }
})
}

View File

@ -0,0 +1,127 @@
var E = window.wangEditor;
$("[id^='contentEditor']").each(function (index, ele) {
var relName = $(ele).attr("id").substring(13);
var editor = new E('#contentEditor' + relName);
// 自定义菜单配置
editor.customConfig.menus = [
'head', // 标题
'bold', // 粗体
'fontSize', // 字号
'fontName', // 字体
'italic', // 斜体
'underline', // 下划线
'strikeThrough', // 删除线
'foreColor', // 文字颜色
//'backColor', // 背景颜色
//'link', // 插入链接
'list', // 列表
'justify', // 对齐方式
'quote', // 引用
'emoticon', // 表情
'image', // 插入图片
//'table', // 表格
//'video', // 插入视频
//'code', // 插入代码
'undo', // 撤销
'redo' // 重复
];
editor.customConfig.onchange = function (html) {
// html 即变化之后的内容
$("#" + relName).val(html);
}
editor.customConfig.uploadImgShowBase64 = true;
editor.create();
editor.txt.html($("#" + relName).val());
})
$("[id^='picImage']").each(function (index, ele) {
var relName = $(ele).attr("id").substring(8);
layui.use('upload', function () {
var upload = layui.upload;
//执行实例
var uploadInst = upload.render({
elem: '#picImage' + relName, //绑定元素
url: '/common/sysFile/upload', //上传接口
size: 1000,
accept: 'file',
done: function (r) {
$("#picImage" + relName).attr("src", r.fileName);
$("#" + relName).val(r.fileName);
},
error: function (r) {
layer.msg(r.msg);
}
});
});
});
$().ready(function () {
validateRule();
});
$.validator.setDefaults({
submitHandler: function () {
update();
}
});
function update() {
$.ajax({
cache: true,
type: "POST",
url: "/novel/news/update",
data: $('#signupForm').serialize(),// 你的formid
async: false,
error: function (request) {
parent.layer.alert("Connection error");
},
success: function (data) {
if (data.code == 0) {
parent.layer.msg("操作成功");
parent.reLoad();
var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
parent.layer.close(index);
} else {
parent.layer.alert(data.msg)
}
}
});
}
function validateRule() {
var icon = "<i class='fa fa-times-circle'></i> ";
$("#signupForm").validate({
ignore: "",
rules: {
catId:
{
required: true
}, catName:
{
required: true
}, title:
{
required: true
}, content:
{
required: true
}, },
messages: {
catId:
{
required: icon + "请选择类别ID"
}, catName:
{
required: icon + "请选择分类名"
}, title:
{
required: icon + "请选择标题"
}, content:
{
required: icon + "请选择内容"
}, }
})
}

View File

@ -0,0 +1,206 @@
var prefix = "/novel/news"
$(function () {
load();
});
function load() {
$('#exampleTable')
.bootstrapTable(
{
method: 'get', // 服务器数据的请求方式 get or post
url: prefix + "/list", // 服务器数据的加载地址
// showRefresh : true,
// showToggle : true,
// showColumns : true,
iconSize: 'outline',
toolbar: '#exampleToolbar',
striped: true, // 设置为true会有隔行变色效果
dataType: "json", // 服务器返回的数据类型
pagination: true, // 设置为true会在底部显示分页条
// queryParamsType : "limit",
// //设置为limit则会发送符合RESTFull格式的参数
singleSelect: false, // 设置为true将禁止多选
// contentType : "application/x-www-form-urlencoded",
// //发送到服务器的数据编码类型
pageSize: 10, // 如果设置了分页,每页数据条数
pageNumber: 1, // 如果设置了分布,首页页码
//search : true, // 是否显示搜索框
showColumns: false, // 是否显示内容下拉框(选择显示的列)
sidePagination: "server", // 设置在哪里进行分页,可选值为"client" 或者 "server"
queryParams: function (params) {
//说明传入后台的参数包括offset开始索引limit步长sort排序列orderdesc或者,以及所有列的键值对
var queryParams = getFormJson("searchForm");
queryParams.limit = params.limit;
queryParams.offset = params.offset;
return queryParams;
},
// //请求服务器数据时,你可以通过重写参数的方式添加一些额外的参数,例如 toolbar 中的参数 如果
// queryParamsType = 'limit' ,返回参数必须包含
// limit, offset, search, sort, order 否则, 需要包含:
// pageSize, pageNumber, searchText, sortName,
// sortOrder.
// 返回false将会终止请求
responseHandler: function (rs) {
if (rs.code == 0) {
return rs.data;
} else {
parent.layer.alert(rs.msg)
return {total: 0, rows: []};
}
},
columns: [
{
checkbox: true
},
{
title: '序号',
formatter: function () {
return arguments[2] + 1;
}
},
{
field: 'catName',
title: '分类名'
},
{
field: 'sourceName',
title: '来源'
},
{
field: 'title',
title: '标题'
},
{
field: 'createTime',
title: '发布时间'
},
{
title: '操作',
field: 'id',
align: 'center',
formatter: function (value, row, index) {
var d = '<a class="btn btn-primary btn-sm ' + s_detail_h + '" href="#" mce_href="#" title="详情" onclick="detail(\''
+ row.id
+ '\')"><i class="fa fa-file"></i></a> ';
var e = '<a class="btn btn-primary btn-sm ' + s_edit_h + '" href="#" mce_href="#" title="编辑" onclick="edit(\''
+ row.id
+ '\')"><i class="fa fa-edit"></i></a> ';
var r = '<a class="btn btn-warning btn-sm ' + s_remove_h + '" href="#" title="删除" mce_href="#" onclick="remove(\''
+ row.id
+ '\')"><i class="fa fa-remove"></i></a> ';
return e + r;
}
}]
});
}
function reLoad() {
$('#exampleTable').bootstrapTable('refresh');
}
function add() {
layer.open({
type: 2,
title: '增加',
maxmin: true,
shadeClose: false, // 点击遮罩关闭层
area: ['800px', '520px'],
content: prefix + '/add' // iframe的url
});
}
function detail(id) {
layer.open({
type: 2,
title: '详情',
maxmin: true,
shadeClose: false, // 点击遮罩关闭层
area: ['800px', '520px'],
content: prefix + '/detail/' + id // iframe的url
});
}
function edit(id) {
layer.open({
type: 2,
title: '编辑',
maxmin: true,
shadeClose: false, // 点击遮罩关闭层
area: ['800px', '520px'],
content: prefix + '/edit/' + id // iframe的url
});
}
function remove(id) {
layer.confirm('确定要删除选中的记录?', {
btn: ['确定', '取消']
}, function () {
$.ajax({
url: prefix + "/remove",
type: "post",
data: {
'id': id
},
success: function (r) {
if (r.code == 0) {
layer.msg(r.msg);
reLoad();
} else {
layer.msg(r.msg);
}
}
});
})
}
function resetPwd(id) {
}
function batchRemove() {
var rows = $('#exampleTable').bootstrapTable('getSelections'); // 返回所有选择的行,当没有选择的记录时,返回一个空数组
if (rows.length == 0) {
layer.msg("请选择要删除的数据");
return;
}
layer.confirm("确认要删除选中的'" + rows.length + "'条数据吗?", {
btn: ['确定', '取消']
// 按钮
}, function () {
var ids = new Array();
// 遍历所有选择的行数据取每条数据对应的ID
$.each(rows, function (i, row) {
ids[i] = row['id'];
});
$.ajax({
type: 'POST',
data: {
"ids": ids
},
url: prefix + '/batchRemove',
success: function (r) {
if (r.code == 0) {
layer.msg(r.msg);
reLoad();
} else {
layer.msg(r.msg);
}
}
});
}, function () {
});
}

View File

@ -0,0 +1,18 @@
-- 菜单SQL
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES ('1', '新闻类别表', 'novel/category', 'novel:category:category', '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:category:detail', '2', null, '6';
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
SELECT @parentId, '新增', null, 'novel:category:add', '2', null, '6';
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
SELECT @parentId, '修改', null, 'novel:category:edit', '2', null, '6';
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
SELECT @parentId, '删除', null, 'novel:category:remove', '2', null, '6';
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
SELECT @parentId, '批量删除', null, 'novel:category:batchRemove', '2', null, '6';

View File

@ -0,0 +1,18 @@
-- 菜单SQL
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
VALUES ('1', '新闻表', 'novel/news', 'novel:news:news', '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:news:detail', '2', null, '6';
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
SELECT @parentId, '新增', null, 'novel:news:add', '2', null, '6';
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
SELECT @parentId, '修改', null, 'novel:news:edit', '2', null, '6';
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
SELECT @parentId, '删除', null, 'novel:news:remove', '2', null, '6';
INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`)
SELECT @parentId, '批量删除', null, 'novel:news:batchRemove', '2', null, '6';

View File

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-content">
<form class="form-horizontal m-t" id="signupForm">
<div class="form-group">
<label class="col-sm-3 control-label">分类名:</label>
<div class="col-sm-3">
<input id="name" name="name"
class="form-control"
type="text" maxlength="10">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">排序:</label>
<div class="col-sm-2">
<input id="sort" name="sort"
class="form-control"
type="number" maxlength="2">
</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/category/add.js">
</script>
</body>
</html>

View File

@ -0,0 +1,57 @@
<!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:category:add" type="button"
class="btn btn-primary" onclick="add()">
<i class="fa fa-plus" aria-hidden="true"></i>添加
</button>
<button shiro:hasPermission="novel:category:batchRemove" type="button"
class="btn btn-danger"
onclick="batchRemove()">
<i class="fa fa-trash" aria-hidden="true"></i>删除
</button>
</div>
</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:category:edit">
<script type="text/javascript">
s_edit_h = '';
</script>
</div>
<div shiro:hasPermission="novel:category: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/category/category.js"></script>
</body>
</html>

View File

@ -0,0 +1,80 @@
<!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="${category.id}"
type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">分类名:</label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${category.name}">
</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="${category.sort}">
</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="${category.createUserId}">
</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="${category.createTime}==null?null:${#dates.format(category.createTime,'yyyy-MM-dd HH:mm:ss')}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div style="padding-top:8px" class="col-sm-8"
th:text="${category.updateUserId}">
</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="${category.updateTime}==null?null:${#dates.format(category.updateTime,'yyyy-MM-dd HH:mm:ss')}">
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div th:include="include::footer"></div>
</body>
</html>

View File

@ -0,0 +1,48 @@
<!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="${category.id}"
type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">分类名:</label>
<div class="col-sm-3">
<input id="name" name="name"
th:value="${category.name}"
class="form-control"
type="text" maxlength="10">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">排序:</label>
<div class="col-sm-2">
<input id="sort" name="sort"
th:value="${category.sort}"
class="form-control"
type="number" maxlength="2">
</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/category/edit.js">
</script>
</body>
</html>

View File

@ -0,0 +1,105 @@
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-content">
<form class="form-horizontal m-t" id="signupForm">
<div class="form-group">
<label class="col-sm-3 control-label">类别:</label>
<div class="col-sm-3">
<select data-placeholder="--选择--" id="catId"
name="catId"
class="form-control chosen-select" tabindex="2"
>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-8">
<input type="hidden" id="catName" name="catName"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">来源:</label>
<div class="col-sm-3">
<input id="sourceName" name="sourceName"
class="form-control"
type="text" maxlength="10">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">标题:</label>
<div class="col-sm-8">
<input id="title" name="title"
class="form-control"
type="text" maxlength="30">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">内容:</label>
<div class="col-sm-8">
<input type="hidden" id="content" name="content"/>
<div id="contentEditorcontent">
</div>
</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/news/add.js">
</script>
<script>
$.ajax({
type: "GET",
url: "/novel/category/list",
data: {limit:100,offset:0},
success: function (r) {
if (r.code == 0) {
var list = r.data.rows;
var catHtml = "<option>请选择</option>";
for(var i = 0 ; i < list.length ; i++){
var cat = list[i];
catHtml += ("<option value='"+cat.id+"'>"+cat.name+"</option>");
}
$("#catId").html(catHtml);
$("#catId").change(function(){
var catName = $(this).find("option:selected").text();
if(catName != '请选择'){
$("#catName").val(catName);
}else{
$("#catName").val('');
}
});
} else {
layer.msg(r.msg);
}
},
});
</script>
</body>
</html>

View File

@ -0,0 +1,108 @@
<!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="${news.id}"
type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">类别ID</label>
<div style="padding-top:8px" class="col-sm-8 dict-type" dict-type="${column.dictType}"
th:attr="dict-value=${news.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="${news.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="${news.sourceName}">
</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="${news.title}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">内容:</label>
<div style="padding-top:8px" class="col-sm-8"
th:utext="${news.content}"></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="${news.createTime}==null?null:${#dates.format(news.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="${news.createUserId}">
</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="${news.updateTime}==null?null:${#dates.format(news.updateTime,'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="${news.updateUserId}">
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div th:include="include::footer"></div>
</body>
</html>

View File

@ -0,0 +1,109 @@
<!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="${news.id}"
type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">类别:</label>
<div class="col-sm-3">
<select data-placeholder="--选择--" id="catId"
name="catId"
class="form-control chosen-select" tabindex="2"
th:value="${news.catId}">
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-8">
<input type="hidden" id="catName" name="catName" th:value="${news.catName}"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">来源:</label>
<div class="col-sm-3">
<input id="sourceName" name="sourceName"
th:value="${news.sourceName}"
class="form-control"
type="text" maxlength="10">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">标题:</label>
<div class="col-sm-8">
<input id="title" name="title"
th:value="${news.title}"
class="form-control"
type="text" maxlength="30">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">内容:</label>
<div class="col-sm-8">
<input type="hidden" id="content" name="content" th:value="${news.content}"/>
<div id="contentEditorcontent">
</div>
</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/news/edit.js">
</script>
<script>
$.ajax({
type: "GET",
url: "/novel/category/list",
data: {limit:100,offset:0},
success: function (r) {
if (r.code == 0) {
var list = r.data.rows;
var catHtml = "<option>请选择</option>";
for(var i = 0 ; i < list.length ; i++){
var cat = list[i];
if(cat.id == $("#catId").attr("value")){
catHtml += ("<option selected value='"+cat.id+"'>"+cat.name+"</option>");
}else{
catHtml += ("<option value='"+cat.id+"'>"+cat.name+"</option>");
}
}
$("#catId").html(catHtml);
$("#catId").change(function(){
var catName = $(this).find("option:selected").text();
if(catName != '请选择'){
$("#catName").val(catName);
}else{
$("#catName").val('');
}
});
} else {
layer.msg(r.msg);
}
},
});
</script>
</body>
</html>

View File

@ -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:news:add" type="button"
class="btn btn-primary" onclick="add()">
<i class="fa fa-plus" aria-hidden="true"></i>添加
</button>
<button shiro:hasPermission="novel:news: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="title" name="title" 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:news:edit">
<script type="text/javascript">
s_edit_h = '';
</script>
</div>
<div shiro:hasPermission="novel:news: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/news/news.js"></script>
</body>
</html>

View File

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

View File

@ -23,11 +23,12 @@ spring:
#连接超时时间毫秒
timeout: 30000
datasource:
url: jdbc:mysql://127.0.0.1:3306/novel_plus?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
url: jdbc:mysql://127.0.0.1:3306/novel_biz?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
username: root
password: test123456
driver-class-name: com.mysql.cj.jdbc.Driver
####使用shardingJdbc时
####所有的jdbcType都不能是LONGVARCHAR,否则会导致java.io.NotSerializableException: java.io.StringReader错误
##### 应该替换所有的 LONGVARCHAR 类型为VARCHAR

View File

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

View File

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

View File

@ -1508,9 +1508,9 @@ a cite {
.layui-elem-quote {
margin-bottom: 10px;
padding: 15px;
padding: 8px;
line-height: 22px;
border-left: 5px solid #009688;
border-left: 5px solid #f80;
border-radius: 0 2px 2px 0;
background-color: #f2f2f2
}
@ -1596,7 +1596,6 @@ a cite {
.layui-colla-content, .layui-colla-item {
border-top-width: 1px;
border-top-style: solid
}
.layui-colla-item:first-child {
@ -1714,7 +1713,7 @@ a cite {
}
.layui-bg-cyan {
background-color: #2F4056 !important
background-color: #f80 !important
}
.layui-bg-blue {
@ -1788,7 +1787,7 @@ a cite {
height: 38px;
line-height: 38px;
padding: 0 18px;
background-color: #009688;
background-color: #f80;
color: #fff;
white-space: nowrap;
text-align: center;
@ -2700,7 +2699,7 @@ a cite {
padding: 1px;
width: 100%;
height: 100%;
background-color: #009688
background-color: #f80
}
.layui-laypage-em {
@ -3490,7 +3489,7 @@ body .layui-table-tips .layui-layer-content {
.layui-nav {
position: relative;
padding: 0 20px;
background-color: #393D49;
background-color: #f80;
color: #fff;
border-radius: 2px;
font-size: 0;
@ -3514,7 +3513,6 @@ body .layui-table-tips .layui-layer-content {
display: block;
padding: 0 20px;
color: #fff;
color: rgba(255, 255, 255, .7);
transition: all .3s;
-webkit-transition: all .3s
}
@ -3525,7 +3523,7 @@ body .layui-table-tips .layui-layer-content {
top: 0;
width: 0;
height: 5px;
background-color: #5FB878;
background-color: rgba(255, 255, 255, 0.8);;
transition: all .2s;
-webkit-transition: all .2s
}
@ -3606,8 +3604,7 @@ body .layui-table-tips .layui-layer-content {
}
.layui-nav .layui-nav-child dd.layui-this a, .layui-nav-child dd.layui-this {
background-color: #5FB878;
color: #fff
background-color: #f80;
}
.layui-nav-child dd.layui-this:after {

File diff suppressed because one or more lines are too long

View File

@ -185,18 +185,18 @@
<div style="width:10%;float: left;margin-left: 10px">
<a href="javascript:history.go(-1)">
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon">&#xe65c;</i></a>
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe65c;</i></a>
</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:utext="${bookIndex.indexName}+' '+${book.bookName}"></b></a>
<div style="width:10%;float: right;margin-right: 10px"><a href="/">
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon">&#xe68e;</i>
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe68e;</i>
</a>
</div>
</div>
<p class="Readpage" style="background:#FFFFFF;padding:2px;">
<a id="lightdiv" class="button lighton" onclick="nr_setbg('light')">灯</a>
<a id="lightdiv" class="button lightoff" onclick="nr_setbg('light')">灯</a>
<a id="huyandiv" class="button huyanon" onclick="nr_setbg('huyan')">护眼</a>&nbsp;&nbsp;&nbsp;&nbsp;
字体:<a id="fontbig" class="sizebg" onclick="nr_setbg('big')">大</a> <a id="fontmiddle" class="button sizebgon"
onclick="nr_setbg('middle')">中</a> <a
@ -204,9 +204,9 @@
</p>
<div class="indexDiv" style="height: 42px;line-height: 42px;text-align:center;background: #f2f2f2">
<a th:href="${preBookIndexId!=0?'/book/'+book.id+'/'+preBookIndexId+'.html':'#'}">上一章</a>
<a th:href="'/book/indexList-'+${book.id}+'.html'">目录</a>
<a th:href="${nextBookIndexId!=0?'/book/'+book.id+'/'+nextBookIndexId+'.html':'#'}">下一章</a>
<a style="color: #333" th:href="${preBookIndexId!=0?'/book/'+book.id+'/'+preBookIndexId+'.html':'#'}">上一章</a>
<a style="color: #333" th:href="'/book/indexList-'+${book.id}+'.html'">目录</a>
<a style="color: #333" th:href="${nextBookIndexId!=0?'/book/'+book.id+'/'+nextBookIndexId+'.html':'#'}">下一章</a>
</div>
<!--<div id="screenInput" class="screen_toolbar" style="display: none">
<div style="height: 5px" class="layui-col-xs2 layui-col-sm3 layui-col-md3 layui-col-lg3"></div>
@ -230,13 +230,13 @@
<div th:replace="mobile/common/js :: js">
</div>
<div id="chaptercontent" class="Readarea ReadAjax_content screen_container"
style="color: rgb(0, 0, 0); font-size: 25px;" th:if="${!needBuy}">
style="color: rgb(0, 0, 0); font-size: 20px;" th:if="${!needBuy}">
<p style="width:100%;text-alight:center; overflow: auto;-webkit-overflow-scrolling:touch;" >&nbsp;&nbsp;&nbsp;&nbsp;
<span
th:utext="${bookContent.content}"></span></p>
</div>
<div class="Readarea ReadAjax_content screen_container"
style="color: rgb(0, 0, 0); font-size: 10px;background-color: #fff" th:if="${needBuy}">
style="color: rgb(0, 0, 0); font-size: 20px;background-color: #fff" th:if="${needBuy}">
<h5>此章为VIP章节需要订阅后才能继续阅读</h5>
价格:<span style="color: red" th:text="${bookIndex.bookPrice}+'屋币(1元=100屋币)'"></span><br/>
<a href="javascript:buyBookIndex()" type="button" class="layui-btn layui-btn-sm layui-btn-radius">购买</a>
@ -244,9 +244,9 @@
</div>
<div class="indexDiv" style="height: 42px;line-height: 42px;text-align:center;background: #f2f2f2">
<a th:href="${preBookIndexId!=0?'/book/'+book.id+'/'+preBookIndexId+'.html':'#'}">上一章</a>
<a th:href="'/book/indexList-'+${book.id}+'.html'">目录</a>
<a th:href="${nextBookIndexId!=0?'/book/'+book.id+'/'+nextBookIndexId+'.html':'#'}">下一章</a>
<a style="color: #333" th:href="${preBookIndexId!=0?'/book/'+book.id+'/'+preBookIndexId+'.html':'#'}">上一章</a>
<a style="color: #333" th:href="'/book/indexList-'+${book.id}+'.html'">目录</a>
<a style="color: #333" th:href="${nextBookIndexId!=0?'/book/'+book.id+'/'+nextBookIndexId+'.html':'#'}">下一章</a>
</div>

View File

@ -119,26 +119,26 @@
<div style="float: left;margin-left: 10px">
<a href="javascript:history.go(-1)">
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon">&#xe65c;</i></a>
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe65c;</i></a>
</div>
<b class="layui-icon" th:utext="${book.bookName}"></b>
<div style="float: right;margin-right: 10px">
<a href="/"><i style="font-size: 20px;color: #92B8B1;" class="layui-icon">&#xe68e;</i></a>
<a href="/"><i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe68e;</i></a>
</div>
</div>
<div class="layui-row" style="background: #f2f2f2">
<div style="padding: 10px" class="layui-col-xs4 layui-col-sm2 layui-col-md2 layui-col-lg2">
<img style=" width:auto; height:auto; max-width:100%; max-height:100%;" th:src="${book.picUrl}"/>
<div style="padding: 3px" class="layui-col-xs4 layui-col-sm2 layui-col-md2 layui-col-lg2">
<img style=" width:130px; height:auto; max-width:100%; max-height:100%;" th:src="${book.picUrl}"/>
</div>
<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: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>
<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 style="font-weight:bold;color: red" th:text="${book.score} + '分'"></i></div>
<div style="margin-top: 5px;color: #4c6978;">点击:<i style="font-weight:bold;color: red" th:text="${book.visitCount}"></i></div>
<div style="position:relative;padding: 3px 10px 0px" class="layui-col-xs8 layui-col-sm8 layui-col-md8 layui-col-lg8">
<a th:href="'javascript:searchBooks(\''+ ${book.authorName}+'\')'"><div style=";color: #444;" th:utext="'作者'+ ${book.authorName}"></div></a>
<a th:href="'/book/book_ranking.html?catId='+${book.catId}"><div style="margin-top: 5px;color: #444;" th:text="'类别'+ ${book.catName}"></div></a>
<div style="margin-top: 5px;color: #444;" th:text="'状态'+ ${book.bookStatus==0?'连载':'完结'}"></div>
<div style="margin-top: 5px;color: #444;">更新:<i th:text="${#dates.format(book.lastIndexUpdateTime, 'yy-MM-dd')}"></i></div>
<div style="margin-top: 5px;color: #444;">评分:<i style="font-weight:bold;color: red" th:text="${book.score} + '分'"></i></div>
<div style="margin-top: 5px;color: #444;">点击:<i style="font-weight:bold;color: red" th:text="${book.visitCount}"></i></div>
</div>
@ -155,7 +155,7 @@
<button type="button" onclick="downloadFile()" class="layui-btn layui-btn-sm layui-btn-radius layui-bg-normal">下载TXT</button>
-->
</div>
<p style="line-height: 23px;padding: 10px;font-size: 14px;color: #4c6978;" th:utext="${book.bookDesc}">
<p style="line-height: 23px;padding: 10px;font-size: 14px;color: #333;" th:utext="${book.bookDesc}">
</p>
@ -230,7 +230,7 @@
var indexListHtml = "";
for(var i = 0 ; i < data.data.length ; i++){
var bookIndex = data.data[i];
indexListHtml+=("<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;\"><a href=\"/book/"+$("#bookIdHidden").val()+"/"+bookIndex.id+".html\">"+bookIndex.indexName+"</a></p>");
indexListHtml+=("<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;\"><a href=\"/book/"+$("#bookIdHidden").val()+"/"+bookIndex.id+".html\" style='color: #333'>"+bookIndex.indexName+"</a></p>");
}
$("#indexList").html(indexListHtml);

View File

@ -46,11 +46,11 @@
<div style="float: left;margin-left: 10px">
<a href="javascript:history.go(-1)">
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon">&#xe65c;</i></a>
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe65c;</i></a>
</div>
<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">
<a href="/"><i style="font-size: 20px;color: #92B8B1;" class="layui-icon">&#xe68e;</i></a>
<a href="/"><i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe68e;</i></a>
</div>
</div>
@ -63,7 +63,7 @@
<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}">
<a th:href="'/book/'+${index.bookId}+'/'+${index.id}+'.html'" th:utext="${index.indexName}">
<a style="color:#333;" th:href="'/book/'+${index.bookId}+'/'+${index.id}+'.html'" th:utext="${index.indexName}">
</a>
</p>

View File

@ -81,11 +81,11 @@
<div style="float: left;margin-left: 10px">
<a href="javascript:history.go(-1)">
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon">&#xe65c;</i></a>
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe65c;</i></a>
</div>
<b class="layui-icon">小说列表</b>
<div style="float: right;margin-right: 10px">
<a href="/"><i style="font-size: 20px;color: #92B8B1;" class="layui-icon">&#xe68e;</i></a>
<a href="/"><i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe68e;</i></a>
</div>
</div>
@ -191,24 +191,24 @@
bookListHtml += ("<div class=\"layui-row\" style=\"margin-bottom:10px;padding:10px;background: #f2f2f2\">\n" +
" <a href=\"/book/"+book.id+".html\">\n" +
" <div class=\"layui-col-xs6 layui-col-sm3 layui-col-md2 layui-col-lg2\" style=\"text-align: center\">\n" +
" <img width='150' height='180' align=\"center\"\n" +
" <img style='width: 130px;height: 180px' align=\"center\"\n" +
" src=\""+book.picUrl+"\"/>\n" +
"\n" +
" </div>\n" +
" </a>\n" +
" <div style=\"padding: 10px\" class=\"layui-col-xs6 layui-col-sm8 layui-col-md8 layui-col-lg8\">\n" +
" <a href=\"/book/"+book.id+".html\">\n" +
" <div class=\"line-limit-length\" style=\";color: #4c6978;font-weight: bold;font-size: 15px\">"+book.bookName+"</div>\n" +
" <div class=\"line-limit-length\" style=\";color: #000;font-size: 15px\">"+book.bookName+"</div>\n" +
" </a>\n" +
" <div style=\";color: #4c6978;float: right;\"><i style=\"color: red\"></i></div>\n" +
" <a href=\"/book/book_ranking.html?keyword="+encodeURI(book.authorName)+"\">\n" +
" <div style=\";color: #4c6978;\" class=\"line-limit-length\">作者:"+book.authorName+"</div>\n" +
" <div style=\";color: #a6a6a6;\" class=\"line-limit-length\">作者:"+book.authorName+"</div>\n" +
" </a>\n" +
" <div style=\"margin-top: 5px;color: #4c6978;\">类别:"+book.catName+"</div>\n" +
" <div style=\"margin-top: 5px;color: #4c6978;\">状态:"+(book.bookStatus==0?'连载':'完结')+"</div>\n" +
" <div style=\"margin-top: 5px;color: #4c6978;\">更新:<i>"+book.lastIndexUpdateTime.substr(0,11)+"</i>\n" +
" <div style=\"margin-top: 5px;color: #a6a6a6;\">类别:"+book.catName+"</div>\n" +
" <div style=\"margin-top: 5px;color: #a6a6a6;\">状态:"+(book.bookStatus==0?'连载':'完结')+"</div>\n" +
" <div style=\"margin-top: 5px;color: #a6a6a6;\">更新:<i style='color: red'>"+book.lastIndexUpdateTime.substr(0,11)+"</i>\n" +
" </div>\n" +
" <div style=\"margin-top: 5px;color: #4c6978;\">简介:"+(book.bookDesc?(book.bookDesc.length>20?(book.bookDesc.substr(0,20)+"..."):book.bookDesc):book.bookDesc)+"</div>\n" +
" <div style=\"margin-top: 5px;color: #a6a6a6;\">简介:"+(book.bookDesc?(book.bookDesc.length>15?(book.bookDesc.substr(0,15)+"..."):book.bookDesc):book.bookDesc)+"</div>\n" +
"\n" +
"\n" +
" </div>\n" +

View File

@ -5,7 +5,7 @@
display: none;
}
@media (max-width: 360px) {
@media (max-width: 500px) {
.app {
display: block !important;
}
@ -15,7 +15,7 @@
display: block;
}
@media (max-width: 360px) {
@media (max-width: 500px) {
.pc {
display: none;
}

View File

@ -1,14 +1,14 @@
<div th:fragment="footer" style="height: 60px;line-height: 60px;text-align: center" class="layui-footer footer footer-demo layui-bg-cyan">
<!--<a href="/mobile/book/searchSoftBook.html" style="font-size: 14px;color: #92B8B1;">轻小说</a>
<a href="/mobile/book/searchSoftBook.html?catId=9" style="font-size: 14px;color: #92B8B1;margin-left: 8px">漫画</a>-->
<a href="/?to=pc" style="font-size: 14px;color: #92B8B1;margin-left: 8px">电脑站</a>
<a href="/user/read_history.html" style="font-size: 14px;color: #92B8B1;margin-left: 8px">阅读记录</a>
<a href="/user/favorites.html" style="font-size: 14px;color: #92B8B1;margin-left: 8px">书架</a>
<a href="/mobile/HotBook.apk" style="font-size: 14px;color: #92B8B1;margin-left: 8px">客户端</a>
<!--<a href="https://www.zinglizingli.xyz/me/index.html" style="font-size: 14px;color: #92B8B1;margin-left: 8px">开发者</a>-->
<!--<a href="/mobile/book/searchSoftBook.html" style="font-size: 14px;color: #fff;">轻小说</a>
<a href="/mobile/book/searchSoftBook.html?catId=9" style="font-size: 14px;color: #fff;margin-left: 8px">漫画</a>-->
<a href="/?to=pc" style="font-size: 14px;color: #fff;margin-left: 8px">电脑站</a>
<a href="/user/read_history.html" style="font-size: 14px;color: #fff;margin-left: 8px">阅读记录</a>
<a href="/user/favorites.html" style="font-size: 14px;color: #fff;margin-left: 8px">书架</a>
<a href="/mobile/HotBook.apk" style="font-size: 14px;color: #fff;margin-left: 8px">客户端</a>
<!--<a href="https://www.zinglizingli.xyz/me/index.html" style="font-size: 14px;color: #fff;margin-left: 8px">开发者</a>-->
<div style="float: right"><a href="#top"><i class="layui-icon"
style="margin-right:15px;font-size: 30px;color:#92B8B1 ">&#xe604;</i></a>
style="margin-right:15px;font-size: 30px;color:#fff ">&#xe604;</i></a>
</div>
</div>

View File

@ -146,8 +146,9 @@
<div style="height: 1px" class="layui-col-lg1"></div>
<div class="layui-collapse layui-col-lg10">
<div class="layui-colla-item">
<h2 class="layui-colla-title">本站推荐</h2>
<div class="layui-colla-content layui-show">
<blockquote class="layui-elem-quote" style="text-align: left;font-size: 16px">
精品推荐
</blockquote>
<div class="layui-container" style="padding: 0px">
@ -155,11 +156,11 @@
<div class="layui-row" style="text-align: center" id="currentWeek">
</div>
</div>
</div>
</div>
<div class="layui-colla-item">
<h2 class="layui-colla-title">热门小说推荐</h2>
<div class="layui-colla-content layui-show">
<blockquote class="layui-elem-quote" style="text-align: left;font-size: 16px">
热门推荐
</blockquote>
<div class="layui-container">
<div class="layui-row" id="hotRecBooks">
@ -190,7 +191,6 @@
</a>
</div>-->
</div>
</div>
</div>
@ -203,11 +203,11 @@
<div class="layui-colla-item layui-col-lg10"
style="border-width: 1px;border-style: solid;border-radius: 2px;border-top-width: 0px"><a
href="javascript:moreNewBooks()">
<h2 class="layui-colla-title">最更新小说
<div style="float: right; margin-right: 20px"><i style="font-size: 14px;"
<blockquote class="layui-elem-quote" style="text-align: left;color: #000;font-size: 16px">最更新
<div style="float: right; margin-right: 20px"><i style="font-size: 14px;color:#666"
class="layui-icon">更多&#xe65b;</i>
</div>
</h2>
</blockquote>
</a>
<div class="layui-colla-content layui-show">
@ -242,8 +242,8 @@
success: function (data) {
if (data.code == 200) {
//本周强推
var rightListBooks = data.data[2];
//精品推荐
var rightListBooks = data.data[4];
var rightListBooksHtml = "";
for (var i = 0; i < 3; i++) {
var rightListBook = rightListBooks[i];
@ -258,11 +258,11 @@
rightListBooksHtml += (" <span>\n" +
" <a href=\"/book/"+rightListBook.bookId+".html\">\n" +
" <div style=\"padding: 1%\" class=\"layui-col-xs4 layui-col-sm4 layui-col-md4 layui-col-lg4\">\n" +
" <img style=\" width:80%; height:auto; max-width:100%; max-height:100%;\"\n" +
" <img style=\" width:100px; height:125px; max-width:100%; max-height:100%;\"\n" +
" src=\""+rightListBook.picUrl+"\"/>\n" +
"\n" +
" <br/>\n" +
" <span>"+rightListBook.bookName+"</span>\n" +
" <span >"+(rightListBook.bookName.length>5?(rightListBook.bookName.substr(0,5)+'...'):rightListBook.bookName)+"</span>\n" +
"\n" +
" </div>\n" +
" </a>\n" +
@ -280,6 +280,8 @@
hotRecBook.bookDesc = hotRecBook.bookDesc.replace(/<[^>]+>/g,"").replace(/\s+/g,"");
}
//手机浏览器不支持String.replaceAll()方法
hotRecBooksHtml += ("<div style=\"margin-bottom: 5px\" class=\"layui-col-xs12 layui-col-sm6 layui-col-md4 layui-col-lg4\">\n" +
" <a href=\"/book/"+hotRecBook.bookId+".html\">\n" +
" <div class=\"layui-col-xs5 layui-col-sm4 layui-col-md4 layui-col-lg4\" >\n" +
@ -289,9 +291,9 @@
" </div>\n" +
" <div class=\"layui-col-xs5 layui-col-sm6 layui-col-md6 layui-col-lg6\">\n" +
" <ul>\n" +
" <li class=\"line-limit-length\" style=\"font-weight: bold\">"+hotRecBook.bookName+"</li>\n" +
" <li>作者:"+hotRecBook.authorName+"</li>\n" +
" <li style=\"width: 180px;height:40px;overflow: hidden\">简介:  "+hotRecBook.bookDesc+"" +
" <li style='padding-bottom: 2px' class=\"line-limit-length\" >"+hotRecBook.bookName+"</li>\n" +
" <li style='padding-bottom: 2px;color: #a6a6a6'>作者:"+hotRecBook.authorName+"</li>\n" +
" <li style=\"color: #a6a6a6;width: 180px;height:60px;overflow: hidden\">"+hotRecBook.bookDesc +
" </ul>\n" +
" </div>\n" +
" <div style=\"font-style: italic;color: red\"\n" +
@ -335,13 +337,13 @@
" class=\"layui-col-xs12 layui-col-sm6 layui-col-md6 layui-col-lg6\">\n" +
"\n" +
" <a href=\"/book/"+updateRankBook.id+".html\">\n" +
" <div class=\"line-limit-length layui-col-xs8 layui-col-sm6 layui-col-md6 layui-col-lg6\"><b>"+(i+1)+"."+updateRankBook.bookName+"</b> - <span class=\"layui-elip\">"+updateRankBook.authorName+"</span>\n" +
" <div class=\"line-limit-length layui-col-xs8 layui-col-sm6 layui-col-md6 layui-col-lg6\"><span '>"+(i+1)+"."+updateRankBook.bookName+"</span> - <span class=\"layui-elip\" style='color: #a6a6a6;'>"+updateRankBook.authorName+"</span>\n" +
" </div>\n" +
" <div class=\"layui-col-sm3 layui-col-md3 layui-col-lg3\"\n" +
" style=\"color: #FF5722;float: right;margin-right:5px\"><i>"+updateRankBook.lastIndexUpdateTime+"</i></div>\n" +
"\n" +
" <div style=\"clear: both\"></div>\n" +
" <div style=\"padding-left: 5px;padding-top: 5px\"\n" +
" <div style=\"color: #a6a6a6;padding-left: 5px;padding-top: 5px\"\n" +
" class=\"layui-elip layui-col-md11 layui-col-sm11 layui-col-lg11\">简介:  "+updateRankBook.bookDesc+"" +
" </div></a>\n" +
" </div>");

View File

@ -5,7 +5,7 @@
<groupId>com.java2nb</groupId>
<artifactId>novel</artifactId>
<version>2.10.0</version>
<version>3.0.2</version>
<modules>
<module>novel-common</module>
<module>novel-front</module>

32
sql/20201201.sql Normal file
View File

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

View File

@ -1869,4 +1869,39 @@ CREATE TABLE `author_income` (
alter table book add column `yesterday_buy` int(11) DEFAULT '0' COMMENT '昨日订阅数' after comment_count;
alter table book_index add column `book_price` int(3) DEFAULT 0 COMMENT '章节费用(屋币)' after `is_vip`;
alter table book_index add column `book_price` int(3) DEFAULT 0 COMMENT '章节费用(屋币)' after `is_vip`;
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (246, 241, '批量删除', NULL, 'novel:news:batchRemove', 2, NULL, 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (245, 241, '删除', NULL, 'novel:news:remove', 2, NULL, 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (244, 241, '修改', NULL, 'novel:news:edit', 2, NULL, 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (243, 241, '新增', NULL, 'novel:news:add', 2, NULL, 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (242, 241, '查看', NULL, 'novel:news:detail', 2, NULL, 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (241, 234, '新闻列表', 'novel/news', 'novel:news:news', 1, 'fa', 8, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (240, 235, '批量删除', NULL, 'novel:category:batchRemove', 2, NULL, 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (239, 235, '删除', NULL, 'novel:category:remove', 2, NULL, 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (238, 235, '修改', NULL, 'novel:category:edit', 2, NULL, 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (237, 235, '新增', NULL, 'novel:category:add', 2, NULL, 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (236, 235, '查看', NULL, 'novel:category:detail', 2, NULL, 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (235, 234, '类别管理', 'novel/category', 'novel:category:category', 1, 'fa', 6, NULL, NULL);
INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`, `gmt_create`, `gmt_modified`) VALUES (234, 0, '新闻管理', '', '', 0, 'fa fa-newspaper-o', 8, NULL, NULL);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4889, 1, 246);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4890, 1, 245);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4891, 1, 244);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4892, 1, 243);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4893, 1, 242);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4899, 1, 241);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4894, 1, 240);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4895, 1, 239);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4896, 1, 238);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4897, 1, 237);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4898, 1, 236);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4900, 1, 235);
INSERT INTO `sys_role_menu`(`id`, `role_id`, `menu_id`) VALUES (4888, 1, 234);
delete from sys_menu where menu_id = 202;