package com.YuyeTech.HeartRate.game.userinfo.service;

import com.YuyeTech.HeartRate.common.service.CommonService;
import com.YuyeTech.HeartRate.game.imageInfo.projo.Pictures;
import com.YuyeTech.HeartRate.dto.UserDTO;
import com.YuyeTech.HeartRate.game.userinfo.projo.UserInfo;
import com.YuyeTech.HeartRate.game.userinfo.vo.UserInfoVo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @author:slambb
 * @date:2019/12/5
 */
public interface UserInfoService extends CommonService<UserInfoVo, UserInfo, String> {

//    UserInfo

    UserInfo findUserInfoById(String userId,Boolean bDomain);

    UserInfo addUserInfo(UserInfo userInfo);

    String deleteUserInfoById(String userId);

    /**
     * 获取默认头像
     * @return
     */
    List<Pictures> getDefaultAvatar();


    /**
     * 获取用户列表
     * @return
     */
    List<UserDTO> findUserInfoListByIDs(List<String> userIdList);


    /**
     * 分页查询用户信息
     * @param pageable
     * @return
     */
    Page<UserDTO> findAllByPageable(Pageable pageable);

    /**
     * 分页查询用户信息
     * @param pageable
     * @return
     */
    Page<UserInfo> findAllUserInfoByPageable(Pageable pageable);

    /**
     * 根据用户名模糊查询
     * @param pageable
     * @param username
     * @return
     */
    Page<UserInfo> searchByUsername(Pageable pageable,String username);
}
