|
@ -93,6 +93,50 @@ public abstract class ProfessorDao {
|
93
|
93
|
@From(Professor.class)
|
94
|
94
|
public abstract int updateStarAvg(Connection con, String id, @Set BigDecimal starAvg) throws SQLException;
|
95
|
95
|
|
|
96
|
public List<EditProfessor> queryInvite(Connection con, String id) throws SQLException{
|
|
97
|
int index = 1;
|
|
98
|
String sql = "SELECT OFFICE,ADDRESS,ORG_ID,O.NAME,TITLE,AUTHENTICATION,AUTH_TYPE,AUTH_STATUS,P.ID,P.NAME "
|
|
99
|
+ " FROM PROFESSOR P INNER JOIN ORGANIZATION O ON P.ORG_ID=O.ID "
|
|
100
|
+ " INNER JOIN LUSER L ON P.ID=L.ID WHERE L.INVITER_ID = ? ORDER BY P.CREATE_TIME DESC,P.ID";
|
|
101
|
PreparedStatement ps = con.prepareStatement(sql);
|
|
102
|
try{
|
|
103
|
ps.setString(index++,id);
|
|
104
|
ResultSet rs = ps.executeQuery();
|
|
105
|
try{
|
|
106
|
List<EditProfessor> _result = new ArrayList<EditProfessor>();
|
|
107
|
while(rs.next()){
|
|
108
|
EditProfessor professor = new EditProfessor();
|
|
109
|
String _m_1 = rs.getString(1);
|
|
110
|
if(rs.wasNull()){
|
|
111
|
_m_1 = null;
|
|
112
|
}
|
|
113
|
professor.setOffice(_m_1);
|
|
114
|
String _m_2 = rs.getString(2);
|
|
115
|
if(rs.wasNull()){
|
|
116
|
_m_2 = null;
|
|
117
|
}
|
|
118
|
professor.setAddress(_m_2);
|
|
119
|
Organization organization = new Organization();
|
|
120
|
organization.setId(rs.getString(3));
|
|
121
|
organization.setName(rs.getString(4));
|
|
122
|
professor.setOrganization(organization);
|
|
123
|
professor.setTitle(rs.getString(5));
|
|
124
|
professor.setAuthentication(rs.getInt(6));
|
|
125
|
professor.setAuthType(rs.getInt(7));
|
|
126
|
professor.setAuthStatus(rs.getInt(8));
|
|
127
|
professor.setId(rs.getString(9));
|
|
128
|
professor.setName(rs.getString(10));
|
|
129
|
_result.add(professor);
|
|
130
|
}
|
|
131
|
return _result;
|
|
132
|
}finally{
|
|
133
|
try{rs.close();}catch(Exception e1){}
|
|
134
|
}
|
|
135
|
}finally{
|
|
136
|
try{ps.close();}catch(Exception e2){}
|
|
137
|
}
|
|
138
|
}
|
|
139
|
|
96
|
140
|
/**
|
97
|
141
|
* 查询用户的认证状态。
|
98
|
142
|
* @param con
|