53 lines
1.2 KiB
Java
53 lines
1.2 KiB
Java
package com.sky.mapper;
|
|
|
|
import com.github.pagehelper.Page;
|
|
import com.sky.annotation.AutoFill;
|
|
import com.sky.dto.EmployeePageQueryDTO;
|
|
import com.sky.entity.Employee;
|
|
import com.sky.enumeration.OperationType;
|
|
import org.apache.ibatis.annotations.Insert;
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
|
@Mapper
|
|
public interface EmployeeMapper {
|
|
|
|
/**
|
|
* 根据用户名查询员工
|
|
*
|
|
* @param username String
|
|
* @return Employee
|
|
*/
|
|
Employee getByUsername(String username);
|
|
|
|
/**
|
|
* 插入员工数据
|
|
*
|
|
* @param employee 员工
|
|
*/
|
|
@AutoFill(value = OperationType.INSERT)
|
|
void insert(Employee employee);
|
|
|
|
/**
|
|
* 员工分页查询
|
|
*
|
|
* @param employeePageQueryDTO EmployeePageQueryDTO
|
|
* @return Page<Employee>
|
|
*/
|
|
Page<Employee> pageQuery(EmployeePageQueryDTO employeePageQueryDTO);
|
|
|
|
/**
|
|
* 启用或禁用员工账号
|
|
*
|
|
* @param employee Employee
|
|
*/
|
|
@AutoFill(value = OperationType.UPDATE)
|
|
void update(Employee employee);
|
|
|
|
/**
|
|
* 根据id查询员工信息
|
|
* @param id Integer
|
|
*/
|
|
Employee getById(Integer id);
|
|
}
|