UserPrivilegeMapper.java 861 B

1234567891011121314151617181920212223242526272829303132333435
  1. package com.zy.bms.mapper;
  2. import com.zy.bms.entity.UserPrivilege;
  3. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  4. import org.apache.ibatis.annotations.Mapper;
  5. import org.apache.ibatis.annotations.Param;
  6. import org.springframework.stereotype.Repository;
  7. import java.util.List;
  8. /**
  9. * 用户查看手机设备权限表 Mapper 接口
  10. *
  11. * @author chenyi
  12. * @since 2021-07-13
  13. */
  14. @Mapper
  15. @Repository
  16. public interface UserPrivilegeMapper extends BaseMapper<UserPrivilege> {
  17. /**
  18. * 通过用户Id 查询用户拥有权限的设备组
  19. *
  20. * @param userId 用户ID
  21. */
  22. List<String> ownGroupIds(@Param("userId") Integer userId);
  23. /**
  24. * 批量保存实体类
  25. *
  26. * @param userId 用户ID
  27. * @param groups 用户组
  28. */
  29. void saveBatch(@Param("userId") Integer userId, @Param("groups") String[] groups);
  30. }