mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-09 02:46:50 +08:00
笔记评论逻辑变化
This commit is contained in:
@@ -70,6 +70,24 @@ public class CommentsApi extends ApiBaseController{
|
||||
|
||||
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})
|
||||
|
||||
@@ -137,5 +137,13 @@ public interface ICommentsService {
|
||||
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
|
||||
public PageList<CommentsDto> findCourseTome(int pageIndex, int pageSize, Integer objType, String toaid, String uname, Boolean isread) {
|
||||
|
||||
Reference in New Issue
Block a user