| | |
| | | import cn.lili.modules.lmk.domain.entity.VideoTag; |
| | | import cn.lili.modules.lmk.domain.entity.VideoTagRef; |
| | | import cn.lili.modules.lmk.domain.form.*; |
| | | import cn.lili.modules.lmk.domain.query.AuthorVideoQuery; |
| | | import cn.lili.modules.lmk.domain.query.ManagerVideoQuery; |
| | | import cn.lili.modules.lmk.domain.vo.*; |
| | | import cn.lili.modules.lmk.enums.general.TagCreateTypeEnum; |
| | |
| | | footprintService.saveFootprint(footPrint); |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public Result getAuthorInfo(String authorId) { |
| | | VideoAccountVO vo = baseMapper.getAuthorInfo(authorId, UserContext.getCurrentUserId()); |
| | | vo.setSelf(authorId.equals(UserContext.getCurrentUserId())); |
| | | // 查询获赞数 |
| | | List<String> videoIds = baseMapper.getVideoIdsByAuthor(authorId); |
| | | if (CollectionUtils.isNotEmpty(videoIds)) { |
| | | vo.setLikeNum(baseMapper.countAuthorVideoCollectNum(videoIds)); |
| | | } else { |
| | | vo.setLikeNum(0L); |
| | | } |
| | | return Result.ok().data(vo); |
| | | } |
| | | |
| | | @Override |
| | | public Result getAuthorVideoPage(AuthorVideoQuery query) { |
| | | IPage<WxVideoVO> page = PageUtil.getPage(query, WxVideoVO.class); |
| | | baseMapper.getAuthorVideoPage(page, query); |
| | | return Result.ok().data(page.getRecords()).total(page.getTotal()); |
| | | } |
| | | } |