Map mailSizeInfo=
new HashMap();
try{
String sql =
" select count(*) as mailCount,Mail_box_coding as mailCoding from oa_mail where ISSUANCE_ID =:userId group by Mail_box_coding";
SQLQuery sqlQuery = (SQLQuery) super.getSession().createSQLQuery(sql).setString(
"userId",userId);
List<Object[]> students = sqlQuery.list();
for (Iterator<Object[]> iterator = students.iterator(); iterator.hasNext();) {
Object[] mailInfo = iterator.next();
logger.info(
"查詢出的結果mailInfo mailCount"+mailInfo[0]+
"mailCoding"+mailInfo[1]);
mailSizeInfo.put(mailInfo[1],mailInfo[0]);
}
}
catch(Exception ex){
ex.printStackTrace();
throw
new PageJumpException();
}