基于javaweb+mysql的ssm推荐算法书城系统(java+ssm+jsp+js+jquery+layui+mysql)

基于javaweb+mysql的ssm推荐算法书城系统(java+ssm+jsp+js+jquery+layui+mysql)

私信源码获取及调试交流

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

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

适用

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

功能说明

基于javaweb的SSM推荐算法书城系统(java+ssm+jsp+js+jquery+layui+mysql)

项目介绍

角色:管理员、用户

用户登陆后,主要模块包括首页、热卖图书、公告信息、个人中心、后台管理、购物车、在线客服等功能

管理员登陆后,主要模块包括个人中心、用户管理、图书类型管理、热卖图书管理、管理员管理、系统管理、订单管理等功能

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.是否Maven项目: 否;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目; 6.数据库:MySql 5.7/8.0等版本均可;

技术栈

后端:SSM(Spring+SpringMVC+Mybatis) 前端:JSP+CSS+JS+JQUERY+Layui

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,修改配置,运行项目;

//        获取供应商

List<Supplier> supplierList = iSupplierService.findAllSupplier(1,100);

model.addAttribute("supplierList", supplierList);

//        获取图书

List<Books> booksList = iBookService.findAllBook(num,size);

PageInfo<Books> booksPageInfo = new PageInfo<>(booksList);

model.addAttribute("booksPageInfo", booksPageInfo);

return "/backstage/home";

/**

* 图书列表

* @param model


图书管理控制层:

@Controller

@RequestMapping("/book")

@SessionAttributes({"bookTypeList"})

public class BookController {

@Autowired

private IBookTypeService iBookTypeService;

@Autowired

private IBookService iBookService;

@Autowired

private ISupplierService iSupplierService;


return i;

订单管理控制层:

@Controller

@RequestMapping("/shopping")

public class ShoppingController {

@Autowired

private IShoppingService iShoppingService;

@Autowired

private IOrderFormService iOrderFormService;

/**

* 添加购物车或修改购物车已有图书商品
* 管理员通过Id查询图书详情

* @param id

* @param model

* @return

*/

@GetMapping("/adminfindById/{id}")

