|
@ -198,11 +198,10 @@ public abstract class ProfessorDao {
|
198
|
198
|
if (1 == pageNo) {
|
199
|
199
|
_result.setPageNo(1);
|
200
|
200
|
sql = new StringBuilder();
|
201
|
|
sql.append("SELECT OFFICE,SUBJECT,INDUSTRY,ADDRESS,DEPARTMENT,ORG_ID,organization.NAME AS ONAME,TITLE,AUTHENTICATION,professor.ID,professor.NAME,professor.DESCP,professor.CREATE_TIME,professor.MODIFY_TIME FROM PROFESSOR LEFT JOIN ORGANIZATION ON professor.ORG_ID=organization.ID ORDER BY ONAME");
|
|
201
|
sql.append("SELECT OFFICE,SUBJECT,INDUSTRY,DEPARTMENT,ORG_ID,TITLE,AUTHENTICATION,ID,NAME,DESCP,CREATE_TIME,MODIFY_TIME FROM PROFESSOR");
|
202
|
202
|
if (whereSql.length() > 0) {
|
203
|
203
|
sql.append(whereSql);
|
204
|
204
|
}
|
205
|
|
sql.append(" ORDER BY ONAME");
|
206
|
205
|
sql.append(" LIMIT ").append(pageSize);
|
207
|
206
|
} else {
|
208
|
207
|
int _pageSize = totalSize / pageSize;
|
|
@ -216,11 +215,11 @@ public abstract class ProfessorDao {
|
216
|
215
|
--pageNo;
|
217
|
216
|
int _m_10 = (pageNo * pageSize);
|
218
|
217
|
sql = new StringBuilder();
|
219
|
|
sql.append("SELECT OFFICE,SUBJECT,INDUSTRY,ADDRESS,DEPARTMENT,ORG_ID,organization.NAME AS ONAME,TITLE,AUTHENTICATION,professor.ID,professor.NAME,professor.DESCP,professor.CREATE_TIME,professor.MODIFY_TIME FROM PROFESSOR LEFT JOIN ORGANIZATION ON professor.ORG_ID=organization.ID ORDER BY ONAME");
|
|
218
|
sql.append("SELECT OFFICE,SUBJECT,INDUSTRY,DEPARTMENT,ORG_ID,TITLE,AUTHENTICATION,ID,NAME,DESCP,CREATE_TIME,MODIFY_TIME FROM PROFESSOR");
|
220
|
219
|
if (whereSql.length() > 0) {
|
221
|
220
|
sql.append(whereSql);
|
222
|
221
|
}
|
223
|
|
sql.append(" ORDER BY ONAME");
|
|
222
|
sql.append(" ORDER BY ID");
|
224
|
223
|
sql.append(" LIMIT ").append(pageSize).append(" OFFSET ").append(_m_10);
|
225
|
224
|
}
|
226
|
225
|
ps = con.prepareStatement(sql.toString());
|