package com.crm.manager.service;

import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.exception.ServiceException;
import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
import com.crm.rely.backend.core.dto.user.department.UserDepartmentSearchDto;
import com.crm.rely.backend.core.entity.user.department.UserDepartmentAddEntity;
import com.crm.rely.backend.core.entity.user.department.UserDepartmentDeleteEntity;
import com.crm.rely.backend.core.entity.user.department.UserDepartmentSearchEntity;
import com.crm.rely.backend.core.entity.user.department.UserDepartmentUpdateEntity;

/**
 * @program: crm-backend
 * @description:
 * @author: houn
 * @create: 2019-07-25 13:56
 */
public interface UserDepartmentService {

    /**
     * 添加部门
     *
     * @param entity
     * @throws ServiceException
     */
    void add(UserDepartmentAddEntity entity) throws ServiceException;

    /**
     * 更新部门信息
     *
     * @param entity
     * @throws ServiceException
     */
    void update(UserDepartmentUpdateEntity entity) throws ServiceException;

    /**
     * 删除部门(批量)
     *
     * @param entity
     * @throws ServiceException
     */
    void delete(UserDepartmentDeleteEntity entity) throws ServiceException;

    /**
     * 根据条件搜索列表
     *
     * @param entity
     * @return
     * @throws ServiceException
     */
    BaseResultWithPagerDto searchPage(UserDepartmentSearchEntity entity) throws ServiceException;

    BaseResultDto searchList() throws ServiceException;

    /**
     * 根据id查询
     *
     * @param id
     * @return
     * @throws ServiceException
     */
    UserDepartmentSearchDto searchSingle(Long id) throws ServiceException;

}
