package com.yonge.cooleshow.biz.dal.service;

import java.util.List;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yonge.cooleshow.auth.api.entity.SysRole;
import com.yonge.cooleshow.auth.api.entity.SysUser;
import com.yonge.cooleshow.biz.dal.dto.EmployeeDto;
import com.yonge.cooleshow.biz.dal.dto.search.EmployeeSearch;
import com.yonge.cooleshow.biz.dal.entity.Employee;
import com.yonge.cooleshow.biz.dal.vo.EmployeeVo;
import com.yonge.cooleshow.common.entity.HttpResponseResult;
import com.yonge.toolset.mybatis.service.BaseService;

public interface EmployeeService extends BaseService<Long, Employee> {
    /***
     * 查询员工详情
     * @author liweifan
     * @param: userId
     * @updateTime 2022/3/25 11:52
     * @return: com.yonge.cooleshow.biz.dal.entity.Employee
     */
    EmployeeVo detail(Long id);
    /***
     * 分页查询
     * @author liweifan
     * @param: page
     * @param: employeeSearch
     * @updateTime 2022/4/6 13:56
     * @return: com.baomidou.mybatisplus.core.metadata.IPage<com.yonge.cooleshow.biz.dal.entity.Employee>
     */
    IPage<EmployeeVo> selectPage(IPage<EmployeeVo> page, EmployeeSearch employeeSearch);
    /**
     * 新增员工
     * @param employee
     */
    HttpResponseResult<EmployeeDto> addEmployee(EmployeeDto employee) throws Exception;

    /**
     * 修改员工信息
     * @param employee
     */
    HttpResponseResult<EmployeeDto> updateEmployee(EmployeeDto employee) throws Exception;

    /***
     * 通过手机号查询用户
     * @author liweifan
     * @param: phone
     * @updateTime 2022/3/25 14:15
     * @return: com.yonge.cooleshow.auth.api.entity.SysUser
     */
    SysUser queryUserByMobile(String phone);


    List<Long> queryUserRole(Long sysUserId);

    int batchInsertRoleMenu( Long roleId, List<Integer> menuIds);

    int insertSysRole(SysRole sysRole);

}
