——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Node.js≥14
开发工具
后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可
❗没学过node.js的不要搞前后端分离项目
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明





基于javaweb的SpringBoot超市进销存系统(java+springboot+maven+mybaits+vue+elementui+mysql)
角色:管理员、员工
管理员:管理员登录进入超市进销存系统可以查看首页、个人中心、员工管理、客户管理、供应商管理、承运商管理、仓库信息管理、商品类别管理、 商品信息管理、采购信息管理、入库信息管理、出库信息管理、销售订单管理、部门管理、岗位管理等功能
员工:员工登录进入超市进销存系统可以查看首页、个人中心、仓库信息管理、 商品信息管理、采购信息管理、入库信息管理、出库信息管理、销售订单管理等功能
技术栈
后端:SpringBoot+Mybaits
前端:Vue+ElementUI
——————————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
|
@RequestMapping("/lists") public R list( GangweiEntity gangwei){ EntityWrapper<GangweiEntity> ew = new EntityWrapper<GangweiEntity>(); ew.allEq(MPUtil.allEQMapPre( gangwei, "gangwei")); return R.ok().put("data", gangweiService.selectListView(ew)); }
@RequestMapping("/query") public R query(GangweiEntity gangwei){ EntityWrapper< GangweiEntity> ew = new EntityWrapper< GangweiEntity>(); ew.allEq(MPUtil.allEQMapPre( gangwei, "gangwei")); GangweiView gangweiView = gangweiService.selectView(ew); return R.ok("查询岗位成功").put("data", gangweiView); }
@RequestMapping("/info/{id}") public R info(@PathVariable("id") Long id){ GangweiEntity gangwei = gangweiService.selectById(id); return R.ok().put("data", gangwei); }
@IgnoreAuth @RequestMapping("/detail/{id}") public R detail(@PathVariable("id") Long id){ GangweiEntity gangwei = gangweiService.selectById(id); return R.ok().put("data", gangwei); }
|
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
|
@RestController @RequestMapping("/gangwei") public class GangweiController { @Autowired private GangweiService gangweiService;
@RequestMapping("/page") public R page(@RequestParam Map<String, Object> params,GangweiEntity gangwei, HttpServletRequest request){ EntityWrapper<GangweiEntity> ew = new EntityWrapper<GangweiEntity>(); PageUtils page = gangweiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, gangwei), params), params));
|
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
|
@RequestMapping("/lists") public R list( RukuxinxiEntity rukuxinxi){ EntityWrapper<RukuxinxiEntity> ew = new EntityWrapper<RukuxinxiEntity>(); ew.allEq(MPUtil.allEQMapPre( rukuxinxi, "rukuxinxi")); return R.ok().put("data", rukuxinxiService.selectListView(ew)); }
@RequestMapping("/query") public R query(RukuxinxiEntity rukuxinxi){ EntityWrapper< RukuxinxiEntity> ew = new EntityWrapper< RukuxinxiEntity>(); ew.allEq(MPUtil.allEQMapPre( rukuxinxi, "rukuxinxi")); RukuxinxiView rukuxinxiView = rukuxinxiService.selectView(ew); return R.ok("查询入库信息成功").put("data", rukuxinxiView); }
@RequestMapping("/info/{id}") public R info(@PathVariable("id") Long id){ RukuxinxiEntity rukuxinxi = rukuxinxiService.selectById(id); return R.ok().put("data", rukuxinxi); }
@IgnoreAuth @RequestMapping("/detail/{id}") public R detail(@PathVariable("id") Long id){ RukuxinxiEntity rukuxinxi = rukuxinxiService.selectById(id); return R.ok().put("data", rukuxinxi); }
|
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
| YuangongEntity yuangong = yuangongService.selectById(id); return R.ok().put("data", yuangong); }
@RequestMapping("/save") public R save(@RequestBody YuangongEntity yuangong, HttpServletRequest request){ yuangong.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); YuangongEntity user = yuangongService.selectOne(new EntityWrapper<YuangongEntity>().eq("yuangongzhanghao", yuangong.getYuangongzhanghao())); if(user!=null) { return R.error("用户已存在"); } yuangong.setId(new Date().getTime()); yuangongService.insert(yuangong); return R.ok(); }
@RequestMapping("/add") public R add(@RequestBody YuangongEntity yuangong, HttpServletRequest request){ yuangong.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); YuangongEntity user = yuangongService.selectOne(new EntityWrapper<YuangongEntity>().eq("yuangongzhanghao", yuangong.getYuangongzhanghao())); if(user!=null) { return R.error("用户已存在"); } yuangong.setId(new Date().getTime()); yuangongService.insert(yuangong); return R.ok(); }
@RequestMapping("/update") public R update(@RequestBody YuangongEntity yuangong, HttpServletRequest request){ yuangongService.updateById(yuangong); return R.ok(); }
|
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
| if(StringUtils.isNotBlank(type) && type.equals("1")) { ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile")); if(configEntity==null) { configEntity = new ConfigEntity(); configEntity.setName("faceFile"); configEntity.setValue(fileName); } else { configEntity.setValue(fileName); } configService.insertOrUpdate(configEntity); } return R.ok().put("file", fileName); }
@IgnoreAuth @RequestMapping("/download") public ResponseEntity<byte[]> download(@RequestParam String fileName) { try { File path = new File(ResourceUtils.getURL("classpath:static").getPath()); if(!path.exists()) { path = new File(""); } File upload = new File(path.getAbsolutePath(),"/upload/"); if(!upload.exists()) { upload.mkdirs(); } File file = new File(upload.getAbsolutePath()+"/"+fileName); if(file.exists()){
HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_OCTET_STREAM); headers.setContentDispositionFormData("attachment", fileName); return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED); } } catch (IOException e) { e.printStackTrace(); } return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR); } }
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=281524190701201kk
https://javayms.pages.dev?id=281524190701201kk