基于javaweb+mysql的springboot商品进销存管理系统(java+springboot+vue+maven+mybatis+mysql)

运行环境

Java≥8、MySQL≥5.7、Node.js≥10

开发工具

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

前端:WebStorm/VSCode/HBuilderX等均可

适用

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

功能说明

基于javaweb+mysql的SpringBoot商品进销存管理系统(java+springboot+vue+maven+mybatis+mysql)

一、项目运行 环境配置:

Jdk1.8 + Tomcat8.5 + Mysql + HBuilderX(Webstorm也行)+ Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。

项目技术:

Spring + SpringBoot+ mybatis + Maven + Vue 等等组成,B/S模式 + Maven管理等等。


@RestController
public class StaffController {
    @Autowired
    private StaffService staffService;

    //查询全部的员工
    @PostMapping("/findStaffAll/{pageCode}/{pageSize}")
    public Page<Staff> findStaffAll(@PathVariable(value = "pageCode") int pageCode, @PathVariable(value = "pageSize") int pageSize, @RequestBody Staff staff){
        int num = pageCode * pageSize;
        return staffService.findStaffAll(pageCode, pageSize, staff);
    }

    //添加员工
    @PostMapping("/addStaff")
    public int addStaff(@RequestBody Staff staff){
        return staffService.addStaff(staff);
    }

    //删除员工
    @PostMapping("/deleteStaff")
    public int deleteStaff(String staff_id){
        return staffService.deleteStaff(staff_id);
    }

    //id查询
    @PostMapping(value = "/findStaffById", produces = "application/json;charset=UTF-8")
    public List<Staff> findStaffById(String staff_id){
        return staffService.findStaffById(staff_id);
    }

    //更新员工
    @PutMapping("/updateStaff")
    public int updateStaff(@RequestBody Staff staff){
        return staffService.updateStaff(staff);
    }
}

        return ordersService.findOrderAll(pageCode,pageSize,orders);
    }

    //添加订单
    @PostMapping("/addOrders")
    public int addOrders(@RequestBody Orders orders){
        return ordersService.addOrders(orders);
    }

    //id查询
    @PostMapping("/findOrdersById")
    public List<Orders> findOrdersById(Integer goods_id){
        return ordersService.findOrdersById(goods_id);
    }

    //删除订单
    @PostMapping("/deleteOrders")
    public int deleteOrders(String orders_id){
        return ordersService.deleteOrders(orders_id);
    }
}

@RestController
public class LoginController {
    @Autowired
    private AccountService accountService;

    //登录
    @PostMapping("/login")
    public Object login(@RequestBody Account account, HttpSession httpSession) {
    }
}

@RestController
public class OrdersController {
    @Autowired
    private OrdersService ordersService;

    //查询总订单
    @PostMapping("/findOrdersAll/{pageCode}/{pageSize}")
    public Page<Orders> findOrdersAll(@PathVariable(value = "pageCode") int pageCode, @PathVariable(value = "pageSize") int pageSize, @RequestBody Orders orders){
        int num = pageCode * pageSize;
        return ordersService.findOrderAll(pageCode,pageSize,orders);
    }

    //添加订单
    @PostMapping("/addOrders")
    public int addOrders(@RequestBody Orders orders){
        return ordersService.addOrders(orders);
    }

    //id查询
    @PostMapping("/findOrdersById")
    public List<Orders> findOrdersById(Integer goods_id){
        return ordersService.findOrdersById(goods_id);
    }

