头像加上时间戳
This commit is contained in:
parent
819c09d5f0
commit
babd3f858a
@ -94,9 +94,9 @@ public class UserProfileController {
|
|||||||
if (file.isEmpty()) {
|
if (file.isEmpty()) {
|
||||||
throw exception(FILE_IS_EMPTY);
|
throw exception(FILE_IS_EMPTY);
|
||||||
}
|
}
|
||||||
String name = getLoginUserId()+"_avatar.jpg";
|
String name = getLoginUserId() + "_avatar.jpg";
|
||||||
String avatar = userService.updateUserAvatar(getLoginUserId(), name, file.getInputStream());
|
String avatar = userService.updateUserAvatar(getLoginUserId(), name, file.getInputStream());
|
||||||
return success(avatar);
|
return success(avatar + "?timestamp=" + System.currentTimeMillis());
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/getSignImgPath",
|
@RequestMapping(value = "/getSignImgPath",
|
||||||
@ -104,7 +104,7 @@ public class UserProfileController {
|
|||||||
@Operation(summary = "获取用户的签名图片地址")
|
@Operation(summary = "获取用户的签名图片地址")
|
||||||
@Parameter(name = "userId", description = "用户ID", required = true, example = "1024")
|
@Parameter(name = "userId", description = "用户ID", required = true, example = "1024")
|
||||||
public CommonResult<String> getSignImgPath(@RequestParam("userId") Long userId) {
|
public CommonResult<String> getSignImgPath(@RequestParam("userId") Long userId) {
|
||||||
String path = userService.getSignImgPath(userId) ;
|
String path = userService.getSignImgPath(userId);
|
||||||
return success(path);
|
return success(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user