7 changed files with 216 additions and 20 deletions
@ -0,0 +1,83 @@ |
|||
package org.dromara.system.domain.vo; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serial; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 部门精简视图对象(用于列表接口,减少传输数据量) |
|||
* <p> |
|||
* 相比 SysDeptVo 去掉了: creditcode, deptCategory, leader, phone, email, createTime, zzDisplayPath |
|||
* </p> |
|||
* |
|||
* @author system |
|||
*/ |
|||
@Data |
|||
public class SysDeptMinVo implements Serializable { |
|||
|
|||
@Serial |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 部门id |
|||
*/ |
|||
private String deptId; |
|||
|
|||
/** |
|||
* 父部门id |
|||
*/ |
|||
private String parentId; |
|||
|
|||
/** |
|||
* 父部门名称 |
|||
*/ |
|||
private String parentName; |
|||
|
|||
/** |
|||
* 祖级列表 |
|||
*/ |
|||
private String ancestors; |
|||
|
|||
/** |
|||
* 部门名称 |
|||
*/ |
|||
private String deptName; |
|||
|
|||
/** |
|||
* 显示顺序 |
|||
*/ |
|||
private Integer orderNum; |
|||
|
|||
/** |
|||
* 负责人 |
|||
*/ |
|||
private String leaderName; |
|||
|
|||
/** |
|||
* 部门状态(0正常 1停用) |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 区域标识 |
|||
*/ |
|||
private Integer zone; |
|||
|
|||
/** |
|||
* 从 SysDeptVo 转换 |
|||
*/ |
|||
public static SysDeptMinVo from(SysDeptVo vo) { |
|||
SysDeptMinVo min = new SysDeptMinVo(); |
|||
min.setDeptId(vo.getDeptId()); |
|||
min.setParentId(vo.getParentId()); |
|||
min.setParentName(vo.getParentName()); |
|||
min.setAncestors(vo.getAncestors()); |
|||
min.setDeptName(vo.getDeptName()); |
|||
min.setOrderNum(vo.getOrderNum()); |
|||
min.setLeaderName(vo.getLeaderName()); |
|||
min.setStatus(vo.getStatus()); |
|||
min.setZone(vo.getZone()); |
|||
return min; |
|||
} |
|||
} |
|||
Loading…
Reference in new issue