|
|
@ -14,7 +14,7 @@ import java.sql.Connection;
|
|
|
|
|
|
|
|
|
|
|
|
public class userManager {
|
|
|
|
public class userManager {
|
|
|
|
|
|
|
|
|
|
|
|
private static final String TAG = "userDao";
|
|
|
|
private static final String TAG = "userManager";
|
|
|
|
|
|
|
|
|
|
|
|
public int login(String username, String password){
|
|
|
|
public int login(String username, String password){
|
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
|
@ -71,6 +71,8 @@ public class userManager {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
Log.d(TAG, "login bug: " + e.getMessage());
|
|
|
|
Log.d(TAG, "login bug: " + e.getMessage());
|
|
|
|
msg = 0;
|
|
|
|
msg = 0;
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return msg;
|
|
|
|
return msg;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -130,6 +132,8 @@ public class userManager {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
Log.d(TAG, "login bug: " + e.getMessage());
|
|
|
|
Log.d(TAG, "login bug: " + e.getMessage());
|
|
|
|
msg = 0;
|
|
|
|
msg = 0;
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return msg;
|
|
|
|
return msg;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -158,6 +162,8 @@ public class userManager {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (SQLException throwables) {
|
|
|
|
} catch (SQLException throwables) {
|
|
|
|
throwables.printStackTrace();
|
|
|
|
throwables.printStackTrace();
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return user;
|
|
|
|
return user;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -193,6 +199,8 @@ public class userManager {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
Log.e(TAG, "异常 register");
|
|
|
|
Log.e(TAG, "异常 register");
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -230,6 +238,8 @@ public class userManager {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
Log.d(TAG, "login bug: " + e.getMessage());
|
|
|
|
Log.d(TAG, "login bug: " + e.getMessage());
|
|
|
|
msg = 0;
|
|
|
|
msg = 0;
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return msg;
|
|
|
|
return msg;
|
|
|
|
}
|
|
|
|
}
|
|
|
|