bug
This commit is contained in:
@@ -81,17 +81,19 @@ public class BookTeachLikeAndCommentController {
|
|||||||
* 本用户当前目录是否点赞
|
* 本用户当前目录是否点赞
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/ifLike")
|
@RequestMapping("/ifLike")
|
||||||
public boolean ifLike(int teachId) {
|
public R ifLike(int teachId) {
|
||||||
|
boolean flag ;
|
||||||
LambdaQueryWrapper<BookTeachLikeEntity> wrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BookTeachLikeEntity> wrapper = new LambdaQueryWrapper<>();
|
||||||
wrapper.eq(BookTeachLikeEntity::getDelFlag,0);
|
wrapper.eq(BookTeachLikeEntity::getDelFlag,0);
|
||||||
wrapper.eq(BookTeachLikeEntity::getTeachId,teachId);
|
wrapper.eq(BookTeachLikeEntity::getTeachId,teachId);
|
||||||
wrapper.eq(BookTeachLikeEntity::getUserId,ShiroUtils.getUId());
|
wrapper.eq(BookTeachLikeEntity::getUserId,ShiroUtils.getUId());
|
||||||
BookTeachLikeEntity likeEntity = likeService.getOne(wrapper);
|
BookTeachLikeEntity likeEntity = likeService.getOne(wrapper);
|
||||||
if (likeEntity != null){
|
if (likeEntity != null){
|
||||||
return true;
|
flag = true;
|
||||||
}else {
|
}else {
|
||||||
return false;
|
flag = false;
|
||||||
}
|
}
|
||||||
|
return R.ok().put("flag",flag);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 获取评论列表
|
* 获取评论列表
|
||||||
|
|||||||
Reference in New Issue
Block a user