Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop
This commit is contained in:
commit
58ff71a863
@ -58,7 +58,7 @@ public class NoticeMessageExecute implements TradeEvent, OrderStatusChangeEvent,
|
||||
OrderDetailVO orderDetailVO = orderService.queryDetail(orderMessage.getOrderSn());
|
||||
NoticeMessageDTO noticeMessageDTO = new NoticeMessageDTO();
|
||||
//如果订单状态不为空
|
||||
if (orderDetailVO != null) {
|
||||
if (orderDetailVO != null && orderDetailVO.getOrderItems() != null && !orderDetailVO.getOrderItems().isEmpty()) {
|
||||
Map<String, String> params = new HashMap<>(2);
|
||||
switch (orderMessage.getNewStatus()) {
|
||||
//如果订单新的状态为已取消 则发送取消订单站内信
|
||||
|
@ -9,6 +9,7 @@ import org.apache.http.client.CredentialsProvider;
|
||||
import org.apache.http.conn.ConnectionKeepAliveStrategy;
|
||||
import org.apache.http.impl.client.BasicCredentialsProvider;
|
||||
import org.apache.http.impl.nio.client.HttpAsyncClientBuilder;
|
||||
import org.apache.http.impl.nio.reactor.IOReactorConfig;
|
||||
import org.elasticsearch.client.RestClient;
|
||||
import org.elasticsearch.client.RestClientBuilder;
|
||||
import org.elasticsearch.client.RestHighLevelClient;
|
||||
@ -72,7 +73,12 @@ public class ElasticsearchConfig extends AbstractElasticsearchConfiguration {
|
||||
CredentialsProvider credentialsProvider) {
|
||||
httpClientBuilder
|
||||
.setKeepAliveStrategy(getConnectionKeepAliveStrategy())
|
||||
.setMaxConnPerRoute(10);
|
||||
.setMaxConnPerRoute(10)
|
||||
.setDefaultIOReactorConfig(
|
||||
IOReactorConfig
|
||||
.custom()
|
||||
.setIoThreadCount(Runtime.getRuntime().availableProcessors())
|
||||
.build());
|
||||
if (credentialsProvider != null) {
|
||||
httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -455,9 +455,8 @@ public class EsGoodsIndexServiceImpl extends BaseElasticsearchService implements
|
||||
this.client.bulkAsync(request, RequestOptions.DEFAULT, new ActionListener<BulkResponse>() {
|
||||
@Override
|
||||
public void onResponse(BulkResponse bulkItemResponses) {
|
||||
if (bulkItemResponses.hasFailures()) {
|
||||
throw new RetryException("批量更新商品索引失败,es内容版本冲突");
|
||||
}
|
||||
// 判断索引如果不存在的处理
|
||||
log.info("批量更新商品索引结果:{}", bulkItemResponses.buildFailureMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -19,6 +19,15 @@ import java.util.Map;
|
||||
@CacheConfig(cacheNames = "{regions}")
|
||||
public interface RegionService extends IService<Region> {
|
||||
|
||||
|
||||
/**
|
||||
* 更新地区
|
||||
*
|
||||
* @param region 地区
|
||||
* @return
|
||||
*/
|
||||
@CacheEvict(allEntries = true)
|
||||
boolean updateById(Region region);
|
||||
/**
|
||||
* 同步行政数据
|
||||
*
|
||||
|
@ -16,6 +16,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@ -36,6 +37,13 @@ public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> impleme
|
||||
@Autowired
|
||||
private Cache cache;
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public boolean updateById(Region region) {
|
||||
return super.updateById(region);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void synchronizationData(String url) {
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user