mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-22 18:29:51 +08:00
user代码优化
This commit is contained in:
@@ -2,9 +2,13 @@ package xyz.playedu.api.service;
|
||||
|
||||
import xyz.playedu.api.domain.AdminUser;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import xyz.playedu.api.exception.NotFoundException;
|
||||
import xyz.playedu.api.exception.ServiceException;
|
||||
import xyz.playedu.api.types.paginate.AdminUserPaginateFilter;
|
||||
import xyz.playedu.api.types.paginate.PaginationResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author tengteng
|
||||
* @description 针对表【admin_users】的数据库操作Service
|
||||
@@ -15,5 +19,21 @@ public interface AdminUserService extends IService<AdminUser> {
|
||||
|
||||
AdminUser findByEmail(String email);
|
||||
|
||||
Boolean emailExists(String email);
|
||||
|
||||
AdminUser findById(Integer id);
|
||||
|
||||
AdminUser findOrFail(Integer id) throws NotFoundException;
|
||||
|
||||
void createWithRoleIds(String name, String email, String password, Integer isBanLogin, Integer[] roleIds) throws ServiceException;
|
||||
|
||||
void relateRoles(AdminUser user, Integer[] roleIds);
|
||||
|
||||
void resetRelateRoles(AdminUser user, Integer[] roleIds);
|
||||
|
||||
List<Integer> getRoleIdsByUserId(Integer userId);
|
||||
|
||||
void updateWithRoleIds(AdminUser user, String name, String email, String password, Integer isBanLogin, Integer[] roleIds) throws ServiceException;
|
||||
|
||||
void removeWithRoleIds(Integer userId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user