基于javaweb+mysql的ssm校园快递物流管理系统(java+jsp+ssm+javabean+mysql+tomcat)

基于javaweb+mysql的ssm校园快递物流管理系统(java+jsp+ssm+javabean+mysql+tomcat)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

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

适用

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

功能说明

内容:源码+数据库脚本+论文

本系统采用SSM框架和MySQL数据库进行开发实现。

本系统实现了三大模块:

管理员模块具备快递人员管理、物流订单管理、取件发件管理以及系统其他配置功能;

用户模块具备发布代取件、送件信息管理、评价功能和查询订单功能等;

快递员模块具备物流订单管理功能和公告功能。

管理员

用户

快递员

技术框架

JavaBean JSP SSM(Spring SpringMVC MyBatis) MySQL Bootstrap JavaScript CSS

基于javaweb+mysql的SSM校园快递物流管理系统(java+jsp+ssm+javabean+mysql+tomcat)

	
	/**
	 * 保存修改信息
	 */
	@RequestMapping(value = "/update.action")
	public String update(Gonggao gonggao, Model model, HttpServletRequest request, HttpServletResponse response) {
		gonggaoDao.update(gonggao);
		return "redirect:/gonggao/list.action";
	}

	/**
	 * 删除通过主键
	 * @return
	 */
	@RequestMapping(value = "/del.action")
	public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) {
		// 真正删除
		gonggaoDao.deleteById(id);
		// 状态删除
		// Gonggao gonggao = gonggaoDao.load(id);
		// load.setDel(1);
		// gonggaoDao.update(load);
		return "redirect:/gonggao/list.action";
	}
	
		// --------------------------------------- 华丽分割线------------------------------------------------------//

	/**
	 * 分页查询 返回list json(通过对象)
	 * @param request
	 * @param response
	 * @return
	 */
	@RequestMapping(value = "/findByObj.json", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
	@ResponseBody
	public String findByObjByEntity(Gonggao gonggao, Model model, HttpServletRequest request, HttpServletResponse response) {
		// 分页查询
		Pager<Gonggao> pagers = gonggaoDao.findByEntity(gonggao);
		JSONObject jsonObject = JsonUtil2.getJsonObject();
		jsonObject.put("pagers", pagers);
		jsonObject.put("obj", gonggao);
		return jsonObject.toString();
	}

	// --------------------------------------- 华丽分割线------------------------------	// 
}
@RequestMapping(value = "/order")
public class OrderController extends BaseController{
	/**
	 * 依赖注入 start dao/===
	 */
	@Autowired
	private OrderDaoImpl orderDao;

	public OrderDaoImpl getOrderDao() {
		return orderDao;
	}

	public void setOrderDao(OrderDaoImpl orderDao) {
		this.orderDao = orderDao;
	}

	// --------------------------------------- 华丽分割线 ------------------------------//

	/**
	 * 分页查询 返回list对象(通过对象)
	 * @param request
	 * @param response
	 * @return
	 */
	@RequestMapping(value = "/list.action")
	public String list(Order order, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
		Pager<Order> pagers = orderDao.findByEntity(order);
		model.addAttribute("pagers", pagers);
		return "admin/order/order_list";
	}

	/**
	 * 跳转添加页面
	 */
	@RequestMapping(value = "/add.action")
	public String add(Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
		return "admin/order/order_add";
	}

