package com.ho.user.mapper;

import com.ho.user.api.entity.SysUser;
import com.ho.user.api.vo.req.OrderUserSelectReqVo;
import com.ho.user.entity.SysTheme;
import com.ho.user.vo.req.SysUserThemeReqVo;
import com.ho.user.vo.req.UserPageReqVO;
import com.ho.user.vo.req.UserPageUserByDeptReqVO;
import com.ho.user.vo.resp.SysUserThemeRespVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysUserMapper {

    SysUser getUserInfoByName(String username);

    //按人员名称模糊查询列表,用于工单
    List<SysUser> getUserInfoListByName(String username, Integer groupId);

    //根据手机号查询
    SysUser getUserInfoByPhone(String phone);

    int deleteByPrimaryKey(String id);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    SysUser selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);

    List<SysUser> selectAll(UserPageReqVO vo);

    List<SysUser> selectUserInfoByDeptIds(@Param("list") List<Integer> deptIds, @Param("vo") UserPageUserByDeptReqVO vo,@Param("groupId") Integer groupId);

    List<SysUser> getUserListByDeptId(Integer deptId);

    int deletedUsers(@Param("sysUser") SysUser sysUser, @Param("list") List<String> list);

    List<SysUser> selectByIds(@Param("list") List<String> userIds, @Param("vo") OrderUserSelectReqVo vo);


    List<SysUser> selectPostUserIds(@Param("userIds")List<String> userIds,@Param("postIds")List<Integer> postIds);

    SysUserThemeRespVo getUserTheme(String userId);

    List<SysTheme> getSysTheme();

    void deletedUserTheme(String userId);

    void addUserTheme(SysUserThemeReqVo vo);


}
