作者主页:夜未央5788

简介:Java领域优质创作者、Java项目、学习资料、技术互助

文末获取源码

项目介绍

本项目为后台管理系统,
主要功能包括:

公告增删改查,用户管理,登录页面,订单查询,配件添加等等

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;

5.数据库:MySql 5.7版本;

6.是否Maven项目:是;

技术栈

1. 后端:SpringBoot

2. 前端:HTML+CSS+JavaScript+layui

使用说明

1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;
若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行;
3. 将项目中application.properties配置文件中的数据库配置改为自己的配置;
4. 运行项目,输入localhost:18081/ 登录

管理员:admin/123456

运行截图

代码相关

配件管理配置器

/*** 配件控制器*/
@Api("配件接口API")
@RestController
public class GoodsController {private Logger logger = LoggerFactory.getLogger(this.getClass());@Autowiredprivate GoodsService goodsService;private String image = "";@ApiOperation(value = "配件列表接口", notes = "配件结果集列表")@GetMapping("/admin/goodsList")public ServerLayResult<Goods> list(@RequestParam(value = "page", defaultValue = "1") Integer page,@RequestParam(value = "limit", defaultValue = "10") Integer limit) {//查询结果总数int count = goodsService.count();List<Goods> goods = goodsService.selectAll(page, limit);//组装Json数据ServerLayResult result = new ServerLayResult(0, "", count, goods);return result;}@ApiOperation(value = "配件删除接口", notes = "根据配件ID删除配件")@GetMapping("/admin/goods/del")public String delete(Integer id) {System.out.println("id = " + id);int row = goodsService.deleteByPrimaryKey(id);if (row > 0) {return "success";}return "error";}@ApiOperation(value = "配件更新接口", notes = "根据json数据对象来更新接口")@PostMapping("/admin/goods/update")public String update(@RequestBody JSONObject ob) {com.alibaba.fastjson.JSONObject json = JSON.parseObject(ob.toJSONString());logger.info(ob.toJSONString());String gname = json.getString("gname");Integer id = json.getInteger("id");Double goprice = json.getDouble("goprice");Double grprice = json.getDouble("grprice");Integer gstore = json.getInteger("gstore");String goodstypeId = json.getString("goodstypeId");if (goodstypeId == null) {return "error";}Goods goods = new Goods();goods.setId(id);goods.setGname(gname);goods.setGoprice(goprice);goods.setGrprice(grprice);goods.setGstore(gstore);GoodsType goodsType = new GoodsType();goodsType.setId(Integer.parseInt(goodstypeId));goods.setGoodstypeId(goodsType);goods.setIputTime(new Date());//        goods.setGpicture("http://www.csbishe.cn:18081/views/upload/" + image);goods.setGpicture("http://localhost:18081/views/upload/" + image);logger.info(String.valueOf(goods));int insert = goodsService.updateByPrimaryKey(goods);if (insert > 0) {return "success";}return "error";}@ApiOperation(value = "配件保存接口", notes = "根据json数据来保存配件")@PostMapping("/admin/goods/add")public String addGoods(@RequestBody JSONObject ob) {com.alibaba.fastjson.JSONObject json = JSON.parseObject(ob.toJSONString());String gname = json.getString("gname");Double goprice = json.getDouble("goprice");Double grprice = json.getDouble("grprice");Integer gstore = json.getInteger("gstore");String goodstypeId = json.getString("goodstypeId");Goods goods = new Goods();goods.setGname(gname);goods.setGoprice(goprice);goods.setGrprice(grprice);goods.setGstore(gstore);GoodsType goodsType = new GoodsType();goodsType.setId(Integer.parseInt(goodstypeId));goods.setGoodstypeId(goodsType);goods.setIputTime(new Date());goods.setGpicture("http://localhost:18081/views/upload/" + image);int insert = goodsService.insert(goods);if (insert > 0) {return "success";}return "error";}/*** 实现文件上传*/@ApiOperation(value = "图片上传接口", notes = "根据MultipartFile类上传文件")@PostMapping(value = "/admin/uploadImg")public Map<String, Object> ramanage(@RequestParam("file") MultipartFile file,HttpServletRequest request) {Map<String, Object> result = new HashMap<>();try {//获取跟目录File path = new File(ResourceUtils.getURL("classpath:").getPath());if (!path.exists()) path = new File("");System.out.println("path:" + path.getAbsolutePath());File upload = new File(path.getAbsolutePath(), "static/images/upload/");if (!upload.exists())upload.mkdirs();String realPath = path.getAbsolutePath() + "/static/views/upload";request.setAttribute("path", realPath);image = FileUploadUtils.uploadFile(file, realPath);result.put("code", 0);result.put("image", image);} catch (Exception e) {result.put("code", 1);e.printStackTrace();}return result;}}

公共控制器

/*** 公告控制器*/
@Api(value = "公告模块AIP接口")
@RestController
public class NoticeController {@Autowiredprivate NoticeService noticeService;/*** 查询结果列表** @param page* @param limit* @return*/@SuppressWarnings("rawtypes")@ApiOperation(value = "公告模块接口",notes = "公告结果列表")@GetMapping("/admin/notice/list")public ServerLayResult<Notice> list(@RequestParam(value = "page", defaultValue = "1") Integer page,@RequestParam(value = "limit", defaultValue = "10") Integer limit) {@SuppressWarnings("unchecked")ServerLayResult<Notice> result = new ServerLayResult(0, "", noticeService.count(), noticeService.selectAll(page, limit));return result;}/*** 根据id删除** @param id* @return*/@ApiOperation(value = "公告删除接口",notes = "根据公告id删除公告")@GetMapping("/admin/notice/del")public String delete(Integer id) {System.out.println("id = " + id);int row = noticeService.deleteByPrimaryKey(id);if (row > 0) {return "success";}return "error";}/*** 更新** @param notice* @return*/@ApiOperation(value = "更新公告接口",notes = "根据公告前台json数据对象进行删除公告!")@PostMapping("/admin/notice/update")public String update(@RequestBody Notice notice) {Notice upNotice = notice;upNotice.setNtime(new Date());if (upNotice != null) {int index = noticeService.updateByPrimaryKey(upNotice);if (index > 0) {return "success";}}return "error";}/*** 保存操作** @param notice* @return*/@ApiOperation(value = "保存公告接口",notes = "根据前台传入json数据对象进行保存公告")@PostMapping("/admin/notice/save")public String save(@RequestBody Notice notice) {Notice saveNotice = notice;saveNotice.setNtime(new Date());if (saveNotice != null) {int index = noticeService.insert(saveNotice);if (index > 0) {return "success";}}return "error";}
}

如果也想学习本系统,下面领取。回复:069springboot

Java项目:Springboot汽车配件销售管理系统相关推荐

