Java+MySQL 基于ssm的宠物商店领养管理系统#毕业设计
生活随笔
收集整理的這篇文章主要介紹了
Java+MySQL 基于ssm的宠物商店领养管理系统#毕业设计
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
文末獲取源碼
開發(fā)環(huán)境
項目編號:Java+MySQL ssm272寵物商店領養(yǎng)管理系統(tǒng)#畢業(yè)設計
開發(fā)語言:Java
開發(fā)工具:IDEA /Eclipse
數據庫:MYSQL5.7
應用服務:Tomcat7/Tomcat8
使用框架:ssm+vue
項目介紹
寵物的品種也越來越多樣化,寵物不僅能給生活帶來樂趣還可以成為空巢老人,獨生子女很好的精神陪伴,養(yǎng)寵物是許多小伙伴的選擇,寵物通常是寵物店購買的,帶給它們一個溫暖的家。
本論文系統(tǒng)地描繪了整個網上寵物管理系統(tǒng)的設計與實現,主要實現的功能有以下幾點:管理員;首頁、個人中心、寵物分類管理、商品分類管理、寵物用品管理、寵物商店管理、寵物領養(yǎng)管理、用戶管理、寵物寄存管理、用戶領養(yǎng)管理、寵物掛失管理、論壇管理、管理員管理、系統(tǒng)管理、訂單管理,前臺首頁;首頁、寵物用品、寵物商店、寵物領養(yǎng)、寵物掛失、論壇信息、寵物資訊、個人中心、后臺管理、購物車、客服,用戶;首頁、個人中心、寵物寄存管理、用戶領養(yǎng)管理、寵物掛失管理、我的收藏管理、訂單管理等功能,其具有簡單的接口,方便的應用,強大的互動,完全基于互聯(lián)網的特點。
系統(tǒ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.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.ChongwulingyangEntity; import com.entity.view.ChongwulingyangView;import com.service.ChongwulingyangService; import com.service.TokenService; import com.utils.PageUtils; import com.utils.R; import com.utils.MPUtil; import com.utils.CommonUtil;/*** 寵物領養(yǎng)* 后端接口* @author * @email * @date 2021-01-16 09:02:05*/ @RestController @RequestMapping("/chongwulingyang") public class ChongwulingyangController {@Autowiredprivate ChongwulingyangService chongwulingyangService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,ChongwulingyangEntity chongwulingyang, HttpServletRequest request){EntityWrapper<ChongwulingyangEntity> ew = new EntityWrapper<ChongwulingyangEntity>();PageUtils page = chongwulingyangService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chongwulingyang), params), params));return R.ok().put("data", page);}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,ChongwulingyangEntity chongwulingyang, HttpServletRequest request){EntityWrapper<ChongwulingyangEntity> ew = new EntityWrapper<ChongwulingyangEntity>();PageUtils page = chongwulingyangService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chongwulingyang), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( ChongwulingyangEntity chongwulingyang){EntityWrapper<ChongwulingyangEntity> ew = new EntityWrapper<ChongwulingyangEntity>();ew.allEq(MPUtil.allEQMapPre( chongwulingyang, "chongwulingyang")); return R.ok().put("data", chongwulingyangService.selectListView(ew));}/*** 查詢*/@RequestMapping("/query")public R query(ChongwulingyangEntity chongwulingyang){EntityWrapper< ChongwulingyangEntity> ew = new EntityWrapper< ChongwulingyangEntity>();ew.allEq(MPUtil.allEQMapPre( chongwulingyang, "chongwulingyang")); ChongwulingyangView chongwulingyangView = chongwulingyangService.selectView(ew);return R.ok("查詢寵物領養(yǎng)成功").put("data", chongwulingyangView);}/*** 后端詳情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){ChongwulingyangEntity chongwulingyang = chongwulingyangService.selectById(id);return R.ok().put("data", chongwulingyang);}/*** 前端詳情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){ChongwulingyangEntity chongwulingyang = chongwulingyangService.selectById(id);return R.ok().put("data", chongwulingyang);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody ChongwulingyangEntity chongwulingyang, HttpServletRequest request){chongwulingyang.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(chongwulingyang);chongwulingyangService.insert(chongwulingyang);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody ChongwulingyangEntity chongwulingyang, HttpServletRequest request){chongwulingyang.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(chongwulingyang);chongwulingyangService.insert(chongwulingyang);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody ChongwulingyangEntity chongwulingyang, HttpServletRequest request){//ValidatorUtils.validateEntity(chongwulingyang);chongwulingyangService.updateById(chongwulingyang);//全部更新return R.ok();}/*** 刪除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){chongwulingyangService.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<ChongwulingyangEntity> wrapper = new EntityWrapper<ChongwulingyangEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}int count = chongwulingyangService.selectCount(wrapper);return R.ok().put("count", count);}}總結
以上是生活随笔為你收集整理的Java+MySQL 基于ssm的宠物商店领养管理系统#毕业设计的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2015 2020 r4烧录卡 区别_每
- 下一篇: 栅栏密码 - Python脚本