class SPubinfo implements RowMapper<AppNews> {
AppNews p = null;
@Override
public AppNews mapRow(ResultSet re, int arg1) throws SQLException {
p = new AppNews();
p.setNewsId(re.getInt("newsid"));
p.setReferCreateTime(new Date(re.getTimestamp("newsCreateTime").getTime()));
return p;
}
}
getDate() 是精确到天的
AppNews p = null;
@Override
public AppNews mapRow(ResultSet re, int arg1) throws SQLException {
p = new AppNews();
p.setNewsId(re.getInt("newsid"));
p.setReferCreateTime(new Date(re.getTimestamp("newsCreateTime").getTime()));
return p;
}
}
getDate() 是精确到天的