diff --git a/BE/src/main/java/com/codesquad/issuetracker/ragdoll/dao/IssueDao_Ragdoll.java b/BE/src/main/java/com/codesquad/issuetracker/ragdoll/dao/IssueDao_Ragdoll.java index f1d05b9..f417064 100644 --- a/BE/src/main/java/com/codesquad/issuetracker/ragdoll/dao/IssueDao_Ragdoll.java +++ b/BE/src/main/java/com/codesquad/issuetracker/ragdoll/dao/IssueDao_Ragdoll.java @@ -127,4 +127,14 @@ public void deleteAssigneeId(Long issueId, Long deletedAssigneeId) { String sql = "DELETE FROM assignee WHERE issue_id = ? AND user_id = ?"; jdbcTemplate.update(sql, new Object[]{issueId, deletedAssigneeId}); } + + public void addAttachedLabelId(Long issueId, Integer labelId) { + String sql = "INSERT issue_has_label (label_id, issue_id) VALUES (?, ?)"; + jdbcTemplate.update(sql, new Object[]{labelId, issueId}); + } + + public void deleteAttachedLabelId(Long issueId, Integer labelId) { + String sql = "DELETE FROM issue_has_label WHERE issue_id = ? AND label_id = ?"; + jdbcTemplate.update(sql, new Object[]{issueId, labelId}); + } }