|
@ -70,6 +70,10 @@ public abstract class ProfessorDao {
|
70
|
70
|
@From(Professor.class)
|
71
|
71
|
public abstract int updateAuthStatus(Connection con, String id, @Set Integer authStatus) throws SQLException;
|
72
|
72
|
|
|
73
|
@UpdateWith
|
|
74
|
@From(Professor.class)
|
|
75
|
public abstract int updateAuthStatusExpert(Connection con,String id,@Set Integer authStatusExpert)throws SQLException;
|
|
76
|
|
73
|
77
|
@UpdateWith
|
74
|
78
|
@From(Professor.class)
|
75
|
79
|
public abstract int updateStarLevel(Connection con, String id, @Set BigDecimal starLevel) throws SQLException;
|
|
@ -158,12 +162,12 @@ public abstract class ProfessorDao {
|
158
|
162
|
* 查询用户的认证状态。
|
159
|
163
|
* @param con
|
160
|
164
|
* @param id
|
161
|
|
* @return 返回认证类型 用户类型和认证状态
|
|
165
|
* @return 返回认证类型 用户类型 实名认证状态和专家认证状态
|
162
|
166
|
* @throws SQLException
|
163
|
167
|
*/
|
164
|
168
|
public Professor queryAuth(Connection con, String id) throws SQLException{
|
165
|
169
|
int index = 1;
|
166
|
|
String sql = " SELECT AUTHENTICATION,AUTH_TYPE,AUTH_STATUS FROM PROFESSOR WHERE ID = ? ";
|
|
170
|
String sql = " SELECT AUTHENTICATION,AUTH_TYPE,AUTH_STATUS,AUTH_STATUS_EXPERT FROM PROFESSOR WHERE ID = ? ";
|
167
|
171
|
PreparedStatement ps = con.prepareStatement(sql);
|
168
|
172
|
try{
|
169
|
173
|
ps.setString(index++,id);
|
|
@ -174,6 +178,7 @@ public abstract class ProfessorDao {
|
174
|
178
|
professor.setAuthentication(rs.getInt(1));
|
175
|
179
|
professor.setAuthType(rs.getInt(2));
|
176
|
180
|
professor.setAuthStatus(rs.getInt(3));
|
|
181
|
professor.setAuthStatusExpert(rs.getInt(4));
|
177
|
182
|
return professor;
|
178
|
183
|
}else{
|
179
|
184
|
return null;
|