mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
feat: send contact list
This commit is contained in:
@@ -425,6 +425,30 @@ void ProcessingSystem::processingClientQueryToDB(ClientHandler *client, ClientQu
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case TypeQueryToDB::TYPE_QUERY_GET_CONTACT_LIST:
|
||||
{
|
||||
QList<User> entitylist;
|
||||
QList<Instructor> listInstructor = providerDBLMS->GetListAllInstructors();
|
||||
QList<Trainee> listTrainees = providerDBLMS->GetListAllTrainees();
|
||||
|
||||
for (Instructor instructor : listInstructor)
|
||||
{
|
||||
entitylist.append(static_cast<User>(instructor));
|
||||
}
|
||||
|
||||
for (Trainee trainee : listTrainees)
|
||||
{
|
||||
entitylist.append(static_cast<User>(trainee));
|
||||
}
|
||||
|
||||
QByteArray arrayAnswer;
|
||||
|
||||
arrayAnswer = dataParser->DbAnswer()->listContacts(true, &entitylist);
|
||||
|
||||
client->sendFileBlockByteArray(arrayAnswer,PacketType::TYPE_BIGXML);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user