开发工具:IDEA
服务器:Tomcat9.0, jdk1.8
项目构建:maven
数据库:mysql5.7
系统分用户前台和管理员后台两部分
前端技术:layui等框架实现
服务端技术:springboot+mybatis
项目功能描述:
一、前台:登录、注册、商品搜索、商品详情、立即购买、购物车、我的订单、退出登录
二、后台:
1.登录
2.书籍管理:
(1)书籍列表:分页查询、修改、删除
(2)分类列表:添加、修改、删除、分页查询
3.订单管理:分页查询、查看详情、修改、删除
4.用户管理:分页查询、修改、删除
5.上架书籍
前台截图:
后台截图:
package edu.hut.bookshop.service.impl; import com.github.pagehelper.PageHelper; import edu.hut.bookshop.dao.BookDisplayMapper; import edu.hut.bookshop.dao.BookMapper; import edu.hut.bookshop.dao.CategoryMapper; import edu.hut.bookshop.pojo.Book; import edu.hut.bookshop.pojo.Category; import edu.hut.bookshop.service.BookDisplayService; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.List; /** * @Description: 首页书籍展示模块实现类 */ @Service public class BookDisplayServiceImpl implements BookDisplayService { @Resource private BookMapper bookMapper; @Resource private CategoryMapper categoryMapper; @Resource private BookDisplayMapper bookDisplayMapper; @Override public ListgetAllCategories() { return categoryMapper.selectAll(); } @Override public List getAllBooks(Integer page, Integer limit) { PageHelper.startPage(page,limit); List books = bookMapper.selectAllByCategoryCode(null); return books; } @Override public List getBooksByCategoryCode(Integer page, Integer limit,String categoryCode) { PageHelper.startPage(page,limit); List books = bookMapper.selectAllByCategoryCode(categoryCode); return books; } @Override public Book getBookDetailsByBookId(Integer bookId) { return bookMapper.selectByBookId(bookId); } @Override public List searchBooksByBookName(Integer page, Integer limit,String bookName) { PageHelper.startPage(page, limit); List books = bookDisplayMapper.fuzzyQueryByBookName(bookName); return books; } }
- package edu.hut.bookshop.service.impl;
-
- import java.util.List;
-
- import javax.annotation.Resource;
-
- import com.github.pagehelper.PageHelper;
- import org.springframework.stereotype.Service;
-
- import edu.hut.bookshop.dao.CategoryMapper;
- import edu.hut.bookshop.pojo.Category;
- import edu.hut.bookshop.service.CategoryService;
- @Service
- public class CategoryServiceImpl implements CategoryService{
- @Resource
- private CategoryMapper categoryMapper;
- @Override
- public int deleteByByCategoryCode(String categoryCode) {
- // TODO Auto-generated method stub
- int categories = categoryMapper.deleteByByCategoryCode(categoryCode);
- return categories;
- }
-
- @Override
- public int insert(Category record) {
- // TODO Auto-generated method stub
- int categories = categoryMapper.insert(record);
- return categories;
- }
-
- @Override
- public Category selectByByCategoryCode(String categoryCode) {
- // TODO Auto-generated method stub
- Category category = categoryMapper.selectByByCategoryCode(categoryCode);
- return category;
- }
-
- @Override
- public int updateByCategoryCode(Category record) {
- // TODO Auto-generated method stub
- int category = categoryMapper.updateByCategoryCode(record);
- return category;
- }
-
- @Override
- public List
selectAll(Integer page, Integer limit) { - // TODO Auto-generated method stub
- PageHelper.startPage(page, limit);
- List
categories = categoryMapper.selectAll(); - return categories;
- }
-
- }