package com.gz.service.system;


import com.gz.core.exception.BusinessException;
import com.gz.dto.system.AdminDTO;
import com.gz.dto.system.MenuDTO;
import com.gz.rvo.system.AdminRVO;
import com.gz.rvo.system.InitialHomeRVO;
import com.gz.rvo.system.LoginRVO;
import com.gz.vo.system.LoginVO;
import com.gz.vo.system.UpdatePasswordVO;

import java.util.List;

public interface AuthService {

    /**
     * @description 登录
     * @author LiuChangLan
     * @since 2021/1/23 0:26
     */
    LoginRVO login(LoginVO param);

    /**
     * @description 根据Base64登录
     * @author LiuChangLan
     * @since 2021/4/23 9:37
     */
    LoginRVO login(String base64);
    /**
     * @description 刷新Token
     * @author LiuChangLan
     * @since 2021/1/23 1:41
     */
    LoginRVO refreshToken(String refreshToken);

    /**
     * @description 获取登录的信息
     * @author LiuChangLan
     * @since 2021/1/28 22:04
     */
    AdminDTO getLoginInfo();

    /**
     * @description 退出登录
     * @author LiuChangLan
     * @since 2021/1/30 14:27
     */
    void logout(String refreshToken);


    Integer updatePassword(UpdatePasswordVO vo) throws BusinessException;


    InitialHomeRVO getLoginMenus();

    List<MenuDTO> getLoginButtons(Integer menuId);

    String generatePictureCaptcha();

    /**
     * @description 获取当前登录的用户
     * @author LiuChangLan
     * @since 2021/2/27 14:32
     */
    AdminDTO currLoginAdmin();

    AdminRVO currLoginAdminDept();
}
