資源簡介
某論壇要開發短消息系統 ,實現如下功能:
用戶登錄、登出
查看個人的短消息
發送短消息
回復短消息
刪除短消息
該系統要滿足如下要求:
已讀和未讀的短消息應采用不同的標記
回復時自動添寫用戶名
未登錄不能看短消息,自動跳轉到登錄頁面
登錄后自動跳轉到查看短消息列表的頁面

代碼片段和文件信息
/*
?*s2jsp.xmal.biz.MessageBiz.java
?*?2007-08-10
?*?短消息業務類
?*/
package?s2jsp.xmal.biz;
import?java.text.SimpleDateFormat;
import?java.util.Date;
import?java.util.List;
import?s2jsp.xmal.dao.MessageDao;
import?s2jsp.xmal.entity.Message;
public?class?MessageBiz?{
????private?MessageDao?messageDao?=?new?MessageDao();?//?獲得短消息的數據訪問對象
????
????/**
?????*?保存留言
?????*?@param?message
?????*?@return
?????*/
????public?int?save(Message?message){
????????String???time?=?new?SimpleDateFormat(“yyyy-MM-dd?HH:mm:ss“).format(new?Date());??//?取得日期時間
????????message.setPostTime(time);
????????return?messageDao.save(message);
????}
????
????/**
?????*?刪除留言
?????*?@param?id
?????*?@return
?????*/
????public?int?delete(int?id){
????????return?messageDao.delete(id);
????}
????
????/**
?????*?查詢留言
?????*?@param?page
?????*?@return
?????*/
????public?List?listByReceiveUname(String?uname){
????????return?messageDao.listByReceiveUname(uname);
????}
????
????/**
?????*?根據短信息id查一條短信息
?????*?@param?id
?????*?@return
?????*/
????public?Message?findMessage(int?id){
????????Message?message?=?messageDao.findMessage(id);
????????int?sign?=?message.getReadSign();
????????message.setReadSign(sign);
????????if(sign==0){
????????????messageDao.update(message);
????????}
????????return?message;
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????4404736??2008-01-02?17:40??論壇短消息\教學幻燈片\論壇短消息V1.0.ppt
?????文件???????1591??2007-09-19?09:51??論壇短消息\提供給學員的素材\st
?????文件???????8954??2007-08-17?15:55??論壇短消息\提供給學員的素材\image\new.jpg
?????文件???????9043??2007-08-17?16:03??論壇短消息\提供給學員的素材\image\old.jpg
?????文件???????1742??2007-09-26?11:24??論壇短消息\Source\message.sql
?????文件????1048576??2007-09-26?11:24??論壇短消息\Source\message_Data.MDF
?????文件????1048576??2007-09-26?11:24??論壇短消息\Source\message_Log.LDF
?????文件?????891302??2008-01-08?09:09??論壇短消息\Source\論壇短消息.rar
?????文件????????646??2007-10-26?14:48??論壇短消息\Source\s2jsp_XMAL\.classpath
?????文件????????303??2007-10-26?14:48??論壇短消息\Source\s2jsp_XMAL\.myme
?????文件???????1228??2007-08-13?13:27??論壇短消息\Source\s2jsp_XMAL\.project
?????文件????????675??2007-08-18?16:11??論壇短消息\Source\s2jsp_XMAL\WebRoot\doDelete.jsp
?????文件????????448??2007-08-17?14:48??論壇短消息\Source\s2jsp_XMAL\WebRoot\doLogin.jsp
?????文件????????154??2007-08-13?15:23??論壇短消息\Source\s2jsp_XMAL\WebRoot\doLogout.jsp
?????文件????????674??2007-08-14?10:49??論壇短消息\Source\s2jsp_XMAL\WebRoot\doPost.jsp
?????文件???????1003??2007-08-18?16:18??論壇短消息\Source\s2jsp_XMAL\WebRoot\index.jsp
?????文件???????1777??2007-08-17?16:36??論壇短消息\Source\s2jsp_XMAL\WebRoot\listMsg.jsp
?????文件???????2159??2007-08-18?14:58??論壇短消息\Source\s2jsp_XMAL\WebRoot\post.jsp
?????文件???????1973??2007-09-19?09:15??論壇短消息\Source\s2jsp_XMAL\WebRoot\showMsg.jsp
?????文件????????286??2007-08-13?09:55??論壇短消息\Source\s2jsp_XMAL\WebRoot\WEB-INF\web.xm
?????文件?????287022??2004-10-19?14:15??論壇短消息\Source\s2jsp_XMAL\WebRoot\WEB-INF\lib\msba
?????文件??????67115??2004-10-19?14:15??論壇短消息\Source\s2jsp_XMAL\WebRoot\WEB-INF\lib\mssqlserver.jar
?????文件??????59074??2004-10-19?14:15??論壇短消息\Source\s2jsp_XMAL\WebRoot\WEB-INF\lib\msutil.jar
?????文件???????1591??2007-09-19?09:51??論壇短消息\Source\s2jsp_XMAL\WebRoot\st
?????文件?????????39??2007-08-13?09:55??論壇短消息\Source\s2jsp_XMAL\WebRoot\me
?????文件???????8954??2007-08-17?15:55??論壇短消息\Source\s2jsp_XMAL\WebRoot\image\new.jpg
?????文件???????9043??2007-08-17?16:03??論壇短消息\Source\s2jsp_XMAL\WebRoot\image\old.jpg
?????文件???????2011??2007-09-13?09:55??論壇短消息\Source\s2jsp_XMAL\src\s2jsp\xmal\entity\Message.java
?????文件????????656??2007-09-13?09:55??論壇短消息\Source\s2jsp_XMAL\src\s2jsp\xmal\entity\User.java
?????文件???????3082??2007-09-26?11:23??論壇短消息\Source\s2jsp_XMAL\src\s2jsp\xmal\dao\ba
............此處省略28個文件信息
- 上一篇:《復雜配電網簡化分析與優化》劉健等
- 下一篇:AnyDesk_xp85
評論
共有 條評論