日期:2014-05-20 浏览次数:20731 次
<div class="topBarCtrl"> <a href="user/toAdvice.shtml?pageNum=1">建议</a>| <a href="user/toNotice.shtml?pageNum=1" class="newNotice">消息</a>| <s:if test="#request.newsNum != null"> <a href="user/toNotice.shtml?pageNum=1"> <span class="newNum" title="新信息">您有${newsNum}条新消息!</span> </a> </s:if> <a href="user/toSetPassword.shtml">帐号</a>| <a href="user/logOut.shtml">退出</a> </div>
String hql ="from TbUser u ,TbLetter l where u.userId = l.tbUserByFkFromId.userId and l.toIsDelete=1 and l.tbUserByFkToId.userId="+tbUser.userId+" order by l.letterIsRead desc , l.letterTime desc"; //查询 List result = userDao.query(pageNo, pageSize, hql.toString()); //执行更新操作:把所有未读的letter更新为已经读 if(null != result && 0 != result.size()) { hql =new StringBuffer(" update tb_letter set letter_is_read= 1 where letter_is_read=0 and fk_to_id =") ; hql.append(tbUser.getUserId()); userDao.excuteSql(hql.toString()); } return result ;