ssm+vue寵物領(lǐng)養(yǎng)系統(tǒng)源碼和論文103
?開發(fā)工具:idea?
?數(shù)據(jù)庫(kù)mysql5.7+
?數(shù)據(jù)庫(kù)鏈接工具:navcat,小海豚等
? 技術(shù):ssm
摘 ?要
本課題是根據(jù)用戶的需要以及網(wǎng)絡(luò)的優(yōu)勢(shì)建立的一個(gè)寵物領(lǐng)養(yǎng)系統(tǒng),來滿足用寵物領(lǐng)養(yǎng)的需求。
本寵物領(lǐng)養(yǎng)系統(tǒng)應(yīng)用JSP技術(shù),Java語(yǔ)言,MYSQL數(shù)據(jù)庫(kù)存儲(chǔ)數(shù)據(jù),基于B/S結(jié)構(gòu)開發(fā)。在網(wǎng)站的整個(gè)開發(fā)過程中,首先對(duì)系統(tǒng)進(jìn)行了需求分析,設(shè)計(jì)出系統(tǒng)的主要功能模塊,其次對(duì)網(wǎng)站進(jìn)行總體規(guī)劃和詳細(xì)設(shè)計(jì),最后對(duì)寵物領(lǐng)養(yǎng)系統(tǒng)進(jìn)行了系統(tǒng)測(cè)試,包括測(cè)試概述,測(cè)試方法,測(cè)試方案等,并對(duì)測(cè)試結(jié)果進(jìn)行了分析和總結(jié),進(jìn)而得出系統(tǒng)的不足及需要改進(jìn)的地方,為以后的系統(tǒng)維護(hù)和擴(kuò)展提供了方便。
本系統(tǒng)布局合理、色彩搭配和諧、框架結(jié)構(gòu)設(shè)計(jì)清晰,具有操作簡(jiǎn)單,界面清晰,管理方便,功能完善等優(yōu)勢(shì),有很高的使用價(jià)值。
關(guān)鍵詞:JSP技術(shù),寵物領(lǐng)養(yǎng),MYSQL數(shù)據(jù)庫(kù),B/S結(jié)構(gòu)
-
- 課題背景
在當(dāng)今的社會(huì),可以說是信息技術(shù)的發(fā)展時(shí)代,在社會(huì)的方方面面無不涉及到各種信息的處理。信息是人們對(duì)客觀世界的具體描述,是人們進(jìn)行交流與聯(lián)系的重要途徑。人類社會(huì)就處在一個(gè)對(duì)信息進(jìn)行有效合理的加工中。它將促進(jìn)整個(gè)社會(huì)的發(fā)展。隨著社會(huì)信息技術(shù)的提高,計(jì)算機(jī)已被廣泛應(yīng)用于當(dāng)今社會(huì)的各個(gè)領(lǐng)域,成為推動(dòng)社會(huì)發(fā)展的首要技術(shù)動(dòng)力。
在現(xiàn)在的社會(huì)生活中,人們的生活品質(zhì)不斷的提高,物質(zhì)的需求也相應(yīng)的得到了滿足。但是也有一些人在物質(zhì)上的滿足并不能填滿心里的孤寂。當(dāng)一個(gè)人在外拼搏,就算在工作氛圍中有很多人的陪伴,但是回家也可能會(huì)是一個(gè)冷冷清清的環(huán)境。所以這時(shí)候如果有了一個(gè)寵物的陪伴,心里的孤寂也會(huì)得到很大的慰藉,飼養(yǎng)寵物可以給我們帶來快樂,也讓我們的心靈得到慰藉。這讓用戶寵物領(lǐng)養(yǎng)的需求日益在增加,但是人們?cè)陬I(lǐng)養(yǎng)寵物方面卻缺乏一個(gè)很好的平臺(tái),針對(duì)這一情況,開發(fā)了本寵物領(lǐng)養(yǎng)系統(tǒng),為用戶通過一個(gè)全新的寵物領(lǐng)養(yǎng)的平臺(tái),提高效率。
文章來源:http://www.zghlxwxcb.cn/news/detail-687521.html
?文章來源地址http://www.zghlxwxcb.cn/news/detail-687521.html
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.ChongwuxiuEntity;
import com.entity.view.ChongwuxiuView;
import com.service.ChongwuxiuService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
* 寵物秀
* 后端接口
* @author
* @email
* @date 2021-03-29 18:02:25
*/
@RestController
@RequestMapping("/chongwuxiu")
public class ChongwuxiuController {
@Autowired
private ChongwuxiuService chongwuxiuService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ChongwuxiuEntity chongwuxiu,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("shouyangren")) {
chongwuxiu.setShouyanghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<ChongwuxiuEntity> ew = new EntityWrapper<ChongwuxiuEntity>();
PageUtils page = chongwuxiuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chongwuxiu), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ChongwuxiuEntity chongwuxiu, HttpServletRequest request){
EntityWrapper<ChongwuxiuEntity> ew = new EntityWrapper<ChongwuxiuEntity>();
PageUtils page = chongwuxiuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chongwuxiu), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( ChongwuxiuEntity chongwuxiu){
EntityWrapper<ChongwuxiuEntity> ew = new EntityWrapper<ChongwuxiuEntity>();
ew.allEq(MPUtil.allEQMapPre( chongwuxiu, "chongwuxiu"));
return R.ok().put("data", chongwuxiuService.selectListView(ew));
}
/**
* 查詢
*/
@RequestMapping("/query")
public R query(ChongwuxiuEntity chongwuxiu){
EntityWrapper< ChongwuxiuEntity> ew = new EntityWrapper< ChongwuxiuEntity>();
ew.allEq(MPUtil.allEQMapPre( chongwuxiu, "chongwuxiu"));
ChongwuxiuView chongwuxiuView = chongwuxiuService.selectView(ew);
return R.ok("查詢寵物秀成功").put("data", chongwuxiuView);
}
/**
* 后端詳情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ChongwuxiuEntity chongwuxiu = chongwuxiuService.selectById(id);
chongwuxiu.setClicktime(new Date());
chongwuxiuService.updateById(chongwuxiu);
return R.ok().put("data", chongwuxiu);
}
/**
* 前端詳情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
ChongwuxiuEntity chongwuxiu = chongwuxiuService.selectById(id);
chongwuxiu.setClicktime(new Date());
chongwuxiuService.updateById(chongwuxiu);
return R.ok().put("data", chongwuxiu);
}
/**
* 贊或踩
*/
@RequestMapping("/thumbsup/{id}")
public R thumbsup(@PathVariable("id") String id,String type){
ChongwuxiuEntity chongwuxiu = chongwuxiuService.selectById(id);
if(type.equals("1")) {
chongwuxiu.setThumbsupnum(chongwuxiu.getThumbsupnum()+1);
} else {
chongwuxiu.setCrazilynum(chongwuxiu.getCrazilynum()+1);
}
chongwuxiuService.updateById(chongwuxiu);
return R.ok();
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ChongwuxiuEntity chongwuxiu, HttpServletRequest request){
chongwuxiu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(chongwuxiu);
chongwuxiuService.insert(chongwuxiu);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody ChongwuxiuEntity chongwuxiu, HttpServletRequest request){
chongwuxiu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(chongwuxiu);
chongwuxiuService.insert(chongwuxiu);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody ChongwuxiuEntity chongwuxiu, HttpServletRequest request){
//ValidatorUtils.validateEntity(chongwuxiu);
chongwuxiuService.updateById(chongwuxiu);//全部更新
return R.ok();
}
/**
* 刪除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
chongwuxiuService.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<ChongwuxiuEntity> wrapper = new EntityWrapper<ChongwuxiuEntity>();
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("shouyangren")) {
wrapper.eq("shouyanghao", (String)request.getSession().getAttribute("username"));
}
int count = chongwuxiuService.selectCount(wrapper);
return R.ok().put("count", count);
}
/**
* 前端智能排序
*/
@IgnoreAuth
@RequestMapping("/autoSort")
public R autoSort(@RequestParam Map<String, Object> params,ChongwuxiuEntity chongwuxiu, HttpServletRequest request,String pre){
EntityWrapper<ChongwuxiuEntity> ew = new EntityWrapper<ChongwuxiuEntity>();
Map<String, Object> newMap = new HashMap<String, Object>();
Map<String, Object> param = new HashMap<String, Object>();
Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String, Object> entry = it.next();
String key = entry.getKey();
String newKey = entry.getKey();
if (pre.endsWith(".")) {
newMap.put(pre + newKey, entry.getValue());
} else if (StringUtils.isEmpty(pre)) {
newMap.put(newKey, entry.getValue());
} else {
newMap.put(pre + "." + newKey, entry.getValue());
}
}
params.put("sort", "clicktime");
params.put("order", "desc");
PageUtils page = chongwuxiuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chongwuxiu), params), params));
return R.ok().put("data", page);
}
}
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.DaichushenshenqingEntity;
import com.entity.view.DaichushenshenqingView;
import com.service.DaichushenshenqingService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
* 待初審申請(qǐng)
* 后端接口
* @author
* @email
* @date 2021-03-29 18:02:25
*/
@RestController
@RequestMapping("/daichushenshenqing")
public class DaichushenshenqingController {
@Autowired
private DaichushenshenqingService daichushenshenqingService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,DaichushenshenqingEntity daichushenshenqing,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("songyangren")) {
daichushenshenqing.setSongyanghao((String)request.getSession().getAttribute("username"));
}
if(tableName.equals("shouyangren")) {
daichushenshenqing.setShouyanghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<DaichushenshenqingEntity> ew = new EntityWrapper<DaichushenshenqingEntity>();
PageUtils page = daichushenshenqingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, daichushenshenqing), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,DaichushenshenqingEntity daichushenshenqing, HttpServletRequest request){
EntityWrapper<DaichushenshenqingEntity> ew = new EntityWrapper<DaichushenshenqingEntity>();
PageUtils page = daichushenshenqingService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, daichushenshenqing), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( DaichushenshenqingEntity daichushenshenqing){
EntityWrapper<DaichushenshenqingEntity> ew = new EntityWrapper<DaichushenshenqingEntity>();
ew.allEq(MPUtil.allEQMapPre( daichushenshenqing, "daichushenshenqing"));
return R.ok().put("data", daichushenshenqingService.selectListView(ew));
}
/**
* 查詢
*/
@RequestMapping("/query")
public R query(DaichushenshenqingEntity daichushenshenqing){
EntityWrapper< DaichushenshenqingEntity> ew = new EntityWrapper< DaichushenshenqingEntity>();
ew.allEq(MPUtil.allEQMapPre( daichushenshenqing, "daichushenshenqing"));
DaichushenshenqingView daichushenshenqingView = daichushenshenqingService.selectView(ew);
return R.ok("查詢待初審申請(qǐng)成功").put("data", daichushenshenqingView);
}
/**
* 后端詳情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
DaichushenshenqingEntity daichushenshenqing = daichushenshenqingService.selectById(id);
return R.ok().put("data", daichushenshenqing);
}
/**
* 前端詳情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
DaichushenshenqingEntity daichushenshenqing = daichushenshenqingService.selectById(id);
return R.ok().put("data", daichushenshenqing);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody DaichushenshenqingEntity daichushenshenqing, HttpServletRequest request){
daichushenshenqing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(daichushenshenqing);
daichushenshenqingService.insert(daichushenshenqing);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody DaichushenshenqingEntity daichushenshenqing, HttpServletRequest request){
daichushenshenqing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(daichushenshenqing);
daichushenshenqingService.insert(daichushenshenqing);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody DaichushenshenqingEntity daichushenshenqing, HttpServletRequest request){
//ValidatorUtils.validateEntity(daichushenshenqing);
daichushenshenqingService.updateById(daichushenshenqing);//全部更新
return R.ok();
}
/**
* 刪除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
daichushenshenqingService.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<DaichushenshenqingEntity> wrapper = new EntityWrapper<DaichushenshenqingEntity>();
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("songyangren")) {
wrapper.eq("songyanghao", (String)request.getSession().getAttribute("username"));
}
if(tableName.equals("shouyangren")) {
wrapper.eq("shouyanghao", (String)request.getSession().getAttribute("username"));
}
int count = daichushenshenqingService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
到了這里,關(guān)于ssm+vue寵物領(lǐng)養(yǎng)系統(tǒng)源碼和論文的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!