❤️撸完这个springboot项目,我对boot轻车熟路!源码+视频都开源强烈建议收藏❤️

Posted 我是springmeng

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了❤️撸完这个springboot项目,我对boot轻车熟路!源码+视频都开源强烈建议收藏❤️相关的知识,希望对你有一定的参考价值。

上次给大家分享了一个springboot+vue的校园招聘系统,视频教程加项目源码,都是开源的,应该说很香了,今天再给大家分享一个不错的springboot的项目。

老规矩,开源,开源,开源!!!

金九银十来了,小伙伴们,冲啊!前面已经整理了很多的面试题,拿去学习吧!

1,❤️爆肝!整理了一周的Spring面试大全【含答案】,吊打Java面试官【建议收藏】!❤️

2,❤️肝完了,一天掌握数据结构和算法面试题,吊打面试官,建议收藏❤️

3,❤️集合很简单?开什么玩笑?肝了一周,全是精华,万字讲解!面试再不怕集合问题了!!!❤️

4,肝完了,总结了SpringBoot与缓存的知识点,快速掌握

5,Mysql面试大全,看完可以吊打面试官!!!

6,入计算机专业的师弟师妹,别再迷茫了,我整理一份CS的学习路线大全!帮你超越大部分的同学!

7,❤️专科出身拿到阿里offer,小孟直呼666!【付硬核面试】❤️

8,❤️设计模式肝完了,还挺全!腾讯和阿里的offer已拿!❤️

废话不叨叨,直接上干货!

目录

1,系统源码下载地址

2,系统教程:

 3,系统环境

4,系统演示

5,系统核心代码

6,数据表设计


1,系统源码下载地址

见文章底部

2,系统教程:

一般开发项目,猛哥还是比较快,但是录教程真的非常耗时!

为了帮助大家更好的理解项目,还是录吧!

都开源了!

小伙伴,记得给个三连!

教程非常详细了:

见文章底部

 3,系统环境

 系统开发平台:

JDK1.8+Maven3.6.1

框架:Springboot2.X+Layui

数据库和工具:mysql5.7 Navicat

开发工具: Intellij Idea

浏览器:Chrome

涉及到的技术:MySql、Springboot、MyBatisPlus、lombok、Shiro、layui、jquery、element

4,系统演示

 

 

 

 

 

 

 

 

大家若看详细的演示还是去看视频吧: 

 https://www.bilibili.com/video/BV1eh411k7P3

老铁,这些好的实战项目,你确认不三连吗?嘿嘿……

5,系统核心代码

controller:

@Controller
public class UserController 

    /**
     * 转向登录页面
     */
    @RequestMapping(value = "/login")
    public String login()
        return "/login";
    

    /**
     * 判断用户登录是否成功
     */
    @RequestMapping(value = "/toLogin")
    @ResponseBody
    public Object toLogin(String username,String password)
        if(username==null||password==null)
            return ResultMapUtil.getHashMapLogin("用户名密码不能为空","2");
        
        Subject subject = SecurityUtils.getSubject();
        UsernamePasswordToken token = new UsernamePasswordToken(username,password);
        try
            subject.login(token);
        catch (UnknownAccountException e)
            return ResultMapUtil.getHashMapLogin("用户名不存在","2");
        catch (IncorrectCredentialsException e)
            return ResultMapUtil.getHashMapLogin("密码错误","2");
        
        return ResultMapUtil.getHashMapLogin("验证成功","1");
    

    /**
     * 转向后台管理首页
     */
    @RequestMapping(value = "/index")
    public String index()
        return "/index";
    

    /**
     * 退出登录
     */
    @RequestMapping(value = "/logout")
    public String logout()
        Subject subject = SecurityUtils.getSubject();
        subject.logout();
        return "redirect:/login";
    

SupplierController

