Commit 7144d3b3 authored by shiyu's avatar shiyu

打卡动态

parent 77f397aa
......@@ -32,6 +32,11 @@ public class QdSignInNoteVo implements Entity {
*/
private Integer likeNum;
/**
* 当前用户是否点赞
*/
private Boolean isLike = false;
/**
* 签到任务id
*/
......
......@@ -41,6 +41,9 @@ public class QdUserSignInNoteServiceImpl implements QdUserSignInNoteService {
@Autowired
QdUserSignInDao qdUserSignInDao;
@Autowired
QdGiveLikeRecordDao qdGiveLikeRecordDao;
@Override
public Result findSignInNoteList(QdUserSignInNoteRequestDto dto) {
try {
......@@ -72,6 +75,11 @@ public class QdUserSignInNoteServiceImpl implements QdUserSignInNoteService {
qdSignInNoteVo.setUploadTime(uploadTime);
SignInTask signInTask = signInTaskDao.findById(qdUserSignInNote.getTaskId());
qdSignInNoteVo.setTaskName(signInTask.getName());
//查询当前用户是否点赞
if (dto.getUserId() != null) {
qdGiveLikeRecordDao.isExisted(dto.getUserId(), qdUserSignInNote.getId());
qdSignInNoteVo.setIsLike(true);
}
list.add(qdSignInNoteVo);
}
return Result.success(PageSearchResult.of(pageInfo, list));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment