|
@RequestMapping(params = "addorUpdate")
public ModelAndView addorupdate(SignedUserInfo signedUserInfo, HttpServletRequest req) {
System.out.println(".....id......"+signedUserInfo.getId()+"......"+StringUtil.isNotEmpty(signedUserInfo.getId()));
if (StringUtil.isNotEmpty(signedUserInfo.getId())) {
signedUserInfo = systemService.getEntity(SignedUserInfo.class, signedUserInfo.getId());
System.out.println("....name....."+signedUserInfo.getName()+"...sfzh...."+signedUserInfo.getSfzh());
req.setAttribute("signedUserInfo", signedUserInfo);
}
req.setAttribute("test", "ddddddd");
return new ModelAndView("gjj/signedUserInfo");
}
在测试中发现在后台这个实体类也被取出来了,但是在前台用${signedUserInfo.name}取值不到
下面是我实体类。
@Entity
@Table(name="signeduserinfo")
public class SignedUserInfo extends IdEntity implements java.io.Serializable {
private static final long serialVersionUID = 1L;
//公积金账号
private String gjjzh;
//姓名
private String name;
//密码
private String password;
//身份证号
private String sfzh;
//地市标识
private String dsbs;
//单位名称
private String dwmc;
//单位代码 根据需求有些单位的公积金账号是由个人账号和单位账号组成
private String dwdm;
//移动号码
private String ydmobile;
//联通号码
private String ltmobile;
//电信号码
private String dxmobile;
//签约状态 yes or no
private String qyzt;
//账号状态
private String zhzt;
@Column(name ="gjjzh",nullable=false)
public String getGjjzh() {
return gjjzh;
}
public void setGjjzh(String gjjzh) {
this.gjjzh = gjjzh;
}
@Column(name ="name",nullable=false)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Column(name ="password",nullable=false)
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Column(name ="sfzh",nullable=false,length=32)
public String getSfzh() {
return sfzh;
}
public void setSfzh(String sfzh) {
this.sfzh = sfzh;
}
@Column(name ="dsbs",nullable=false)
public String getDsbs() {
return dsbs;
}
public void setDsbs(String dsbs) {
this.dsbs = dsbs;
}
@Column(name ="dwmc",nullable=true)
public String getDwmc() {
return dwmc;
}
public void setDwmc(String dwmc) {
this.dwmc = dwmc;
}
@Column(name ="dwdm",nullable=true)
public String getDwdm() {
return dwdm;
}
public void setDwdm(String dwdm) {
this.dwdm = dwdm;
}
@Column(name ="ydmobile",nullable=true)
public String getYdmobile() {
return ydmobile;
}
public void setYdmobile(String ydmobile) {
this.ydmobile = ydmobile;
}
@Column(name ="ltmobile",nullable=true)
public String getLtmobile() {
return ltmobile;
}
public void setLtmobile(String ltmobile) {
this.ltmobile = ltmobile;
}
@Column(name ="dxmobile",nullable=true)
public String getDxmobile() {
return dxmobile;
}
public void setDxmobile(String dxmobile) {
this.dxmobile = dxmobile;
}
@Column(name ="qyzt",nullable=true)
public String getQyzt() {
return qyzt;
}
public void setQyzt(String qyzt) {
this.qyzt = qyzt;
}
@Column(name ="zhzt",nullable=true)
public String getZhzt() {
return zhzt;
}
public void setZhzt(String zhzt) {
this.zhzt = zhzt;
} |
|