!301 fix & improve

Merge pull request !301 from OceansDeep/pg
This commit is contained in:
OceansDeep
2023-08-03 08:18:06 +00:00
committed by Gitee
3 changed files with 4 additions and 4 deletions

View File

@@ -92,6 +92,7 @@ public class CustomWordsServiceImpl extends ServiceImpl<CustomWordsMapper, Custo
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean deleteBathByName(List<String> names) {
LambdaQueryWrapper<CustomWords> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(CustomWords::getName, names);
@@ -99,6 +100,7 @@ public class CustomWordsServiceImpl extends ServiceImpl<CustomWordsMapper, Custo
}
@Override
@Transactional(rollbackFor = Exception.class)
public long insertBatchCustomWords(List<CustomWords> customWordsList) {
return this.baseMapper.insertBatchSomeColumn(customWordsList);
}

View File

@@ -455,10 +455,8 @@ public class EsGoodsIndexServiceImpl extends BaseElasticsearchService implements
this.client.bulkAsync(request, RequestOptions.DEFAULT, new ActionListener<BulkResponse>() {
@Override
public void onResponse(BulkResponse bulkItemResponses) {
// 判断索引如果不存在的处理
log.info("批量更新商品索引结果:{}", bulkItemResponses.buildFailureMessage());
if (bulkItemResponses.hasFailures() && bulkItemResponses.getItems().length > 0) {
throw new RetryException("批量更新商品索引失败," + bulkItemResponses.buildFailureMessage());
}
}
@Override