package cn.com.countrygarden.bi.main.service.experience;

import cn.com.countrygarden.bi.main.core.Result;
import cn.com.countrygarden.bi.main.dto.experience.WcxEmployeeManageDto;
import cn.com.countrygarden.bi.main.model.AccessToken;
import cn.com.countrygarden.bi.main.model.experience.WcxEmployeesManage;
import me.chanjar.weixin.mp.bean.result.WxMpUser;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
import java.util.Map;

public interface WcxCustomerService {

    /**
     * 查询客户用户管理列表
     * @param params
     * @return
     * @throws Exception
     */
    List<WcxEmployeesManage> queryPageList(Map<String,Object> params) throws Exception;

    int count(Map<String,Object> params) throws Exception;

    /**
     * 下载员工用户模板
     * @param request
     * @param response
     * @throws Exception
     */
    void downloadEmployeeTemplate(HttpServletRequest request, HttpServletResponse response) throws Exception;

    /**
     * 删除员工数据
     * @param id
     * @return
     * @throws Exception
     */
    int delete(Long id) throws Exception;

    /**
     * 保存/更新客户用户信息
     * @param dto
     * @return
     * @throws Exception
     */
    WcxEmployeesManage createOrUpdate(WcxEmployeeManageDto dto, AccessToken accessToken) throws Exception;

    /**
     * 导入客户用户数据
     * @param inputStream
     * @param originalFilename
     * @param fileType
     * @param accessToken
     * @return
     * @throws Exception
     */
    Result importCustomers(InputStream inputStream, String originalFilename, String fileType, AccessToken accessToken) throws Exception;


    WcxEmployeesManage selectByByOpenId(String openId, WxMpUser wxMpUser);

}
