当前位置:   article > 正文

基于javaweb+SpringBoot的在线电子书在线小说阅读系统(java+Layui+Springboot+Maven+mysql+HTML+FTP)_小说网站java开源项目

小说网站java开源项目

一、项目介绍

环境配置
Jdk1.8 + Tomcat8.5 + mysql + Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)

项目技术:
Layui+Springboot+ SpringMVC + HTML + FTP+ JavaScript + JQuery + Ajax + maven等等。请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

适用

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

}
 
图书订单管理控制层:
@Controller
public class BookOrderController {
    @Autowired
    private BookOrderService bookOrderService;
    @Autowired
    private BookService bookService;
    @RequestMapping("/bookorder/bookorderlist")
    public String bookorderlist(Model model,
                                @RequestParam(defaultValue = "1") Integer page,
                                @RequestParam(defaultValue = "3") Integer pageSize) {
        PageInfo<BookOrder> pageInfo = bookOrderService.list(page, pageSize);
//将数据转发到页面
        model.addAttribute("list", pageInfo.getList());
        model.addAttribute("pageInfo", pageInfo);
        return "bookorder/bookorder-list";
    }
    @RequestMapping("/bookorder/orderSearch")
    public String searchList(Model model,
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
        model.addAttribute("pageInfo",pageInfo);
        return "author/author-del";
    }
    //添加作者
    @RequestMapping("/author/addPage")
    public String addPage(){
        return "author/author-add";
    }
//    添加作者的方法
    @RequestMapping("/author/add")
    @ResponseBody
    public ResultData add(Author author){
        return authorService.add(author);
    }
    /**
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
    public String list(Model model,
                       @RequestParam(defaultValue = "1") Integer page,
                       @RequestParam(defaultValue = "3") Integer pageSize) {
        PageInfo<History> pageInfo=historyService.list(page,pageSize);
        model.addAttribute("list",pageInfo.getList());
        model.addAttribute("pageInfo",pageInfo);
        return "history/history-list";
    }
    //添加
    @RequestMapping("/history/addPage")
    public String addPage(){
        return "history/history-add";
    }
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
    @RequestMapping("/author/search")
    public String searchList(Model model,
                       @RequestParam(defaultValue = "1") Integer page,
                       @RequestParam(defaultValue = "5") Integer pageSize,
                             String keyword){
        PageInfo<Author> pageInfo = authorService.searchList(page, pageSize, keyword);
        model.addAttribute("list",pageInfo.getList());
        model.addAttribute("pageInfo",pageInfo);
        return "author/author-list";
    }
    //作者删除列表
    @RequestMapping("/author/deleteList")
    public String deleteList(Model model,
                       @RequestParam(defaultValue = "1") Integer page,
                       @RequestParam(defaultValue = "5") Integer pageSize){
        PageInfo<Author> pageInfo = authorService.DeleteList(page,pageSize);
        model.addAttribute("list",pageInfo.getList());
        model.addAttribute("pageInfo",pageInfo);
        return "author/author-del";
    }
    //添加作者
    @RequestMapping("/author/addPage")
    public String addPage(){
        return "author/author-add";
    }
//    添加作者的方法
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
     * @param readerStatus: 读者当前状态
     * @return
     */
    @RequestMapping("/reader/editStatus")
    @ResponseBody
    public ResultData editStatus(Integer readerId, Integer readerStatus){
        return readerService.updateStatus(readerId, readerStatus);
    }
    /**
     * 编辑读者
     * @param
     * @param
     * @return
     */
    @RequestMapping("/reader/editPage")
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
    @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<Author> 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,
                       @RequestParam(defaultValue = "5") Integer pageSize,
                             String keyword){
        PageInfo<Author> pageInfo = authorService.searchList(page, pageSize, keyword);
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
    public String duzhe(){
        return "loginreader";
    }
    @RequestMapping("/book/getByType?bookType=1")
    public String xiangqing(){
        return "front/personal";
    }
    /**
     * 登陆操作
     * @return
     */
    @RequestMapping("/loginreader")
    @ResponseBody
        public ResultData login1(Reader reader,HttpServletRequest request){
            // 登陆操作
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
    /**
     * 批量删除
     * @param ids
     * @return
     */
    @RequestMapping("/reader/deleteAll")
    @ResponseBody
    public ResultData deleteAll(@RequestParam(name = "ids") String ids){
//        将ids转换成数组
        String[] idArr=ids.split(",");
        return readerService.batchDelete(idArr);
    };
    /**
     * 批量恢复
     * @param ids
     * @return
     */
    @RequestMapping("/reader/huifuAll")
    @ResponseBody
    public ResultData huifuDelete(@RequestParam(name = "ids") String ids){
//        将ids转换成数组
        String[] idArr=ids.split(",");
        return readerService.huifuDelete(idArr);
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
        return "reader/reader-del";
    }
    //添加读者
    @RequestMapping("/reader/addPage")
    public String addPage(){
        return "front/register";
    }
//    添加读者的方法
    @RequestMapping("/reader/add")
    @ResponseBody
    public ResultData add(Reader reader){
        return readerService.add(reader);
    }
    /**
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
        return bookService.batchDelete(idArr);
    }
    //    search
    @RequestMapping("/book/search")
    public String searchList(Model model,
                             @RequestParam(defaultValue = "1") Integer page,
                             @RequestParam(defaultValue = "3") Integer pageSize,
                             String keyword) {
        PageInfo<Book> pageInfo=bookService.searchList(page,pageSize,keyword);
        model.addAttribute("list",pageInfo.getList());
        model.addAttribute("pageInfo",pageInfo);
        return  "book/book-list";
    }
    @RequestMapping("/book/search1")
    public String searchList1(Model model,
                             @RequestParam(defaultValue = "1") Integer page,
                             @RequestParam(defaultValue = "3") Integer pageSize,
                             String keyword1) {
        PageInfo<Book> pageInfo=bookService.searchList1(page,pageSize,keyword1);
        model.addAttribute("list",pageInfo.getList());
        model.addAttribute("pageInfo",pageInfo);
        return  "book/book-list";
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
                             @RequestParam(defaultValue = "3") Integer pageSize,
                             String keyword1) {
        PageInfo<Book> pageInfo=bookService.searchList1(page,pageSize,keyword1);
        model.addAttribute("list",pageInfo.getList());
        model.addAttribute("pageInfo",pageInfo);
        return  "book/book-list";
    }
    @RequestMapping(value = "/book/getByType",method = RequestMethod.GET)
    public String getByType(Integer bookType, Model model, HttpSession session){
        List<Book> bookList = bookService.findByType(bookType);
        List<Book> randList = bookService.findRandList();
        //将字符串数组转为int数组
        session.setAttribute("bookList",bookList);
        session.setAttribute("randList",randList);
        return "/front/personal";
    }
    @RequestMapping(value = "/book/getByName",method = RequestMethod.POST)
    public String getByName(String likeName, Model model, HttpSession session) throws UnsupportedEncodingException {
       // String likeName1 = new String(likeName.getBytes("ISO-8859-1"),"utf-8");
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/715237
推荐阅读
相关标签
  

闽ICP备14008679号