diff --git a/src/com/ssm/controller/TingchexinxiController.java b/src/com/ssm/controller/TingchexinxiController.java index 0317d9f..ff0e647 100644 --- a/src/com/ssm/controller/TingchexinxiController.java +++ b/src/com/ssm/controller/TingchexinxiController.java @@ -1,16 +1,19 @@ package com.ssm.controller; +import com.ssm.entity.TingchequyuModel; import com.ssm.entity.TingchexinxiModel; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.servlet.ModelAndView; @Controller @RequestMapping("tingchexinxi") public class TingchexinxiController { @RequestMapping("add") - public String test(TingchexinxiModel tingchexinxi) { - System.out.println("停车信息" + tingchexinxi.toString()); - return "showTingchexinxi"; + public ModelAndView test(TingchexinxiModel tingchexinxi){ + ModelAndView mv=new ModelAndView("showTingchexinxi"); + mv.addObject("tingchexinxiInfo", tingchexinxi); + return mv; } } diff --git a/web/WEB-INF/view/showTingchexinxi.jsp b/web/WEB-INF/view/showTingchexinxi.jsp index fd3744e..9d54950 100644 --- a/web/WEB-INF/view/showTingchexinxi.jsp +++ b/web/WEB-INF/view/showTingchexinxi.jsp @@ -14,5 +14,13 @@ success!
停车信息已在控制台输出! +
+停车ID:${tingchexinxiInfo.parkingId} +
+车牌号:${tingchexinxiInfo.licensePlate} +
+进入时间:${tingchexinxiInfo.entryTime} +
+离开时间:${tingchexinxiInfo.exitTime}