基于javaweb的SSM+Maven图书借阅系统微信小程序(java+ssm+vue+wechat+mysql)

运行环境

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

开发工具

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

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

适用

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

功能说明

032324422805

042324422805

052324422805

062324422805

072324422805

092324422805

512124143108

基于javaweb的SSM+Maven图书借阅系统微信小程序(java+ssm+vue+wechat+mysql)

/BookSystem

上传图片名称路径不要有中文!
管理员:
admin 123456

用户:
账号1 123456
账号2 123456
账号3 123456
账号4 123456
账号5 123456
账号6 123456
账号7 123456
账号8 123456

后端启动:Tomcat(Tomcat端口使用8585,避免8080被系统占用了)
前端web端启动命令:npm run serve
前端小程序端启动:微信开发者工具预览

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



/**
* 我的待还
* 后端接口
* @email
*/
@RestController
@RequestMapping("/wodedaihai")
public class WodedaihaiController {
@Autowired
private WodedaihaiService wodedaihaiService;






/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,WodedaihaiEntity wodedaihai,
HttpServletRequest request){

String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
wodedaihai.setZhanghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<WodedaihaiEntity> ew = new EntityWrapper<WodedaihaiEntity>();


PageUtils page = wodedaihaiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, wodedaihai), 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



/**
* 用户
* 后端接口
* @email
*/
@RestController
@RequestMapping("/yonghu")
public class YonghuController {
@Autowired
private YonghuService yonghuService;




@Autowired
private TokenService tokenService;

/**
* 登录
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
   * 查询
*/
@RequestMapping("/query")
public R query(CuihaitixingEntity cuihaitixing){
EntityWrapper< CuihaitixingEntity> ew = new EntityWrapper< CuihaitixingEntity>();
ew.allEq(MPUtil.allEQMapPre( cuihaitixing, "cuihaitixing"));
CuihaitixingView cuihaitixingView = cuihaitixingService.selectView(ew);
return R.ok("查询催还提醒成功").put("data", cuihaitixingView);
}

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

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




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

cuihaitixingService.insert(cuihaitixing);
return R.ok();
}

/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody CuihaitixingEntity cuihaitixing, HttpServletRequest request){
cuihaitixing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(cuihaitixing);
cuihaitixing.setUserid((Long)request.getSession().getAttribute("userId"));

cuihaitixingService.insert(cuihaitixing);
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
   @IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request){
UsersEntity user = userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", username));
if(user==null) {
return R.error("账号不存在");
}
user.setPassword("123456");
userService.update(user,null);
return R.ok("密码已重置为:123456");
}

/**
* 列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,UsersEntity user){
EntityWrapper<UsersEntity> ew = new EntityWrapper<UsersEntity>();
PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));
return R.ok().put("data", page);
}

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

/**
* 信息
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") String id){
UsersEntity user = userService.selectById(id);
return R.ok().put("data", user);
}

/**
* 获取用户的session用户信息
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
		}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}

String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
wrapper.eq("zhanghao", (String)request.getSession().getAttribute("username"));
}

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









}



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