——————————DescriptionStart——————————
运行环境 Java≥8、MySQL≥5.7、Node.js≥14
开发工具 后端:eclipse/idea/myeclipse/sts等均可配置运行 前端:WebStorm/VSCode/HBuilderX等均可
❗没学过node.js的不要搞前后端分离项目
适用 课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb的SpringBoot商品进销存管理系统(java+springboot+vue+maven+mybatis+mysql)
1 2 3 4 5 6 7 8 前端启动命令:npm run serve 超级管理员: 13588888881 123456 管理员: 13588888882 123456 13588888883 123456
一、项目运行 环境配置:
Jdk1.8 + Mysql + HBuilderX(Webstorm也行)+ Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。
项目技术:
Spring + SpringBoot+ mybatis + Maven + Vue 等等组成,B/S模式 + Maven管理等等。
——————————CodeStart——————————
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 @RestController public class GoodsController { @Autowired private GoodsService goodsService; @PostMapping(value = "/findGoodsAll/{pageCode}/{pageSize}", produces = "application/json;charset=UTF-8") public Page<Goods> findGoodsAll (@PathVariable(value = "pageCode") int pageCode, @PathVariable(value = "pageSize") int pageSize, @RequestBody Goods goods) { int num = pageCode * pageSize; return goodsService.findGoodsAll(pageCode, pageSize, goods); } @PostMapping("/findGoods") public List<Goods> findGoods () { return goodsService.findGoods(); } @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); } } package com.ysm.controller;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 @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); } @PostMapping("/findSupplierAndId") public List<Supplier> findSupplierAndId () { return supplierService.findSupplierAndId(); } @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);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 @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); } @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); } } package com.ysm.controller;@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 ) {
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 public List<Supplier> findSupplierAndId () { return supplierService.findSupplierAndId(); } @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); } } package com.ysm.controller;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 } package com.ysm.controller;@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); } @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); } } package com.ysm.controller;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 @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); } @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); } } package com.ysm.controller;@RestController public class LoginController { @Autowired private AccountService accountService;
——————————PayStart——————————
项目链接: https://javayms.github.io?id=181023491103200xw https://javayms.pages.dev?id=181023491103200xw