分享一套优质的微信小程序校园失物招领系统(SpringBoot后端+Vue管理端)
大家好我是锋哥看到一个不错的微信小程序校园失物招领系统(SpringBoot后端Vue管理端)分享下哈。项目介绍互联网发展至今无论是其理论还是技术都已经成熟而且它广泛参与在社会中的方方面面。它让信息都可以通过网络传播搭配信息管理工具可以很好地为人们提供服务。针对高校教师成果信息管理混乱出错率高信息安全性差劳动强度大费时费力等问题采用校园失物招领系统可以有效管理使信息管理能够更加科学和规范。校园失物招领系统使用Java语言进行编码使用Mysql创建数据表保存本系统产生的数据。系统可以提供信息显示和相应服务其管理校园失物招领系统信息查看校园失物招领系统信息管理校园失物招领系统。总之校园失物招领系统集中管理信息有着保密性强效率高存储空间大成本低等诸多优点。它可以降低信息管理成本实现信息管理计算机化。源码下载链接https://pan.baidu.com/s/1CwHLHe11xreoL5Zr7xKJ6Q?pwd1234提取码1234系统展示核心代码package com.controller; import java.io.File; import java.math.BigDecimal; import java.net.URL; import java.text.SimpleDateFormat; import com.alibaba.fastjson.JSONObject; import java.util.*; import org.springframework.beans.BeanUtils; import javax.servlet.http.HttpServletRequest; import org.springframework.web.context.ContextLoader; import javax.servlet.ServletContext; import com.service.TokenService; import com.utils.*; import java.lang.reflect.InvocationTargetException; import com.service.DictionaryService; import org.apache.commons.lang3.StringUtils; import com.annotation.IgnoreAuth; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.mapper.Wrapper; import com.entity.*; import com.entity.view.*; import com.service.*; import com.utils.PageUtils; import com.utils.R; import com.alibaba.fastjson.*; /** * 失物信息 * 后端接口 * author * email */ RestController Controller RequestMapping(/shiwuzhaoling) public class ShiwuzhaolingController { private static final Logger logger LoggerFactory.getLogger(ShiwuzhaolingController.class); private static final String TABLE_NAME shiwuzhaoling; Autowired private ShiwuzhaolingService shiwuzhaolingService; Autowired private TokenService tokenService; Autowired private DictionaryService dictionaryService;//字典 Autowired private ForumService forumService;//论坛 Autowired private NewsService newsService;//公告信息 Autowired private XunwuqishiService xunwuqishiService;//寻物启事 Autowired private XunwuqishiLiuyanService xunwuqishiLiuyanService;//寻物启事留言 Autowired private YonghuService yonghuService;//用户 Autowired private UsersService usersService;//管理员 /** * 后端列表 */ RequestMapping(/page) public R page(RequestParam MapString, Object params, HttpServletRequest request){ logger.debug(page方法:,,Controller:{},,params:{},this.getClass().getName(),JSONObject.toJSONString(params)); String role String.valueOf(request.getSession().getAttribute(role)); if(false) return R.error(511,永不会进入); else if(用户.equals(role)) params.put(yonghuId,request.getSession().getAttribute(userId)); CommonUtil.checkMap(params); PageUtils page shiwuzhaolingService.queryPage(params); //字典表数据转换 ListShiwuzhaolingView list (ListShiwuzhaolingView)page.getList(); for(ShiwuzhaolingView c:list){ //修改对应字典表字段 dictionaryService.dictionaryConvert(c, request); } return R.ok().put(data, page); } /** * 后端详情 */ RequestMapping(/info/{id}) public R info(PathVariable(id) Long id, HttpServletRequest request){ logger.debug(info方法:,,Controller:{},,id:{},this.getClass().getName(),id); ShiwuzhaolingEntity shiwuzhaoling shiwuzhaolingService.selectById(id); if(shiwuzhaoling !null){ //entity转view ShiwuzhaolingView view new ShiwuzhaolingView(); BeanUtils.copyProperties( shiwuzhaoling , view );//把实体数据重构到view中 //级联表 用户 //级联表 YonghuEntity yonghu yonghuService.selectById(shiwuzhaoling.getYonghuId()); if(yonghu ! null){ BeanUtils.copyProperties( yonghu , view ,new String[]{ id, createTime, insertTime, updateTime, yonghuId});//把级联的数据添加到view中,并排除id和创建时间字段,当前表的级联注册表 view.setYonghuId(yonghu.getId()); } //修改对应字典表字段 dictionaryService.dictionaryConvert(view, request); return R.ok().put(data, view); }else { return R.error(511,查不到数据); } } /** * 后端保存 */ RequestMapping(/save) public R save(RequestBody ShiwuzhaolingEntity shiwuzhaoling, HttpServletRequest request){ logger.debug(save方法:,,Controller:{},,shiwuzhaoling:{},this.getClass().getName(),shiwuzhaoling.toString()); String role String.valueOf(request.getSession().getAttribute(role)); if(false) return R.error(511,永远不会进入); else if(用户.equals(role)) shiwuzhaoling.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute(userId)))); WrapperShiwuzhaolingEntity queryWrapper new EntityWrapperShiwuzhaolingEntity() .eq(shiwuzhaoling_name, shiwuzhaoling.getShiwuzhaolingName()) .eq(shiwuzhaoling_types, shiwuzhaoling.getShiwuzhaolingTypes()) .eq(zhaugntai_types, shiwuzhaoling.getZhaugntaiTypes()) .eq(yonghu_id, shiwuzhaoling.getYonghuId()) .eq(shiwuzhaoling_dizhi, shiwuzhaoling.getShiwuzhaolingDizhi()) ; logger.info(sql语句:queryWrapper.getSqlSegment()); ShiwuzhaolingEntity shiwuzhaolingEntity shiwuzhaolingService.selectOne(queryWrapper); if(shiwuzhaolingEntitynull){ shiwuzhaoling.setCreateTime(new Date()); shiwuzhaolingService.insert(shiwuzhaoling); return R.ok(); }else { return R.error(511,表中有相同数据); } } /** * 后端修改 */ RequestMapping(/update) public R update(RequestBody ShiwuzhaolingEntity shiwuzhaoling, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException { logger.debug(update方法:,,Controller:{},,shiwuzhaoling:{},this.getClass().getName(),shiwuzhaoling.toString()); ShiwuzhaolingEntity oldShiwuzhaolingEntity shiwuzhaolingService.selectById(shiwuzhaoling.getId());//查询原先数据 String role String.valueOf(request.getSession().getAttribute(role)); // if(false) // return R.error(511,永远不会进入); // else if(用户.equals(role)) // shiwuzhaoling.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute(userId)))); if(.equals(shiwuzhaoling.getShiwuzhaolingPhoto()) || null.equals(shiwuzhaoling.getShiwuzhaolingPhoto())){ shiwuzhaoling.setShiwuzhaolingPhoto(null); } shiwuzhaolingService.updateById(shiwuzhaoling);//根据id更新 return R.ok(); } /** * 删除 */ RequestMapping(/delete) public R delete(RequestBody Integer[] ids, HttpServletRequest request){ logger.debug(delete:,,Controller:{},,ids:{},this.getClass().getName(),ids.toString()); ListShiwuzhaolingEntity oldShiwuzhaolingList shiwuzhaolingService.selectBatchIds(Arrays.asList(ids));//要删除的数据 shiwuzhaolingService.deleteBatchIds(Arrays.asList(ids)); return R.ok(); } /** * 批量上传 */ RequestMapping(/batchInsert) public R save( String fileName, HttpServletRequest request){ logger.debug(batchInsert方法:,,Controller:{},,fileName:{},this.getClass().getName(),fileName); Integer yonghuId Integer.valueOf(String.valueOf(request.getSession().getAttribute(userId))); SimpleDateFormat sdf new SimpleDateFormat(yyyy-MM-dd HH:mm:ss); try { ListShiwuzhaolingEntity shiwuzhaolingList new ArrayList();//上传的东西 MapString, ListString seachFields new HashMap();//要查询的字段 Date date new Date(); int lastIndexOf fileName.lastIndexOf(.); if(lastIndexOf -1){ return R.error(511,该文件没有后缀); }else{ String suffix fileName.substring(lastIndexOf); if(!.xls.equals(suffix)){ return R.error(511,只支持后缀为xls的excel文件); }else{ URL resource this.getClass().getClassLoader().getResource(static/upload/ fileName);//获取文件路径 File file new File(resource.getFile()); if(!file.exists()){ return R.error(511,找不到上传文件请联系管理员); }else{ ListListString dataList PoiUtil.poiImport(file.getPath());//读取xls文件 dataList.remove(0);//删除第一行因为第一行是提示 for(ListString data:dataList){ //循环 ShiwuzhaolingEntity shiwuzhaolingEntity new ShiwuzhaolingEntity(); // shiwuzhaolingEntity.setShiwuzhaolingUuidNumber(data.get(0)); //失物编号 要改的 // shiwuzhaolingEntity.setShiwuzhaolingName(data.get(0)); //物品名称 要改的 // shiwuzhaolingEntity.setShiwuzhaolingTypes(Integer.valueOf(data.get(0))); //物品类型 要改的 // shiwuzhaolingEntity.setZhaugntaiTypes(Integer.valueOf(data.get(0))); //物品状态 要改的 // shiwuzhaolingEntity.setYonghuId(Integer.valueOf(data.get(0))); //用户 要改的 // shiwuzhaolingEntity.setShiwuzhaolingPhoto();//详情和图片 // shiwuzhaolingEntity.setShiwuzhaolingTime(sdf.parse(data.get(0))); //拾遗时间 要改的 // shiwuzhaolingEntity.setShiwuzhaolingDizhi(data.get(0)); //拾遗地址 要改的 // shiwuzhaolingEntity.setShiwuzhaolingContent();//详情和图片 // shiwuzhaolingEntity.setCreateTime(date);//时间 shiwuzhaolingList.add(shiwuzhaolingEntity); //把要查询是否重复的字段放入map中 //失物编号 if(seachFields.containsKey(shiwuzhaolingUuidNumber)){ ListString shiwuzhaolingUuidNumber seachFields.get(shiwuzhaolingUuidNumber); shiwuzhaolingUuidNumber.add(data.get(0));//要改的 }else{ ListString shiwuzhaolingUuidNumber new ArrayList(); shiwuzhaolingUuidNumber.add(data.get(0));//要改的 seachFields.put(shiwuzhaolingUuidNumber,shiwuzhaolingUuidNumber); } } //查询是否重复 //失物编号 ListShiwuzhaolingEntity shiwuzhaolingEntities_shiwuzhaolingUuidNumber shiwuzhaolingService.selectList(new EntityWrapperShiwuzhaolingEntity().in(shiwuzhaoling_uuid_number, seachFields.get(shiwuzhaolingUuidNumber))); if(shiwuzhaolingEntities_shiwuzhaolingUuidNumber.size() 0 ){ ArrayListString repeatFields new ArrayList(); for(ShiwuzhaolingEntity s:shiwuzhaolingEntities_shiwuzhaolingUuidNumber){ repeatFields.add(s.getShiwuzhaolingUuidNumber()); } return R.error(511,数据库的该表中的 [失物编号] 字段已经存在 存在数据为:repeatFields.toString()); } shiwuzhaolingService.insertBatch(shiwuzhaolingList); return R.ok(); } } } }catch (Exception e){ e.printStackTrace(); return R.error(511,批量插入数据异常请联系管理员); } } /** * 前端列表 */ IgnoreAuth RequestMapping(/list) public R list(RequestParam MapString, Object params, HttpServletRequest request){ logger.debug(list方法:,,Controller:{},,params:{},this.getClass().getName(),JSONObject.toJSONString(params)); CommonUtil.checkMap(params); PageUtils page shiwuzhaolingService.queryPage(params); //字典表数据转换 ListShiwuzhaolingView list (ListShiwuzhaolingView)page.getList(); for(ShiwuzhaolingView c:list) dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段 return R.ok().put(data, page); } /** * 前端详情 */ RequestMapping(/detail/{id}) public R detail(PathVariable(id) Long id, HttpServletRequest request){ logger.debug(detail方法:,,Controller:{},,id:{},this.getClass().getName(),id); ShiwuzhaolingEntity shiwuzhaoling shiwuzhaolingService.selectById(id); if(shiwuzhaoling !null){ //entity转view ShiwuzhaolingView view new ShiwuzhaolingView(); BeanUtils.copyProperties( shiwuzhaoling , view );//把实体数据重构到view中 //级联表 YonghuEntity yonghu yonghuService.selectById(shiwuzhaoling.getYonghuId()); if(yonghu ! null){ BeanUtils.copyProperties( yonghu , view ,new String[]{ id, createDate});//把级联的数据添加到view中,并排除id和创建时间字段 view.setYonghuId(yonghu.getId()); } //修改对应字典表字段 dictionaryService.dictionaryConvert(view, request); return R.ok().put(data, view); }else { return R.error(511,查不到数据); } } /** * 前端保存 */ RequestMapping(/add) public R add(RequestBody ShiwuzhaolingEntity shiwuzhaoling, HttpServletRequest request){ logger.debug(add方法:,,Controller:{},,shiwuzhaoling:{},this.getClass().getName(),shiwuzhaoling.toString()); WrapperShiwuzhaolingEntity queryWrapper new EntityWrapperShiwuzhaolingEntity() .eq(shiwuzhaoling_uuid_number, shiwuzhaoling.getShiwuzhaolingUuidNumber()) .eq(shiwuzhaoling_name, shiwuzhaoling.getShiwuzhaolingName()) .eq(shiwuzhaoling_types, shiwuzhaoling.getShiwuzhaolingTypes()) .eq(zhaugntai_types, shiwuzhaoling.getZhaugntaiTypes()) .eq(yonghu_id, shiwuzhaoling.getYonghuId()) .eq(shiwuzhaoling_dizhi, shiwuzhaoling.getShiwuzhaolingDizhi()) // .notIn(shiwuzhaoling_types, new Integer[]{102}) ; logger.info(sql语句:queryWrapper.getSqlSegment()); ShiwuzhaolingEntity shiwuzhaolingEntity shiwuzhaolingService.selectOne(queryWrapper); if(shiwuzhaolingEntitynull){ shiwuzhaoling.setCreateTime(new Date()); shiwuzhaolingService.insert(shiwuzhaoling); return R.ok(); }else { return R.error(511,表中有相同数据); } } }

