| | |
| | | */ |
| | | private Short status; |
| | | |
| | | public Resource() {} |
| | | public Resource() { |
| | | } |
| | | |
| | | public Resource(String code,String name,Long resourceId,Short level,Integer sort,Short status) { |
| | | public Resource(String code, String name, Long resourceId, Short level, Integer sort, Short status) { |
| | | this.code = code; |
| | | this.name = name; |
| | | this.resourceId = resourceId; |
| | |
| | | return resourceId; |
| | | } |
| | | |
| | | public String getResourceName(){ |
| | | public void setResourceId(Long resourceId) { |
| | | this.resourceId = resourceId; |
| | | } |
| | | |
| | | public String getResourceName() { |
| | | ResourceService service = SpringUtils.getBean(ResourceService.class); |
| | | Resource resource = service.selectById(this.resourceId); |
| | | if (!Cools.isEmpty(resource)){ |
| | | if (!Cools.isEmpty(resource)) { |
| | | return resource.getName(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public void setResourceId(Long resourceId) { |
| | | this.resourceId = resourceId; |
| | | } |
| | | |
| | | public Short getLevel() { |
| | | return level; |
| | | } |
| | | |
| | | public String getLevel$(){ |
| | | if (null == this.level){ return null; } |
| | | switch (this.level){ |
| | | public void setLevel(Short level) { |
| | | this.level = level; |
| | | } |
| | | |
| | | public String getLevel$() { |
| | | if (null == this.level) { |
| | | return null; |
| | | } |
| | | switch (this.level) { |
| | | case 1: |
| | | return "一级菜单"; |
| | | case 2: |
| | |
| | | default: |
| | | return String.valueOf(this.level); |
| | | } |
| | | } |
| | | |
| | | public void setLevel(Short level) { |
| | | this.level = level; |
| | | } |
| | | |
| | | public Integer getSort() { |
| | |
| | | return status; |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | public void setStatus(Short status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getStatus$() { |
| | | if (null == this.status) { |
| | | return null; |
| | | } |
| | | switch (this.status) { |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public void setStatus(Short status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | |