mirror of
https://gitee.com/myxzgzs/boyue-vue-pro.git
synced 2025-08-08 16:32:46 +08:00
feat: system 模块新增批量删除接口
This commit is contained in:
parent
777d64f065
commit
ce69fd8ab2
@ -8,10 +8,10 @@ import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostPageReqV
|
|||||||
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostSaveReqVO;
|
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.post.PostSaveReqVO;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.dept.PostDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.dept.PostDO;
|
||||||
import cn.iocoder.yudao.module.system.dal.mysql.dept.PostMapper;
|
import cn.iocoder.yudao.module.system.dal.mysql.dept.PostMapper;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -58,10 +58,16 @@ public class PostServiceImpl implements PostService {
|
|||||||
public void deletePost(Long id) {
|
public void deletePost(Long id) {
|
||||||
// 校验是否存在
|
// 校验是否存在
|
||||||
validatePostExists(id);
|
validatePostExists(id);
|
||||||
// 删除部门
|
// 删除岗位
|
||||||
postMapper.deleteById(id);
|
postMapper.deleteById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deletePostList(List<Long> ids) {
|
||||||
|
// 删除岗位
|
||||||
|
postMapper.deleteByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
private void validatePostForCreateOrUpdate(Long id, String name, String code) {
|
private void validatePostForCreateOrUpdate(Long id, String name, String code) {
|
||||||
// 校验自己存在
|
// 校验自己存在
|
||||||
validatePostExists(id);
|
validatePostExists(id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user