最近给客户开发一个宠物领养的网站平台,效果还不错,拿出来展示一下
系统介绍:
我国的动物管理正处于起步阶段,注册在线的宠物数量非常有限,信息也很封闭,因此必须发挥民间力量扩容,加强宠物信息的宣传力度,使更多爱护动物的好心人可以领养宠物,同时也就收纳有家宠物信息,以防宠物丢失,恶性伤人的事件发生,由此可见,建立一个规范化,科学化的流浪狗领养系统是非常必要的。
本项目基于SSM实现一个宠物领养平台,分为系统前端和后端,用户登陆网站可以实现查看博客,领养宠物,送养宠物等,后台管理可以实现用户管理,宠物管理,领养审批,文章管理,留言管理等管理操作
系统编号:BS-PT-055
技术架构:
- 三层架构设计
- MVC设计模式应用
- 整体开发框架SSM+LayUI+BootStrap
- 开发工具:使用IDEA或ECLIPSE均可
- 数据库:MYSQL
下面展示一下系统的基本功能:
前端页面
宠物收养
宠物送养
系统留言
前台用户登陆
后台信息管理系统
用户管理
流浪狗管理
疫苗管理
收养记录管理
留言管理
文章管理
package com.ypf.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.ypf.mapper.TDogUserMapper; import com.ypf.mapper.TDogUserMapperCustom; import com.ypf.pojo.TDogUser; import com.ypf.service.AdoptService; import com.ypf.utils.JqGridResult; import com.ypf.vo.AdoptRecord; import com.ypf.vo.AdoptUserVO; @Service public class AdoptServiceImpl implements AdoptService { @Autowired TDogUserMapper adoptMapper; @Autowired TDogUserMapperCustom adoptRecordMapper; @Override public int addAdoptRecord(TDogUser adopt) { int result = adoptMapper.insert(adopt); return result; } @Override public int deleteAdoptRecord(Integer adoptId) { int result = adoptMapper.deleteByPrimaryKey(adoptId); return result; } @Override public int updateAdoptRecord(TDogUser adopt) { int result = adoptMapper.updateByPrimaryKeySelective(adopt); return result; } @Override public JqGridResult queryAllAdoptRecord(Integer page,Integer pageSize) { PageHelper.startPage(page, pageSize); List<AdoptRecord> list = adoptRecordMapper.queryAllAdoptRecordList(); PageInfo<AdoptRecord> pageInfo = new PageInfo<>(list); JqGridResult grid = new JqGridResult(); grid.setPage(pageInfo.getPageNum()); grid.setRows(list); grid.setTotal(pageInfo.getPages()); grid.setRecords(pageInfo.getTotal()); return grid; } @Override public JqGridResult queryAllAdoptUser(Integer page,Integer pageSize) { PageHelper.startPage(page, pageSize); List<AdoptUserVO> list = adoptRecordMapper.queryAllAdoptUserList(); PageInfo<AdoptUserVO> pageInfo = new PageInfo<>(list); JqGridResult grid = new JqGridResult(); grid.setPage(pageInfo.getPageNum()); grid.setRows(list); grid.setTotal(pageInfo.getPages()); grid.setRecords(pageInfo.getTotal()); return grid; } }
package com.ypf.service.impl; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.ypf.mapper.TArticleMapper; import com.ypf.pojo.TArticle; import com.ypf.pojo.TUser; import com.ypf.service.ArticleService; import com.ypf.utils.JqGridResult; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * 文章业务管理接口实现类 */ @Service public class ArticleServiceImpl implements ArticleService { @Autowired private TArticleMapper articleMapper; /** * 发表文章 * @param article */ @Override public void saveArticle(TArticle article) { articleMapper.saveArticle(article); } /** * 查询文章列表 * @param title * @param page * @param pageSize * @return */ @Override public JqGridResult queryAllArticle(String title, Integer page, Integer pageSize) { PageHelper.startPage(page, pageSize); List<TArticle> articles = articleMapper.findArticles(title); PageInfo<TArticle> pageInfo = new PageInfo<>(articles); JqGridResult grid = new JqGridResult(); grid.setPage(pageInfo.getPageNum()); grid.setRows(articles); grid.setTotal(pageInfo.getPages()); grid.setRecords(pageInfo.getTotal()); return grid; } //删除文章 public void deleteArticle(Integer articleId){ articleMapper.delete(articleId); } //查询单个文章 public TArticle queryArticleInfoById(Integer articleId){ return articleMapper.findArticleById(articleId); } //更新文章 public void updateArticle(TArticle article){ articleMapper.updateArticleById(article); } //按点击量查询 public JqGridResult queryArticleByDj(Integer num) { JqGridResult grid = new JqGridResult(); grid.setRows(articleMapper.queryArticleByDj(num)); return grid; } //按日期查询 public JqGridResult queryArticleByDate(Integer num) { JqGridResult grid = new JqGridResult(); grid.setRows(articleMapper.queryArticleByDate(num)); return grid; } //按推荐查询 public JqGridResult queryArticleByTj(int num){ JqGridResult grid = new JqGridResult(); grid.setRows(articleMapper.queryArticleByTj(num)); return grid; } //更新点击量 public void updateCount(Integer id){ articleMapper.updateCount(id); } }
package com.ypf.service.impl; import java.util.List; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.ypf.mapper.TDogMapper; import com.ypf.pojo.TDog; import com.ypf.pojo.TDogExample; import com.ypf.pojo.TDogExample.Criteria; import com.ypf.service.DogService; import com.ypf.utils.JqGridResult; @Service public class DogServiceImpl implements DogService{ @Autowired TDogMapper dogMapper; @Override public int addDog(TDog dog) { dog.setAdoptState(1); return dogMapper.insert(dog); } @Override public int deleteDog(Integer dogId) { int result = dogMapper.deleteByPrimaryKey(dogId); return result; } @Override public int updateDog(TDog dog) { int result = dogMapper.updateByPrimaryKeySelective(dog); return result; } @Override public JqGridResult queryAllDog(TDog dog,Integer page,Integer pageSize) { String dogName = ""; if (dog != null) { dogName = dog.getDogName(); } TDogExample dogExample = new TDogExample(); Criteria dogCriteria = dogExample.createCriteria(); if (StringUtils.isNotBlank(dogName)) { dogCriteria.andDogNameLike("%" + dogName + "%"); } PageHelper.startPage(page, pageSize); List<TDog> list = dogMapper.selectByExample(dogExample); PageInfo<TDog> pageInfo = new PageInfo<>(list); JqGridResult grid = new JqGridResult(); grid.setPage(pageInfo.getPageNum()); grid.setRows(list); grid.setTotal(pageInfo.getPages()); grid.setRecords(pageInfo.getTotal()); return grid; } @Override public TDog queryDogInfoById(Integer dogId) { TDog dogInfo = dogMapper.selectByPrimaryKey(dogId); return dogInfo; } }