1. 程式人生 > >關於org.mybatis.spring.MyBatisSystemException:Parameter 'userId' not found. 錯誤除錯

關於org.mybatis.spring.MyBatisSystemException:Parameter 'userId' not found. 錯誤除錯

private static final long serialVersionUID = 1826023156097338963L; private String userId; //使用者ID private String id; //帖子ID private String ggTitle; // 公告標題 private String ggBody; //公告內容 private String ggIconCls; // 公告樣式 private String createTime; //建立時間 private String corpName; //部門名稱 private String state; //狀態 private String remark; // 稽核備註 private String typeId; //型別ID private String Pthird; //擴充套件備用 public Announcement() { } public Announcement(String userId, String id, String ggTitle, String ggBody, String ggIconCls, String createTime, String corpName, String state, String remark, String typeId, String pthird) { super(); this.userId = userId; this.id = id; this.ggTitle = ggTitle; this.ggBody = ggBody; this.ggIconCls = ggIconCls; this.createTime = createTime; this.corpName = corpName; this.state = state; this.remark = remark; this.typeId = typeId; Pthird = pthird; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getGgTitle() { return ggTitle; } public void setGgTitle(String ggTitle) { this.ggTitle = ggTitle; } public String getGgBody() { return ggBody; } public void setGgBody(String ggBody) { this.ggBody = ggBody; } public String getGgIconCls() { return ggIconCls; } public void setGgIconCls(String ggIconCls) { this.ggIconCls = ggIconCls; } public String getCreateTime() { return createTime; } public void setCreateTime(String createTime) { this.createTime = createTime; } public String getCorpName() { return corpName; } public void setCorpName(String corpName) { this.corpName = corpName; } public String getState() { return state; } public void setState(String state) { this.state = state; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public String getTypeId() { return typeId; } public void setTypeId(String typeId) { this.typeId = typeId; } public String getPthird() { return Pthird; } public void setPthird(String pthird) { Pthird = pthird; } @Override public String toString() { return "Announcement [userId=" + userId + ", id=" + id + ", ggTitle=" + ggTitle + ", ggBody=" + ggBody + ", ggIconCls=" + ggIconCls + ", createTime=" + createTime + ", corpName=" + corpName + ", state=" + state + ", remark=" + remark + ", typeId=" + typeId + ", Pthird=" + Pthird + "]"; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Announcement other = (Announcement) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; return true; }