【JAVA项目】基于JAVA的超市订单管理系统

一、项目介绍

本系统前端框架采用了比较流行的渐进式JavaScript框架Vue.js。使用Vue-Router实现动态路由,Ajax实现前后端通信,Element-plus组件库使页面快速成型。后端部分:采用SpringBoot作为开发框架,同时集成MyBatis、Redis、阿里云oss对象存储等相关技术。

超市管理系统,可前后端分离

运行环境:idea

技术栈:springboot,vue,mybatis,redis,elementplus

jwt令牌技术,不登录无法访问内容页面,换浏览器也不可以

二、系统功能

具有订单管理功能,供应商管理功能,用户管理功能,个人中心,修改密码,退出登录

三、系统实现

登陆界面

用户列表

订单列表

基本资料

供应商列表

四、实现代码

复制代码
package com.example.demo.Controller;

import com.example.demo.Service.CategoryService;

import com.example.demo.entity.Pojo.Category;
import com.example.demo.entity.Pojo.Flower;
import com.example.demo.entity.Result.PageBean;
import com.example.demo.entity.Result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/category")
public class CategoryController {
    @Autowired
    private CategoryService categoryService;

    //获取列表
    @GetMapping
    public Result<List<Category>> getMessage(){
        List<Category> cs= categoryService.list();
        return Result.success(cs);
    }

    //新增
    @PostMapping
    public Result add(@RequestBody Category category){
        categoryService.add(category);
        return Result.success();
    }

    //获取详情
    @GetMapping("/detail")
    public Result<Category> detail(Integer id){
        Category c= categoryService.findById(id);
        return Result.success(c);
    }

    //更新商品分类
    @PutMapping
    public Result update(@RequestBody Category category){
        categoryService.update(category);
        return  Result.success();
    }

    // 删除
    @DeleteMapping
    public Result delete(Integer id){
        categoryService.delete(id);
        return Result.success();
    }

    //分页查询
    @GetMapping("/page")
    public Result<PageBean<Category>> page(Integer pageNum, Integer pageSize, String agriculturalName){
        PageBean<Category> pageBean= categoryService.page(pageNum, pageSize, agriculturalName);
        return Result.success(pageBean);
    }

    //根据分类查询
    @GetMapping("/flower")
    public Result<PageBean<Flower>> listByCategory(Integer pageNum, Integer pageSize, String categoryName){
        PageBean<Flower> pageBean= categoryService.getByCategoryId(pageNum, pageSize, categoryName);
        return Result.success(pageBean);
    }
}

联系方式绿泡泡公主号👇

相关推荐
haluhalu.2 分钟前
从 Linux 线程控制到 pthread 库
java·linux·服务器
indexsunny2 分钟前
互联网大厂Java面试实战:从Spring Boot到微服务架构的三轮提问
java·spring boot·微服务·eureka·kafka·mybatis·spring security
花间相见7 分钟前
【JAVA开发】—— HTTP常见请求方法
java·开发语言·http
APIshop8 分钟前
实战代码解析:item_get——获取某鱼商品详情接口
java·linux·数据库
楼田莉子9 分钟前
Linux系统小项目——“主从设计模式”进程池
linux·服务器·开发语言·c++·vscode·学习
zhangchangz14 分钟前
Idea护眼插件分享之:Catppuccin Theme
java·ide·intellij-idea
走粥18 分钟前
选项式API与组合式API的区别
开发语言·前端·javascript·vue.js·前端框架
从此不归路19 分钟前
Qt5 进阶【7】网络请求与 REST API 实战:QNetworkAccessManager 深度应用
开发语言·c++·qt
浮生醉清风i19 分钟前
Spring Ai
java·人工智能·spring
试剂小课堂 Pro25 分钟前
mPEG-Silane:mPEG链单端接三乙氧基硅的亲水性硅烷偶联剂
java·c语言·网络·c++·python·tomcat