| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.SpringUtils; |
| | | import com.vincent.rsf.server.system.service.TenantService; |
| | |
| | | |
| | | @TableField(exist = false) |
| | | private List<Menu> children; |
| | | @TableField(exist = false) |
| | | private String tenantId$; |
| | | |
| | | @TableField(exist = false) |
| | | private String createBy$; |
| | | |
| | | @TableField(exist = false) |
| | | private String updateBy$; |
| | | |
| | | |
| | | |
| | | public Menu() {} |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public String getTenantId$(){ |
| | | TenantService service = SpringUtils.getBean(TenantService.class); |
| | | Tenant tenant = service.getById(this.tenantId); |
| | | if (!Cools.isEmpty(tenant)){ |
| | | return String.valueOf(tenant.getName()); |
| | | } |
| | | return null; |
| | | return this.tenantId$; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | return this.createBy$; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.getById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | return this.updateBy$; |
| | | } |
| | | |
| | | public Boolean getStatusBool(){ |