// 保存文件
String saveName = ServletActionContext.getServletContext()
.getRealPath(path) + File.separator + uuidName;
ImageUtil.thumbnails(logo[i], new File(saveName), 70);
// 更新商家LogoUrl
Merchant merchant = merchantService.findById(id);
String oldLogoPath = ServletActionContext.getServletContext()
.getRealPath(merchant.getMerchantLogoUrl());
File oldLogoFile = new File(oldLogoPath == null ? "" : oldLogoPath);
if (oldLogoFile.exists())
{
oldLogoFile.delete();
}
merchant.setMerchantLogoUrl(path + "/" + uuidName);
merchantService.update(merchant);
}
}
else
{