  1. Springboot汽车配件销售管理系统毕业设计源码131650

    Springboot汽车配件销售管理系统 摘  要 随着二十一世信息代的到来,信息技展越来越快,随着互联网的发展,网上购物具有普遍性,并被越来越多的人所接受,目前网上汽配件销售渠道有很多,比如淘宝等就 ...

  2. (附源码)springboot汽车配件销售管理系统 毕业设计131650

    Springboot汽车配件销售管理系统 摘 要 随着二十一世信息代的到来,信息技展越来越快,随着互联网的发展,网上购物具有普遍性,并被越来越多的人所接受,目前网上汽配件销售渠道有很多,比如淘宝等就是 ...

  3. springboot汽车配件销售管理系统 附源码-毕业设计131650

    Springboot汽车配件销售管理系统 摘  要 随着二十一世信息代的到来,信息技展越来越快,随着互联网的发展,网上购物具有普遍性,并被越来越多的人所接受,目前网上汽配件销售渠道有很多,比如淘宝等就 ...

  4. 基于javaweb的汽车配件销售管理系统(java+springboot+layui+html+mysql)

    基于javaweb的汽车配件销售管理系统(java+springboot+layui+html+mysql) 运行环境 Java≥8.MySQL≥5.7 开发工具 eclipse/idea/myecl ...

