update article + retrait

This commit is contained in:
Parpaillax
2024-04-30 12:17:59 +02:00
parent 36952b957f
commit d13ad65102
11 changed files with 194 additions and 30 deletions

View File

@@ -168,7 +168,6 @@ public class ArticleRepositoryImpl implements ArticleRepository {
sql.append(")");
}
System.out.println();
// Compte le nombre total d'articles
int totalCount = countArticlePageable(critere);
@@ -334,7 +333,16 @@ public class ArticleRepositoryImpl implements ArticleRepository {
}
@Override
public void updateArticle(int id) {
public int updateArticle(Article article) {
String sql = "UPDATE ARTICLES_VENDUS " +
"SET nom_article = ?, " +
"description = ?," +
"date_debut_encheres = ?," +
"date_fin_encheres = ?," +
"prix_initial = ?," +
"no_categorie = ? " +
"WHERE no_article = ?";
jdbcTemplate.update(sql, article.getNom(), article.getDesc(), article.getDateDebutEnch(), article.getDateFinEnch(), article.getPrixInitial(), article.getNumCategorie(), article.getId());
return article.getId();
}
}