| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.DeptService; |
| | |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date createTime; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | |
| | | } |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public String getDeptId$(){ |
| | | DeptService service = SpringUtils.getBean(DeptService.class); |
| | | Dept dept = service.getById(this.deptId); |
| | |
| | | return null; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public String getTenantId$(){ |
| | | TenantService service = SpringUtils.getBean(TenantService.class); |
| | | Tenant tenant = service.getById(this.tenantId); |
| | |
| | | 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); |
| | |
| | | return null; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | |
| | | 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); |
| | |
| | | return this.roleIds; |
| | | } |
| | | |
| | | @JsonIgnore |
| | | public Long[] getUserRoleIds() { |
| | | UserRoleService service = SpringUtils.getBean(UserRoleService.class); |
| | | List<UserRole> list = service.list(new LambdaQueryWrapper<UserRole>().eq(UserRole::getUserId, this.id)); |