package com.inspect.system.mapper;

import com.inspect.system.base.domain.SysUser;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface SysUserMapper {
    List<SysUser> selectUserList(SysUser sysUser);

    List<SysUser> selectAllocatedList(SysUser sysUser);

    List<SysUser> selectUnallocatedList(SysUser sysUser);

    SysUser selectUserByUserName(String userName);

    SysUser selectUserById(Long id);

    int insertUser(SysUser sysUser);

    int updateUser(SysUser sysUser);

    int updateUserAvatar(@Param("userName") String userName, @Param("avatar") String avatar);

    int resetUserPwd(@Param("userName") String userName, @Param("password") String password);

    int deleteUserById(Long id);

    int deleteUserByIds(Long[] ids);

    int checkUserNameUnique(String userName);

    SysUser checkPhoneUnique(String phone);

    SysUser checkEmailUnique(String email);
}
