@PreAuthorize ("hasRole('ROLE_DATA_MANAGER')")
@Transactional (readOnly=false, propagation=Propagation.REQUIRED)
@CacheEvict (value = "products", allEntries = true)
public void removeProducts (String uuid, Long[] pids)
{
collectionDao.removeProducts (uuid, pids, null);
long start = new Date ().getTime ();
for (Long pid: pids)
{
try
{
searchService.index(productDao.read(pid));
}
catch (Exception e)
{
throw new RuntimeException("Cannot update Solr index", e);
}
}
long end = new Date ().getTime ();
LOGGER.info("[SOLR] Remove " + pids.length +
" product(s) from collection spent " + (end-start) + "ms" );
}
CollectionService.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:dhus-core
作者:
评论列表
文章目录