2019-11-16 09:58:40 +08:00
|
|
|
package com.rymcu.vertical.service;
|
|
|
|
|
|
|
|
import com.rymcu.vertical.core.service.Service;
|
2019-11-23 00:57:29 +08:00
|
|
|
import com.rymcu.vertical.dto.UserDTO;
|
2019-11-16 09:58:40 +08:00
|
|
|
import com.rymcu.vertical.entity.User;
|
|
|
|
import org.apache.ibatis.exceptions.TooManyResultsException;
|
|
|
|
|
2019-11-16 20:11:38 +08:00
|
|
|
import java.util.Map;
|
2019-11-16 09:58:40 +08:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2019-12-06 17:45:04 +08:00
|
|
|
*
|
|
|
|
* @author CodeGenerator
|
|
|
|
* @date 2018/05/29
|
2019-11-16 09:58:40 +08:00
|
|
|
*/
|
|
|
|
public interface UserService extends Service<User> {
|
|
|
|
|
2019-12-06 17:45:04 +08:00
|
|
|
/**
|
|
|
|
* 通过账号查询用户信息
|
|
|
|
* @param account
|
|
|
|
* @throws TooManyResultsException
|
|
|
|
* @return User
|
|
|
|
* */
|
2019-11-16 20:11:38 +08:00
|
|
|
User findByAccount(String account) throws TooManyResultsException;
|
2019-11-16 09:58:40 +08:00
|
|
|
|
2019-12-06 17:45:04 +08:00
|
|
|
/**
|
|
|
|
* 注册接口
|
|
|
|
* @param email 邮箱
|
|
|
|
* @param password 密码
|
|
|
|
* @param code 验证码
|
|
|
|
* @return Map
|
|
|
|
* */
|
2019-11-16 20:11:38 +08:00
|
|
|
Map register(String email, String password, String code);
|
2019-11-16 09:58:40 +08:00
|
|
|
|
2019-12-06 17:45:04 +08:00
|
|
|
/**
|
|
|
|
* 登录接口
|
|
|
|
* @param account 邮箱
|
|
|
|
* @param password 密码
|
|
|
|
* @return Map
|
|
|
|
* */
|
2019-11-16 20:11:38 +08:00
|
|
|
Map login(String account, String password);
|
2019-11-23 00:57:29 +08:00
|
|
|
|
2019-12-06 17:45:04 +08:00
|
|
|
/**
|
|
|
|
* 通过 nickname 获取用户信息接口
|
|
|
|
* @param nickname 昵称
|
|
|
|
* @return UserDTO
|
|
|
|
* */
|
2019-11-23 00:57:29 +08:00
|
|
|
UserDTO findUserDTOByNickname(String nickname);
|
2019-11-24 15:50:02 +08:00
|
|
|
|
2019-12-06 17:45:04 +08:00
|
|
|
/**
|
|
|
|
* 找回密码接口
|
|
|
|
* @param code 验证码
|
|
|
|
* @param password 密码
|
|
|
|
* @return Map
|
|
|
|
* */
|
2019-11-24 15:50:02 +08:00
|
|
|
Map forgetPassword(String code, String password);
|
2019-12-05 17:29:39 +08:00
|
|
|
|
2019-12-06 17:45:04 +08:00
|
|
|
/**
|
|
|
|
* 更新用户角色接口
|
|
|
|
* @param idUser 用户 id
|
|
|
|
* @param idRole 角色 id
|
|
|
|
* @return Map
|
|
|
|
* */
|
2019-12-05 17:29:39 +08:00
|
|
|
Map updateUserRole(Integer idUser, Integer idRole);
|
|
|
|
|
2019-12-06 17:45:04 +08:00
|
|
|
/**
|
|
|
|
* 更新用户状态
|
|
|
|
* @param idUser 用户 id
|
|
|
|
* @param status 状态
|
|
|
|
* @return Map
|
|
|
|
* */
|
2019-12-05 17:29:39 +08:00
|
|
|
Map updateStatus(Integer idUser, String status);
|
2019-11-16 09:58:40 +08:00
|
|
|
}
|