栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

基于javaweb+jsp的小说在线阅读系统(前台阅读+后台管理)(java+SSM+jsp+mysql+maven)

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

基于javaweb+jsp的小说在线阅读系统(前台阅读+后台管理)(java+SSM+jsp+mysql+maven)

基于javaweb+jsp的小说在线阅读系统(前台阅读+后台管理)(java+SSM+jsp+mysql+maven)
一、项目简述
功能包括(管理员和游客角色):

1:用户及主要操作功能 游客可以浏览网站的主页,但是需要注册为会员后部分小 说才能对网络小说进免费行阅读或阅读。用户可以收藏书 架,留言评论,上次阅读,阅读历史,章节选择等等功 能。

2:管理模块 网络小说管理模块包括不同网络小说类别的添加,删除以 及网络小说的上传,删除管理。可以包括武侠小书,都市 言情,穿越小书等各个类等等功能。

二、项目运行
环境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe (IntelliJ IDEA,Eclispe,MyEclispe,Sts 都支持)

项目技术: JSP +Spring + SpringMVC + MyBatis + html+ css + JavaScript + JQuery + Ajax等等。





适用

课程设计,大作业,毕业设计,项目练习,学习演示等

    @RequestMapping("/book/list")
    public String list(Model model,
                       @RequestParam(defaultValue = "1") Integer page,
                       @RequestParam(defaultValue = "3") Integer pageSize) {
        PageInfo pageInfo=bookService.list(page,pageSize);
        model.addAttribute("list",pageInfo.getList());
        model.addAttribute("pageInfo",pageInfo);
        return "book/book-list";
    }
    //小说添加
    @RequestMapping("/book/addPage")
    public String addPage() {
        return "book/book-add";
    }
//
//    //    添加小说
    @RequestMapping("/book/add")
    @ResponseBody
        session.setAttribute("randList",randList);
        return "/front/personal";
    }
}
角色控制层:
@Controller
public class AuthorController {
    @Autowired
    private AuthorService authorService;
    @RequestMapping("/zuozhe")
    public String duzhe(){
        return "loginauthor";
    }
    @RequestMapping("/zuoping")
    public String zuoping(){
        return "index11";
    }
    public String list(Model model,
                       @RequestParam(defaultValue = "1") Integer page,
                       @RequestParam(defaultValue = "3") Integer pageSize) {
        PageInfo pageInfo=bookService.list(page,pageSize);
        model.addAttribute("list",pageInfo.getList());
        model.addAttribute("pageInfo",pageInfo);
        return "book/book-list";
    }
    //小说添加
    @RequestMapping("/book/addPage")
    public String addPage() {
        return "book/book-add";
    }
//
//    //    添加小说
    @RequestMapping("/book/add")
    @ResponseBody
    public ResultData add(Book book) {
    @ResponseBody
    public ResultData login2(Author author){
        ResultData resultData=authorService.login2(author);
        return resultData;
    }
    //作者列表
    @RequestMapping("/author/list")
    public String list(Model model,
                       @RequestParam(defaultValue = "1") Integer page,
                       @RequestParam(defaultValue = "5") Integer pageSize){
        PageInfo pageInfo = authorService.list(page,pageSize);
        model.addAttribute("list",pageInfo.getList());
        model.addAttribute("pageInfo",pageInfo);
        return "author/author-list";
    }
    //搜索作者显示列表
    @RequestMapping("/author/search")
    public String searchList(Model model,
                       @RequestParam(defaultValue = "1") Integer page,
    }
    
    @RequestMapping("/loginauthor")
    @ResponseBody
    public ResultData login2(Author author){
        ResultData resultData=authorService.login2(author);
        return resultData;
    }
    //作者列表
    @RequestMapping("/author/list")
    public String list(Model model,
                       @RequestParam(defaultValue = "1") Integer page,
                       @RequestParam(defaultValue = "5") Integer pageSize){
        PageInfo pageInfo = authorService.list(page,pageSize);
        model.addAttribute("list",pageInfo.getList());
        model.addAttribute("pageInfo",pageInfo);
        return "author/author-list";
    }
    //搜索作者显示列表
    @RequestMapping("/author/search")
//    编辑页面
    @RequestMapping("/book/editPage")
    public String editPage(Model model, Integer bookId){
        Book dbBook = bookService.findById(bookId);
        model.addAttribute("book",dbBook);
        return "book/book-edit";
    }
//更新基本信息
    @RequestMapping("/book/edit")
    @ResponseBody
    public ResultData edit(Book book){
        return  bookService.edit(book);
    }
//    批量删除
    @RequestMapping("/book/deleteAll")
    @ResponseBody
    public ResultData deleteAll(@RequestParam(name="ids") String ids){
        //将ids转为数组
        String[] idArr = ids.split(",");
        //将字符串数组转为int数组
        return bookService.batchDelete(idArr);
    }
    //    search
    @RequestMapping("/book/search")
    public String searchList(Model model,
                             @RequestParam(defaultValue = "1") Integer page,
                             @RequestParam(defaultValue = "3") Integer pageSize,
        return "book/book-add";
    }
//
//    //    添加小说
    @RequestMapping("/book/add")
    @ResponseBody
    public ResultData add(Book book) {
       return bookService.add(book);
    }
//    编辑小说状态
    @RequestMapping("/book/editCondition")
    @ResponseBody
    public ResultData editCondition(Integer bookId, Integer condition){
    @RequestMapping("/author/add")
    @ResponseBody
    public ResultData add(Author author){
        return authorService.add(author);
    }
    
    @RequestMapping("/author/editStatus")
    @ResponseBody
    public ResultData editStatus(Integer authorId, Integer authorStatus){
        return authorService.updateStatus(authorId, authorStatus);
    }
    /**
     * 编辑作者
     * @param
     * @param
    }
//    编辑小说状态
    @RequestMapping("/book/editCondition")
    @ResponseBody
    public ResultData editCondition(Integer bookId, Integer condition){
        return bookService.updateStatus(bookId,condition);
    }
//    编辑页面
    @RequestMapping("/book/editPage")
    public String editPage(Model model, Integer bookId){
        Book dbBook = bookService.findById(bookId);
        model.addAttribute("book",dbBook);
        return "book/book-edit";
    }
//更新基本信息
    @RequestMapping("/book/edit")
    @ResponseBody
    public ResultData edit(Book book){
        return  bookService.edit(book);
    }
//    批量删除
    @RequestMapping("/book/deleteAll")
    @ResponseBody
        return rechargeOrderService.batchDelete(idArr);
    }
    @RequestMapping("/rechargeorder/delete")
    @ResponseBody
    public  ResultData delete(Integer rechargeId,Integer rechargeStatus){
        return  rechargeOrderService.delete(rechargeId,rechargeStatus);
    }
}
书籍管理控制层:
@Controller
public class BookController {
    @Autowired
    private BookService bookService;
//    @Autowired
//    private BookService bookService;
    //小说列表
    @RequestMapping("/book/list")
    public String list(Model model,
                       @RequestParam(defaultValue = "1") Integer page,
                       @RequestParam(defaultValue = "3") Integer pageSize) {
        PageInfo pageInfo=bookService.list(page,pageSize);
        model.addAttribute("list",pageInfo.getList());
        model.addAttribute("pageInfo",pageInfo);
        return "book/book-list";
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/826801.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号