mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-15 05:46:49 +08:00
笔记评论逻辑变化
This commit is contained in:
@@ -71,6 +71,24 @@ public class CommentsApi extends ApiBaseController{
|
|||||||
return success(list);
|
return success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 只显示某个内容下的一级评论,现在只有笔记
|
||||||
|
* */
|
||||||
|
@PostMapping("/list")
|
||||||
|
public JsonResponse<List<Comments>> list(Integer objType,Integer objId){
|
||||||
|
if(objId==null){
|
||||||
|
return badRequest("参数异常");
|
||||||
|
}
|
||||||
|
if(objType==null){
|
||||||
|
return badRequest("参数异常");
|
||||||
|
}
|
||||||
|
List<Comments> list = service.list(objType, objId);
|
||||||
|
return success(list);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value="/user-reply-list",method= {RequestMethod.GET,RequestMethod.POST})
|
@RequestMapping(value="/user-reply-list",method= {RequestMethod.GET,RequestMethod.POST})
|
||||||
public JsonResponse<List<Comments>> findReplyList(Integer num,String ids,Boolean self,Integer type){
|
public JsonResponse<List<Comments>> findReplyList(Integer num,String ids,Boolean self,Integer type){
|
||||||
|
|||||||
@@ -137,5 +137,13 @@ public interface ICommentsService {
|
|||||||
PageList<CommentsDto> findAll(int pageIndex, int pageSize, String toaid, String uname);
|
PageList<CommentsDto> findAll(int pageIndex, int pageSize, String toaid, String uname);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 笔记的回复
|
||||||
|
* */
|
||||||
|
List<Comments> list(Integer objType,Integer objId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -289,6 +289,12 @@ public class CommentsServiceImpl implements ICommentsService{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Comments> list(Integer objType, Integer objId) {
|
||||||
|
List<Comments> list = dao.findList(FieldFilters.eq("objType", objType), FieldFilters.eq("objId", objId));
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageList<CommentsDto> findCourseTome(int pageIndex, int pageSize, Integer objType, String toaid, String uname, Boolean isread) {
|
public PageList<CommentsDto> findCourseTome(int pageIndex, int pageSize, Integer objType, String toaid, String uname, Boolean isread) {
|
||||||
|
|||||||
Reference in New Issue
Block a user