parent
a3ec73bbf4
commit
f77114803b
@ -0,0 +1,13 @@
|
||||
package com.ssm.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Controller
|
||||
public class FirstController {
|
||||
@RequestMapping("hello")
|
||||
public String hello() {
|
||||
System.out.println("1111");
|
||||
return "showFirst";
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.ssm.controller;
|
||||
|
||||
import com.ssm.entity.Income;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("income")
|
||||
public class IncomeController {
|
||||
|
||||
//对象方式接收收入信息
|
||||
@RequestMapping("add")
|
||||
public String test(Income income){
|
||||
System.out.println("收入信息:"+income.toString());
|
||||
return "showIncome";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.ssm.entity;
|
||||
|
||||
public class Datadic {
|
||||
private Integer id; // 编号
|
||||
private String datadicname; // 数据字典名称
|
||||
private String datadicvalue; // 数据字典值
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
public String getDatadicname() {
|
||||
return datadicname;
|
||||
}
|
||||
public void setDatadicname(String datadicname) {
|
||||
this.datadicname = datadicname;
|
||||
}
|
||||
public String getDatadicvalue() {
|
||||
return datadicvalue;
|
||||
}
|
||||
public void setDatadicvalue(String datadicvalue) {
|
||||
this.datadicvalue = datadicvalue;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.ssm.entity;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class Income {
|
||||
private Integer id; // 编号
|
||||
private User user; // 收入用户
|
||||
private Datadic incometype; // 收入类型
|
||||
private String source; // 来源
|
||||
private Integer money; // 金额
|
||||
private String content; // 备注
|
||||
@DateTimeFormat(pattern = "yyyy-mm-dd HH:mm:ss")
|
||||
private Date incometime; // 收入时间
|
||||
@DateTimeFormat(pattern = "yyyy-mm-dd HH:mm:ss")
|
||||
private Date createtime; // 创建时间
|
||||
@DateTimeFormat(pattern = "yyyy-mm-dd HH:mm:ss")
|
||||
private Date updatetime; // 更新时间
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
public Integer getMoney() {
|
||||
return money;
|
||||
}
|
||||
public void setMoney(Integer money) {
|
||||
this.money = money;
|
||||
}
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
public Date getIncometime() {
|
||||
return incometime;
|
||||
}
|
||||
public void setIncometime(Date incometime) {
|
||||
this.incometime = incometime;
|
||||
}
|
||||
public Date getCreatetime() {
|
||||
return createtime;
|
||||
}
|
||||
public void setCreatetime(Date createtime) {
|
||||
this.createtime = createtime;
|
||||
}
|
||||
public Date getUpdatetime() {
|
||||
return updatetime;
|
||||
}
|
||||
public void setUpdatetime(Date updatetime) {
|
||||
this.updatetime = updatetime;
|
||||
}
|
||||
|
||||
public User getUser() {
|
||||
return user;
|
||||
}
|
||||
|
||||
public void setUser(User user) {
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
public Datadic getIncometype() {
|
||||
return incometype;
|
||||
}
|
||||
|
||||
public void setIncometype(Datadic incometype) {
|
||||
this.incometype = incometype;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Income{" +
|
||||
"id=" + id +
|
||||
// 输出收入用户名
|
||||
", username='" + user.getUsername() + '\'' +
|
||||
// 输出收入类型
|
||||
", incometype=" + incometype.getDatadicvalue() +
|
||||
", source=" + source +
|
||||
", money='" + money + '\'' +
|
||||
", incometime='" + incometime + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,113 @@
|
||||
package com.ssm.entity;
|
||||
|
||||
/**
|
||||
* 用户实体
|
||||
*/
|
||||
public class User {
|
||||
private Integer id; // 编号
|
||||
private String username; // 用户名
|
||||
private String password; // 密码
|
||||
private String truename; // 真实姓名
|
||||
private String email; // 邮件
|
||||
private String phone; // 电话
|
||||
private String address; // 住址
|
||||
private Integer sex; // 性别
|
||||
private Integer age; // 年龄
|
||||
private String appellation; // 家庭称谓
|
||||
private Integer salary; // 薪水工资
|
||||
private String card; // 银行卡号
|
||||
private Integer isvalid; // 是否有效
|
||||
private String createtime; // 创建时间
|
||||
private String updatetime; // 修改时间
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
public String getTruename() {
|
||||
return truename;
|
||||
}
|
||||
public void setTruename(String truename) {
|
||||
this.truename = truename;
|
||||
}
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
public Integer getSex() {
|
||||
return sex;
|
||||
}
|
||||
public void setSex(Integer sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
public Integer getAge() {
|
||||
return age;
|
||||
}
|
||||
public void setAge(Integer age) {
|
||||
this.age = age;
|
||||
}
|
||||
public String getAppellation() {
|
||||
return appellation;
|
||||
}
|
||||
public void setAppellation(String appellation) {
|
||||
this.appellation = appellation;
|
||||
}
|
||||
public Integer getSalary() {
|
||||
return salary;
|
||||
}
|
||||
public void setSalary(Integer salary) {
|
||||
this.salary = salary;
|
||||
}
|
||||
public String getCard() {
|
||||
return card;
|
||||
}
|
||||
public void setCard(String card) {
|
||||
this.card = card;
|
||||
}
|
||||
public Integer getIsvalid() {
|
||||
return isvalid;
|
||||
}
|
||||
public void setIsvalid(Integer isvalid) {
|
||||
this.isvalid = isvalid;
|
||||
}
|
||||
public String getCreatetime() {
|
||||
return createtime;
|
||||
}
|
||||
public void setCreatetime(String createtime) {
|
||||
this.createtime = createtime;
|
||||
}
|
||||
public String getUpdatetime() {
|
||||
return updatetime;
|
||||
}
|
||||
public void setUpdatetime(String updatetime) {
|
||||
this.updatetime = updatetime;
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,16 @@
|
||||
<%@ 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>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>展示收入类型信息</title>
|
||||
</head>
|
||||
<body>
|
||||
Success!
|
||||
<br>
|
||||
收入类型编号:${datadicInfo.id}
|
||||
<br>
|
||||
收入类型名称:${datadicInfo.datadicvalue}
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,12 @@
|
||||
<%@ 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>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>展示入门程序信息</title>
|
||||
</head>
|
||||
<body>
|
||||
Success!
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,15 @@
|
||||
<%@ 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>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>展示Controller接收及响应数据</title>
|
||||
</head>
|
||||
<body>
|
||||
Success!
|
||||
<br>
|
||||
收入信息已在控制台输出!
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,19 @@
|
||||
<%@ 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>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>添加收入类型信息</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="datadic/add" method="post">
|
||||
收入类型编号:<input type="text" name="id">
|
||||
<br>
|
||||
收入类型名称:<input type="text" name="datadicvalue">
|
||||
<br>
|
||||
<input type="submit" value="添加">
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,57 @@
|
||||
<%@ 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>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>添加收入信息</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="income/add" method="post">
|
||||
<table>
|
||||
<tr>
|
||||
<td>收入编号:</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="id" placeholder="请输入收入编号" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>收入用户:</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="user.username" placeholder="请输入收入用户" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>收入类型:</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="incometype.datadicvalue" placeholder="请输入收入类型" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>来源:</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="source" placeholder="请输入来源" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>金额:</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="money" value="" class="bg" placeholder="金额" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>收入时间:</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="incometime" placeholder="请输入收入时间" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>备注:</td>
|
||||
<td width="20"></td>
|
||||
<td><textarea name="content" rows="5" cols="35"></textarea></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,12 @@
|
||||
<%@ 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>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>入门程序</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href="hello">hello world</a>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in new issue