package com.iformall.service;

import com.github.pagehelper.PageInfo;
import com.iformall.common.ResultData;
import com.iformall.domain.dto.WxCUserBasicInfoDto;
import com.iformall.domain.dto.WxCUserBasicInfoFilterDto;
import com.iformall.domain.dto.WxCUserBasicInfoFilterListDto;
import com.iformall.domain.po.*;
import com.iformall.domain.vo.CUserBaseInfoT;
import com.iformall.domain.vo.UserCountVo;
import com.iformall.domain.vo.WxTagsGroupVo;

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

public interface WxCUserBasicInfoService {
    /**
     * 根据租户ID获取会员过滤器列表
     *
     * @return
     */

    List<WxTagsGroupVo> listFilters(String tenantId);
    long countByFilter(String tenantId, List<WxCUserBasicInfoFilterDto> filterList);
    List<WxCUserBasicInfo> listByFilter(String tenantId, List<WxCUserBasicInfoFilterDto> filterList);
    List<WxCUserBasicInfo> listByFilterList(String tenantId, List<WxCUserBasicInfoFilterListDto> filterList);
    /**
     * 根据实体查询分页列表
     *
     * @param record
     * @param pageIndex
     * @param pageSize
     * @return
     */
    PageInfo<WxCUserBasicInfo> listAsPage(WxCUserBasicInfo record, Integer pageIndex, Integer pageSize);

    /**
     * 根据实体查询列表
     * @param record
     * @return
     */
    int countUser(WxCUserBasicInfo record);

    /**
     * 根据Id获得实体
     *
     * @param id
     * @return
     */
    WxCUserBasicInfo getById(Long id);

    /**
     * 保存实体
     *
     * @param record
     */
    void save(WxCUserBasicInfo record);

    /**
     * 更新实体
     *
     * @param record
     */
    void update(WxCUserBasicInfo record);

    /**
     * 保存或更新实体
     *
     * @param record
     */
    void updateObj(WxCUserBasicInfo record, WxCUser user);

    /**
     * 根据Id删除实体
     *
     * @param id
     */
    void deleteById(Long id);

    List<WxCUserBasicInfo> findByPhone(String tenantId, String phone);
    WxCUserBasicInfo findInfoByPhone(String tenantId, String phone);

    /**
     * 修改会员积分
     *
     * @param record
     */
    void updateScore(WxCUserBasicInfo record);

    /**
     * 根据性别查询数量
     *
     * @param dto
     * @return
     */
    long findCountBySex(WxCUserBasicInfoDto dto);

    /**
     * 根据年龄查询数量
     *
     * @param dto
     * @return
     */

    long findCountByAge(WxCUserBasicInfoDto dto);
    /**
     * 根据年龄积分查寻数量
     *
     * @param dto
     * @return
     */
    long findCountByScore(WxCUserBasicInfoDto dto);

    int  exportDataCount(WxCUserBasicInfo basicInfo);

    void exportData(WxCUserBasicInfo basicInfo, HttpServletRequest request, HttpServletResponse response);

    void exportTemplate(HttpServletRequest request, HttpServletResponse response, String tenantId);

    void importOneMem(String tenantId, String importKey, List<WxTags> tagList, CUserBaseInfoT uBase,MallUserInfo mallUserInfo);

    long findCount(WxCUserBasicInfoDto dto);
    List<UserCountVo> findCountHistory(WxCUserBasicInfoDto dto);
    /**
     * 停车会员记录导出
     * @param record
     * @param request
     * @param response
     */
    void exportCarPayData(WxCarPayRecord record, HttpServletRequest request, HttpServletResponse response);

    long findCountByFilter(WxCUserBasicInfoDto dto);


    /**
     * 自然增长用户
     * @param dto
     * @return
     */
    long findGrowUserCount(WxCUserBasicInfoDto dto);

    /**
     * 导入用户数
     * @param dto
     * @return
     */
    long findImportUserCount(WxCUserBasicInfoDto dto);

    ResultData updateStatus(WxCUserBasicInfo wxCUserBasicInfo);

}

