基于javaweb的SpringBoot阿博图书馆管理系统(java+springboot+maven+mybaits+vue+elementui+mysql)

运行环境

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

开发工具

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

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

适用

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

功能说明

021025570706

031025570706

041025570706

051025570706

061025570706

071025570706

081025570706

101025570706

111025570706

121025570706

基于javaweb的SpringBoot阿博图书馆管理系统(java+springboot+maven+mybaits+vue+elementui+mysql)

项目介绍

基于Springboot+vue阿博图书馆管理系统

技术栈

后端:SpringBoot+Mybaits

前端:Vue + elementui

使用说明

项目运行:

  1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件;

  2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令;

  3. 将项目中application.yml配置文件中的数据库配置改为自己的配置;

  4. 运行项目,在浏览器中输入地址:

前台地址:http://localhost:8080/springboot33dng/front/index.html

后台地址

http://localhost:8080/springboot33dng/admin/dist/index.html

后台管理员:
admin 123456

前台用户:
用户1 123456
用户2 123456
用户3 123456
用户4 123456
用户5 123456
用户6 123456

注意项目文件路径中不能含有中文、空格、特殊字符等,否则图片会上传不成功。

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

/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
TushuxinxiEntity tushuxinxi = tushuxinxiService.selectById(id);
tushuxinxi.setClicknum(tushuxinxi.getClicknum()+1);
tushuxinxi.setClicktime(new Date());
tushuxinxiService.updateById(tushuxinxi);
return R.ok().put("data", tushuxinxi);
}




/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody TushuxinxiEntity tushuxinxi, HttpServletRequest request){
tushuxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(tushuxinxi);
tushuxinxiService.insert(tushuxinxi);
return R.ok();
}

/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody TushuxinxiEntity tushuxinxi, HttpServletRequest request){
tushuxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(tushuxinxi);
tushuxinxiService.insert(tushuxinxi);
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
51
52
53
54
   	if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
storeup.setUserid((Long)request.getSession().getAttribute("userId"));
}
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>();
PageUtils page = storeupService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, storeup), params), params));
return R.ok().put("data", page);
}

/**
* 列表
*/
@RequestMapping("/lists")
public R list( StoreupEntity storeup){
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>();
ew.allEq(MPUtil.allEQMapPre( storeup, "storeup"));
return R.ok().put("data", storeupService.selectListView(ew));
}

/**
* 查询
*/
@RequestMapping("/query")
public R query(StoreupEntity storeup){
EntityWrapper< StoreupEntity> ew = new EntityWrapper< StoreupEntity>();
ew.allEq(MPUtil.allEQMapPre( storeup, "storeup"));
StoreupView storeupView = storeupService.selectView(ew);
return R.ok("查询收藏表成功").put("data", storeupView);
}

/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
StoreupEntity storeup = storeupService.selectById(id);
return R.ok().put("data", storeup);
}

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




/**
* 后端保存
*/
@RequestMapping("/save")
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24




/**
* 图书信息
* 后端接口
* @email
*/
@RestController
@RequestMapping("/tushuxinxi")
public class TushuxinxiController {
@Autowired
private TushuxinxiService tushuxinxiService;



/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,TushuxinxiEntity tushuxinxi,
HttpServletRequest request){
EntityWrapper<TushuxinxiEntity> ew = new EntityWrapper<TushuxinxiEntity>();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
		Wrapper<JiaonafajinEntity> wrapper = new EntityWrapper<JiaonafajinEntity>();
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("yonghu")) {
wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username"));
}

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



}




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("/save")
public R save(@RequestBody TushujieyueEntity tushujieyue, HttpServletRequest request){
tushujieyue.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(tushujieyue);
tushujieyueService.insert(tushujieyue);
return R.ok();
}

/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody TushujieyueEntity tushujieyue, HttpServletRequest request){
tushujieyue.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(tushujieyue);
tushujieyueService.insert(tushujieyue);
return R.ok();
}

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


/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
tushujieyueService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}

/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21





/**
* 图书分类
* 后端接口
* @email
*/
@RestController
@RequestMapping("/tushufenlei")
public class TushufenleiController {
@Autowired
private TushufenleiService tushufenleiService;



/**
* 后端列表
*/


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