数据库更新
This commit is contained in:
@@ -37,7 +37,8 @@ public class articleDao {
|
||||
String datetime = rs.getString(4);
|
||||
int isvalid = rs.getInt(5);
|
||||
int readcount = rs.getInt(6);
|
||||
articleEntity entity = new articleEntity(articleid, userid, articlecontent, datetime, isvalid, readcount);
|
||||
String articleTitle = rs.getString(7);
|
||||
articleEntity entity = new articleEntity(articleid, userid, articlecontent, datetime, isvalid, readcount,articleTitle);
|
||||
articleEntities.add(entity);
|
||||
}
|
||||
return articleEntities;
|
||||
@@ -75,7 +76,8 @@ public class articleDao {
|
||||
String datetime = rs.getString(4);
|
||||
int isvalid = rs.getInt(5);
|
||||
int readcount = rs.getInt(6);
|
||||
articleEntity entity = new articleEntity(articleid, userid, articlecontent, datetime, isvalid, readcount);
|
||||
String articleTitle = rs.getString(7);
|
||||
articleEntity entity = new articleEntity(articleid, userid, articlecontent, datetime, isvalid, readcount,articleTitle);
|
||||
articleEntities.add(entity);
|
||||
}
|
||||
return articleEntities;
|
||||
|
@@ -2,13 +2,14 @@ package com.hellogithub.entity;
|
||||
|
||||
public class articleEntity {
|
||||
public articleEntity(){} //无参构造函数
|
||||
public articleEntity(int articleId,int userId,String articleContent,String publishTime,int isValid,int readCount){
|
||||
public articleEntity(int articleId,int userId,String articleContent,String publishTime,int isValid,int readCount,String articleTitle){
|
||||
this.articleId = articleId;
|
||||
this.userId = userId;
|
||||
this.articleContent = articleContent;
|
||||
this.publishTime = publishTime;
|
||||
this.isValid = isValid;
|
||||
this.readCount = readCount;
|
||||
this.articleTitle=articleTitle;
|
||||
}
|
||||
|
||||
int articleId;
|
||||
@@ -22,6 +23,15 @@ public class articleEntity {
|
||||
|
||||
int readCount;
|
||||
|
||||
String articleTitle;
|
||||
|
||||
public String getArticleTitle() {
|
||||
return articleTitle;
|
||||
}
|
||||
|
||||
public void setArticleTitle(String articleTitle) {
|
||||
this.articleTitle = articleTitle;
|
||||
}
|
||||
|
||||
public int getArticleId() {
|
||||
return articleId;
|
||||
|
Reference in New Issue
Block a user