package com.zjty.tynotes.job.basic.controller;//package com.zjty.tynotes.job.basic.controller;
//
//import com.zjty.tynotes.job.basic.entity.database.Comment;
//import com.zjty.tynotes.job.basic.entity.response.JobResponse;
//import com.zjty.tynotes.job.basic.service.CommentService;
//import com.zjty.tynotes.job.status.service.BusinessTreeManagement;
//import com.zjty.tynotes.misc.config.AutoDocument;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.http.ResponseEntity;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.Date;
//
//import static org.springframework.http.ResponseEntity.ok;
//
///**
// * <p>Description : ty-note-backend
// * <p>Date : 2019/4/28 10:28
// * <p>@author : C
// */
//@AutoDocument
//@Api(tags = "工作记录相关接口", description = "工作记录模块")
//@RestController
//@RequestMapping("/job/comment")
//public class CommentController {
//
//    private final
//    CommentService commentService;
//
//    @Autowired
//    private BusinessTreeManagement businessTreeManagement;
//
//    @Autowired
//    public CommentController(CommentService commentService) {
//        this.commentService = commentService;
//    }
//
//    @PostMapping(value = "/{workId}")
//    @ApiOperation(value = "新增留言并将其添加到所属工作中.", notes = "新增不可在数据中附带id.需要在路径中指定所属工作的id.成功时返回新增数据保存的id.")
//    public ResponseEntity<JobResponse> add(@RequestBody Comment comment, @PathVariable String workId) {
//        String saveId = commentService.add(comment, workId);
//        businessTreeManagement.saveAction(comment.getCommentator(),workId,7,new Date(),"");
//        return ok(new JobResponse(saveId));
//    }
//
//    @PutMapping()
//    @ApiOperation(value = "修改留言.", notes = "修改必须在数据中附带id.")
//    public ResponseEntity<JobResponse> modify(@RequestBody Comment comment) {
//        String saveId = commentService.modify(comment);
//        return ok(new JobResponse(saveId));
//    }
//
//    @DeleteMapping("/{commentId}")
//    @ApiOperation(value = "根据id删除留言.")
//    public ResponseEntity<JobResponse> delete(@PathVariable String commentId) {
//        return ok(new JobResponse(commentId));
//    }
//}