  5. SpringBoot+Vue实现前后端分离的汽车配件销售管理系统

    文末获取源码 开发语言:Java 使用框架:spring boot 前端技术:JavaScript.Vue.js .css3 开发工具:IDEA/MyEclipse/Eclipse.Visual St ...

  6. 基于Java实现的汽车租赁管理系统、SSM/SpringBoot两个版本都有+mysql汽车出租系统实现

    基于Java实现的汽车租赁管理系统.SSM/SpringBoot两个版本都有+mysql汽车出租系统实现 感兴趣的朋友可以家 3060912346 主要技术 SpringBoot\SSM(两个版本都有 ...

  7. java计算机毕业设计汽车租赁管理系统源代码+数据库+系统+lw文档

    java计算机毕业设计汽车租赁管理系统源代码+数据库+系统+lw文档 java计算机毕业设计汽车租赁管理系统源代码+数据库+系统+lw文档 本源码技术栈: 项目架构:B/S架构 开发语言:Java语言 ...

  8. java计算机毕业设计汽车售后服务管理系统源码+程序+lw文档+mysql数据库

    java计算机毕业设计汽车售后服务管理系统源码+程序+lw文档+mysql数据库 java计算机毕业设计汽车售后服务管理系统源码+程序+lw文档+mysql数据库 本源码技术栈: 项目架构:B/S架构 ...

  9. java计算机毕业设计汽车租赁管理系统源码+程序+lw文档+mysql数据库

    java计算机毕业设计汽车租赁管理系统源码+程序+lw文档+mysql数据库 java计算机毕业设计汽车租赁管理系统源码+程序+lw文档+mysql数据库 本源码技术栈: 项目架构:B/S架构 开发语 ...

最新文章

  1. 如何用python画数据图-利用Python绘制数据的瀑布图的教程
  2. BufferedReader
  3. 移动端通过ajax上传图片(文件)并在前台展示——通过H5的FormData对象
  4. SAP批次级别的意义及启用操作
  5. 数据结构学习笔记(四):重识数组(Array)
  6. [论文阅读] (11)ACE算法和暗通道先验图像去雾算法(Rizzi | 何恺明老师)
  7. js中document.write()使用方法
  8. [转]使用Navicat for Oracle工具连接oracle的
  9. Kylin3.1.3连接Hbase报错找不到 hbase-common lib not found的解决办法
  10. jdk和jre是什么?都有什么用?
  11. celery 停止_celery 停止执行中 task
  12. 阿里战微信!20 亿元扶持小程序开发者
  13. Proteus:51仿真入门
  14. 巧用 TypeScript(四)
  15. 图说:Windows 8 Copy的呈现变化
  16. dede rss.php,[经验]dede全站RSS订阅静态输出的办法
  17. IV值和WOE值的理解
  18. 打开计算机文件反应慢怎么解决方法,电脑反应慢怎么办?常见原因与解决办法...
  19. 外贸软件出口管理亮点有哪些,出口贸易过程全解析
  20. 焦虑的时候听一听,分享我喜欢的一段话,心就安静很多

热门文章

  1. Ubuntu 下安装zsh和oh-my-zsh
  2. 为什么浙江初中数学用计算机,计算器对初中数学学习几点看法
  3. Android - Audio - Qcom平台 - hac器件bring up
  4. 影院卖品既然除了爆米花都卖不动,为什么不降价?
  5. 只有那些疯狂到以为自己能够改变世界的人, 才能真正的改变世界
  6. 嵌入式系统与通用计算机系统的区别,嵌入式操作系统和通用计算机系统两者有什么不同之处...
  7. 联想网御防火墙v3404_联想网御防火墙Power_V命令行操作手册.pdf
  8. 利用有限元数值模拟技术辅助静电场学习
  9. 2022年网络搭建与应用——国赛FTP搭建 (解题步骤答案)
  10. 支付宝,你在憋什么大招?