feat(bugcollect): 新增 PUT /issues/{id}/reopen 接口
- LogService.reopenIssue() 将状态设回 open
- LogController 暴露 /issues/{id}/reopen 端点
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
这个提交包含在:
父节点
8770f505f7
当前提交
fbc9d02e2a
@ -106,6 +106,12 @@ public class LogController {
|
|||||||
return ApiResponse.ok();
|
return ApiResponse.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PutMapping("/issues/{id}/reopen")
|
||||||
|
public ApiResponse<Void> reopenIssue(@PathVariable Long id) {
|
||||||
|
logService.reopenIssue(id);
|
||||||
|
return ApiResponse.ok();
|
||||||
|
}
|
||||||
|
|
||||||
@PutMapping("/issues/{id}/assign")
|
@PutMapping("/issues/{id}/assign")
|
||||||
public ApiResponse<Void> assignIssue(
|
public ApiResponse<Void> assignIssue(
|
||||||
@PathVariable Long id,
|
@PathVariable Long id,
|
||||||
|
|||||||
@ -270,6 +270,14 @@ public class LogService {
|
|||||||
issueRepository.save(issue);
|
issueRepository.save(issue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public void reopenIssue(Long id) {
|
||||||
|
LogIssueEntity issue = issueRepository.findById(id)
|
||||||
|
.orElseThrow(() -> new IllegalArgumentException("Issue not found: " + id));
|
||||||
|
issue.setStatus("open");
|
||||||
|
issueRepository.save(issue);
|
||||||
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public void assignIssue(Long id, String assignee) {
|
public void assignIssue(Long id, String assignee) {
|
||||||
issueRepository.updateAssignee(id, assignee);
|
issueRepository.updateAssignee(id, assignee);
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户