相关新闻

如何用1款开源工具解锁加密音频自由?音频格式转换完整指南

如何用1款开源工具解锁加密音频自由?音频格式转换完整指南

如何用1款开源工具解锁加密音频自由?音频格式转换完整指南 【免费下载链接】QMCDecode QQ音乐QMC格式转换为普通格式(qmcflac转flac,qmc0,qmc3转mp3, mflac,mflac0等转flac),仅支持macOS,可自动识别到QQ音乐下载目录,默…

2026/7/5 19:14:52 阅读更多 →
横评后发现!千笔AI,遥遥领先的降AIGC网站

横评后发现!千笔AI,遥遥领先的降AIGC网站

在AI技术迅猛发展的今天,越来越多的本科生开始借助AI工具辅助论文写作,提升效率、优化内容。然而,随之而来的“AI率超标”问题却成为许多学生难以逾越的障碍。随着各大查重系统不断升级算法,对AI生成内容的识别愈发严格&#xff0…

2026/7/5 7:37:12 阅读更多 →
跨平台音乐API开发效率提升指南:3大突破与实战应用

跨平台音乐API开发效率提升指南:3大突破与实战应用

跨平台音乐API开发效率提升指南:3大突破与实战应用 【免费下载链接】listen1-api One API for all free music in China 项目地址: https://gitcode.com/gh_mirrors/li/listen1-api 价值定位:为什么需要统一音乐API接口 在数字音乐生态中&#x…

