• 基于springboot网上书城系统


    开发工具: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 List getAllCategories() {
            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;
        }
    }
    
    1. package edu.hut.bookshop.service.impl;
    2. import java.util.List;
    3. import javax.annotation.Resource;
    4. import com.github.pagehelper.PageHelper;
    5. import org.springframework.stereotype.Service;
    6. import edu.hut.bookshop.dao.CategoryMapper;
    7. import edu.hut.bookshop.pojo.Category;
    8. import edu.hut.bookshop.service.CategoryService;
    9. @Service
    10. public class CategoryServiceImpl implements CategoryService{
    11. @Resource
    12. private CategoryMapper categoryMapper;
    13. @Override
    14. public int deleteByByCategoryCode(String categoryCode) {
    15. // TODO Auto-generated method stub
    16. int categories = categoryMapper.deleteByByCategoryCode(categoryCode);
    17. return categories;
    18. }
    19. @Override
    20. public int insert(Category record) {
    21. // TODO Auto-generated method stub
    22. int categories = categoryMapper.insert(record);
    23. return categories;
    24. }
    25. @Override
    26. public Category selectByByCategoryCode(String categoryCode) {
    27. // TODO Auto-generated method stub
    28. Category category = categoryMapper.selectByByCategoryCode(categoryCode);
    29. return category;
    30. }
    31. @Override
    32. public int updateByCategoryCode(Category record) {
    33. // TODO Auto-generated method stub
    34. int category = categoryMapper.updateByCategoryCode(record);
    35. return category;
    36. }
    37. @Override
    38. public List selectAll(Integer page, Integer limit) {
    39. // TODO Auto-generated method stub
    40. PageHelper.startPage(page, limit);
    41. List categories = categoryMapper.selectAll();
    42. return categories;
    43. }
    44. }

     

  • 相关阅读:
    Postman使用总结
    Vue项目重新部署后,提示用户刷新网页
    Json文件序列化读取
    电脑复制和粘贴的时候会出现Hello!
    JavaScript处理点击事件
    C++之函数指针、指针函数以及相关问题
    JavaSE泛型讲解
    Java中的内存泄漏问题及其解决方法
    路由跳转问题(浏览器返回replace replaceState)
    华为终端智能家居应用方案
  • 原文地址:https://blog.csdn.net/weixin_42899150/article/details/127040802