新增发帖达人页面

This commit is contained in:
linfeng 2022-10-08 14:44:23 +08:00
parent d7ad5d7e25
commit 84c89d95bc
2 changed files with 10 additions and 0 deletions

View File

@ -332,6 +332,9 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserDao, AppUserEntity> i
DateTime month = cn.hutool.core.date.DateUtil.beginOfMonth(new Date());
List<PostEntity> postList = postService.lambdaQuery().gt(PostEntity::getCreateTime, month).list();
if(postList.isEmpty()){
return new ArrayList<>();
}
Map<Integer, Long> collect = postList.stream().collect(Collectors.groupingBy(PostEntity::getUid, Collectors.counting()));
Map<Integer, Long> sorted = collect
.entrySet()

View File

@ -117,6 +117,13 @@ public class AppUserInfoController {
return R.ok().put("result", response);
}
@Login
@PostMapping("/cancelFollow")
@ApiOperation("取消关注用户")
public R cancelFollow(@LoginUser AppUserEntity user, @RequestBody AddFollowForm request) {
appUserService.cancelFollow(request, user);
return R.ok("取消关注用户成功");
}
@Login
@PostMapping("/userInfoEdit")