package com.uas.platform.b2b.service;

import java.util.List;

import org.springframework.data.domain.Page;

import com.uas.platform.b2b.model.Customer;
import com.uas.platform.b2b.model.User;
import com.uas.platform.core.model.PageInfo;

public interface CustomerService {
	
	/**
	 * 分页查找客户资料
	 * 
	 * @param enUU 企业uu
	 * @param pageInfo
	 * @return
	 */
	public Page<Customer> findAllByPageInfo(Long enUU, PageInfo pageInfo);
	
	/**
	 * 判断申请的客户是否存在
	 * 
	 * @param enUU
	 * @param custEnUUStr
	 * @return 存在的客户
	 */
	public List<Customer> findAllByCustUU(Long enUU, String custEnUUStr);
	
	/**
	 * 获取客户信息
	 * 
	 * @param custId
	 * @return
	 */
	public Customer findCustomer(Long custId);

	/**
	 * 保存客户信息
	 * 
	 * @param user
	 * @param customer
	 * @return
	 */
	public Customer saveCustomer(User user, Customer customer);

	/**
	 * 保存客户信息
	 * 
	 * @param user
	 * @param customers
	 * @return
	 */
	public List<Customer> saveCustomers(User user, List<Customer> customers);

	/**
	 * 审核客户信息
	 * 
	 * @param user
	 * @param customer
	 * @return
	 */
	public Customer auditCustomer(User user, Customer customer);

	/**
	 * 审核客户信息
	 * 
	 * @param user
	 * @param customers
	 * @return
	 */
	public List<Customer> auditCustomers(User user, List<Customer> customers);
	
	/**
	 * 反审核客户信息
	 * 
	 * @param user
	 * @param customer
	 * @return
	 */
	public Customer unAuditCustomer(User user, Customer customer);

	/**
	 * 反审核客户信息
	 * 
	 * @param user
	 * @param customers
	 * @return
	 */
	public List<Customer> unAuditCustomers(User user, List<Customer> customers);

	/**
	 * 删除客户信息
	 * 
	 * @param customer
	 */
	public void deleteCustomer(Customer customer);

	/**
	 * 批量删除客户信息
	 * 
	 * @param customers
	 */
	public void deleteCustomers(List<Customer> customers);
	
	/**
	 * 批量删除客户信息
	 * 
	 * @param custIds 多个id用逗号隔开
	 */
	public void deleteCustomers(String custIds);
	
}
