package com.palmnest.service.washcar.manager;

import com.palmnest.application.bean.Page;
import com.palmnest.model.washcar.Customer;
import com.palmnest.service.GenericManager;

import java.io.InputStream;
import java.util.List;
import java.util.Map;


/**
 * 用户manager类
 *
 * @author longmeizhen
 */
@SuppressWarnings("rawtypes")
public interface CustomerManager extends GenericManager<Customer, Long> {

	/**
	 * 导入用户信息
	 *
	 * @param ins
	 * @return
	 * @throws Exception
	 */
	public Map<String, Object> importUserInfo(InputStream ins, String userId) throws Exception;

	/**
	 * 保存导入的用户信息
	 *
	 * @param list
	 * @param userLi
	 * @param tb
	 * @throws Exception
	 */
	public String saveImportUser(List<Customer> list) throws Exception;

	/**
	 * 保存用户信息
	 *
	 * @param customerInputDto
	 * @return
	 * @throws Exception
	 */
	public String saveCustomer(Customer customer, String userId) throws Exception;

	/**
	 * 删除用户信息
	 *
	 * @param custId
	 * @param userId 操作用户(creator or modifier)
	 * @return
	 * @throws Exception
	 */
	public String deleteCustomer(Long custId, String userId) throws Exception;

	/**
	 * 获取用户列表
	 *
	 * @param mobile电话
	 * @param userName用户名
	 * @param carNumber车牌号
	 * @return
	 * @throws Exception
	 */
	public Page getCustList(String orgIds, String mobile, String userName, String carNumber, String searchStr, int pageNo, int pageSize) throws Exception;

	/**
	 * 根据电话号码查找用户
	 *
	 * @param mobile
	 * @return
	 * @throws Exception
	 */
	public Customer getCustByMobile(String orgId, String mobile) throws Exception;

	/**
	 * 根据openId查找用户
	 *
	 * @param mobile
	 * @return
	 * @throws Exception
	 */
	public Customer getCustByOpenId(String orgId, String openId) throws Exception;
}
