package com.bonus.canteen.core.auth.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bonus.canteen.core.auth.user.entity.MgrUserRole;
import com.bonus.canteen.core.auth.user.vo.MgrUserRoleInfoVO;
import com.bonus.canteen.core.auth.user.vo.MgrUserRolePageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

@Mapper
public interface MgrUserRoleMapper extends BaseMapper<MgrUserRole> {
   Set<String> listRoles(@Param("userId") Long userId);

   List<MgrUserRolePageVO> getUserRoleVOByUserIdList(@Param("userIdList") List<Long> userIdList);

   List<MgrUserRoleInfoVO> getMgrUserRoleListByUserId(@Param("userId") Long userId);

   void updateDefaultByRoleCode(@Param("roleCode") String roleCode, @Param("userId") Long userId, @Param("ifDefault") Integer ifDefault);
}
