✨作者主页 :IT毕设梦工厂✨
个人简介:曾从事计算机专业培训教学,擅长Java、Python、微信小程序、Golang、安卓Android等项目实战。接项目定制开发、代码讲解、答辩教学、文档编写、降重等。
文章目录
一、前言
在当今数字化社会,人们的生活与互联网紧密相连。特别是在校园环境中,学生们的生活方式已经深深地受到了互联网的影响。失物招领问题在校园中是一个常见的问题,影响着广大的师生的日常生活和学习。因此,开发一款基于互联网的校园失物招领平台,如微信小程序或安卓APP,已经成为了一个迫切的需求。
尽管目前已经存在一些失物招领的解决方案,如校园公告板、失物招领微信群等,但它们存在着一些问题。首先,这些平台的信息传播范围有限,往往只能在一定区域内进行传播,无法覆盖整个校园。其次,这些平台的信息更新速度慢,往往需要一定的时间才能更新,无法满足快速失物招领的需求。因此,我们需要一种更便捷的解决方案来解决这些问题。
本课题的研究目的是开发一款基于互联网的校园失物招领平台,以解决现有解决方案的问题。具体来说,我们将实现以下功能:
用户可以通过微信小程序或安卓APP上传失物信息,包括物品名称、描述、丢失地点等;
用户可以通过微信小程序或安卓APP查询失物信息,包括已发布的失物信息、失物招领状态等。
本课题的研究意义在于提供一种更便捷的校园失物招领解决方案。通过开发基于互联网的校园失物招领平台,我们可以帮助学生和教职工更快速地找到丢失的物品,提高他们的学习和工作效率。同时,我们也可以通过平台的数据分析功能,了解校园内失物招领的现状和问题,为学校的管理和改进提供参考。因此,本课题的研究成果具有重要的实用价值和社会意义。
二、开发环境
- 开发语言:Java
- 数据库:MySQL
- 后端:SpringBoot
- 前端:微信小程序/Android+uniapp+Vue
三、系统界面展示
- 校园失物招领微信小程序/安卓APP界面展示:
四、部分代码设计
- 校园失物招领微信小程序/安卓APP项目实战-代码参考:
java(贴上部分代码)
@Controller
@RequestMapping("/found")
public class FoundController {
@Autowired
private WupinService wupinService;
@Autowired
private ZhandainService zhandainService;
public String wupinmingcheng = "";
//寻物列表
@GetMapping("/list/{currPage}")
@ResponseBody//返回json数据到前端
public Result list(@PathVariable int currPage) {
//当前页数
int pageCount = currPage;
//总记录数
Integer totalCount = wupinService.findXunWuTotal();
//重试次数
int count = 2;
while (totalCount == 0 && count > 0) {
totalCount = wupinService.findXunWuTotal();
count--;
}
//总页数
Integer totalPage = totalCount % 10 == 0 ? totalCount / 10 : totalCount / 10 + 1;
//如果记录数为0或请求页面大于总页数或为负数
if (pageCount > totalPage || pageCount < 0 || totalCount == 0) {
return new Result(Code.GET_ERR, Msg.QUERY_ERR);
} else {//如果数据正常则写成json格式返回前端
//每页显示数,10条
Integer pageSize = 10;
// 计算当前查询页数
Integer startIndex = (pageCount - 1) * pageSize;
List<Wupin> wuPinEntitys = wupinService.findXunWuList(startIndex, pageSize);
//重试次数
int retry = 2;
while (wuPinEntitys.size() == 0 && retry > 0) {
wuPinEntitys = wupinService.findXunWuList(startIndex, pageSize);
retry--;
}
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("totalPage",totalPage);
map.put("totalCount",totalCount);
map.put("currPage",pageCount);
map.put("data",wuPinEntitys);
return new Result(Code.GET_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.GET_ERR, Msg.QUERY_ERR);
}
}
}
//寻物页面搜索信息处理
@PostMapping("/search")
public String search(Wupin Wupin, Model model, HttpSession session) {
wupinmingcheng = Wupin.getWupinmingcheng();
if (wupinmingcheng.equals("")) {
// model.addAttribute("errorMsg", "请输入关键词!");
Object obj = session.getAttribute("dbWupin");
if (null != obj) {
session.removeAttribute("dbWupin");
}
return "found2";
}
wupinmingcheng = "%" + wupinmingcheng + "%";
List<Wupin> dbWupin = wupinService.findXunWuByWuPinName(wupinmingcheng);
if (dbWupin.size() > 0) {
return "redirect:/found/resSearch";
} else {
// model.addAttribute("errorMsg", "该物品不存在!");
Object obj = session.getAttribute("dbWupin");
if (null != obj) {
session.removeAttribute("dbWupin");
}
return "found2";
}
}
//返回搜索结果
@GetMapping("/resSearch")
public String resSearch(HttpSession session) {
List<Wupin> dbWupin = wupinService.findXunWuByWuPinName(wupinmingcheng);
session.setAttribute("dbWupin", dbWupin);
return "found2";
}
//寻物页面详情页
@GetMapping("/content")
public String content(String id, Map<String, Object> map) {
Wupin dbWupin = wupinService.findXunWuById(id);
String zhanDianName = dbWupin.getZhandianmingcheng();
Zhandian dbZhanDian = null;
if (!zhanDianName.equals("")) {
dbZhanDian = zhandainService.findByZhanDianName(zhanDianName);
}
dbWupin.setLianxidianhua(dbZhanDian.getLianxidianhua());
map.put("dbWupin", dbWupin);
return "foundContent";
}
//个人中心寻物审核中列表
@PostMapping("/userXWSH")
@ResponseBody//返回json数据到前端
public Result userXunWu(@RequestBody Wupin wupin) {
String userid = wupin.getUserid();
userid = userid.replace(" ", "");
if ("".equals(userid) || userid.length() == 0) {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
} else {
List<Wupin> wuPinEntitys = wupinService.findXWSHByUserId(wupin.getUserid());
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.POST_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
}
}
}
//个人中心寻物审核未通过列表
@PostMapping("/userXWJJ")
@ResponseBody//返回json数据到前端
public Result userXWJJ(@RequestBody Wupin wupin) {
String userid = wupin.getUserid();
userid = userid.replace(" ", "");
if ("".equals(userid) || userid.length() == 0) {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
} else {
List<Wupin> wuPinEntitys = wupinService.findXWSHByUserIdJJ(wupin.getUserid());
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.POST_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
}
}
}
//个人中心寻物审核详情页
@GetMapping("/XWSHContent")
public String XWSHContent(String id, Map<String, Object> map) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
Wupin dbWupin = wupinService.findXWSHById(id);
map.put("dbWupin", dbWupin);
return "userXWContent";
}
//个人中心寻物审核删除
@GetMapping("/XWSHDelete")
public String XWSHDelete(String id) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
wupinService.deleteXWSHById(id);
return "userXunWu";
}
//个人中心寻物公示中列表
@RequestMapping("/userXWXZ")
@ResponseBody//返回json数据到前端
public Result userXWXZ(@RequestBody Wupin wupin) {
String userid = wupin.getUserid();
userid = userid.replace(" ", "");
if ("".equals(userid) || userid.length() == 0) {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
} else {
List<Wupin> wuPinEntitys = wupinService.findXWByUserId(wupin.getUserid());
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.POST_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
}
}
}
//个人中心寻物已完成列表
@RequestMapping("/userXWXZWC")
@ResponseBody//返回json数据到前端
public Result userXWXZWC(@RequestBody Wupin wupin) {
String userid = wupin.getUserid();
userid = userid.replace(" ", "");
if ("".equals(userid) || userid.length() == 0) {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
} else {
List<Wupin> wuPinEntitys = wupinService.findXWByUserIdWC(wupin.getUserid());
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.POST_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
}
}
}
//个人中心寻物详情页
@GetMapping("/XWContent")
public String XWContent(String id, Map<String, Object> map) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
Wupin dbWupin = wupinService.findXunWuById(id);
map.put("dbWupin", dbWupin);
return "userXWContent";
}
//个人中心寻物删除
@GetMapping("/XWDelete")
public String XWDelete(String id) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
wupinService.deleteXWById(id);
return "userXunWu";
}
//管理员寻物审核列表
@RequestMapping("/HTXWSH")
@ResponseBody//返回json数据到前端
public Result HTXWSH() {
List<Wupin> wuPinEntitys = wupinService.findAllXWSH();
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.GET_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.GET_ERR, Msg.QUERY_ERR);
}
}
//管理员查看寻物审核详情页
@GetMapping("/HTXWSHContent")
public String HTXWSHContent(String id, Map<String, Object> map) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
Wupin dbWupin = wupinService.findXWSHById(id);
map.put("dbWupin", dbWupin);
return "admin/houTaiXWContent";
}
//管理员寻物审核同意
@GetMapping("/HTXWSHTYUpdate")
public String HTXWSHTYUpdate(String id) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
wupinService.updateXWSH(id);
Wupin dbWupin = wupinService.findXWSHById(id);
wupinService.addXW(dbWupin);
return "admin/houTaiIndex";
}
//管理员寻物审核拒绝
@GetMapping("/HTXWSHJJUpdate")
public String HTXWSHJJUpdate(String id) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
wupinService.updateJJXWSH(id);
return "admin/houTaiIndex";
}
//管理员寻物公告公示中列表
@RequestMapping("/HTXWXZ")
@ResponseBody//返回json数据到前端
public Result HTXWXZ() {
List<Wupin> wuPinEntitys = wupinService.findAllXunWu();
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.GET_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
}
}
//管理员查看寻物公告公示中的详情页
@GetMapping("/HTXWXZContent")
public String HTXWXZContent(String id, Map<String, Object> map) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
Wupin dbWupin = wupinService.findXunWuById(id);
map.put("dbWupin", dbWupin);
return "admin/houTaiXWContent";
}
//管理员提交完成寻物公示中的公告
@GetMapping("/HTXWXZWCUpdate")
public String HTXWXZWCUpdate(String id) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
wupinService.updateXWXZ(id);
return "admin/houTaiIndex";
}
//管理员删除寻物公示公告
@GetMapping("/HTXWXZDelete")
public String HTXWXZDelete(String id) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
wupinService.deleteXWById(id);
return "admin/houTaiIndex";
}
//管理员寻物公告已完成列表
@RequestMapping("/HTXWWC")
@ResponseBody//返回json数据到前端
public Result HTXWWC() {
List<Wupin> wuPinEntitys = wupinService.findAllXWWC();
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.GET_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
}
}
}
java(贴上部分代码)
@Controller
@RequestMapping("/liuyan")
public class LiuyanController {
@Autowired
private LiuyanService liuyanService;
//上传留言
@RequestMapping("/information")
@ResponseBody
public Result liuYanAdd(@RequestBody Liuyan liuyan) {
String liuYanContent = liuyan.getLiuyanneirong().replace(" ", "");
/* if (liuYanContent == null || liuYanContent.length() == 0) {
return new Result(Code.POST_ERR,Msg.ADD_ERR);
}*/
Date addTime = new Date();
liuyan.setLiuyanriqi(addTime);
liuyan.setAddtime(addTime);
boolean flag = liuyanService.add(liuyan);
Integer code = flag ? Code.POST_OK : Code.POST_ERR;
String msg = flag ? Msg.ADD_OK : Msg.ADD_ERR;
return new Result(code,msg);
}
//获取留言列表
@GetMapping("/list/{currPage}")
@ResponseBody
public Result liuYanList(@PathVariable int currPage) {
//当前页数
int pageCount = currPage;
//总记录数
Integer totalCount = liuyanService.findLiuYanTotal();
//重试次数
int count = 2;
while (totalCount == 0 && count > 0) {
totalCount = liuyanService.findLiuYanTotal();
count--;
}
//总页数
Integer totalPage = totalCount % 10 == 0 ? totalCount / 10 : totalCount / 10 + 1;
//如果记录数为0或请求页面大于总页数或为负数
if (pageCount > totalPage || pageCount < 0 || totalCount == 0) {
return new Result(Code.GET_ERR, Msg.QUERY_ERR);
} else {//如果数据正常则写成json格式返回前端
//每页显示数,10条
Integer pageSize = 10;
// 计算前索引
Integer startIndex = (pageCount - 1) * pageSize;
List<Liuyan> liuYanEntitys = liuyanService.findLiuYanList(startIndex, pageSize);
//重试次数
int retry = 2;
while (liuYanEntitys.size() == 0 && retry > 0) {
liuYanEntitys = liuyanService.findLiuYanList(startIndex, pageSize);
retry--;
}
if (liuYanEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("totalPage",totalPage);
map.put("totalCount",totalCount);
map.put("currPage",pageCount);
map.put("data",liuYanEntitys);
return new Result(Code.GET_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.GET_ERR, Msg.QUERY_ERR);
}
}
}
//根据用户id获取留言列表
@RequestMapping("/userLY")
@ResponseBody
public Result userLY(@RequestBody Liuyan liuyan) {
Integer user_Id = liuyan.getUserid();
String userId = String.valueOf(user_Id);
userId = userId.replace(" ", "");
if ("".equals(userId) || userId.length() == 0) {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
} else {//如果数据正常则写成json格式返回前端
List<Liuyan> liuYanEntitys = liuyanService.findLYByUserId(userId);
if (liuYanEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",liuYanEntitys);
return new Result(Code.POST_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
}
}
}
//个人根据id删除留言
@GetMapping("/LYDelete")
public String LYDelete(String id) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
liuyanService.deleteLYById(id);
return "userLiuYan";
}
//后台获取留言列表
@RequestMapping("/HTLY")
@ResponseBody
public Result HTLY() {
List<Liuyan> liuYanEntitys = liuyanService.findAllLY();
if (liuYanEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",liuYanEntitys);
return new Result(Code.GET_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.GET_ERR, Msg.QUERY_ERR);
}
}
//后台根据id删除留言
@GetMapping("/HTLYDelete")
public String HTLYDelete(String id) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
boolean flag = liuyanService.deleteLYById(id);
return "admin/houTaiLiuYan";
}
}
java(贴上部分代码)
@Controller
@RequestMapping("/lost")
public class LostController {
@Autowired
private WupinService wupinService;
@Autowired
private ZhandainService zhandainService;
@Autowired
private UserService userService;
public String wupinmingcheng = "";
//招领列表
@GetMapping("/list/{currPage}")
@ResponseBody//返回json数据到前端
public Result list(@PathVariable int currPage) {
//当前页数
int pageCount = currPage;
//总记录数
Integer totalCount = wupinService.findZhaoLingTotal();
//重试次数
int count = 2;
while (totalCount == 0 && count > 0) {
totalCount = wupinService.findZhaoLingTotal();
count--;
}
//总页数
Integer totalPage = totalCount % 10 == 0 ? totalCount / 10 : totalCount / 10 + 1;
//如果记录数为0或请求页面大于总页数或为负数
if (pageCount > totalPage || pageCount < 0 || totalCount == 0) {
return new Result(Code.GET_ERR, Msg.QUERY_ERR);
} else {//如果数据正常则写成json格式返回前端
//每页显示数,10条
Integer pageSize = 10;
// 计算前索引
Integer startIndex = (pageCount - 1) * pageSize;
List<Wupin> wuPinEntitys = wupinService.findZhaoLingList(startIndex, pageSize);
//重试次数
int retry = 2;
while (wuPinEntitys.size() == 0 && retry > 0) {
wuPinEntitys = wupinService.findZhaoLingList(startIndex, pageSize);
retry--;
}
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("totalPage",totalPage);
map.put("totalCount",totalCount);
map.put("currPage",pageCount);
map.put("data",wuPinEntitys);
return new Result(Code.GET_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.GET_ERR, Msg.QUERY_ERR);
}
}
}
//招领页面搜索信息处理
@PostMapping("/search")
public String search(Wupin Wupin, Model model, HttpSession session) {
wupinmingcheng = Wupin.getWupinmingcheng();
if (wupinmingcheng.equals("") || wupinmingcheng.contains("?")) {
// model.addAttribute("errorMsg", "请输入关键词!");
Object obj = session.getAttribute("dbWupin");
if (null != obj) {
session.removeAttribute("dbWupin");
}
return "/lost2";
}
wupinmingcheng = "%" + wupinmingcheng + "%";
List<Wupin> dbWupin = wupinService.findZhaoLingByWuPinName(wupinmingcheng);
if (dbWupin.size() > 0) {
return "redirect:/lost/resSearch";
} else {
// model.addAttribute("errorMsg", "该物品不存在!");
Object obj = session.getAttribute("dbWupin");
if (null != obj) {
session.removeAttribute("dbWupin");
}
return "/lost2";
}
}
//返回搜索结果
@GetMapping("/resSearch")
public String resSearch(HttpSession session) {
List<Wupin> dbWupin = wupinService.findZhaoLingByWuPinName(wupinmingcheng);
session.setAttribute("dbWupin", dbWupin);
return "/lost2";
}
//详情页
@GetMapping("/content")
public String content(String id, Map<String, Object> map) {
Wupin dbWupin = wupinService.findZhaoLingById(id);
String zhanDianName = dbWupin.getZhandianmingcheng();
Zhandian dbZhanDian = null;
if (!zhanDianName.equals("")) {
dbZhanDian = zhandainService.findByZhanDianName(zhanDianName);
}
dbWupin.setLianxidianhua(dbZhanDian.getLianxidianhua());
map.put("dbWupin", dbWupin);
return "lostContent";
}
//添加申领
@RequestMapping("/SLSH")
@ResponseBody//返回json数据到前端
public String SLSH(@RequestBody Wupin wupin) {
String userid = wupin.getUserid();
Integer id = wupin.getId();
String wuPinId = String.valueOf(id);
Date daozhandianriqi = wupin.getDaozhandianriqi();
String zhuangtai = wupin.getZhuangtai();
if (StringUtils.isEmpty(userid) || StringUtils.isEmpty(wuPinId) || StringUtils.isEmpty(zhuangtai) || daozhandianriqi == null) {
return "false";
}
Wupin findWuPin = wupinService.findSLSHByUserIdAndId(wuPinId,userid);
if (null!=findWuPin){
return "0";
}
Wupin dbWuPin = wupinService.findZhaoLingById(wuPinId);
if (null != dbWuPin) {
Date addtie = new Date();
wupin.setWupinmingcheng(dbWuPin.getWupinmingcheng());
wupin.setBianhao(dbWuPin.getBianhao());
wupin.setTupian(dbWuPin.getTupian());
wupin.setJiandaoriqi(dbWuPin.getJiandaoriqi());
wupin.setJiandaodizhi(dbWuPin.getJiandaodizhi());
wupin.setJianshu(dbWuPin.getJianshu());
wupin.setZhandianmingcheng(dbWuPin.getZhandianmingcheng());
wupin.setFuzeren(dbWuPin.getFuzeren());
wupin.setDizhi(dbWuPin.getDizhi());
wupin.setShenhejieguo("审核中");
wupin.setAddtime(addtie);
wupinService.addSLSH(wupin);
return "succeful";
} else {
return "false";
}
}
//个人中心获取申领审核中信息
@RequestMapping("/userSLSH")
@ResponseBody//返回json数据到前端
public Result userSLSH(@RequestBody Wupin wupin) {
String userid = wupin.getUserid();
userid = userid.replace(" ", "");
if ("".equals(userid) || userid.length() == 0) {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
} else {
List<Wupin> wuPinEntitys = wupinService.findSLSHByUserId(wupin.getUserid());
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.POST_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
}
}
}
//个人中心获取申领未通过信息
@RequestMapping("/userSLJJ")
@ResponseBody//返回json数据到前端
public Result userSLJJ(@RequestBody Wupin wupin) {
String userid = wupin.getUserid();
userid = userid.replace(" ", "");
if ("".equals(userid) || userid.length() == 0) {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
} else {
List<Wupin> wuPinEntitys = wupinService.findSLSHByUserIdJJ(wupin.getUserid());
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.POST_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
}
}
}
//个人中心获取申领正在进行信息
@RequestMapping("/userSLJX")
@ResponseBody//返回json数据到前端
public Result userSLJX(@RequestBody Wupin wupin) {
String userid = wupin.getUserid();
userid = userid.replace(" ", "");
if ("".equals(userid) || userid.length() == 0) {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
} else {
List<Wupin> wuPinEntitys = wupinService.findSLSHByUserIdJX(wupin.getUserid());
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.POST_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
}
}
}
//个人中心获取申领已完成信息
@RequestMapping("/userSLWC")
@ResponseBody//返回json数据到前端
public Result userSLWC(@RequestBody Wupin wupin) {
String userid = wupin.getUserid();
userid = userid.replace(" ", "");
if ("".equals(userid) || userid.length() == 0) {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
} else {
List<Wupin> wuPinEntitys = wupinService.findSLSHByUserIdWC(wupin.getUserid());
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.POST_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
}
}
}
//个人中心申领审核物品详情页
@GetMapping("/SLSHContent")
public String SLSHContent(String id, Map<String, Object> map) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
Wupin dbWupin = wupinService.findSLSHById(id);
map.put("dbWupin", dbWupin);
return "/userSLContent";
}
//个人中心根据物品id删除申领审核物品
@GetMapping("/SLSHDelete")
public String SLSHDelete(String id) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
wupinService.deleteSLSHById(id);
return "userShenLing";
}
//个人中心招领审核中列表
@RequestMapping("/userZLSH")
@ResponseBody//返回json数据到前端
public Result userZLSH(@RequestBody Wupin wupin) {
String userid = wupin.getUserid();
userid = userid.replace(" ", "");
if ("".equals(userid) || userid.length() == 0) {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
} else {
List<Wupin> wuPinEntitys = wupinService.findZLSHByUserId(wupin.getUserid());
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.POST_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
}
}
}
//个人中心招领审核未通过列表
@RequestMapping("/userZLSHJJ")
@ResponseBody//返回json数据到前端
public Result userZLSHJJ(@RequestBody Wupin wupin) {
String userid = wupin.getUserid();
userid = userid.replace(" ", "");
if ("".equals(userid) || userid.length() == 0) {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
} else {
List<Wupin> wuPinEntitys = wupinService.findZLSHByUserIdJJ(wupin.getUserid());
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.POST_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
}
}
}
//个人中心招领审核详情页
@GetMapping("/ZLSHContent")
public String ZLSHContent(String id, Map<String, Object> map) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
Wupin dbWupin = wupinService.findZLSHById(id);
map.put("dbWupin", dbWupin);
return "/userZLContent";
}
//个人中心招领审核删除
@GetMapping("/ZLSHDelete")
public String ZLSHDelete(String id) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
wupinService.deleteZLSHById(id);
return "userZhaoLing";
}
//个人中心招领公示中列表
@RequestMapping("/userSWZL")
@ResponseBody//返回json数据到前端
public Result userSWZL(@RequestBody Wupin wupin) {
String userid = wupin.getUserid();
userid = userid.replace(" ", "");
if ("".equals(userid) || userid.length() == 0) {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
} else {
List<Wupin> wuPinEntitys = wupinService.findZLByUserId(wupin.getUserid());
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.POST_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
}
}
}
//个人中心招领已完成列表
@RequestMapping("/userSWWC")
@ResponseBody//返回json数据到前端
public Result userSWWC(@RequestBody Wupin wupin) {
String userid = wupin.getUserid();
userid = userid.replace(" ", "");
if ("".equals(userid) || userid.length() == 0) {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
} else {
List<Wupin> wuPinEntitys = wupinService.findZLByUserIdWC(wupin.getUserid());
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.POST_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.POST_ERR, Msg.QUERY_ERR);
}
}
}
//个人中心招领详情页
@GetMapping("/ZLContent")
public String ZLContent(String id, Map<String, Object> map) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
Wupin dbWupin = wupinService.findZhaoLingById(id);
map.put("dbWupin", dbWupin);
return "userZLContent";
}
//个人中心招领删除
@GetMapping("/ZLDelete")
public String ZLDelete(String id) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
wupinService.deleteZLById(id);
return "userZhaoLing";
}
//管理员招领审核列表
@RequestMapping("/HTZLSH")
@ResponseBody//返回json数据到前端
public Result HTZLSH() {
List<Wupin> wuPinEntitys = wupinService.findAllZLSH();
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.GET_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.GET_ERR, Msg.QUERY_ERR);
}
}
//管理员查看招领审核详情页
@GetMapping("/HTZLSHContent")
public String HTZLSHContent(String id, Map<String, Object> map) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
Wupin dbWupin = wupinService.findZLSHById(id);
map.put("dbWupin", dbWupin);
return "admin/houTaiZLContent";
}
//管理员招领审核同意
@GetMapping("/HTZLSHTYUpdate")
public String HTZLSHTYUpdate(String id) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
wupinService.updateZLSH(id);
Wupin dbWupin = wupinService.findZLSHById(id);
wupinService.addZL(dbWupin);
return "admin/houTaiZhaoLing";
}
//管理员招领审核拒绝
@GetMapping("/HTZLSHJJUpdate")
public String HTZLSHJJUpdate(String id) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
wupinService.updateJJZLSH(id);
return "admin/houTaiZhaoLing";
}
//管理员招领公告公示中列表
@RequestMapping("/HTSWZL")
@ResponseBody//返回json数据到前端
public Result HTSWZL() {
List<Wupin> wuPinEntitys = wupinService.findAllSWZL();
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.GET_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.GET_ERR, Msg.QUERY_ERR);
}
}
//管理员查看招领公示中公告详情页
@GetMapping("/HTSWZLContent")
public String HTSWZLContent(String id, Map<String, Object> map) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
Wupin dbWupin = wupinService.findZhaoLingById(id);
map.put("dbWupin", dbWupin);
return "admin/houTaiZLContent";
}
//管理员提交完成招领公示中的公告
@GetMapping("/HTSWZLWCUpdate")
public String HTSWZLWCUpdate(String id) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
wupinService.updateSWZL(id);
return "admin/houTaiZhaoLing";
}
//管理员删除招领公示公告
@GetMapping("/HTSWZLDelete")
public String HTSWZLDelete(String id) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
wupinService.deleteZLById(id);
return "admin/houTaiZhaoLing";
}
//管理员招领公告已完成列表
@RequestMapping("/HTZLWC")
@ResponseBody//返回json数据到前端
public Result HTZLWC() {
List<Wupin> wuPinEntitys = wupinService.findAllSWZLWC();
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.GET_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.GET_ERR, Msg.QUERY_ERR);
}
}
//管理员获取申领审核中信息
@RequestMapping("/HTSLSH")
@ResponseBody//返回json数据到前端
public Result HTSLSH() {
List<Wupin> wuPinEntitys = wupinService.findAllSLSH();
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.GET_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.GET_ERR, Msg.QUERY_ERR);
}
}
//管理员查看申领审核的详情页
@GetMapping("/HTSLSHContent")
public String HTSLSHContent(String id, Map<String, Object> map) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
Wupin dbWupin = wupinService.findSLSHById(id);
Integer userid = Integer.parseInt(dbWupin.getUserid());
User dbUser =userService.findByUserId(userid);
String userName =dbUser.getUsername();
map.put("dbWupin", dbWupin);
map.put("userName", userName);
return "admin/houTaiSLContent";
}
//管理员申领审核同意
@GetMapping("/HTSLSHTYUpdate")
public String HTSLSHTYUpdate(String id) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
wupinService.updateSLSH(id);
return "admin/houTaiShenLing";
}
//管理员申领审核拒绝
@GetMapping("/HTSLSHJJUpdate")
public String HTSLSHJJUpdate(String id) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
wupinService.updateJJSLSH(id);
return "admin/houTaiShenLing";
}
//管理员获取申领正在进行中信息
@RequestMapping("/HTSLJX")
@ResponseBody//返回json数据到前端
public Result HTSLJX() {
List<Wupin> wuPinEntitys = wupinService.findAllSLSHJX();
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.GET_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.GET_ERR, Msg.QUERY_ERR);
}
}
//管理员提交完成申领请求
@GetMapping("/HTSLSHWCUpdate")
public String HTSLSHWCUpdate(String id) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
wupinService.updateSLSHWC(id);
wupinService.updateSWZL(id);
return "admin/houTaiShenLing";
}
//管理员删除正在进行的申领请求
@GetMapping("/HTSLSHDelete")
public String HTSLSHDelete(String id) {
if ("".equals(id) || id.length() == 0) {
return "false";
}
wupinService.deleteSLSHById(id);
return "admin/houTaiShenLing";
}
//管理员获取申领已完成的信息
@RequestMapping("/HTSLWC")
@ResponseBody//返回json数据到前端
public Result HTSLWC() {
List<Wupin> wuPinEntitys = wupinService.findAllSLSHWC();
if (wuPinEntitys.size() > 0) {
Map<String,Object> map = new HashMap<>();
map.put("status","true");
map.put("data",wuPinEntitys);
return new Result(Code.GET_OK,map,Msg.QUERY_OK);
} else {
return new Result(Code.GET_ERR, Msg.QUERY_ERR);
}
}
}
五、论文参考
- 计算机毕业设计选题推荐-校园失物招领微信小程序/安卓APP-论文参考:
六、系统视频
校园失物招领微信小程序/安卓APP-项目视频:
计算机毕业设计选题推荐-校园失物招领微信小程序/安卓APP
结语
计算机毕业设计选题推荐-校园失物招领微信小程序/安卓APP-项目实战
大家可以帮忙点赞、收藏、关注、评论啦~
源码获取:私信我