|
|
@@ -1355,29 +1355,29 @@ class ChatService implements ChatServiceInterface
|
|
|
*/
|
|
|
public function getBusinessDistrictList(array $data): array
|
|
|
{
|
|
|
- $query = GroupMemberImp::Join('chat_topics', 'chat_topics.group_id', '=', 'chat_groups_members.group_id')
|
|
|
- ->leftJoin('chat_topic_class', 'chat_topic_class.id', '=', 'chat_topics.type')
|
|
|
- ->where(['group_member.user_id' => $data['user_id']])
|
|
|
+ $query = GroupMemberImp::Join('hperf.chat_topics', 'hperf.chat_topics.group_id', '=', 'chat_groups_members.group_id')
|
|
|
+ ->leftJoin('hperf.chat_topic_class', 'hperf.chat_topic_class.id', '=', 'hperf.chat_topics.type')
|
|
|
+ ->where(['hperf.group_member.user_id' => $data['user_id']])
|
|
|
->when($data, function ($query) use ($data) {
|
|
|
if (!empty($data['type'])) {
|
|
|
- $query->where(['chat_topics.type' => $data['type']]);
|
|
|
+ $query->where(['hperf.chat_topics.type' => $data['type']]);
|
|
|
}
|
|
|
if (!empty($data['title'])) {
|
|
|
- $query->where('chat_topics.title', 'like', '%' . $data['title'] . '%');
|
|
|
+ $query->where('hperf.chat_topics.title', 'like', '%' . $data['title'] . '%');
|
|
|
}
|
|
|
if (!empty($data['created_at'])) {
|
|
|
- $query->whereDate('chat_topics.created_at', $data['created_at']);
|
|
|
+ $query->whereDate('hperf.chat_topics.created_at', $data['created_at']);
|
|
|
}
|
|
|
})
|
|
|
->select(
|
|
|
- 'chat_topics.id',
|
|
|
- 'chat_topics.title',
|
|
|
- 'chat_topics.author',
|
|
|
- 'chat_topics.created_at',
|
|
|
- 'chat_topics.updated_at',
|
|
|
- 'chat_topic_class.topicname',
|
|
|
+ 'hperf.chat_topics.id',
|
|
|
+ 'hperf.chat_topics.title',
|
|
|
+ 'hperf.chat_topics.author',
|
|
|
+ 'hperf.chat_topics.created_at',
|
|
|
+ 'hperf.chat_topics.updated_at',
|
|
|
+ 'hperf.chat_topic_class.topicname',
|
|
|
)
|
|
|
- ->orderBy('chat_topics.created_at', 'desc');
|
|
|
+ ->orderBy('hperf.chat_topics.created_at', 'desc');
|
|
|
$total = $query->count();
|
|
|
$list = $query->forPage($data['page'], $data['page_size'])->get();
|
|
|
$result = [
|