comment.go 678 B

1234567891011121314151617181920212223242526272829
  1. package service
  2. import (
  3. "time"
  4. "go-common/app/admin/ep/melloi/model"
  5. )
  6. //AddComment add comment for test job
  7. func (s *Service) AddComment(comment *model.Comment) error {
  8. comment.Status = 1
  9. comment.SubmitDate = time.Now()
  10. return s.dao.AddComment(comment)
  11. }
  12. //QueryComment query comment
  13. func (s *Service) QueryComment(comment *model.Comment) (*model.QueryCommentResponse, error) {
  14. return s.dao.QueryComment(comment)
  15. }
  16. //UpdateComment update comment
  17. func (s *Service) UpdateComment(comment *model.Comment) error {
  18. return s.dao.UpdateComment(comment)
  19. }
  20. //DeleteComment delete comment
  21. func (s *Service) DeleteComment(id int64) error {
  22. return s.dao.DeleteComment(id)
  23. }