Skip to content

Commit

Permalink
[BE/#33] Feat : issueDao에 레이블 업데이트 쿼리 추가
Browse files Browse the repository at this point in the history
- issueDao.addAttachedLabelId()
- issueDao.deleteAttachedLabelId()
  • Loading branch information
MuseopKim committed Jun 15, 2020
1 parent 72f5ab1 commit 2af8a3c
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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});
}
}

0 comments on commit 2af8a3c

Please sign in to comment.