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