public class SupplierController 

    @Autowired
    private ISupplierService supplierService;

    /**
     * 转向供应商页面
     */
    @RequestMapping
    public String supplier()
        return "/supplier";
    

    /**
     * 分页查询供应商列表
     */
    @RequestMapping(value = "/supplierQueryPage")
    @ResponseBody
    public Object supplierQueryPage(String param, @RequestParam(defaultValue = "1")int pageNum,@RequestParam(defaultValue = "10")int pageSize)
        try
            IPage<Supplier> iPage = supplierService.selectSupplierPage(pageNum,pageSize,param);
            return ResultMapUtil.getHashMapMysqlPage(iPage);
         catch (Exception e)
            return ResultMapUtil.getHashMapException(e);
        
    

    /**
     * 转向供应商新增页面
     */
    @RequestMapping(value = "/supplierPage")
    public String supplierPage()
        return "/supplierPage";
    

    /**
     * 添加一个供应商
     */
    @RequestMapping(value = "/supplierAdd")
    @ResponseBody
    public Object supplierAdd(Supplier supplier)
        try
            supplier.setCreatetime(new Date());
            int i = supplierService.addSupplier(supplier);
            return ResultMapUtil.getHashMapSave(i);
         catch (Exception e)
            return ResultMapUtil.getHashMapException(e);
        
    

    /**
     * 转向供应商编辑页面
     */
    @RequestMapping(value = "/supplierQueryById")
    public String supplierQueryById(@RequestParam(name = "id",required = true)Integer id, Model model)
        Supplier supplier = supplierService.querySupplierById(id);
        model.addAttribute("obj",supplier);
        return "/supplierPage";
    

    /**
     * 修改一个供应商
     */
    @RequestMapping(value = "/supplierEdit")
    @ResponseBody
    public Object supplierEdit(Supplier supplier)
        try
            int i = supplierService.editSupplier(supplier);
            return ResultMapUtil.getHashMapSave(i);
         catch (Exception e)
            return ResultMapUtil.getHashMapException(e);
        
    

    /**
     * 删除一个供应商
     */
    @RequestMapping(value = "/supplierDelById")
    @ResponseBody
    public Object supplierDelById(Integer id)
        try
            int i = supplierService.delSupplierById(id);
            return ResultMapUtil.getHashMapDel(i);
         catch (Exception e)
            return ResultMapUtil.getHashMapException(e);
        
    

SaleinfoController


    @Autowired
    private ISaleinfoService saleinfoService;

    /**
     * 转向销售记录页面
     */
    @RequestMapping
    public String saleinfo()
        return "/saleinfo";
    

    /**
     * 分页查询销售记录列表
     */
    @RequestMapping(value = "/saleinfoQueryPage")
    @ResponseBody
    public Object saleinfoQueryPage(String param, @RequestParam(defaultValue = "1")int pageNum,@RequestParam(defaultValue = "10")int pageSize)
        try
            IPage<Saleinfo> iPage = saleinfoService.selectSaleinfoPage(pageNum,pageSize,param);
            return ResultMapUtil.getHashMapMysqlPage(iPage);
         catch (Exception e)
            return ResultMapUtil.getHashMapException(e);
        
    

    /**
     * 转向销售记录新增页面
     */
    @RequestMapping(value = "/saleinfoPage")
    public String saleinfoPage()
        return "/saleinfoPage";
    

    /**
     * 添加一个销售记录
     */
    @RequestMapping(value = "/saleinfoAdd")
    @ResponseBody
    public Object saleinfoAdd(Saleinfo saleinfo)
        try
            int i = saleinfoService.addSaleinfo(saleinfo);
            return ResultMapUtil.getHashMapSave(i);
         catch (Exception e)
            return ResultMapUtil.getHashMapException(e);
        
    

    /**
     * 转向销售记录编辑页面
     */
    @RequestMapping(value = "/saleinfoQueryById")
    public String saleinfoQueryById(@RequestParam(name = "id",required = true)Integer id, Model model)
        Saleinfo saleinfo = saleinfoService.querySaleinfoById(id);
        model.addAttribute("obj",saleinfo);
        return "/saleinfoPage";
    

    /**
     * 修改一个销售记录
     */
    @RequestMapping(value = "/saleinfoEdit")
    @ResponseBody
    public Object saleinfoEdit(Saleinfo saleinfo)
        try
            int i = saleinfoService.editSaleinfo(saleinfo);
            return ResultMapUtil.getHashMapSave(i);
         catch (Exception e)
            return ResultMapUtil.getHashMapException(e);
        
    

    /**
     * 删除一个销售记录
     */
    @RequestMapping(value = "/saleinfoDelById")
    @ResponseBody
    public Object saleinfoDelById(Integer id)
        try
            int i = saleinfoService.delSaleinfoById(id);
            return ResultMapUtil.getHashMapDel(i);
         catch (Exception e)
            return ResultMapUtil.getHashMapException(e);
        
    

