Class CommentService

java.lang.Object
es.kukenan.smartfi.microservice.transfer.service.CommentService

@Service public class CommentService extends Object
Comment service.
  • Field Details

    • commentRepository

      @Autowired private CommentRepository commentRepository
      Comment repository.
    • imageRepository

      @Autowired private ImageRepository imageRepository
      Image repository.
  • Constructor Details

    • CommentService

      public CommentService()
  • Method Details

    • createComment

      public es.kukenan.smartfi.microservice.transfer.api.comment.CommentDto createComment(es.kukenan.smartfi.microservice.transfer.api.comment.CommentRequestDto commentRequestDto, String userId)
      Create a comment.
      Parameters:
      commentRequestDto - request data to create the comment.
      userId - user identifier.
      Returns:
      the created comment.
    • getComment

      public es.kukenan.smartfi.microservice.transfer.api.comment.CommentDto getComment(String productId, String transferId, String userId)
      Find comment product, movement, and user IDs.
      Parameters:
      productId - product identifier.
      transferId - transfer identifier.
      userId - user identifier.
      Returns:
      comment.
    • deleteComment

      public void deleteComment(String commentId, String userId)
      Delete a comment.
      Parameters:
      commentId - comment ID.
      userId - user ID.
    • updateComment

      public es.kukenan.smartfi.microservice.transfer.api.comment.CommentDto updateComment(es.kukenan.smartfi.microservice.transfer.api.comment.CommentRequestDto newComment, String commentId, String userId)
      Update a comment.
      Parameters:
      newComment - request Dto containing new data.
      commentId - comment identifier.
      userId - user identifier.
      Returns:
      comment.