parent
e21e921902
commit
fb92684f16
@ -0,0 +1,15 @@
|
||||
package com.ssm.controller;
|
||||
import com.ssm.entity.NewTypeModel;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("newtype")
|
||||
public class NewTypeController {
|
||||
//对象方式接收新闻类型信息
|
||||
@RequestMapping("add")
|
||||
public String test(NewTypeModel newType) {
|
||||
System.out.println("新闻类型信息" + newType.toString());
|
||||
return "showNewType";
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.ssm.controller;
|
||||
|
||||
import com.ssm.entity.NewTypeModel;
|
||||
import com.ssm.entity.TingchexinxiModel;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@Controller
|
||||
@RequestMapping("tingchexinxi")
|
||||
public class TingchexinxiController {
|
||||
@RequestMapping("addtingchexinxi")
|
||||
public String test(TingchexinxiModel tingchexinxiModel) {
|
||||
System.out.println("停车车位信息" + tingchexinxiModel.toString());
|
||||
return "showTingchexinxi";
|
||||
}
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
package com.ssm.entity;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 新闻类型
|
||||
*/
|
||||
public class NewTypeModel {
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer TYid;
|
||||
|
||||
/**
|
||||
* 父级分类
|
||||
*/
|
||||
private Integer parentTypeId;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private Boolean isEnabled;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
// 无参构造方法
|
||||
public NewTypeModel() {}
|
||||
|
||||
// getter和setter方法
|
||||
public Integer getTYid() {
|
||||
return TYid;
|
||||
}
|
||||
|
||||
public void setTYid(Integer TYid) {
|
||||
this.TYid = TYid;
|
||||
}
|
||||
|
||||
public Integer getParentTypeId() {
|
||||
return parentTypeId;
|
||||
}
|
||||
|
||||
public void setParentTypeId(Integer parentTypeId) {
|
||||
this.parentTypeId = parentTypeId;
|
||||
}
|
||||
|
||||
public String getTypeName() {
|
||||
return typeName;
|
||||
}
|
||||
|
||||
public void setTypeName(String typeName) {
|
||||
this.typeName = typeName;
|
||||
}
|
||||
|
||||
public Boolean getIsEnabled() {
|
||||
return isEnabled;
|
||||
}
|
||||
|
||||
public void setIsEnabled(Boolean isEnabled) {
|
||||
this.isEnabled = isEnabled;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "NewTypeModel{" +
|
||||
"新闻类型编号=" + TYid +
|
||||
", 父级分类ID=" + parentTypeId +
|
||||
", 类型名称='" + typeName + '\'' +
|
||||
", 是否启用=" + isEnabled +
|
||||
", 创建时间=" + createTime +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
package com.ssm.entity;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
public class TingchexinxiModel {
|
||||
// 车位编号
|
||||
private String spaceNumber;
|
||||
// 车位所在区域
|
||||
private String area;
|
||||
// 车位类型(普通车位、残疾人车位)
|
||||
private String spaceType;
|
||||
|
||||
public String getSpaceNumber() {
|
||||
return spaceNumber;
|
||||
}
|
||||
|
||||
public void setSpaceNumber(String spaceNumber) {
|
||||
this.spaceNumber = spaceNumber;
|
||||
}
|
||||
|
||||
public String getArea() {
|
||||
return area;
|
||||
}
|
||||
|
||||
public void setArea(String area) {
|
||||
this.area = area;
|
||||
}
|
||||
|
||||
public String getSpaceType() {
|
||||
return spaceType;
|
||||
}
|
||||
|
||||
public void setSpaceType(String spaceType) {
|
||||
this.spaceType = spaceType;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public double getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(double price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
// 车位状态(空闲、已占用)
|
||||
private String status;
|
||||
// 车位价格
|
||||
private double price;
|
||||
public void printInfo() {
|
||||
System.out.println("ParkingLotSpace{" +
|
||||
"车位编号=" + spaceNumber +
|
||||
", 车位所在区域='" + area + '\'' +
|
||||
", 车位类型='" + spaceType + '\'' +
|
||||
", 车位状态='" + status + '\'' +
|
||||
", 车位价格='" + price + '\'' +
|
||||
'}');
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: user
|
||||
Date: 2025/3/26
|
||||
Time: 9:42
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
Success!
|
||||
<br>
|
||||
停车车位信息已在控制台输出!
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,60 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: 吴彦祖
|
||||
Date: 2025/3/26
|
||||
Time: 16:31
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>添加新闻类型</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="newtype/add" method="post">
|
||||
<table>
|
||||
<tr>
|
||||
<td>新闻类型编号:</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="TYid" placeholder="请输入预约编号" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>类型名称:</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="typeName" placeholder="请输入新闻类型名称" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>父级分类:</td>
|
||||
<td width="20"></td>
|
||||
<td>
|
||||
<select name="parentTypeId">
|
||||
<option value="">--请选择上级分类--</option>
|
||||
<option value="1">车位改动</option>
|
||||
<option value="2">物业公告</option>
|
||||
<option value="3">社会新闻</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>是否启用:</td>
|
||||
<td width="20"></td>
|
||||
<td>
|
||||
<input type="checkbox" name="isEnabled" value="true" checked /> 启用
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>创建时间:</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="createTime" placeholder="请输入创建日期" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"><input type="reset" value="重置"></td>
|
||||
<td></td>
|
||||
<td align="center">
|
||||
<input type="submit" value="添加">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,28 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: user
|
||||
Date: 2025/3/26
|
||||
Time: 9:41
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>停车车位信息</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="tingchexinxi/addtingchexinxi" method="post">
|
||||
车位编号:<input type="text" name="spaceNumber">
|
||||
<br>
|
||||
区域名称:<input type="text" name="area">
|
||||
<br>
|
||||
车位价格:<input type="text" name="price">
|
||||
<br>
|
||||
车位状态:<input type="text" name="status">
|
||||
<br>
|
||||
车位类型:<input type="text" name="spaceType">
|
||||
<br>
|
||||
<input type="submit" value="添加">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in new issue