6,数据表设计

DROP TABLE IF EXISTS `billinfo`;
CREATE TABLE `billinfo`  (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `sname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '供应商名称',
  `dname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '药品名称',
  `count` int(10) NULL DEFAULT NULL COMMENT '药品数量',
  `total` float(20, 2) NULL DEFAULT NULL COMMENT '总金额',
  `buytime` datetime(0) NULL DEFAULT NULL COMMENT '进货时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '账单信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of billinfo
-- ----------------------------
INSERT INTO `billinfo` VALUES (1, '哈药六厂', '感冒灵', 1000, 22500.00, '2021-02-02 16:00:00');

-- ----------------------------
-- Table structure for druginfo
-- ----------------------------
DROP TABLE IF EXISTS `druginfo`;
CREATE TABLE `druginfo`  (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称',
  `supplier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '供应商',
  `producttime` date NULL DEFAULT NULL COMMENT '生产时间',
  `warrenty` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '保质期(月)',
  `number` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '药品编码',
  `price` float(20, 2) NULL DEFAULT NULL COMMENT '价格',
  `stock` int(10) NULL DEFAULT NULL COMMENT '库存',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '药品信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of druginfo
-- ----------------------------
INSERT INTO `druginfo` VALUES (2, '感冒灵', '哈药六厂', '2020-01-27', '24', '1001', 22.50, 50);
INSERT INTO `druginfo` VALUES (3, '白药片', '云南白药', '2021-02-02', '36', '2021052', 30.50, 100);

-- ----------------------------
-- Table structure for owinfo
-- ----------------------------
DROP TABLE IF EXISTS `owinfo`;
CREATE TABLE `owinfo`  (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `dname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '药品名称',
  `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '出库/入库',
  `count` int(10) NULL DEFAULT NULL COMMENT '数量',
  `operator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作人',
  `createtime` datetime(0) NULL DEFAULT NULL COMMENT '操作时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '出入库' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of owinfo
-- ----------------------------
INSERT INTO `owinfo` VALUES (1, '白药片', '出库', 3, '华佗', '2021-02-20 14:21:53');
INSERT INTO `owinfo` VALUES (2, '感冒灵', '入库', 20, '扁鹊', '2021-02-20 14:22:12');

-- ----------------------------
-- Table structure for problem
-- ----------------------------
DROP TABLE IF EXISTS `problem`;
CREATE TABLE `problem`  (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `dname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '药品名称',
  `dcount` int(10) NULL DEFAULT NULL COMMENT '问题药品数量',
  `dprice` float(20, 2) NULL DEFAULT NULL COMMENT '药品单价',
  `reason` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '问题原因',
  `createtime` datetime(0) NULL DEFAULT NULL COMMENT '操作时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '问题药品' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of problem
-- ----------------------------
INSERT INTO `problem` VALUES (1, '感冒灵', 2, 22.50, '受潮了。不能欺骗消费者。', '2021-02-24 14:19:36');

-- ----------------------------
-- Table structure for returngoods
-- ----------------------------
DROP TABLE IF EXISTS `returngoods`;
CREATE TABLE `returngoods`  (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `dname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '药品名称',
  `count` int(10) NULL DEFAULT NULL COMMENT '数量',
  `reason` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '退货原因',
  `total` float(20, 2) NULL DEFAULT NULL COMMENT '总金额',
  `operatetime` datetime(0) NULL DEFAULT NULL COMMENT '操作时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '收到退货' ROW_FORMAT = Dynamic;

我是小孟,记得点个赞支持下,谢了!

想联系我,可以去主页。

小伙伴们点赞、收藏、评论,一键三连走起呀,下期见~~


资料获取,关注下面的,回复:医院

以上是关于❤️撸完这个springboot项目,我对boot轻车熟路!源码+视频都开源强烈建议收藏❤️的主要内容,如果未能解决你的问题,请参考以下文章

❤️撸完这个springboot项目,我对boot轻车熟路!源码+视频都开源强烈建议收藏❤️

Java面试高Spring Boot+Sentinel+Nacos高并发已撸完

撸完这个开源项目,工资翻倍了!

重磅! SpringBoot+Sentinel+Nacos已撸完

彻夜怒肝 ! Spring Boot + Sentinel + Nacos 高并发已撸完...

Java面试高频题:Spring Boot+Sentinel+Nacos高并发已撸完