()
| 133 | |
| 134 | //头像路径动态生成 |
| 135 | public String getAvatarPath() { |
| 136 | if(this.avatarPath == null || this.avatarPath.trim().isEmpty()){ |
| 137 | if(this.getRegistrationDate() != null){ |
| 138 | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| 139 | |
| 140 | String date = this.getRegistrationDate().format(formatter); |
| 141 | |
| 142 | //头像路径 |
| 143 | this.avatarPath = "file/avatar/" + date +"/"; |
| 144 | } |
| 145 | } |
| 146 | return avatarPath; |
| 147 | } |
| 148 | } |
no test coverage detected