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

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

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

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

功能说明

20220519001449

20220519001450

20220519001451

20220519001452

20220519001454

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

一、项目简述

功能包括(管理员和游客角色):

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

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

二、项目运行

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

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

书籍管理控制层:

@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”;

//小说添加

@RequestMapping(“/book/addPage”)

public String addPage() {

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){

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

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,

String keyword) {

PageInfo 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 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 bookList = bookService.findByType(bookType);

List 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”);

List bookList = bookService.findByLikeName(likeName);

List randList = bookService.findRandList();

//将字符串数组转为int数组

session.setAttribute(“bookList”,bookList);

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”;

/**

  • 登陆操作

  • @return

*/

@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”)

public String searchList(Model model,

@RequestParam(defaultValue = “1”) Integer page,

@RequestParam(defaultValue = “5”) Integer pageSize,

String keyword){

PageInfo 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 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”;

// 添加作者的方法

@RequestMapping(“/author/add”)

@ResponseBody

public ResultData add(Author author){

return authorService.add(author);

/**

  • 编辑作者状态信息

  • @param authorId : 当前作者Id

  • @param authorStatus: 作者当前状态

  • @return

*/

@RequestMapping(“/author/editStatus”)

@ResponseBody

public ResultData editStatus(Integer authorId, Integer authorStatus){

return authorService.updateStatus(authorId, authorStatus);

/**

  • 编辑作者

  • @param

  • @param

  • @return

*/

@RequestMapping(“/author/editPage”)

public String editPage(Model model, Integer authorId){

Author dbreadder = authorService.findById(authorId);

model.addAttribute(“author”,dbreadder);

return “author/author-edit”;

/**

  • 更新作者基本信息的方法

  • @param author

  • @return

*/

@RequestMapping(“/author/edit”)

@ResponseBody

public ResultData edit(Author author){

return authorService.edit(author);

/**

  • 批量删除

  • @param ids

  • @return

*/

@RequestMapping(“/author/deleteAll”)

@ResponseBody

public ResultData deleteAll(@RequestParam(name = “ids”) String ids){

// 将ids转换成数组

String[] idArr=ids.split(“,”);

return authorService.batchDelete(idArr);

};

/**

  • 批量恢复

  • @param ids

  • @return

*/

@RequestMapping(“/author/huifuAll”)

@ResponseBody

public ResultData huifuDelete(@RequestParam(name = “ids”) String ids){

// 将ids转换成数组

String[] idArr=ids.split(“,”);

return authorService.huifuDelete(idArr);

};

@RequestMapping(“/author/delete”)

@ResponseBody

public ResultData deleteAuthor(Integer authorId, Integer authorStatus){

return authorService.deleteauthor(authorId,authorStatus);

订单业务控制层:

@Controller

public class RechargeOrderController{

@Autowired

private RechargeOrderService rechargeOrderService;

@RequestMapping(“/rechargeorder/rechargeorderlist”)

public String rechargeorderlist(Model model,

@RequestParam(defaultValue = “1”) Integer page,

@RequestParam(defaultValue = “3”) Integer pageSize) {

PageInfo pageInfo = rechargeOrderService.list(page, pageSize);

//将数据转发到页面

model.addAttribute(“list”, pageInfo.getList());

model.addAttribute(“pageInfo”, pageInfo);

return “rechargeorder/rechargeorder-list”;

@RequestMapping(“/rechargeorder/search”)

public String rechargeSearchList(Model model,

@RequestParam(defaultValue = “1”) Integer page,

@RequestParam(defaultValue = “3”) Integer pageSize,

String keyword) {

PageInfo pageInfo = rechargeOrderService.searchList(page, pageSize,keyword);

//将数据转发到页面

model.addAttribute(“list”, pageInfo.getList());

model.addAttribute(“pageInfo”, pageInfo);

return “rechargeorder/rechargeorder-list”;

@RequestMapping(“/rechargeorder/rechargeorderadd”)

public String rechargeorderadd() {

return “rechargeorder/rechargeorder-add”;

@RequestMapping(“/rechargeorder/add”)

@ResponseBody

public ResultData add(RechargeOrder rechargeOrder) {

return rechargeOrderService.add(rechargeOrder);

@RequestMapping(“/rechargeorder/editStatus”)

@ResponseBody

public ResultData editStatus(Integer id, Integer status) {

return rechargeOrderService.updateStatus(id,status);

@RequestMapping(“/rechargeorder/deleteAll”)

@ResponseBody

public ResultData deleteAll(@RequestParam(name = “ids”) String ids){

// 将ids转换成数组

String[] idArr = ids.split(“,”);

return rechargeOrderService.batchDelete(idArr);

@RequestMapping(“/rechargeorder/delete”)

@ResponseBody

public ResultData delete(Integer rechargeId,Integer rechargeStatus){

return rechargeOrderService.delete(rechargeId,rechargeStatus);


  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
网选课系统是一个非常实用的系统,可以方便学生进行选课操作,也可以方便教师进行课程管理。下面是一个基于JavaWeb的网上选课系统的设计思路: 1. 系统架构 该系统采用 B/S 架构,即浏览器/服务器架构。前端使用 HTML、CSS、JavaScript 和 JQuery,后端使用 Java+SSM 框架和 MySQL 数据库。 2. 系统功能 (1)学生模块:学生可以登录系统后进行选课操作,查看已选课程,并对已选课程进行退选操作。 (2)教师模块:教师可以登录系统后进行课程管理操作,包括添加课程、修改课程、删除课程等操作。 (3)管理员模块:管理员可以登录系统后对学生和教师进行管理,包括添加学生、添加教师、修改学生信息、修改教师信息等操作。 (4)公告管理管理员可以发布公告,学生和教师可以浏览公告。 (5)选课规则管理管理员可以设置选课规则,例如每个学生最多选择多少门课程,每门课程最多选多少人等。 3. 数据库设计 该系统需要设计以下数据库表: (1)学生表:包括学生编号、学生姓名、学生性别、学生年龄、所在班级等字段。 (2)教师表:包括教师编号、教师姓名、教师性别、所教课程、教龄等字段。 (3)课程表:包括课程编号、课程名称、授课教师、上课时间、选课人数等字段。 (4)选课记录表:包括学生编号、课程编号等字段。 (5)公告表:包括公告编号、公告内容、发布时间等字段。 4. 技术实现 该系统采用 Java+SSM 框架进行实现,其中: (1)后端技术:采用 SpringMVC 框架进行控制器的开发,采用 MyBatis 框架进行数据库操作。 (2)前端技术:采用 HTML、CSS、JavaScript 和 JQuery 进行页面布局和交互效果的实现。 (3)数据库技术:采用 MySQL 数据库进行数据存储和管理。 5. 总结 网上选课系统是一个非常实用的系统,它可以方便学生进行选课操作,也可以方便教师进行课程管理。该系统采用 B/S 架构,采用 Java+SSM 框架进行开发,实现了学生模块、教师模块、管理员模块、公告管理和选课规则管理等功能。在实现时需要注意数据库表的设计和技术实现。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值