0
点赞
收藏
分享

微信扫一扫

基于springboot的消防员招录系统


博主主页:猫头鹰源码

博主简介:Java领域优质创作者、博客专家、公司架构师、全网粉丝5万+、专注Java技术领域和毕业设计项目实战

主要内容:毕业设计(Javaweb项目|小程序等)、简历模板、学习资料、面试题库、技术咨询

项目介绍: 

该系统为原创项目,基于springboot技术,数据层为MyBatis,mysql数据库,页面采用html,具有完整的业务逻辑,适合选题:消防员、消防、招录、人员录取等。

项目功能:

用户:首页,分页查询公告或筛选公告,提交申请、登陆注册、个人信息维护
管理员:登陆、用户管理、报名管理、公告管理、管理员管理
以上是主要功能,具体实现以演示视频为准。

数据库表结构文档: 

基于springboot的消防员招录系统_spring boot

系统包含技术:

后端:springBoot、mybatis
前端:bootstrap、layui、js、css等,html页面
开发工具:idea
数据库:mysql 5.7
JDK版本:jdk1.8

系统部分截图:

首页

基于springboot的消防员招录系统_开发语言_02

分页筛选公告

基于springboot的消防员招录系统_java_03

公告详情

基于springboot的消防员招录系统_javaweb_04

 我的申请信息

基于springboot的消防员招录系统_spring boot_05

查看个人信息

基于springboot的消防员招录系统_javaweb_06

登录页面,输入账号登陆

基于springboot的消防员招录系统_开发语言_07

 管理员首页

基于springboot的消防员招录系统_开发语言_08

管理员对用户管理

基于springboot的消防员招录系统_开发语言_09

管理员公告管理

基于springboot的消防员招录系统_后端_10

管理员对公告进行编辑

基于springboot的消防员招录系统_开发语言_11

管理员对报名进行管理

基于springboot的消防员招录系统_javaweb_12

部分代码:

首页相关操作

//首页
    @GetMapping("/")
    public String userIframe(Model model){
        Map mp = new HashMap<>();
        mp.put("limit","1");
        List<Notice> notices = noticeService.queryFilter(mp);
        model.addAttribute("notices",notices);
        return "show";
    }

    //店铺
    @GetMapping("/notice")
    public String touristRoute(Model model, String searchName, Integer pageNum, Integer pageSize){
        Map mp = new HashMap<>();
        mp.put("title",searchName);
        if(pageNum==null){
            pageNum =1;
        }
        if(pageSize==null){
            pageSize =10;
        }
        PageHelper.startPage(pageNum,pageSize);
        List<Notice> storeList = noticeService.queryFilter(mp);
        PageInfo<Notice> notices = new PageInfo<>(storeList);
        for(int i=0;i<notices.getList().size();i++){
            notices.getList().get(i).setContent(this.getText(notices.getList().get(i).getContent()));
        }
        model.addAttribute("notices",notices);
        return "notices";
    }


    //商品详情
    @GetMapping("/noticeDetail")
    public String goodDetail(String id, Model model){
        Notice notice = noticeService.selectById(id);
        model.addAttribute("id",id);
        model.addAttribute("notice",notice);
        return "noticeDetail";
    }

 文件上传

/**
     * 文件上传
     * @param dropFile
     * @param request
     * @return
     */
    @ResponseBody
    @RequestMapping(value = "/avatar", method = RequestMethod.POST)
    public Map<String, Object> acticleAvatar(MultipartFile dropFile, HttpServletRequest request) throws IOException {
        Map<String, Object> result = new HashMap<>();
        //获取文件后缀
        String fileName = dropFile.getOriginalFilename();
        String fileSuffix = fileName.substring(fileName.lastIndexOf('.'));
        //文件存放路径
        String fileDirPath = new String(uploadDir);
        File fileDir = new File(fileDirPath);
        //判断文件是否存在
        if (!fileDir.exists()){
            fileDir.mkdirs();
        }
        File file = new File(fileDir.getAbsolutePath()+ File.separator+ UUID.randomUUID() + fileSuffix);
        try {
            dropFile.transferTo(file);
        } catch (IOException e) {
            e.printStackTrace();
        }
        //传到前端
        result.put("fileName", "http://localhost:"+port+"/upload/"+file.getName());
        return result;
    }

登录

/**
	 * 登录
	 * 将提交数据(username,password)写入Admin对象
	 */
	@RequestMapping(value = "/login")
	@ResponseBody
	public String login(String username, String password, String type, Model model, HttpSession session) {
		Map mp = new HashMap();
		if(username.equals("") || password.equals("")){
			return "202";
		}
		if(type.equals("01")){
			mp.put("username",username);
			mp.put("password",password);
			List<Admin> admins = adminService.queryFilter(mp);
			if(admins!=null && admins.size()==1){
				session.setAttribute("userInfo", admins.get(0));
				session.setAttribute("type", "01");
			}else{
				return "201";
			}
		}else{
			mp.put("phone",username);
			mp.put("password",password);
			List<User> users = userService.queryFilter(mp);
			if(users!=null && users.size()==1){
				session.setAttribute("userInfo", users.get(0));
				session.setAttribute("type", "02");
				return "203";
			}else{
				return "201";
			}
		}
		return "200";
	}

以上就是部分功能展示,从整体上来看,本系统功能是十分完整的,界面设计简洁大方,交互友好,数据库设计也很合理,规模适中,代码工整,清晰,适合学习使用。

好了,今天就到这儿吧,小伙伴们点赞、收藏、评论,一键三连走起呀,下期见~~

举报

相关推荐

0 条评论