基于javaweb的SpringBoot物流管理系统(java+springboot+thymeleaf+html+mybatis+layui+mysql)

运行环境

Java≥8、MySQL≥5.7

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

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

功能说明

560023012403

511023021103

521023021103

531023021103

541023021103

561023021103

571023021103

基于javaweb的SpringBoot物流管理系统(java+springboot+thymeleaf+html+mybatis+layui+mysql)

项目介绍

基于springboot的物流管理系统,这个项目的技术使用的都是比较新的,代码写的架构设计、编码风格很规范、注释清洗、代码简洁、适合于二次开发、学习。

管理员角色:注册、登录、我的物流,可以创建我要寄件,可以查看我要收件。个人管理,个人信息的查看和修改(头像、用户名、账号、密码、电话、邮箱等属性)、

我收到的(展示收到的物流信息,如快递编号、寄件人、存放位置、订单时间、状态等)、我寄出的(可以自行修改订单的状态,未寄出、已寄出、已签收等)。后台管理:物流管理和用户管理。

普通用户:注册、登录、我的物流,可以创建我要寄件,可以查看我要收件。个人管理,个人信息的查看和修改(头像、用户名、账号、密码、电话、邮箱等属性)、

我收到的(展示收到的物流信息,如快递编号、寄件人、存放位置、订单时间、状态等)、我寄出的(可以自行修改订单的状态,未寄出、已寄出、已签收等)。

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
4.数据库:MySql 8.0/5.7版本;

技术栈

1.后端:SpringBoot+Mysql+redis+Mybatis-plus

2.前端:Thymeleaf+jquery+layui

使用说明
运行项目,在浏览器中输入http://localhost:8080 访问
管理员用户名密码:admin/123456,
普通用户名密码:user/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
        }
}

@GetMapping("toPostDetail/{id}")
public String toPostDetail(@PathVariable Integer id, Model model) {
Post post = postService.findById(id);
model.addAttribute("post",post);
return "send3";
}

@GetMapping("toUpdatePost/{id}")
public String toUpdatePost(@PathVariable Integer id, Model model) {
Post post = postService.findById(id);
model.addAttribute("post",post);
return "send2";
}

@GetMapping("deletePost/{id}")
public String deletePost(@PathVariable Integer id) {
postService.removeById(id);
return "redirect:/toUserSend";
}

}
package com.ev.logistics.controller;