    //删除订单
    @PostMapping("/deleteOrders")
    public int deleteOrders(String orders_id){
        return ordersService.deleteOrders(orders_id);
    }
}

    @Autowired
    private StaffService staffService;

    //查询全部的员工
    @PostMapping("/findStaffAll/{pageCode}/{pageSize}")
    public Page<Staff> findStaffAll(@PathVariable(value = "pageCode") int pageCode, @PathVariable(value = "pageSize") int pageSize, @RequestBody Staff staff){
        int num = pageCode * pageSize;
        return staffService.findStaffAll(pageCode, pageSize, staff);
    }

    //添加员工
    @PostMapping("/addStaff")
    public int addStaff(@RequestBody Staff staff){
        return staffService.addStaff(staff);
    }

    //删除员工
    @PostMapping("/deleteStaff")
    public int deleteStaff(String staff_id){
        return staffService.deleteStaff(staff_id);
    }

    //id查询
    @PostMapping(value = "/findStaffById", produces = "application/json;charset=UTF-8")
    public List<Staff> findStaffById(String staff_id){
        return staffService.findStaffById(staff_id);
    }

    //更新员工
    @PutMapping("/updateStaff")
    public int updateStaff(@RequestBody Staff staff){
        return staffService.updateStaff(staff);
    }
}

    }

    //id查询
    @PostMapping("/findGoodsById")
    public List<Goods> findGoodsById(Integer goods_id){
        return goodsService.findGoodsById(goods_id);
    }

    //添加商品
    @PostMapping("/addGoods")
    public int addGoods(@RequestBody Goods goods) {
        Date date = new Date();
        Timestamp timestamp = new Timestamp(date.getTime());
        goods.setGoods_date(timestamp);
        return goodsService.addGoods(goods);
    }

    //修改商品
    @PutMapping("/updateGoods")
    public int updateGoods(@RequestBody Goods goods) {
        return goodsService.updateGoods(goods);
    }

    //删除商品
    @PostMapping("/deleteGoods")
    public int deleteGoods(Integer goods_id) {
        return goodsService.deleteGoods(goods_id);
    }

}


    //添加订单
    @PostMapping("/addOrders")
    public int addOrders(@RequestBody Orders orders){
        return ordersService.addOrders(orders);
    }

    //id查询
    @PostMapping("/findOrdersById")
    public List<Orders> findOrdersById(Integer goods_id){
        return ordersService.findOrdersById(goods_id);
    }

    //删除订单
    @PostMapping("/deleteOrders")
    public int deleteOrders(String orders_id){
        return ordersService.deleteOrders(orders_id);
    }
}

@RestController
public class LoginController {
    @Autowired
    private AccountService accountService;

