ソースを参照

我的工作台最新回复,按当前登录人ID查询最新回复。

zzy.zhiyuan.foxmail 8 年 前
コミット
e5f8fc27d0
共有1 個のファイルを変更した2 個の追加2 個の削除を含む
  1. 2 2
      src/main/java/com/ekexiu/portal/dao/TidingsDao.java

+ 2 - 2
src/main/java/com/ekexiu/portal/dao/TidingsDao.java

66
        		+ " LEFT JOIN PROFESSOR ON CONSULT.PROFESSOR_ID = PROFESSOR.ID "
66
        		+ " LEFT JOIN PROFESSOR ON CONSULT.PROFESSOR_ID = PROFESSOR.ID "
67
        		+ " LEFT JOIN ORGANIZATION ON PROFESSOR.ORG_ID = ORGANIZATION.ID "
67
        		+ " LEFT JOIN ORGANIZATION ON PROFESSOR.ORG_ID = ORGANIZATION.ID "
68
        		+ " WHERE TIDINGS.CREATE_TIME IN "
68
        		+ " WHERE TIDINGS.CREATE_TIME IN "
69
        		+ " (SELECT MAX(TIDINGS.CREATE_TIME) FROM TIDINGS LEFT JOIN CONSULT ON TIDINGS.CONSULT_ID = CONSULT.CONSULT_ID "
69
        		+ " (SELECT MAX(TIDINGS.CREATE_TIME) FROM TIDINGS INNER JOIN CONSULT ON TIDINGS.CONSULT_ID = CONSULT.CONSULT_ID "
70
        		+ " AND (TIDINGS.READ_STATUS = 0) AND (CONSULTANT_ID = ?) AND (SENDER_ID != ?)) ";
70
        		+ " AND (TIDINGS.READ_STATUS = 0) AND (CONSULT.CONSULTANT_ID = ?) AND (TIDINGS.SENDER_ID != ?)) ";
71
        PreparedStatement ps = con.prepareStatement(sql);
71
        PreparedStatement ps = con.prepareStatement(sql);
72
        try{
72
        try{
73
            ps.setString(_m_1++,consultantId);
73
            ps.setString(_m_1++,consultantId);