——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明







基于javaweb的SSM+Maven宠物领养管理系统(java+ssm+jsp+js+jquery+layui+mysql)
项目介绍
主要功能包括:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| 管理员 admin 123456
用户 账号1 123456 账号2 123456 账号3 123456 账号4 123456 账号5 123456 账号6 123456
发布者 个人账号1 123456 个人账号2 123456 个人账号3 123456 个人账号4 123456 个人账号5 123456 个人账号6 123456
|
管理员模块主要功能有: (1)账号密码注册登录,可修改密码。 (2)用户信息管理,可以查看所有用户信息,并执行删除修改功能。 (3)轮播图、通知公告内容的发布。 (4)发布宠物饲养视频,包括添加视频类别。 (5)领养宠物信息的发布、删除、修改等。 (6)查看用户领养申请,操作同意和拒绝按钮。
用户模块主要功能有: (1)注册登录,上传个人信息,个人地址。 (2)进入首页,轮播图展示宠物图片,查看通知公告,查看感谢信模块。 (3)宠物教学页面,点击进入宠物教学页面,观看宠物饲养教学视频,视频根据动物类别分类,支持模糊查询搜索视频,用户可以点赞留言。 (4)宠物认领页面,查看所有宠物认领信息列表,点击查看宠物详情,点击认领按钮后,填写宠物丢失详情(时间、地点,宠物特点等)等待发布者查看审核,通过后留下联系方式。 (5)宠物领养页面,查看管理员发布的宠物领养信息列表,点击查看宠物详情,提交领养申请,等待管理员审核,通过后方可领养。 (6)发布宠物认领信息,发布标题图片和文字描述,等待遗失者认领。 (7)写感谢信供其他用户首页查看。 (8)联系网站救助小动物热线以及留言板
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.是否Maven项目: 否;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目; 6.数据库:MySql 5.7/8.0等版本均可;
技术栈
后端:SSM(Spring+SpringMVC+Mybatis)
前端:JSP+CSS+JS+JQUERY+Layui
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,修改配置,运行项目; 3. 将项目中db.xml配置文件中的数据库配置改为自己的配置,然后运行;
——————————CodeStart——————————
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| * 后端列表 */ @RequestMapping("/page") public R page(@RequestParam Map<String, Object> params,DiscusschongwurenlingEntity discusschongwurenling, HttpServletRequest request){
EntityWrapper<DiscusschongwurenlingEntity> ew = new EntityWrapper<DiscusschongwurenlingEntity>(); PageUtils page = discusschongwurenlingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, discusschongwurenling), params), params)); request.setAttribute("data", page); return R.ok().put("data", page); }
@IgnoreAuth @RequestMapping("/list") public R list(@RequestParam Map<String, Object> params,DiscusschongwurenlingEntity discusschongwurenling, HttpServletRequest request){ EntityWrapper<DiscusschongwurenlingEntity> ew = new EntityWrapper<DiscusschongwurenlingEntity>(); PageUtils page = discusschongwurenlingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, discusschongwurenling), params), params)); request.setAttribute("data", page); return R.ok().put("data", page); }
@RequestMapping("/lists") public R list( DiscusschongwurenlingEntity discusschongwurenling){ EntityWrapper<DiscusschongwurenlingEntity> ew = new EntityWrapper<DiscusschongwurenlingEntity>(); ew.allEq(MPUtil.allEQMapPre( discusschongwurenling, "discusschongwurenling")); return R.ok().put("data", discusschongwurenlingService.selectListView(ew)); }
@RequestMapping("/query") public R query(DiscusschongwurenlingEntity discusschongwurenling){ EntityWrapper< DiscusschongwurenlingEntity> ew = new EntityWrapper< DiscusschongwurenlingEntity>(); ew.allEq(MPUtil.allEQMapPre( discusschongwurenling, "discusschongwurenling")); DiscusschongwurenlingView discusschongwurenlingView = discusschongwurenlingService.selectView(ew); return R.ok("查询宠物认领评论表成功").put("data", discusschongwurenlingView); }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
@RestController @RequestMapping("/chongwujiaoxue") public class ChongwujiaoxueController { @Autowired private ChongwujiaoxueService chongwujiaoxueService;
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| * 后端接口 * @email */ @RestController @RequestMapping("/messages") public class MessagesController { @Autowired private MessagesService messagesService;
@RequestMapping("/page") public R page(@RequestParam Map<String, Object> params,MessagesEntity messages, HttpServletRequest request){ if(!request.getSession().getAttribute("role").toString().equals("管理员")) { messages.setUserid((Long)request.getSession().getAttribute("userId")); }
EntityWrapper<MessagesEntity> ew = new EntityWrapper<MessagesEntity>(); PageUtils page = messagesService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, messages), params), params)); request.setAttribute("data", page); return R.ok().put("data", page); }
@IgnoreAuth @RequestMapping("/list") public R list(@RequestParam Map<String, Object> params,MessagesEntity messages, HttpServletRequest request){ EntityWrapper<MessagesEntity> ew = new EntityWrapper<MessagesEntity>(); PageUtils page = messagesService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, messages), params), params)); request.setAttribute("data", page);
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| 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<MessagesEntity> wrapper = new EntityWrapper<MessagesEntity>(); if(map.get("remindstart")!=null) { wrapper.ge(columnName, map.get("remindstart")); } if(map.get("remindend")!=null) { wrapper.le(columnName, map.get("remindend")); }
int count = messagesService.selectCount(wrapper);
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
| public R save(@RequestBody DiscusschongwujiaoxueEntity discusschongwujiaoxue, HttpServletRequest request){ discusschongwujiaoxue.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
discusschongwujiaoxueService.insert(discusschongwujiaoxue); return R.ok(); }
@RequestMapping("/add") public R add(@RequestBody DiscusschongwujiaoxueEntity discusschongwujiaoxue, HttpServletRequest request){ discusschongwujiaoxue.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
discusschongwujiaoxueService.insert(discusschongwujiaoxue); return R.ok(); }
@RequestMapping("/update") public R update(@RequestBody DiscusschongwujiaoxueEntity discusschongwujiaoxue, HttpServletRequest request){ discusschongwujiaoxueService.updateById(discusschongwujiaoxue); return R.ok(); }
@RequestMapping("/delete") public R delete(@RequestBody Long[] ids){ discusschongwujiaoxueService.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);
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=111524180701201ht
https://javayms.pages.dev?id=111524180701201ht