package com.tuoheng.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tuoheng.model.po.UserPo;
import com.tuoheng.model.query.UserQuery;
import com.tuoheng.model.vo.TenantVo;
import com.tuoheng.model.vo.UserVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author chenjiandong
 * @description: TODO
 * @date 2022/10/8 11:59
 */
@Mapper
public interface ClientUserMapper {

    int insertClientUser(UserPo userPo);

    int judgeCreateByUserName(String username);

    UserPo getUserByUserName(String userName);

    int updatePass(UserPo userPo);

    UserPo selectByUserId(@Param("userId") Long userId);

    List<UserPo> selectByTenantId(@Param("tenantId") Long id);

    IPage<UserVo> selectByTenantIdAndPage(UserQuery query, IPage<UserPo> page);

    Integer getUserRoleIdByUserName(String username);

    List<UserPo> getUserByRoleId(Integer id);
}
