專業(yè)seo站長工具全面查詢網站市場調研報告1500字
ssm+vue寵物領養(yǎng)系統(tǒng)源碼和論文103
?開發(fā)工具:idea?
?數據庫mysql5.7+
?數據庫鏈接工具:navcat,小海豚等
? 技術:ssm
摘 ?要
本課題是根據用戶的需要以及網絡的優(yōu)勢建立的一個寵物領養(yǎng)系統(tǒng),來滿足用寵物領養(yǎng)的需求。
本寵物領養(yǎng)系統(tǒng)應用JSP技術,Java語言,MYSQL數據庫存儲數據,基于B/S結構開發(fā)。在網站的整個開發(fā)過程中,首先對系統(tǒng)進行了需求分析,設計出系統(tǒng)的主要功能模塊,其次對網站進行總體規(guī)劃和詳細設計,最后對寵物領養(yǎng)系統(tǒng)進行了系統(tǒng)測試,包括測試概述,測試方法,測試方案等,并對測試結果進行了分析和總結,進而得出系統(tǒng)的不足及需要改進的地方,為以后的系統(tǒng)維護和擴展提供了方便。
本系統(tǒng)布局合理、色彩搭配和諧、框架結構設計清晰,具有操作簡單,界面清晰,管理方便,功能完善等優(yōu)勢,有很高的使用價值。
關鍵詞:JSP技術,寵物領養(yǎng),MYSQL數據庫,B/S結構
-
- 課題背景
在當今的社會,可以說是信息技術的發(fā)展時代,在社會的方方面面無不涉及到各種信息的處理。信息是人們對客觀世界的具體描述,是人們進行交流與聯(lián)系的重要途徑。人類社會就處在一個對信息進行有效合理的加工中。它將促進整個社會的發(fā)展。隨著社會信息技術的提高,計算機已被廣泛應用于當今社會的各個領域,成為推動社會發(fā)展的首要技術動力。
在現在的社會生活中,人們的生活品質不斷的提高,物質的需求也相應的得到了滿足。但是也有一些人在物質上的滿足并不能填滿心里的孤寂。當一個人在外拼搏,就算在工作氛圍中有很多人的陪伴,但是回家也可能會是一個冷冷清清的環(huán)境。所以這時候如果有了一個寵物的陪伴,心里的孤寂也會得到很大的慰藉,飼養(yǎng)寵物可以給我們帶來快樂,也讓我們的心靈得到慰藉。這讓用戶寵物領養(yǎng)的需求日益在增加,但是人們在領養(yǎng)寵物方面卻缺乏一個很好的平臺,針對這一情況,開發(fā)了本寵物領養(yǎng)系統(tǒng),為用戶通過一個全新的寵物領養(yǎng)的平臺,提高效率。
?
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 {@Autowiredprivate 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;/*** 待初審申請* 后端接口* @author * @email * @date 2021-03-29 18:02:25*/
@RestController
@RequestMapping("/daichushenshenqing")
public class DaichushenshenqingController {@Autowiredprivate 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("查詢待初審申請成功").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);}}