package com.ruoyi.xq.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.xq.domain.User;
import com.ruoyi.xq.dto.admin.user.FullUserVo;
import com.ruoyi.xq.dto.admin.user.UserAdminVo;
import com.ruoyi.xq.dto.admin.user.req.AddUserReq;
import com.ruoyi.xq.dto.admin.user.req.UpdateMobileAdminReq;
import com.ruoyi.xq.dto.admin.user.req.UpdateUserReq;
import com.ruoyi.xq.dto.app.user.HomePageReq;
import com.ruoyi.xq.dto.app.user.vo.HomeUserListVo;
import com.ruoyi.xq.dto.app.user.vo.HomeUserVo;
import com.ruoyi.xq.dto.common.user.MinUser;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 用户管理Service接口
 *
 * @author 77
 * @date 2024-03-04
 */
public interface UserService extends IService<User> {

    MinUser getMinUserById(Long userId);

    User getByUsername(String username);

    void resetPassword(Long userId, String password);

    User getByUsercode(String usercode);

    HomeUserVo homeUser(Long userId);

    boolean updateMobileUser(UpdateMobileAdminReq bo);

    void resetAvatar(Long userId);

    void resetNickname(Long userId);

    Page<UserAdminVo> pageAdmin(PageQuery pageQuery, UserAdminVo bo);

    Page<HomeUserListVo> homePage(HomePageReq params);

    List<HomeUserListVo> vipHomePage();

    boolean lock(Long id);

    boolean unlock(Long id);

    FullUserVo fullUserAdmin(Long userId);

    User getByMobile(String mobile);

    void saveUser(AddUserReq bo);

    void updateBaseUser(UpdateUserReq updateUserReq);

    void checkFinishStatus(Long userId);
}
