本文整理汇总了Java中slender.services.core.comments.impl.CommentsServiceImpl类的典型用法代码示例。如果您正苦于以下问题:Java CommentsServiceImpl类的具体用法?Java CommentsServiceImpl怎么用?Java CommentsServiceImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CommentsServiceImpl类属于slender.services.core.comments.impl包,在下文中一共展示了CommentsServiceImpl类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addTaskComment
import slender.services.core.comments.impl.CommentsServiceImpl; //导入依赖的package包/类
@POST
@Path("addTaskComment")
@Override
public Response addTaskComment(
@FormParam("userId") Integer userId,
@FormParam("taskId") Integer taskId,
@FormParam("comment") String comment) {
try {
CommentFactory factory = new CommentFactory();
CommentsService service = new CommentsServiceImpl();
Comment com = factory.getComment(comment, 0, taskId, userId);
com.setProjectId(null);
service.addComment(com);
return Response.ok(new SuccessResponse(true, "Success")).build();
}
catch(Exception e) {
e.printStackTrace();
}
return Response.ok(new SuccessResponse(false, "Failed")).build();
}
示例2: addProjectComment
import slender.services.core.comments.impl.CommentsServiceImpl; //导入依赖的package包/类
@POST
@Path("addProjectComment")
@Override
public Response addProjectComment(
@FormParam("userId") Integer userId,
@FormParam("projectId") Integer projId,
@FormParam("comment") String comment) {
try {
CommentFactory factory = new CommentFactory();
CommentsService service = new CommentsServiceImpl();
Comment com = factory.getComment(comment, projId, 0, userId);
com.setTaskId(null);
service.addComment(com);
return Response.ok(new SuccessResponse(true, "Success")).build();
}
catch(Exception e) {
e.printStackTrace();
}
return Response.ok(new SuccessResponse(false, "Failed")).build();
}