Browse Source

1.修复数据同步问题

dev
zhenghaoyu 3 days ago
parent
commit
b56308b2da
  1. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockArticleClient.java

@ -93,12 +93,12 @@ public class DistributionStockArticleClient implements IDistributionStockArticle
bladeRedis.setEx(key,"1",30L); bladeRedis.setEx(key,"1",30L);
DistributionStockArticleEntity distributionStockArticle = distributionStockArticleService.findStockArticleByOrderCodeAndWarehouseId(orderCode, warehouseId); DistributionStockArticleEntity distributionStockArticle = distributionStockArticleService.findStockArticleByOrderCodeAndWarehouseId(orderCode, warehouseId);
if(ObjectUtils.isNotEmpty(distributionStockArticle)){ if(ObjectUtils.isNotEmpty(distributionStockArticle)){
bladeRedis.setEx(key,distributionStockArticle.getId(),30L); bladeRedis.setEx(key,distributionStockArticle.getId().toString(),30L);
return distributionStockArticle.getId(); return distributionStockArticle.getId();
}else{ }else{
boolean saveFlag = distributionStockArticleService.save(distributionStockArticleEntity); boolean saveFlag = distributionStockArticleService.save(distributionStockArticleEntity);
if(saveFlag){ if(saveFlag){
bladeRedis.setEx(key,distributionStockArticleEntity.getId(),30L); bladeRedis.setEx(key,distributionStockArticle.getId().toString(),30L);
return distributionStockArticleEntity.getId(); return distributionStockArticleEntity.getId();
}else{ }else{
return 0L; return 0L;

Loading…
Cancel
Save