CRM-数据权限:完善 code review 提到的问题

This commit is contained in:
puhui999
2023-11-07 17:52:18 +08:00
parent ecf728966f
commit 668fae9398
36 changed files with 346 additions and 353 deletions

View File

@ -1,6 +1,11 @@
package cn.iocoder.yudao.module.system.api.dept;
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
import cn.iocoder.yudao.module.system.api.dept.dto.PostRespDTO;
import java.util.Collection;
import java.util.List;
import java.util.Map;
/**
* 岗位 API 接口
@ -18,4 +23,11 @@ public interface PostApi {
*/
void validPostList(Collection<Long> ids);
List<PostRespDTO> getPostList(Collection<Long> ids);
default Map<Long, PostRespDTO> getPostMap(Collection<Long> ids) {
List<PostRespDTO> list = getPostList(ids);
return CollectionUtils.convertMap(list, PostRespDTO::getId);
}
}

View File

@ -0,0 +1,37 @@
package cn.iocoder.yudao.module.system.api.dept.dto;
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
import lombok.Data;
/**
* 岗位 Response DTO
*
* @author 芋道源码
*/
@Data
public class PostRespDTO {
/**
* 岗位序号
*/
private Long id;
/**
* 岗位名称
*/
private String name;
/**
* 岗位编码
*/
private String code;
/**
* 岗位排序
*/
private Integer sort;
/**
* 状态
*
* 枚举 {@link CommonStatusEnum}
*/
private Integer status;
}