Pope b51c453bba 2021-3-5
添加了log4j2日志
添加了第二版接口
2021-03-05 08:44:42 +08:00

31 lines
608 B
Java

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