赞
踩
一、项目介绍
环境配置:
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,
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);
}
/**
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";
}
@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"; } // 添加作者的方法
* @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")
@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);
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){
// 登陆操作
/** * 批量删除 * @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);
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);
}
/**
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";
@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");
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。