From f5c2870a70cf201af9189b145f9050122076df74 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E6=A2=93=E7=91=9E?= <1301202194@qq.com>
Date: Mon, 7 Apr 2025 11:44:42 +0800
Subject: [PATCH] =?UTF-8?q?=E5=81=9C=E8=BD=A6=E8=BD=A6=E4=BD=8D=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF=E4=BC=98=E5=8C=96=E8=BE=93=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/com/ssm/controller/TingchexinxiController.java | 9 ++++++---
web/WEB-INF/view/showTingchexinxi.jsp | 8 ++++++++
2 files changed, 14 insertions(+), 3 deletions(-)
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}