基于javaweb的SSM+Maven宠物管理系统(java+ssm+elementui+vue+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8、Node.js≥14

开发工具

后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可

❗没学过node.js的不要搞前后端分离项目

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

222323421807

242323421807

252323421807

272323421807

282323421807

基于javaweb的SSM+Maven宠物管理系统(java+ssm+elementui+vue+mysql)

项目介绍

管理员:首页、个人中心、宠物分类管理、宠物用品、宠物商店管理、宠物领养管理、用户管理、宠物寄存管理、宠物挂失管理、论坛管理、管理员管理、系统管理、订单管理

用户: 首页、个人中心、宠物寄存管理、宠物挂失管理、我的收藏管理、订单管理

前台: 首页、宠物用品、宠物领养、宠物挂失、论坛信息、宠物资讯、个人中心、后台管理、购物车、客服

环境需要

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) 前端:ElementUI+Vue

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,修改配置,运行项目; 3. 将项目中db.xml配置文件中的数据库配置改为自己的配置,然后运行;

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
 * 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
DiscusschongwuguashiEntity discusschongwuguashi = discusschongwuguashiService.selectById(id);
return R.ok().put("data", discusschongwuguashi);
}

/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
DiscusschongwuguashiEntity discusschongwuguashi = discusschongwuguashiService.selectById(id);
return R.ok().put("data", discusschongwuguashi);
}




/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody DiscusschongwuguashiEntity discusschongwuguashi, HttpServletRequest request){
discusschongwuguashi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(discusschongwuguashi);

discusschongwuguashiService.insert(discusschongwuguashi);
return R.ok();
}

/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody DiscusschongwuguashiEntity discusschongwuguashi, HttpServletRequest request){
discusschongwuguashi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(discusschongwuguashi);

discusschongwuguashiService.insert(discusschongwuguashi);
return R.ok();
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
48
49
50
       return R.ok();
}

/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody ChongwuguashiEntity chongwuguashi, HttpServletRequest request){
//ValidatorUtils.validateEntity(chongwuguashi);
chongwuguashiService.updateById(chongwuguashi);//全部更新
return R.ok();
}


/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
chongwuguashiService.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));
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
			map.put("remindend", sdf.format(remindEndDate));
}
}

Wrapper<ChongwuyongpinEntity> wrapper = new EntityWrapper<ChongwuyongpinEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}


int count = chongwuyongpinService.selectCount(wrapper);
return R.ok().put("count", count);
}

/**
* 前端智能排序
*/
@IgnoreAuth
@RequestMapping("/autoSort")
public R autoSort(@RequestParam Map<String, Object> params,ChongwuyongpinEntity chongwuyongpin, HttpServletRequest request,String pre){
EntityWrapper<ChongwuyongpinEntity> ew = new EntityWrapper<ChongwuyongpinEntity>();
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", "clicknum");

params.put("order", "desc");
PageUtils page = chongwuyongpinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chongwuyongpin), params), params));
return R.ok().put("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
44

/**
* 删除
*/
@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"));
}
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
48
49
50
51
52
    */
@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));
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

int count = discusschongwushangdianService.selectCount(wrapper);
return R.ok().put("count", count);
}



}






/**
* 宠物领养评论表


项目链接:
https://javayms.github.io?id=070023061907201as
https://javayms.pages.dev?id=070023061907201as