2026/7/5 8:14:01 阅读更多 →

最新新闻

美团ElasticSearch实践

美团ElasticSearch实践

美团ElasticSearch实践美团外卖搜索工程团队在Elasticsearch的优化实践中,基于Location-Based Service(LBS)业务场景对Elasticsearch的查询性能进行优化。该优化基于Run-Length Encoding(RLE)设计了一款高效的倒排索引…

2026/7/6 13:54:48 阅读更多 →
《唤醒你的AI同事:WorkBuddy从零上手》038:附录C 推荐技能清单

《唤醒你的AI同事:WorkBuddy从零上手》038:附录C 推荐技能清单

本文是《唤醒你的 AI 同事——WorkBuddy 从零上手》系列 第 38 篇。 回顾总结:通过第 036 篇附录 A 的指令模板和附录 B 的快捷键,你现在已经掌握了 WorkBuddy 的"基本功"——知道怎么提问、怎么快速操作。但 WorkBuddy 真正的威力在于它的技能生态系统:通过安装不…

2026/7/6 13:52:47 阅读更多 →
第四代半导体为何聚焦氧化镓?

第四代半导体为何聚焦氧化镓?

随着新能源汽车、高压直流输电、数据中心、电力电子和航空航天等领域持续提升对高效率、高耐压器件的需求,功率半导体材料正在经历新一轮升级。 如果说过去十年是碳化硅(SiC)和氮化镓(GaN)快速发展的时代,那么近年来,**氧化镓(Ga₂O₃)**已经成为全球超宽禁带半导体研…