	/**
	 * 跳至修改页面
	private YuangongDaoImpl yuangongDao;

	public YuangongDaoImpl getYuangongDao() {
		return yuangongDao;
	}

	public void setYuangongDao(YuangongDaoImpl yuangongDao) {
		this.yuangongDao = yuangongDao;
	}
	
	@Autowired
	private UserDaoImpl userDao;

	public UserDaoImpl getUserDao() {
		return userDao;
	}

	public void setUserDao(UserDaoImpl userDao) {
		this.userDao = userDao;
	}
	/**
	 * 登陆接口
	 * @param request
	 * @param response
	 * @return
	 */
	@RequestMapping(value = "/login.action")
	public String list(@RequestParam String userName, @RequestParam String userPw, @RequestParam Integer userType, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
			System.out.println("userType" + userType);
			try {
				Thread.sleep(700);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			if (userType == 0)//
			{
				Admin admin = new Admin();
				admin.setUsername(userName);
				admin.setUserpwd(userPw);
				Pager<Admin> pagers = adminDao.findByEntity(admin);
				if (pagers.getTotal() == 0) {
					request.setAttribute("msg", "用户名或者密码错误!");
					return "login";
				} else {
					admin = (Admin) pagers.getDatas().get(0);
					session.setAttribute("userType", 0);
	/**
	 * 依赖注入 start dao/===
	 */
	@Autowired
	private GonggaoDaoImpl gonggaoDao;

	public GonggaoDaoImpl getGonggaoDao() {
		return gonggaoDao;
	}

	public void setGonggaoDao(GonggaoDaoImpl gonggaoDao) {
		this.gonggaoDao = gonggaoDao;
	}

	// --------------------------------------- 华丽分割线 ------------------------------//

	/**
	 * 分页查询 返回list对象(通过对象)
	 * @param request
	 * @param response
	 * @return
	 */
	@RequestMapping(value = "/list.action")
	public String list(Gonggao gonggao, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
		Pager<Gonggao> pagers = gonggaoDao.findByEntity(gonggao);
		model.addAttribute("pagers", pagers);
		return "admin/gonggao/gonggao_list";
	}

	/**
	 * 跳转添加页面
	 */
	@RequestMapping(value = "/add.action")
	public String add(Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
		return "admin/gonggao/gonggao_add";
	}

	/**
	 * 跳至修改页面
	 * 
	}
	
	/**
	 * 跳至修改页面
	 * 
	 * @return
	 */
	@RequestMapping(value = "/pingjia2.action")
	public String pingjia2(Integer id, Model model) {
		Dqorder bean = dqorderDao.load(id);
		model.addAttribute("bean", bean);
		return "admin/dqorder/dqorder_pingjia2";
	}
	/**
	 * 添加信息保存
	 */
	@RequestMapping(value = "/save.action")
	public String save(Dqorder dqorder, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
		dqorderDao.insert(dqorder);
		
		model.addAttribute("msg", "订单创建成功");
		
		return "common/succ";
	}
	
	/**
	 * 保存修改信息
	 */
	@RequestMapping(value = "/update1.action")
	public String update1(Dqorder dqorder, Model model, HttpServletRequest request, HttpServletResponse response) {
		
		Dqorder dqordertt = new Dqorder();
		dqordertt.setYid(dqorder.getYid());
		dqordertt.setYname(dqorder.getYname());
		Pager<Dqorder> pagers = dqorderDao.findByEntity1(dqordertt);
		if(pagers.getDatas().size() > 0){
			model.addAttribute("msg", "用户评分太低不能接单");
			return "common/succ";
		}
		dqorderDao.update(dqorder);
		model.addAttribute("msg", "操作成功");
		return "common/succ";
	}
	
	
	/**
	 * 保存修改信息
	 */
	@RequestMapping(value = "/update.action")
		// 分页查询
		Pager<User> pagers = userDao.findByEntity(user);
		JSONObject jsonObject = JsonUtil2.getJsonObject();
		jsonObject.put("pagers", pagers);
		jsonObject.put("obj", user);
		return jsonObject.toString();
	}

	// --------------------------------------- 华丽分割线------------------------------	// 
}

@Controller
@RequestMapping(value = "/order")
public class OrderController extends BaseController{
	/**
	 * 依赖注入 start dao/===
	 */
	@Autowired
	private OrderDaoImpl orderDao;

	public OrderDaoImpl getOrderDao() {
		return orderDao;
	}

	public void setOrderDao(OrderDaoImpl orderDao) {
		this.orderDao = orderDao;
	}

	public String save(User user, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
		userDao.insert(user);
		return "redirect:/user/list.action";
	}
	
	/**
	 * 添加信息保存
	 */
	@RequestMapping(value = "/reg.action")
	public String reg(User user, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
		userDao.insert(user);
		return "/login";
	}
	
	
	/**
	 * 保存修改信息
	 */
	@RequestMapping(value = "/update.action")
	public String update(User user, Model model, HttpServletRequest request, HttpServletResponse response) {
		userDao.update(user);
		return "redirect:/user/list.action";
	}

	/**
	 * 删除通过主键
	 * @return
	 */
	@RequestMapping(value = "/del.action")
	public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) {
		// 真正删除
		userDao.deleteById(id);
		// 状态删除
		// User user = userDao.load(id);
		// load.setDel(1);
		// userDao.update(load);
		return "redirect:/user/list.action";
	}
	
		// --------------------------------------- 华丽分割线------------------------------------------------------//

	/**
	 * 分页查询 返回list json(通过对象)
	 * @param request
	 * @param response
	 * @return
	 */
	@RequestMapping(value = "/findByObj.json", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
	@ResponseBody
	public String findByObjByEntity(User user, Model model, HttpServletRequest request, HttpServletResponse response) {
		// 分页查询
     * @version 1.0
     * @deprecated 保存修改信息
     */
    @RequestMapping(value = "/update.action")
    public String update(Admin admin, Model model, HttpServletRequest request, HttpServletResponse response) {
        adminDao.update(admin);
        return "redirect:/admin/list.action";
    }

    /**
     * @return
     * @version 1.0
     * @deprecated 删除通过主键
     */
    @RequestMapping(value = "/del.action")
    public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) {
        Admin bean = adminDao.load(id);
        if (!"admin".equals(bean.getUsername())) {
            // 真正删除
            adminDao.deleteById(id);
        }
        // 状态删除
        // Admin admin = adminDao.load(id);
        // load.setDel(1);
        // adminDao.update(load);
        return "redirect:/admin/list.action";
    }

    // --------------------------------------- 华丽分割线------------------------------------------------------//

    /**
     * 分页查询 返回list json(通过对象)
     *
     * @param request
     * @param response
     * @return
     */
    @RequestMapping(value = "/findByObj.json", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
    @ResponseBody
    public String findByObjByEntity(Admin admin, Model model, HttpServletRequest request, HttpServletResponse response) {
        // 分页查询
        Pager<Admin> pagers = adminDao.findByEntity(admin);
        JSONObject jsonObject = JsonUtil2.getJsonObject();
        jsonObject.put("pagers", pagers);
        jsonObject.put("obj", admin);
        return jsonObject.toString();
    }
}

/**
 * @version 1.0
 * @deprecated 管理员操作管理
 */
@Controller
@RequestMapping(value = "/admin")
public class AdminController extends BaseController {
    /**
     * 依赖注入 start dao/===
     */
    @Autowired
    private AdminDaoImpl adminDao;

    public AdminDaoImpl getAdminDao() {
        return adminDao;
    }

    public void setAdminDao(AdminDaoImpl adminDao) {
        this.adminDao = adminDao;
    }

    // --------------------------------------- 华丽分割线 ------------------------------//

    /**
     * @param request
     * @param response
     * @return
     * @deprecated list()
     */
    @RequestMapping(value = "/list.action")
    public String list(Admin admin, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
        Pager<Admin> pagers = adminDao.findByEntity(admin);
        model.addAttribute("pagers", pagers);
        return "admin/admin/admin_list";
    }

    /**
		return "admin/dqorder/dqorder_list2";
	}
	
	/**
	 * 分页查询 返回list对象(通过对象)
	 * @param request
	 * @param response
	 * @return
	 */
	@RequestMapping(value = "/list3.action")
	public String list3(Dqorder dqorder, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
		Pager<Dqorder> pagers = dqorderDao.findByEntity(dqorder);
		model.addAttribute("pagers", pagers);
		return "admin/dqorder/dqorder_list3";
	}

	/**
	 * 跳转添加页面
	 */
	@RequestMapping(value = "/add.action")
	public String add(Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
		return "admin/dqorder/dqorder_add";
	}

	/**
	 * 跳至修改页面
	 * 
	 * @return
	 */
	@RequestMapping(value = "/edit.action")
	public String edit(Integer id, Model model) {
		Dqorder bean = dqorderDao.load(id);
		model.addAttribute("bean", bean);
		return "admin/dqorder/dqorder_edit";
	}
	
	/**
	 * 跳至修改页面
	 * 
	 * @return
	 */
	@RequestMapping(value = "/pingjia1.action")
	public String pingjia1(Integer id, Model model) {
		Dqorder bean = dqorderDao.load(id);
		model.addAttribute("bean", bean);
		return "admin/dqorder/dqorder_pingjia1";
	}
	
	/**
	 * 跳至修改页面
	 * 

/**
 * @version 1.0
 * @deprecated 管理员操作管理
 */
@Controller
@RequestMapping(value = "/admin")
public class AdminController extends BaseController {
    /**
     * 依赖注入 start dao/===
     */
    @Autowired
    private AdminDaoImpl adminDao;

    public AdminDaoImpl getAdminDao() {
        return adminDao;
    }

    public void setAdminDao(AdminDaoImpl adminDao) {
        this.adminDao = adminDao;
    }

    // --------------------------------------- 华丽分割线 ------------------------------//

    /**
     * @param request
     * @param response
     * @return
     * @deprecated list()
	 * 跳至修改页面
	 * 
	 * @return
	 */
	@RequestMapping(value = "/edit.action")
	public String edit(Integer id, Model model) {
		Yuangong bean = yuangongDao.load(id);
		model.addAttribute("bean", bean);
		return "admin/yuangong/yuangong_edit";
	}
	
	/**
	 * 添加信息保存
	 */
	@RequestMapping(value = "/save.action")
	public String save(Yuangong yuangong, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
		yuangongDao.insert(yuangong);
		return "redirect:/yuangong/list.action";
	}
	
	
	/**
	 * 保存修改信息
	 */
	@RequestMapping(value = "/update.action")
	public String update(Yuangong yuangong, Model model, HttpServletRequest request, HttpServletResponse response) {
		yuangongDao.update(yuangong);
		return "redirect:/yuangong/list.action";
	}

	/**
	 * 删除通过主键
	 * @return
	 */
	@RequestMapping(value = "/del.action")
	public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) {
		// 真正删除
		yuangongDao.deleteById(id);
		// 状态删除
		// Yuangong yuangong = yuangongDao.load(id);
		// load.setDel(1);
		// yuangongDao.update(load);
		return "redirect:/yuangong/list.action";
	}
	

@Controller
@RequestMapping(value = "/user")
public class UserController extends BaseController{
	/**
	 * 依赖注入 start dao/===
	 */
	@Autowired
	private UserDaoImpl userDao;

	public UserDaoImpl getUserDao() {
		return userDao;
	}

	public void setUserDao(UserDaoImpl userDao) {
		this.userDao = userDao;
	}

	// --------------------------------------- 华丽分割线 ------------------------------//

	/**
	 * 分页查询 返回list对象(通过对象)
	 * @param request
	 * @param response
	 * @return
	 */

@Controller
@RequestMapping(value = "/user")
public class UserController extends BaseController{
	/**
	 * 依赖注入 start dao/===
	 */
	@Autowired
	private UserDaoImpl userDao;

	public UserDaoImpl getUserDao() {
		return userDao;
	}

	public void setUserDao(UserDaoImpl userDao) {
		this.userDao = userDao;
	}

	// --------------------------------------- 华丽分割线 ------------------------------//

	/**
	 * 分页查询 返回list对象(通过对象)
	 * @param request
	 * @param response
	 * @return
	 */
	@RequestMapping(value = "/list.action")
	public String list(User user, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
		Pager<User> pagers = userDao.findByEntity(user);
		model.addAttribute("pagers", pagers);
		return "admin/user/user_list";
	}

	/**
	 * 跳转添加页面
	 */
	@RequestMapping(value = "/add.action")
	public String add(Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
		return "admin/user/user_add";
	}

	/**

	public void setUserDao(UserDaoImpl userDao) {
		this.userDao = userDao;
	}

	// --------------------------------------- 华丽分割线 ------------------------------//

	/**
	 * 分页查询 返回list对象(通过对象)
	 * @param request
	 * @param response
	 * @return
	 */
	@RequestMapping(value = "/list.action")
	public String list(User user, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
		Pager<User> pagers = userDao.findByEntity(user);
		model.addAttribute("pagers", pagers);
		return "admin/user/user_list";
	}

	/**
	 * 跳转添加页面
	 */
	@RequestMapping(value = "/add.action")
	public String add(Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
		return "admin/user/user_add";
	}

	/**
	 * 跳至修改页面
	 * 
	 * @return
	 */
	@RequestMapping(value = "/edit.action")
	public String edit(Integer id, Model model) {
		User bean = userDao.load(id);
		model.addAttribute("bean", bean);
		return "admin/user/user_edit";
	}
	
	/**
	 * 添加信息保存
	 */
	@RequestMapping(value = "/save.action")
	public String save(User user, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
		userDao.insert(user);
		return "redirect:/user/list.action";
	}
	
	/**
	 * 添加信息保存
	 */
	@RequestMapping(value = "/reg.action")
	public String reg(User user, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
	 */
	@RequestMapping(value = "/del.action")
	public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) {
		// 真正删除
		yuangongDao.deleteById(id);
		// 状态删除
		// Yuangong yuangong = yuangongDao.load(id);
		// load.setDel(1);
		// yuangongDao.update(load);
		return "redirect:/yuangong/list.action";
	}
	
		// --------------------------------------- 华丽分割线------------------------------------------------------//

	/**
	 * 分页查询 返回list json(通过对象)
	 * @param request
	 * @param response
	 * @return
	 */
	@RequestMapping(value = "/findByObj.json", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
	@ResponseBody
	public String findByObjByEntity(Yuangong yuangong, Model model, HttpServletRequest request, HttpServletResponse response) {
		// 分页查询
		Pager<Yuangong> pagers = yuangongDao.findByEntity(yuangong);
		JSONObject jsonObject = JsonUtil2.getJsonObject();
		jsonObject.put("pagers", pagers);
		jsonObject.put("obj", yuangong);
		return jsonObject.toString();
	}
}

@Controller
public class LoginController extends BaseController{
		model.addAttribute("msg", "订单修改成功");
		return "common/succ";
	}

	/**
	 * 删除通过主键
	 * @return
	 */
	@RequestMapping(value = "/del.action")
	public String delete(Integer id, Model model, HttpServletRequest request, HttpServletResponse response) {
		// 真正删除
		orderDao.deleteById(id);
		// 状态删除
		// Order order = orderDao.load(id);
		// load.setDel(1);
		// orderDao.update(load);
//		return "redirect:/order/list.action";
		model.addAttribute("msg", "订单删除成功");
		return "common/succ";
	}
	
		// --------------------------------------- 华丽分割线------------------------------------------------------//

	/**
	 * 分页查询 返回list json(通过对象)
	 * @param request
	 * @param response
	 * @return
	 */
	@RequestMapping(value = "/findByObj.json", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
	@ResponseBody
	public String findByObjByEntity(Order order, Model model, HttpServletRequest request, HttpServletResponse response) {
		// 分页查询
		Pager<Order> pagers = orderDao.findByEntity(order);
		JSONObject jsonObject = JsonUtil2.getJsonObject();
		jsonObject.put("pagers", pagers);
		jsonObject.put("obj", order);
		return jsonObject.toString();
	}

	 */
	@RequestMapping(value = "/list3.action")
	public String list3(Dqorder dqorder, Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
		Pager<Dqorder> pagers = dqorderDao.findByEntity(dqorder);
		model.addAttribute("pagers", pagers);
		return "admin/dqorder/dqorder_list3";
	}

	/**
	 * 跳转添加页面
	 */
	@RequestMapping(value = "/add.action")
	public String add(Model model, HttpServletRequest request, HttpServletResponse response, HttpSession session) {
		return "admin/dqorder/dqorder_add";
	}

	/**
	 * 跳至修改页面
	 * 
	 * @return
	 */
	@RequestMapping(value = "/edit.action")
	public String edit(Integer id, Model model) {
		Dqorder bean = dqorderDao.load(id);
		model.addAttribute("bean", bean);
		return "admin/dqorder/dqorder_edit";
	}
	
	/**
	 * 跳至修改页面
	 * 
	 * @return
	 */
	@RequestMapping(value = "/pingjia1.action")
	public String pingjia1(Integer id, Model model) {
		Dqorder bean = dqorderDao.load(id);
		model.addAttribute("bean", bean);
		return "admin/dqorder/dqorder_pingjia1";
	}
	
	/**
	 * 跳至修改页面
	 * 
	 * @return
	 */
	@RequestMapping(value = "/pingjia2.action")
	public String pingjia2(Integer id, Model model) {
		Dqorder bean = dqorderDao.load(id);
		model.addAttribute("bean", bean);
		return "admin/dqorder/dqorder_pingjia2";

请添加图片描述

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值