    //登录
    @PostMapping("/login")
    public Object login(@RequestBody Account account, HttpSession httpSession) {
        account = accountService.login(account.getAccount_phone(), account.getAccount_password());
        if (account != null) {
            httpSession.setAttribute("acc", account);
            return account;
        } else {
            return false;
    //删除员工
    @PostMapping("/deleteStaff")
    public int deleteStaff(String staff_id){
        return staffService.deleteStaff(staff_id);
    }

    //id查询
    @PostMapping(value = "/findStaffById", produces = "application/json;charset=UTF-8")
    public List<Staff> findStaffById(String staff_id){
        return staffService.findStaffById(staff_id);
    }

    //更新员工
    @PutMapping("/updateStaff")
    public int updateStaff(@RequestBody Staff staff){
        return staffService.updateStaff(staff);
    }
}

@RestController
public class OrdersController {
    @Autowired
    private OrdersService ordersService;

    //查询总订单
    @PostMapping("/findOrdersAll/{pageCode}/{pageSize}")
    public Page<Orders> findOrdersAll(@PathVariable(value = "pageCode") int pageCode, @PathVariable(value = "pageSize") int pageSize, @RequestBody Orders orders){
        int num = pageCode * pageSize;
        return ordersService.findOrderAll(pageCode,pageSize,orders);
    }

    //添加订单
    @PostMapping("/addOrders")
    public int addOrders(@RequestBody Orders orders){
        return ordersService.addOrders(orders);
    }

    //id查询
    @PostMapping("/findOrdersById")
    public List<Orders> findOrdersById(Integer goods_id){
        return ordersService.findOrdersById(goods_id);

    //添加商品
    @PostMapping("/addGoods")
    public int addGoods(@RequestBody Goods goods) {
        Date date = new Date();
        Timestamp timestamp = new Timestamp(date.getTime());
        goods.setGoods_date(timestamp);
        return goodsService.addGoods(goods);
    }

    //修改商品
    @PutMapping("/updateGoods")
    public int updateGoods(@RequestBody Goods goods) {
        return goodsService.updateGoods(goods);
    }

    //删除商品
    @PostMapping("/deleteGoods")
    public int deleteGoods(Integer goods_id) {
        return goodsService.deleteGoods(goods_id);
    }

}

@RestController
public class SupplierController {

    @Autowired
    private SupplierService supplierService;

    //查询所有供应商
    public Page<Staff> findStaffAll(@PathVariable(value = "pageCode") int pageCode, @PathVariable(value = "pageSize") int pageSize, @RequestBody Staff staff){
        int num = pageCode * pageSize;
        return staffService.findStaffAll(pageCode, pageSize, staff);
    }

    //添加员工
    @PostMapping("/addStaff")
    public int addStaff(@RequestBody Staff staff){
        return staffService.addStaff(staff);
    }

    //删除员工
    @PostMapping("/deleteStaff")
    public int deleteStaff(String staff_id){
        return staffService.deleteStaff(staff_id);
    }

    //id查询
    @PostMapping(value = "/findStaffById", produces = "application/json;charset=UTF-8")
    public List<Staff> findStaffById(String staff_id){
        return staffService.findStaffById(staff_id);
    }

    //更新员工
    @PutMapping("/updateStaff")
    public int updateStaff(@RequestBody Staff staff){
        return staffService.updateStaff(staff);
    }
}


    //删除员工
    @PostMapping("/deleteStaff")
    public int deleteStaff(String staff_id){
        return staffService.deleteStaff(staff_id);
    }

    //id查询
    @PostMapping(value = "/findStaffById", produces = "application/json;charset=UTF-8")
    public List<Staff> findStaffById(String staff_id){
        return staffService.findStaffById(staff_id);
    }

    //更新员工
    @PutMapping("/updateStaff")
    public int updateStaff(@RequestBody Staff staff){
        return staffService.updateStaff(staff);
    }
}

@RestController
public class OrdersController {
    @Autowired
    private OrdersService ordersService;

    //查询总订单
    @PostMapping("/findOrdersAll/{pageCode}/{pageSize}")
    public Page<Orders> findOrdersAll(@PathVariable(value = "pageCode") int pageCode, @PathVariable(value = "pageSize") int pageSize, @RequestBody Orders orders){
        int num = pageCode * pageSize;
        return ordersService.findOrderAll(pageCode,pageSize,orders);
    }
    }

    //查询供应商和id
    @PostMapping("/findSupplierAndId")
    public  List<Supplier> findSupplierAndId(){
        return supplierService.findSupplierAndId();
    }

    //id查询
    @PostMapping(value = "/findSupplierById", produces = "application/json;charset=UTF-8")
    public List<Supplier> findSupplierById(Integer supplier_id) {
        return supplierService.findSupplierById(supplier_id);

    }

    //添加供应商
    @PostMapping("/addSupplier")
    public int addSupplier(@RequestBody Supplier supplier) {
        return supplierService.addSupplier(supplier);
    }

    //修改供应商
    @PutMapping("/updateSupplier")
    public int updateSupplier(@RequestBody Supplier supplier) {
        return supplierService.updateSupplier(supplier);
    }

    //删除供应商
    @PostMapping("/deleteSupplier")
    public int deleteSupplier(Integer supplier_id) {
        return supplierService.deleteSupplier(supplier_id);
    }
}

@RestController
public class StaffController {
    @Autowired
    private StaffService staffService;

