package com.labelsys.backend.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.labelsys.backend.entity.SysUser; import com.labelsys.backend.enums.UserPosition; import com.labelsys.backend.enums.UserRole; import com.labelsys.backend.enums.UserStatus; import java.util.List; import org.apache.ibatis.annotations.Param; public interface SysUserMapper extends BaseMapper { int insert(SysUser user); SysUser findById(@Param("id") Long id); SysUser findByIdAndCompanyId(@Param("id") Long id, @Param("companyId") Long companyId); SysUser findByCompanyIdAndPhone(@Param("companyId") Long companyId, @Param("phone") String phone); List listByCompanyId(@Param("companyId") Long companyId); List listCompanyAdmins(@Param("companyId") Long companyId); int updatePassword( @Param("id") Long id, @Param("companyId") Long companyId, @Param("passwordHash") String passwordHash, @Param("mustChangePassword") boolean mustChangePassword ); int updateAssignment( @Param("id") Long id, @Param("companyId") Long companyId, @Param("role") UserRole role, @Param("position") UserPosition position ); int updateStatus(@Param("id") Long id, @Param("companyId") Long companyId, @Param("status") UserStatus status); int bumpSessionVersion(@Param("id") Long id, @Param("companyId") Long companyId); void deleteAll(); }