基于Java+SpringMVC+vue+element实现前后端分离校园失物招领系统详细设计

基于Java+SpringMVC+vue+element实现前后端分离校园失物招领系统详细设计

博主介绍:多年java开发经验,专注Java开发、定制、远程、文档编写指导等,csdn特邀作者、专注于Java技术领域
作者主页 央顺技术团队
Java毕设项目精品实战案例《1000套》
欢迎点赞 收藏 ⭐留言
文末获取源码联系方式

前言介绍:

随着社会的发展,社会的各行各业都在利用信息化时代的优势。计算机的优势和普及使得各种信息系统的开发成为必需。
校园失物招领系统,主要的模块包括首页、个人中心、公告信息管理、用户管理、物品类别管理、失物信息管理、招领信息管理、留言板管理、交流论坛、系统管理等功能。系统中管理员主要是为了安全有效地存储和管理各类信息,还可以对系统进行管理与更新维护等操作,并且对后台有相应的操作权限。
要想实现校园失物招领系统的各项功能,需要后台数据库的大力支持。管理员验证注册信息,收集的信息,并由此分析得出的关联信息等大量的数据都由数据库管理。本文中数据库服务器端采用了Mysql作为后台数据库,使Web与数据库紧密联系起来。在设计过程中,充分保证了系统代码的良好可读性、实用性、易扩展性、通用性、便于后期维护、操作方便以及页面简洁等特点。
本系统的开发使获取校园失物招领系统信息能够更加方便快捷,同时也使校园失物招领系统管理信息变的更加系统化、有序化。系统界面较友好,易于操作。

系统设计:

主要功能设计: 首页、个人中心、公告信息管理、用户管理、物品类别管理、失物信息管理、招领信息管理、留言板管理、交流论坛、系统管理等相应操作管理

系统架构图属于系统设计阶段,系统架构图只是这个阶段一个产物,系统的总体架构决定了整个系统的模式,是系统的基础。校园失物招领系统的整体结构设计如图所示。
在这里插入图片描述

功能截图:

系统前台模块:

系统前端首页:

校园失物招领系统,在系统的首页可以查看首页、公告信息、失物信息、招领信息、交流论坛、留言反馈、个人中心、后台管理等信息进行详细操作
在这里插入图片描述

公告信息:

在公告信息页面中可以查看公告标题、类型、发布日期、内容、图片等信息,并进行评论、收藏等操作
在这里插入图片描述

失物信息:

失物信息,在失物信息页面中可以查看物品名称、图片、物品类别、丢失地点、丢失时间、用户名、姓名、手机、详细描述等信息,并进行评论操作
在这里插入图片描述
在这里插入图片描述
招领信息:招领信息,在招领信息页面中可以查看物品名称
在这里插入图片描述

招领详情页面:

查看物品名称、图片、物品类别、捡拾地点、捡拾时间、用户名、姓名、手机、详细描述等信息,并进行评论操作
在这里插入图片描述

交流论坛信息:

交流论坛,在交流论坛页面通过填写标题、类型、内容等信息进行发布帖子或重置操作
在这里插入图片描述

评论交流:

在这里插入图片描述
留言反馈:在留言反馈页面输入留言内容并立即提交或重置操作
在这里插入图片描述
个人中心:在个人中心页面通过填写用户名、密码、姓名、性别、上传图片、手机等信息进行个人信息修改操作,根据需要对我的发布、我的收藏等进行相应操作

在这里插入图片描述

普通用户后台管理:

用户登录进入系统可以查看首页、个人中心、失物信息管理、招领信息管理、我的收藏管理等信息进行详细操作
在这里插入图片描述

管理员后台管理:

管理员登录进入系统之后,就可以对所有的信息进行查看,可以查看到首页、个人中心、公告信息管理、用户管理、物品类别管理、失物信息管理、招领信息管理、留言板管理、交流论坛、系统管理等,并且还可以对其进行相应的操作管理

公告管理:

在公告信息管理页面中可以对索引、公告标题、类型、图片、发布日期等信息进行详情,查看评论,修改或删除等操作
在这里插入图片描述

内容详情:

在这里插入图片描述

用户管理:

在用户管理页面中可以对索引、用户名、密码、姓名、性别、头像、手机等信息进行详情,修改或删除等操作
在这里插入图片描述

物品类型管理:

在这里插入图片描述

失物信息管理:

失物信息管理,在失物信息管理页面中可以对索引、物品名称、图片、物品类别、丢失地点、丢失时间、用户名、姓名、手机等信息进行详情,修改或删除等操作
在这里插入图片描述

招领信息管理:

在招领信息管理页面中可以对索引、物品名称、图片、物品类别、捡拾地点、捡拾时间、用户名、姓名、手机等信息进行详情,修改或删除等操作
在这里插入图片描述

留言板管理:

在留言板管理页面中可以对索引、用户名、留言内容、回复内容等信息进行详情,回复,修改或删除等操作
在这里插入图片描述

交流论坛管理:

在交流论坛页面中可以对索引、帖子标题、用户名、状态等信息进行详情,修改或删除等操作
在这里插入图片描述

系统轮播管理:

在轮播图管理页面中可以对索引、名称、值等信息进行详情,修改或删除等操作
在这里插入图片描述

数据设计:

失物信息实体属性图,如图所示:
在这里插入图片描述
招领信息实体属性图,如图所示:
在这里插入图片描述
交流论坛实体属性图如图所示。
在这里插入图片描述