    //查询全部的员工
    @PostMapping("/findStaffAll/{pageCode}/{pageSize}")
    public Page<Staff> findStaffAll(@PathVariable(value = "pageCode") int pageCode, @PathVariable(value = "pageSize") int pageSize, @RequestBody Staff staff){
    //修改商品
    @PutMapping("/updateGoods")
    public int updateGoods(@RequestBody Goods goods) {
        return goodsService.updateGoods(goods);
    }

    //删除商品
    @PostMapping("/deleteGoods")
    public int deleteGoods(Integer goods_id) {
        return goodsService.deleteGoods(goods_id);
    }

}

@RestController
public class SupplierController {

    @Autowired
    private SupplierService supplierService;

    //查询所有供应商
    @PostMapping(value = "/findSupplierAll/{pageCode}/{pageSize}", produces = "application/json;charset=UTF-8")
    public Page<Supplier> findAll(@PathVariable(value = "pageCode") int pageCode, @PathVariable(value = "pageSize") int pageSize, @RequestBody Supplier supplier){
            int num = pageCode * pageSize;
            return supplierService.findAll(num, pageSize,supplier);
    }

    //查询供应商和id
    @PostMapping("/findSupplierAndId")
    public  List<Supplier> findSupplierAndId(){
        return supplierService.findSupplierAndId();
    }

    //id查询
    @PostMapping(value = "/findSupplierById", produces = "application/json;charset=UTF-8")
    public List<Supplier> findSupplierById(Integer supplier_id) {
        return supplierService.findSupplierById(supplier_id);

    }
        int num = pageCode * pageSize;
        return goodsService.findGoodsAll(pageCode, pageSize, goods);
    }

    //查询商品
    @PostMapping("/findGoods")
    public List<Goods> findGoods(){
        return goodsService.findGoods();
    }

    //id查询
    @PostMapping("/findGoodsById")
    public List<Goods> findGoodsById(Integer goods_id){
        return goodsService.findGoodsById(goods_id);
    }

    //添加商品
    @PostMapping("/addGoods")
    public int addGoods(@RequestBody Goods goods) {
        Date date = new Date();
        Timestamp timestamp = new Timestamp(date.getTime());
        goods.setGoods_date(timestamp);
        return goodsService.addGoods(goods);
    }

    //修改商品
    @PutMapping("/updateGoods")
    public int updateGoods(@RequestBody Goods goods) {
        return goodsService.updateGoods(goods);
    }

    //删除商品
    @PostMapping("/deleteGoods")
    public int deleteGoods(Integer goods_id) {
        return goodsService.deleteGoods(goods_id);
    }

}


@RestController
public class StaffController {
    @Autowired
    private StaffService staffService;

    //查询全部的员工
    @PostMapping("/findStaffAll/{pageCode}/{pageSize}")
    public Page<Staff> findStaffAll(@PathVariable(value = "pageCode") int pageCode, @PathVariable(value = "pageSize") int pageSize, @RequestBody Staff staff){
        int num = pageCode * pageSize;
        return staffService.findStaffAll(pageCode, pageSize, staff);
    }

    //添加员工
    @PostMapping("/addStaff")
    public int addStaff(@RequestBody Staff staff){
        return staffService.addStaff(staff);
    }

    //删除员工
    @PostMapping("/deleteStaff")
    public int deleteStaff(String staff_id){
        return staffService.deleteStaff(staff_id);
    }

    //id查询
    @PostMapping(value = "/findStaffById", produces = "application/json;charset=UTF-8")
    public List<Staff> findStaffById(String staff_id){
        return staffService.findStaffById(staff_id);
    }

    //更新员工
    @PutMapping("/updateStaff")
    public int updateStaff(@RequestBody Staff staff){
        return staffService.updateStaff(staff);
    }
}

}

@RestController
public class StaffController {
    @Autowired
    private StaffService staffService;

    //查询全部的员工
    @PostMapping("/findStaffAll/{pageCode}/{pageSize}")
    public Page<Staff> findStaffAll(@PathVariable(value = "pageCode") int pageCode, @PathVariable(value = "pageSize") int pageSize, @RequestBody Staff staff){
        int num = pageCode * pageSize;
        return staffService.findStaffAll(pageCode, pageSize, staff);
    }

