修改头像和背景图片
This commit is contained in:
@@ -211,10 +211,13 @@ public class AuthApi {
|
||||
return ResultBean.success(author);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "获取关注目标作者的所有粉丝")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@GetMapping("/api/auth/getFollowMes")
|
||||
@OperLog(operModule = "获取关注目标作者的所有粉丝",operType = OperType.QUERY,operDesc = "获取关注目标作者的所有粉丝")
|
||||
@OperLog(operModule = "获取关注目标作者的所有粉丝",operType = OperType.QUERY,operDesc = "获取 关注目标作者的所有粉丝")
|
||||
public ResultBean getFollowMes(String authorId) {
|
||||
String myId = String.valueOf(request.getAttribute("authorId"));
|
||||
//关注我的列表
|
||||
@@ -281,6 +284,37 @@ public class AuthApi {
|
||||
return ResultBean.success(author);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改头像")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@PostMapping("/api/auth/updateAuthorAvatar")
|
||||
@OperLog(operModule = "修改头像",operType = OperType.EDIT,operDesc = "修改头像")
|
||||
public ResultBean<Author> updateAuthorAvatar(String fileId) {
|
||||
String followId = String.valueOf(request.getAttribute("authorId"));
|
||||
Author author = authorService.getById(followId);
|
||||
author.setAuthorId(followId);
|
||||
author.setAvatarId(fileId);
|
||||
File file = fileService.selectFileByFileId(fileId);
|
||||
String serverName = request.getServerName();
|
||||
author.setAvatarUrl("http://" + serverName + ":" + port + file.getFilePath());
|
||||
authorService.updateById(author);
|
||||
return ResultBean.success(author);
|
||||
};
|
||||
|
||||
@ApiOperation(value = "修改背景图")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@PostMapping("/api/auth/updateAuthorBackGround")
|
||||
@OperLog(operModule = "修改背景图",operType = OperType.EDIT,operDesc = "修改背景图")
|
||||
public ResultBean<Author> updateAuthorBackGround(String fileId) {
|
||||
String followId = String.valueOf(request.getAttribute("authorId"));
|
||||
Author author = authorService.getById(followId);
|
||||
author.setAuthorId(followId);
|
||||
author.setBackGroundId(fileId);
|
||||
File file = fileService.selectFileByFileId(fileId);
|
||||
String serverName = request.getServerName();
|
||||
author.setBackGroundUrl("http://" + serverName + ":" + port + file.getFilePath());
|
||||
authorService.updateById(author);
|
||||
return ResultBean.success(author);
|
||||
};
|
||||
|
||||
@ApiOperation(value = "获取目标博主笔记")
|
||||
@ApiOperationSupport(order = 1)
|
||||
|
@@ -1 +1 @@
|
||||
package com.dd.admin.business.webSocket;
|
||||
package com.dd.admin.business.webSocket;
|
@@ -26,7 +26,7 @@ knife4j:
|
||||
#here is the importance configs of JWT
|
||||
jwt:
|
||||
header: Authorization #请求头权限标识
|
||||
expiration: 604800 #7天 604800
|
||||
expiration: 2592000 #7天 604800 30天2,592,000 60*60*24*365
|
||||
secret: security
|
||||
# 配置不需要认证的接口
|
||||
ignores:
|
||||
|
Reference in New Issue
Block a user