mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-22 18:29:51 +08:00
代码优化
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package xyz.playedu.api.service;
|
||||
|
||||
import xyz.playedu.api.domain.UserDepartment;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author tengteng
|
||||
* @description 针对表【user_department】的数据库操作Service
|
||||
* @createDate 2023-02-23 15:08:38
|
||||
*/
|
||||
public interface UserDepartmentService extends IService<UserDepartment> {
|
||||
|
||||
void removeByUserId(Integer userId);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package xyz.playedu.api.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import xyz.playedu.api.domain.UserDepartment;
|
||||
import xyz.playedu.api.service.UserDepartmentService;
|
||||
import xyz.playedu.api.mapper.UserDepartmentMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author tengteng
|
||||
* @description 针对表【user_department】的数据库操作Service实现
|
||||
* @createDate 2023-02-23 15:08:38
|
||||
*/
|
||||
@Service
|
||||
public class UserDepartmentServiceImpl extends ServiceImpl<UserDepartmentMapper, UserDepartment>
|
||||
implements UserDepartmentService {
|
||||
@Override
|
||||
public void removeByUserId(Integer userId) {
|
||||
remove(query().getWrapper().eq("user_id", userId));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user