package demo.boot.po;
public class User {
private int id;
private String uname;
private String pwd;
private String nikname;
private String phone;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUname() {
return uname;
}
public void setUname(String uname) {
this.uname = uname;
}
public String getPwd() {
return pwd;
}
public void setPwd(String pwd) {
this.pwd = pwd;
}
@Override
public String toString() {
return "User [id=" + id + ", uname=" + uname + ", pwd=" + pwd + ", nikname=" + nikname + ", phone=" + phone
+ "]";
}
public User() {
super();
}
public User(int id, String uname, String pwd, String nikname, String phone) {
super();
this.id = id;
this.uname = uname;
this.pwd = pwd;
this.nikname = nikname;
this.phone = phone;
}
public String getNikname() {
return nikname;
}
public void setNikname(String nikname) {
this.nikname = nikname;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
}
二、mapper(src/main/java文件下)
package demo.boot.mapper;
import java.util.List;
import java.util.Map;
import demo.boot.po.User;
public interface UserMapper {
public List selectAll();
public User selectByAuth(Map params); //String name, String pwd
public int insertUser(User user);
public int deleteUserById(int id);
public int updateUser(User user);
}