2026/7/6 13:52:47 阅读更多 →
容器生态系统:拆解容器三大技术层次,上手部署第一个容器

容器生态系统:拆解容器三大技术层次,上手部署第一个容器

第1章 容器生态系统 摘要:本章全面介绍了容器技术生态系统,从容器技术的整体认知到具体实践。首先阐述了学习容器技术的重要性,然后系统性地讲解了容器生态系统的三个层次:核心技术(容器规范、runtime、管理工具、定义…

2026/7/6 13:52:47 阅读更多 →
AI 知识库系统落地实战指南

AI 知识库系统落地实战指南

在企业日常运营中,最让人头疼的往往不是数据太少,而是数据太“乱”。想象一下这样的场景:新员工入职想查某个项目的历史决策记录,翻遍了共享盘里的几百个 Word 和 PDF 也没找到;客服面对用户咨询,需要在十几…

2026/7/6 13:50:44 阅读更多 →
智能座舱软件开发全解析:中间件、车云协同与高并发低延迟架构实战

智能座舱软件开发全解析:中间件、车云协同与高并发低延迟架构实战

前言 随着汽车朝智能化、网联化、电动化迈进,车内的“座舱”不再只是播放音乐和放手机的地方。它已经变成一个复合型的体验中枢——把语音助手、高清屏幕、全景影像、多屏联动、实时流媒体和车云服务等不同能力,整合成乘客能直接感知的体验。你在夜间行驶时对着方向盘喊一句导…

2026/7/6 13:50:44 阅读更多 →

日新闻

H2 与 MySQL 单元测试兼容性:5 个关键 SQL 语句差异与规避方案

H2 与 MySQL 单元测试兼容性:5 个关键 SQL 语句差异与规避方案

H2与MySQL单元测试兼容性:5个关键SQL语句差异与规避方案1. 单元测试中的数据库兼容性挑战在Java开发领域,单元测试是保证代码质量的重要环节。当应用涉及数据库操作时,测试环境的搭建往往成为开发者的痛点。H2数据库因其轻量级、内存模式和快…

2026/7/6 0:01:17 阅读更多 →
Windows任务栏终极清理指南:用RBTray一键隐藏窗口到系统托盘

Windows任务栏终极清理指南:用RBTray一键隐藏窗口到系统托盘

Windows任务栏终极清理指南:用RBTray一键隐藏窗口到系统托盘 【免费下载链接】rbtray A fork of RBTray from http://sourceforge.net/p/rbtray/code/. 项目地址: https://gitcode.com/gh_mirrors/rb/rbtray 你是否厌倦了Windows任务栏上密密麻麻的图标&…

2026/7/6 0:01:17 阅读更多 →
Visual C++ 运行时库一键安装终极指南:告别DLL缺失烦恼

Visual C++ 运行时库一键安装终极指南:告别DLL缺失烦恼

Visual C 运行时库一键安装终极指南:告别DLL缺失烦恼 【免费下载链接】vcredist AIO Repack for latest Microsoft Visual C Redistributable Runtimes 项目地址: https://gitcode.com/gh_mirrors/vc/vcredist 你是否曾经遇到过这样的情况:下载了…

2026/7/6 0:05:19 阅读更多 →

周新闻

B站视频下载神器BiliTools:5分钟学会轻松保存任何B站内容

B站视频下载神器BiliTools:5分钟学会轻松保存任何B站内容

B站视频下载神器BiliTools:5分钟学会轻松保存任何B站内容 【免费下载链接】BiliTools A cross-platform bilibili toolbox. 跨平台哔哩哔哩工具箱,支持下载视频、番剧等等各类资源 项目地址: https://gitcode.com/GitHub_Trending/bilit/BiliTools …

2026/7/6 8:11:50 阅读更多 →
威胁模型全解析:从新手入门到实战应用,助你构建安全产品!

威胁模型全解析:从新手入门到实战应用,助你构建安全产品!

威胁模型的陌生现状在忙碌疲惫的一天里,参与了关于混合后量子密码学的讨论,应付端点攻击找茬的人,还参与留言板讨论后,发现“威胁模型”对多数人仍是陌生概念,且多被当作时髦用语。有趣的相关画作有一幅由 Embyr 创作的…

2026/7/6 8:11:52 阅读更多 →
渗透测试入门指南:从零基础到实战环境搭建

渗透测试入门指南:从零基础到实战环境搭建

1. 从“看热闹”到“入门”:我理解的渗透测试到底是什么?每次看到新闻里说某个大公司的数据被“黑”了,或者某个网站被攻击导致服务瘫痪,你是不是和我一样,心里会冒出两个念头:一是“这黑客真厉害”&#x…

2026/7/6 6:52:56 阅读更多 →

月新闻