#include "ExpertManager.h" #include #include int ExpertManager::addUser(QFUser user) { if (user.userNo.isEmpty()) { return QF_CODE_EMPTY_ACCOUNT; } if (user.rawPassword().isEmpty()) { return QF_CODE_EMPTY_PASSWORD; } if (user.userName.isEmpty()) { return QF_CODE_EMPTY_USERNAME; } if (-1 == UserService().AddUserInfo(user)) { return QF_CODE_ACCOUNT_OCCUPIED; } return QF_CODE_ADD_USER_SUCCEEDED; } int ExpertManager::deleteUser(int userId) { bool ret = UserService().DeleteUserById(userId); if (!ret) { return QF_CODE_DELETE_USER_FAILED; } // UserService().DeleteUserConfigByEngineerId(userId); // return QF_CODE_DELETE_USER_SUCCEEDED; }