@RequestParam(value="articleDeleteImageCarousel", required = false) boolean articleDeleteImageCarousel,
HttpServletRequest httpServletRequest){
Map<String, Object> data = new HashMap<String, Object>();
ArticleModel articleModel;
try {
articleModel = iArticleService.getArticle(articleId);
articleModel.setTitle(articleTitle.trim());
articleModel.setBody(articleBody);
articleModel.setTags(articleTags);
articleModel.setLang(articleLang);
String keyImageSmall = iImageService.getImageKeyUploaded(httpServletRequest, "articleImageSmall");
String keyImageCarousel = iImageService.getImageKeyUploaded(httpServletRequest, "articleImageCarousel");
if(articleDeleteImageSmall){
articleModel.setImageSmall(null);
}
else if(null!=keyImageSmall && !keyImageSmall.isEmpty()){
articleModel.setImageSmall(keyImageSmall);
}
else{
articleModel.setImageSmall(this.iArticleService.getArticle(articleModel.getId()).getImageSmall());
}
if(articleDeleteImageCarousel){
articleModel.setImageCarousel(null);
}
else if(null!=keyImageCarousel && !keyImageCarousel.isEmpty()){
articleModel.setImageCarousel(keyImageCarousel);
}
else{
articleModel.setImageCarousel(this.iArticleService.getArticle(articleModel.getId()).getImageCarousel());
}
iArticleService.articleUpdate(articleModel);
} catch (Exception e) {