package com.gic.haoban.manage.service.service.out.impl.chat;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.haoban.manage.api.dto.chat.GroupChatDataDTO;
import com.gic.haoban.manage.api.dto.qdto.chat.ChatDataSearchQDTO;
import com.gic.haoban.manage.api.service.chat.GroupChatDataApiService;
import com.gic.haoban.manage.service.service.chat.GroupChatDataService;

@Service("groupChatDataApiService")
public class GroupChatDataApiServiceImpl implements GroupChatDataApiService {

    @Autowired
    private GroupChatDataService groupChatDataService;

    @Override
    public ServiceResponse<Void> chatDataTimer(String params) {
        this.groupChatDataService.chatDataTimer(params);
        return ServiceResponse.success();
    }

    @Override
    public ServiceResponse<GroupChatDataDTO> listTotalData(ChatDataSearchQDTO qdto) {
        GroupChatDataDTO dto = this.groupChatDataService.listTotalData(qdto);
        return ServiceResponse.success(dto);
    }

    @Override
    public ServiceResponse<List<GroupChatDataDTO>> listForChat(ChatDataSearchQDTO qdto) {
        List<GroupChatDataDTO> list = this.groupChatDataService.listForChat(qdto);
        return ServiceResponse.success(list);
    }

    @Override
    public ServiceResponse<Page<GroupChatDataDTO>> listStaffData(ChatDataSearchQDTO qdto, BasePageInfo basePageInfo) {
        Page<GroupChatDataDTO> page = this.groupChatDataService.listStaffData(qdto, basePageInfo);
        return ServiceResponse.success(page);
    }

}
