mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-22 18:29:51 +08:00
管理员与角色绑定
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package xyz.playedu.api.service;
|
||||
|
||||
import xyz.playedu.api.domain.AdminUserRole;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author tengteng
|
||||
* @description 针对表【admin_user_role】的数据库操作Service
|
||||
* @createDate 2023-02-21 16:25:43
|
||||
*/
|
||||
public interface AdminUserRoleService extends IService<AdminUserRole> {
|
||||
|
||||
void removeUserRolesByUserId(Integer userId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package xyz.playedu.api.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import xyz.playedu.api.domain.AdminUserRole;
|
||||
import xyz.playedu.api.service.AdminUserRoleService;
|
||||
import xyz.playedu.api.mapper.AdminUserRoleMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author tengteng
|
||||
* @description 针对表【admin_user_role】的数据库操作Service实现
|
||||
* @createDate 2023-02-21 16:25:43
|
||||
*/
|
||||
@Service
|
||||
public class AdminUserRoleServiceImpl extends ServiceImpl<AdminUserRoleMapper, AdminUserRole>
|
||||
implements AdminUserRoleService {
|
||||
|
||||
@Override
|
||||
public void removeUserRolesByUserId(Integer userId) {
|
||||
remove(query().getWrapper().eq("admin_id", userId));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user