12345678910111213141516171819202122232425262728293031323334353637383940 |
- package com.boman.domain.dto;
- import lombok.Data;
- import java.util.List;
- import static com.boman.common.core.utils.obj.ObjectUtils.requireNonNull;
- import static com.boman.domain.constant.FormDataConstant.COLON;
- /**
- * @author shiqian
- * @date 2021年05月06日 17:25
- **/
- @Data
- public class RoleMenuDto {
- private Long menuId;
- private List<String> head;
- public static String getBtnFromPerms(String perms) {
- // sys_user:A
- requireNonNull(perms, "权限标识为空");
- String[] split = perms.split(COLON);
- assert split.length == 2;
- // A
- return split[1];
- }
- public static String getTableNameFromPerms(String perms) {
- // sys_user:A
- requireNonNull(perms, "权限标识为空");
- String[] split = perms.split(COLON);
- assert split.length == 2;
- // sys_user
- return split[0];
- }
- }
|