    //添加员工
    @PostMapping("/addStaff")
    public int addStaff(@RequestBody Staff staff){
        return staffService.addStaff(staff);
    }

    //删除员工
    @PostMapping("/deleteStaff")
    public int deleteStaff(String staff_id){
        return staffService.deleteStaff(staff_id);
    }

    //id查询
    @PostMapping(value = "/findStaffById", produces = "application/json;charset=UTF-8")
    public List<Staff> findStaffById(String staff_id){
        return staffService.findStaffById(staff_id);
    }

    //更新员工

@RestController
public class StaffController {
    @Autowired
    private StaffService staffService;

    //查询全部的员工
    @PostMapping("/findStaffAll/{pageCode}/{pageSize}")
    public Page<Staff> findStaffAll(@PathVariable(value = "pageCode") int pageCode, @PathVariable(value = "pageSize") int pageSize, @RequestBody Staff staff){
        int num = pageCode * pageSize;
        return staffService.findStaffAll(pageCode, pageSize, staff);
    }

    //添加员工
    @PostMapping("/addStaff")
    public int addStaff(@RequestBody Staff staff){
        return staffService.addStaff(staff);
    }

    //删除员工
    @PostMapping("/deleteStaff")
    public int deleteStaff(String staff_id){
        return staffService.deleteStaff(staff_id);
    }

    //id查询
    @PostMapping(value = "/findStaffById", produces = "application/json;charset=UTF-8")
    public List<Staff> findStaffById(String staff_id){
        return staffService.findStaffById(staff_id);
    }

    //更新员工
    @PutMapping("/updateStaff")
    public int updateStaff(@RequestBody Staff staff){
        return staffService.updateStaff(staff);
    }
}


@RestController
public class StaffController {
    @Autowired
    private StaffService staffService;

    //查询全部的员工
    @PostMapping("/findStaffAll/{pageCode}/{pageSize}")
    public Page<Staff> findStaffAll(@PathVariable(value = "pageCode") int pageCode, @PathVariable(value = "pageSize") int pageSize, @RequestBody Staff staff){
        int num = pageCode * pageSize;
        return staffService.findStaffAll(pageCode, pageSize, staff);
    }

    //添加员工
    @PostMapping("/addStaff")
    public int addStaff(@RequestBody Staff staff){
        return staffService.addStaff(staff);
    }

    //删除员工
    @PostMapping("/deleteStaff")
    public int deleteStaff(String staff_id){
        return staffService.deleteStaff(staff_id);
    }

    //id查询
    @PostMapping(value = "/findStaffById", produces = "application/json;charset=UTF-8")
    public List<Staff> findStaffById(String staff_id){
        return staffService.findStaffById(staff_id);
    }

    //更新员工
    @PutMapping("/updateStaff")
    public int updateStaff(@RequestBody Staff staff){
        return staffService.updateStaff(staff);
    }
}

    public List<Goods> findGoods(){
        return goodsService.findGoods();
    }

    //id查询
    @PostMapping("/findGoodsById")
    public List<Goods> findGoodsById(Integer goods_id){
        return goodsService.findGoodsById(goods_id);
    }

    //添加商品
    @PostMapping("/addGoods")
    public int addGoods(@RequestBody Goods goods) {
        Date date = new Date();
        Timestamp timestamp = new Timestamp(date.getTime());
        goods.setGoods_date(timestamp);
        return goodsService.addGoods(goods);
    }

    //修改商品
    @PutMapping("/updateGoods")
    public int updateGoods(@RequestBody Goods goods) {
        return goodsService.updateGoods(goods);
    }

    //删除商品
    @PostMapping("/deleteGoods")
    public int deleteGoods(Integer goods_id) {
        return goodsService.deleteGoods(goods_id);
    }

}

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

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