/**
*/
@Controller
public class LoginController {

@Autowired
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



/**
*/
@Controller
public class adminController {

@Autowired
PostService postService;

@Autowired
CategoryService categoryService;

@Autowired
PositionService positionService;

@Autowired
OrdersService ordersService;

@Autowired
UserService userService;

//寄件管理
@GetMapping("/toAdminSend")
public String toAdminSend(@RequestParam(required = false, defaultValue = "1", value = "pageNum") int pageNum, HttpSession session, Model model, RedirectAttributes attributes) {
User userInfo = (User) session.getAttribute("user");
if (userInfo != null) {
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
 */
@Controller
public class UserController {

@Autowired
UserService userService;

@Autowired
PostService postService;

@Autowired
OrdersService ordersService;

@Autowired
private AliyunOssUtil aliyunOssUtil;

//个人信息
@GetMapping("/toUserInfo")
public String toUserInfo(HttpSession session, RedirectAttributes attributes) {

User userInfo = (User) session.getAttribute("user");
if (userInfo != null) {
Integer id = userInfo.getId();
User user = userService.getById(id);
//更新
session.setAttribute("user", user);
return "userInfo";
} else {
attributes.addFlashAttribute("message", "权限不足,请先登录");
return "redirect:/toLogin";
}
}

@PostMapping("/updateUserInfo")
public String updateUserInfo(User user, HttpSession session) {
User userInfo = (User) session.getAttribute("user");
Integer id = userInfo.getId();
user.setId(id);
userService.updateById(user);
return "redirect:/toUserInfo";
}

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


/**
*/
@Controller
public class PickUpController {

@Autowired
OrdersService ordersService;

@Autowired
PositionService positionService;

@Autowired
PostService postService;

@GetMapping("/toPickUp")
public String toPickUp(@RequestParam(required = false, defaultValue = "1", value = "pageNum") int pageNum, Model model, HttpSession session, RedirectAttributes attributes) {
User userInfo = (User) session.getAttribute("user");
if (userInfo != null) {
PageHelper.startPage(pageNum, 6);
List<Orders> ordersList = ordersService.findByUserId(userInfo.getId());
PageInfo<Orders> pageInfo = new PageInfo<>(ordersList);
model.addAttribute("ordersList",ordersList);
model.addAttribute("pageInfo",pageInfo);
return "pickUp";
} else {
attributes.addFlashAttribute("message", "权限不足,请先登录");
return "redirect:/toLogin";
}
}

@GetMapping("/pickUpOrders/{id}")
public String pickUpOrders(@PathVariable Integer id){
ordersService.updateOrdersStatusTo1(id,new Date());
Orders orders = ordersService.findById(id);
//柜子状态变为0
Position position = positionService.getById(orders.getPositionId());
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

@GetMapping("adminSendPost/{id}")
public String adminSendPost(@PathVariable Integer id) {
postService.updatePostStatusTo1(id, new Date());
return "redirect:/toAdminSend";
}

@PostMapping("/searchPost")
public String searchPost(Post post, @RequestParam(required = false, defaultValue = "1", value = "pageNum") int pageNum, Model model) {
PageHelper.startPage(pageNum, 6);
List<Post> postList = postService.findPostBySearch(post);
PageInfo<Post> pageInfo = new PageInfo<>(postList);
List<Category> categoryList = categoryService.list();
model.addAttribute("categoryList", categoryList);
model.addAttribute("postList", postList);
model.addAttribute("pageInfo", pageInfo);
return "adminSend";
}


//收件管理
@GetMapping("adminPickUpPost/{id}")
public String adminPickUpPost(@PathVariable Integer id, Model model) {
Post post = postService.findById(id);
model.addAttribute("post", post);
QueryWrapper<Position> status0 = new QueryWrapper<Position>().eq("status", 0);
List<Position> positionList = positionService.list(status0);
model.addAttribute("positionList", positionList);
return "adminPickUp";
}

// @GetMapping("/toAdminPickUp")
// public String toAdminPickUp(Model model, RedirectAttributes attributes, HttpSession session) {
// User userInfo = (User) session.getAttribute("user");
// if (userInfo != null) {
// QueryWrapper<Position> status0 = new QueryWrapper<Position>().eq("status", 0);
// List<Position> positionList = positionService.list(status0);
// model.addAttribute("positionList", positionList);
// return "adminPickUp";
// } else {
// attributes.addFlashAttribute("message", "权限不足,请先登录");
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
@Controller
public class adminController {

@Autowired
PostService postService;

@Autowired
CategoryService categoryService;

@Autowired
PositionService positionService;

@Autowired
OrdersService ordersService;

@Autowired
UserService userService;

//寄件管理
@GetMapping("/toAdminSend")
public String toAdminSend(@RequestParam(required = false, defaultValue = "1", value = "pageNum") int pageNum, HttpSession session, Model model, RedirectAttributes attributes) {
User userInfo = (User) session.getAttribute("user");
if (userInfo != null) {
PageHelper.startPage(pageNum, 6);
List<Post> postList = postService.findAllPost();
PageInfo<Post> pageInfo = new PageInfo<>(postList);
model.addAttribute("postList", postList);
model.addAttribute("pageInfo", pageInfo);
List<Category> categoryList = categoryService.list();
model.addAttribute("categoryList", categoryList);
return "adminSend";
} else {
attributes.addFlashAttribute("message", "权限不足,请先登录");
return "redirect:/toLogin";
}
}

@GetMapping("adminSendPost/{id}")
public String adminSendPost(@PathVariable Integer id) {
postService.updatePostStatusTo1(id, new Date());
return "redirect:/toAdminSend";
}

@PostMapping("/searchPost")
public String searchPost(Post post, @RequestParam(required = false, defaultValue = "1", value = "pageNum") int pageNum, Model model) {
PageHelper.startPage(pageNum, 6);
List<Post> postList = postService.findPostBySearch(post);
PageInfo<Post> pageInfo = new PageInfo<>(postList);
List<Category> categoryList = categoryService.list();
model.addAttribute("categoryList", categoryList);
model.addAttribute("postList", postList);
model.addAttribute("pageInfo", pageInfo);
return "adminSend";
}


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