public String adminfindById(@PathVariable Integer id,Model model) {

//        获取供应商

List<Supplier> supplierList = iSupplierService.findAllSupplier(1,100 );

model.addAttribute("supplierList", supplierList);


*/

@GetMapping("/findAllOrderForm")

public String findAllOrderForm(

@RequestParam(defaultValue = "1") Integer num,

@RequestParam(defaultValue = "5") Integer size,

Model model) {

List<OrderForm> orderFormList = iOrderFormService.findAllOrderForm(num,size);

PageInfo<OrderForm> orderFormPageInfo = new PageInfo<>(orderFormList);

model.addAttribute("orderFormPageInfo",orderFormPageInfo);

return "/backstage/order_form";

/**


* @return

*/

@GetMapping("/adminfindById/{id}")

public String adminfindById(@PathVariable Integer id,Model model) {

//        获取供应商

List<Supplier> supplierList = iSupplierService.findAllSupplier(1,100 );

model.addAttribute("supplierList", supplierList);

//        获取图书详情

Books books = iBookService.findById(id);

model.addAttribute("books",books);


Model model

) {

List<Shopping> shoppingList = iShoppingService.findByUid(uid,num,size);

PageInfo<Shopping> shoppingPageInfo = new PageInfo<>(shoppingList);

model.addAttribute("shoppingPageInfo", shoppingPageInfo);

return "/frontdesk/shopping";

/**

* 移除购物车某一图书商品

* @param id

* @return

*/


PageInfo<Books> booksPageInfo = new PageInfo<>(booksList);

model.addAttribute("booksPageInfo", booksPageInfo);

model.addAttribute("tid",tid);

return "/frontdesk/home";

@PostMapping("/deleteBook/{id}")

public @ResponseBody int deleteBook(@PathVariable("id") Integer id) {

int i = iBookService.deleteBook(id);

return i;

订单管理控制层: 

@Controller

@RequestMapping("/orderForm")

public class OrderFormController {
List<OrderForm> orderFormList = iOrderFormService.findAllOrderForm(num,size);

PageInfo<OrderForm> orderFormPageInfo = new PageInfo<>(orderFormList);

model.addAttribute("orderFormPageInfo",orderFormPageInfo);

return "/backstage/order_form";

/**

* 获取所有用户订单返回JSON数据

* @return

*/

@GetMapping("/findAllOrderForm1")

public @ResponseBody PageInfo<OrderForm> findAllOrderForm1(

@RequestParam(defaultValue = "1") Integer num,

@RequestParam(defaultValue = "5") Integer size


* @param uid

* @param num

* @param size

* @param model

* @return

*/

@GetMapping("/findByUid/{uid}")

public String findByUid(

@PathVariable Integer uid,

@RequestParam(defaultValue = "1") Integer num,

@RequestParam(defaultValue = "5") Integer size,

@Controller

@RequestMapping("/book")

@SessionAttributes({"bookTypeList"})

public class BookController {

@Autowired

private IBookTypeService iBookTypeService;

@Autowired

private IBookService iBookService;

@Autowired

private ISupplierService iSupplierService;

/**

* 图书列表


*/

@PostMapping("/deleteShopping/{uid}/{id}")

public @ResponseBody int findByUid(@PathVariable Integer  uid,@PathVariable Integer id) {

int i = iOrderFormService.deleteOrderForm(uid,id);

//        System.out.println("返回的i="+i);

return i;

订单管理控制层:

@Controller

@RequestMapping("/shopping")

public class ShoppingController {

@Autowired

private IShoppingService iShoppingService;

@Autowired
int i = iShoppingService.deleteShopping(shopping.getUid(), shopping.getId());

//        System.out.println("返回的i="+i);

int count = i + i1;

return count;

/**

* 将购物车图书信息转化封装到订单实体类中

* @param shopping

* @return

*/

public static OrderForm shoppingOrderForm(Shopping shopping) {

OrderForm orderForm = new OrderForm();


* @return

*/

@GetMapping("/findAllOrderForm")

public String findAllOrderForm(

@RequestParam(defaultValue = "1") Integer num,

@RequestParam(defaultValue = "5") Integer size,

Model model) {

List<OrderForm> orderFormList = iOrderFormService.findAllOrderForm(num,size);

PageInfo<OrderForm> orderFormPageInfo = new PageInfo<>(orderFormList);

model.addAttribute("orderFormPageInfo",orderFormPageInfo);

List<Books> booksList = iBookService.findAllBook(num,size );

PageInfo<Books> booksPageInfo = new PageInfo<>(booksList);

model.addAttribute("booksPageInfo", booksPageInfo);

return "/frontdesk/home";

/**

* 通过Id查询图书详情

* @param id

* @param model

* @return

*/

@GetMapping("/findById/{id}")

public String findById(@PathVariable Integer id,Model model) {

@GetMapping("/findAllOrderForm")

public String findAllOrderForm(

@RequestParam(defaultValue = "1") Integer num,

@RequestParam(defaultValue = "5") Integer size,

Model model) {

List<OrderForm> orderFormList = iOrderFormService.findAllOrderForm(num,size);

PageInfo<OrderForm> orderFormPageInfo = new PageInfo<>(orderFormList);

model.addAttribute("orderFormPageInfo",orderFormPageInfo);

return "/backstage/order_form";

/**

* 获取所有用户订单返回JSON数据


public @ResponseBody int findByUid(@PathVariable Integer  uid,@PathVariable Integer id) {

int i = iOrderFormService.deleteOrderForm(uid,id);

//        System.out.println("返回的i="+i);

return i;

订单管理控制层:

@Controller

@RequestMapping("/shopping")

public class ShoppingController {

@Autowired

private IShoppingService iShoppingService;

@Autowired
![请添加图片描述](https://img-blog.csdnimg.cn/direct/2eca45c18d9640e2b8c9aa4bea9e9b80.jpeg)

private IOrderFormService iOrderFormService;


* @return

*/

@PostMapping("/updateBook")

public String updateBook(Books books) {

//        System.out.println("返回的图书:"+books);

iBookService.updateBook(books);

return "redirect:/book/home";

/**

* 通过图书类型Id查询图书

* @param tid

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值