package cn.wise.sc.cement.business.mapper;

import cn.wise.sc.cement.business.entity.SysUser;
import cn.wise.sc.cement.business.model.vo.UserVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author ztw
 * @since 2020-08-14
 */
public interface SysUserMapper extends BaseMapper<SysUser> {

	IPage<UserVo> getPage(@Param("page") Page page, @Param("params") Map<String, Object> params);

	UserVo getById(Integer id);

//	List<Map<String,Object>> exportList(@Param("params") Map<String,Object> params);

	@Delete("delete from sys_role_user where user_id = #{userId}")
	int deleteUserRole(Integer userId);


	int saveUserRoles(@Param("userId") Integer userId, @Param("roleId") Integer roleId);







}
