com.github.javaclub.base.mapper.UserRoleMapper Maven / Gradle / Ivy
/* Automatic generated by CrudCodeGenerator wirtten by Gerald Chen
*
* @(#)UserRoleMapper.java 2023-09-06
*
* Copyright (c) 2023 - 2099. All Rights Reserved.
*
*/
package com.github.javaclub.base.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.javaclub.base.domain.UserRole;
/**
* UserRoleMapper 数据库持久层
*
* @version $Id: UserRoleMapper.java 2023-09-06 19:11:12 Exp $
*/
public interface UserRoleMapper extends BaseMapper {
/**
* 根据角色ID数组,批量删除
* @param roleIds
* @return
*/
int deleteBatch(@Param("roleIds") Long[] roleIds);
/**
* 根据用户id删除用户与角色关系
* @param userId
*/
void deleteByUserId(Long userId);
/**
* 根据用户id 批量添加用户角色关系
* @param userId
* @param roleIdList
*/
void insertUserAndUserRole(@Param("userId") Long userId, @Param("creatorId") Long creatorId, @Param("roleIdList") List roleIdList);
}