代码实现:

 
/**
 * 上传文件映射表
 */
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{
	@Autowired
    private ConfigService configService;
 
/**
	 * 下载文件
	 */
	@IgnoreAuth
	@RequestMapping("/download")
	public void download(@RequestParam String fileName, HttpServletRequest request, HttpServletResponse response) {
		try {
			File file = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName);
			if (file.exists()) {
				response.reset();
				response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName+"\"");
				response.setHeader("Cache-Control", "no-cache");
				response.setHeader("Access-Control-Allow-Credentials", "true");
				response.setContentType("application/octet-stream; charset=UTF-8");
				IOUtils.write(FileUtils.readFileToByteArray(file), response.getOutputStream());
			}
 
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	/**
	 * 上传文件
	 */
	@RequestMapping("/upload")
	public R upload(@RequestParam("file") MultipartFile file, String type,HttpServletRequest request) throws Exception {
		if (file.isEmpty()) {
			throw new EIException("上传文件不能为空");
		}
		String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
		String fileName = new Date().getTime()+"."+fileExt;
		File dest = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName);
		file.transferTo(dest);
		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);
	}
	
	
	
}
 
/**
 * 失物信息
 * 后端接口
 * @author 
 * @email 
 * @date 2022-03-06 13:11:28
 */
@RestController
@RequestMapping("/shiwuxinxi")
public class ShiwuxinxiController {
    @Autowired
    private ShiwuxinxiService shiwuxinxiService;
    
 
 
    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,ShiwuxinxiEntity shiwuxinxi, HttpServletRequest request){
 
		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("yonghu")) {
			shiwuxinxi.setYonghuming((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<ShiwuxinxiEntity> ew = new EntityWrapper<ShiwuxinxiEntity>();
		PageUtils page = shiwuxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shiwuxinxi), params), params));
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,ShiwuxinxiEntity shiwuxinxi, HttpServletRequest request){
        EntityWrapper<ShiwuxinxiEntity> ew = new EntityWrapper<ShiwuxinxiEntity>();
		PageUtils page = shiwuxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shiwuxinxi), params), params));
        return R.ok().put("data", page);
    }
 
	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( ShiwuxinxiEntity shiwuxinxi){
       	EntityWrapper<ShiwuxinxiEntity> ew = new EntityWrapper<ShiwuxinxiEntity>();
      	ew.allEq(MPUtil.allEQMapPre( shiwuxinxi, "shiwuxinxi")); 
        return R.ok().put("data", shiwuxinxiService.selectListView(ew));
    }
 
	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(ShiwuxinxiEntity shiwuxinxi){
        EntityWrapper< ShiwuxinxiEntity> ew = new EntityWrapper< ShiwuxinxiEntity>();
 		ew.allEq(MPUtil.allEQMapPre( shiwuxinxi, "shiwuxinxi")); 
		ShiwuxinxiView shiwuxinxiView =  shiwuxinxiService.selectView(ew);
		return R.ok("查询失物信息成功").put("data", shiwuxinxiView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        ShiwuxinxiEntity shiwuxinxi = shiwuxinxiService.selectById(id);
        return R.ok().put("data", shiwuxinxi);
    }
 
    /**
     * 前端详情
     */
	@IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        ShiwuxinxiEntity shiwuxinxi = shiwuxinxiService.selectById(id);
        return R.ok().put("data", shiwuxinxi);
    }
    
 
 
 
    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody ShiwuxinxiEntity shiwuxinxi, HttpServletRequest request){
    	shiwuxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(shiwuxinxi);
 
        shiwuxinxiService.insert(shiwuxinxi);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody ShiwuxinxiEntity shiwuxinxi, HttpServletRequest request){
    	shiwuxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(shiwuxinxi);
 
        shiwuxinxiService.insert(shiwuxinxi);
        return R.ok();
    }
 
    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody ShiwuxinxiEntity shiwuxinxi, HttpServletRequest request){
        //ValidatorUtils.validateEntity(shiwuxinxi);
        shiwuxinxiService.updateById(shiwuxinxi);//全部更新
        return R.ok();
    }
    
 
    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        shiwuxinxiService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /**
     * 提醒接口
     */
	@RequestMapping("/remind/{columnName}/{type}")
	public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("column", columnName);
		map.put("type", type);
		
		if(type.equals("2")) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Calendar c = Calendar.getInstance();
			Date remindStartDate = null;
			Date remindEndDate = null;
			if(map.get("remindstart")!=null) {
				Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
				c.setTime(new Date()); 
				c.add(Calendar.DAY_OF_MONTH,remindStart);
				remindStartDate = c.getTime();
				map.put("remindstart", sdf.format(remindStartDate));
			}
			if(map.get("remindend")!=null) {
				Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
				c.setTime(new Date());
				c.add(Calendar.DAY_OF_MONTH,remindEnd);
				remindEndDate = c.getTime();
				map.put("remindend", sdf.format(remindEndDate));
			}
		}
		
		Wrapper<ShiwuxinxiEntity> wrapper = new EntityWrapper<ShiwuxinxiEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}
 
		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("yonghu")) {
			wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username"));
		}
 
		int count = shiwuxinxiService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	
 
 
}

论文参考:

在这里插入图片描述

获取源码:

大家点赞、收藏、关注、评论啦
🍅查看下方微信号获取联系方式 📝
🚀🚀🚀精彩系列推荐
Java毕设项目精品实战案例《1000套》
精彩专栏推荐订阅:在下方专栏

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

网顺技术团队

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值