package com.ai.da.service;

import com.ai.da.common.response.PageBaseResponse;
import com.ai.da.mapper.primary.entity.Account;
import com.ai.da.mapper.primary.entity.Organization;
import com.ai.da.mapper.primary.entity.Questionnaire;
import com.ai.da.mapper.primary.entity.TrialOrder;
import com.ai.da.model.dto.*;
import com.ai.da.model.vo.PaymentInfoVO;
import com.ai.da.model.vo.QuestionnaireFeedbackVO;
import com.ai.da.model.vo.QuestionnaireVO;
import com.ai.da.model.vo.QueryUserConditionsVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

public interface ConvenientInquiryService extends IService<Questionnaire> {

    IPage<TrialOrder> getTrial(QueryUserConditionsVO queryUserConditionsVO);

    List<UserDesignStatisticDTO> getDesignStatistic(String startTime, String endTime, List<Long> ids,
                                                    String email, String organizationName);

    QuestionnaireFeedbackVO getQuestionnaireInfo();

    List<QuestionnaireVO> getAllQuestionnaire();

    IPage<Account> recentNewUser(QueryUserConditionsVO queryUserConditionsVO);

    Map<String, Object> recentNewUserChart(String startTime, String endTime, Integer userType);

    IPage<Account> recentActiveUser(QueryUserConditionsVO queryUserConditionsVO);


    int recentActiveUserChart(String startTime, String endTime);

    Map<String, List<Object>> getActiveUserFunc(String startTime, String endTime, List<Long> ids);

    Map<String, Object> conversionRate(String startTime, String endTime);

    Map<String, List<Object>> trialUserCountry(String startTime, String endTime);

    Boolean addUser(AccountAddDTO accountAddDTO);

    Organization checkOrganization(Integer systemUser, String organizationName);

    Boolean modifyUser(Long accountId, Long validEndTime, Integer systemUser, Long credits);

    IPage<Account> getUserInfo(QueryUserConditionsVO queryUserConditionsVO);

    List<Map<String, Object>> getAllUserIdList();

    PageBaseResponse<PaymentInfoVO> queryTransactionRecords(QueryPaymentInfoDTO queryPaymentInfoDTO);

    Map<String, List<String>> getCities();

    String exportTransactionRecords(QueryPaymentInfoDTO queryPaymentInfoDTO, HttpServletResponse response);

    PageBaseResponse<AccountCreditsUsageDTO> getGenerateFrequency(AccountCreditsUsageQueryDTO queryDTO);

    List<String> getAllGenerateFuncName();

    Organization addOrganization(String name, String type);

    IPage<Organization> queryOrganization(QueryOrganizationPageDTO queryOrganizationPageDTOe);
}
