|
|
@@ -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.dal.dataobject.dept.PostDO;
|
|
|
import cn.iocoder.yudao.module.system.dal.mysql.dept.PostMapper;
|
|
|
+import jakarta.annotation.Resource;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
|
-import jakarta.annotation.Resource;
|
|
|
import java.util.Collection;
|
|
|
import java.util.Collections;
|
|
|
import java.util.List;
|
|
|
@@ -58,10 +58,16 @@ public class PostServiceImpl implements PostService {
|
|
|
public void deletePost(Long id) {
|
|
|
// 校验是否存在
|
|
|
validatePostExists(id);
|
|
|
- // 删除部门
|
|
|
+ // 删除岗位
|
|
|
postMapper.deleteById(id);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void deletePostList(List<Long> ids) {
|
|
|
+ // 删除岗位
|
|
|
+ postMapper.deleteByIds(ids);
|
|
|
+ }
|
|
|
+
|
|
|
private void validatePostForCreateOrUpdate(Long id, String name, String code) {
|
|
|
// 校验自己存在
|
|
|
validatePostExists(id);
|