Skip to content

Commit

Permalink
fix: 잘못된 쿼리문 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
laigasus committed Nov 21, 2024
1 parent 28575e8 commit 24c3e83
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ public class OrderDirectDBAdapter {
@Autowired
private JdbcTemplate jdbcTemplate;

public int updateOrderState(OrderState before, OrderState after, int week) {
public int updateOrderState(OrderState desired, OrderState now, int week) {
String sql = "UPDATE `order` SET order_state= ? " +
"WHERE order_state = ? " +
"AND order_date < DATE_SUB(NOW(), INTERVAL ? WEEK)";

return jdbcTemplate.update(sql, after.name(), before.name(), week);
return jdbcTemplate.update(sql, desired.name(), now.name(), week);
}

public int deleteOrder(OrderState desired, int week) {
Expand Down

0 comments on commit 24c3e83

Please sign in to comment.