Survey/src/main/java/com/example/survey/vo/CreateRoleVo.java
Pope b51c453bba 2021-3-5
添加了log4j2日志
添加了第二版接口
2021-03-05 08:44:42 +08:00

30 lines
606 B
Java

package com.example.survey.vo;
import com.example.survey.entity.Role;
import com.example.survey.enumeration.AuthEnum;
import lombok.*;
import java.util.LinkedList;
import java.util.List;
/**
* @author Pope
*/
@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class CreateRoleVo {
private String roleName;
private List<String> authList;
public CreateRoleVo(Role role) {
roleName = role.getName();
authList = new LinkedList<>();
for (AuthEnum authEnum : role.getAuthoritySet()) {
authList.add(authEnum.getName());
}
}
}