思迅同步库存问题修改,类型问题
This commit is contained in:
parent
a334cfce29
commit
71a2b5acb8
@ -780,7 +780,7 @@ public class SyncThirdDataServiceImpl extends SyncBaseThirdSxAbstract implements
|
||||
}
|
||||
//持久化保存数据到数据库队列
|
||||
String key=RedisKey.STOREDATARELEASE+":"+syncAppO.getStore_id();
|
||||
Map<String, Double> redisHash = redisTemplate.opsForHash().entries(key);
|
||||
Map redisHash = redisTemplate.opsForHash().entries(key);
|
||||
List<ProductQuantityConsumption> productQuantityConsumptionList=getProductStockFromRedis(syncAppO.getStore_id(),redisHash);
|
||||
List<ProductQuantityConsumption> productQuantityConsumptions=new ArrayList<>();
|
||||
if (!productQuantityConsumptionList.isEmpty()) {
|
||||
@ -884,7 +884,7 @@ public class SyncThirdDataServiceImpl extends SyncBaseThirdSxAbstract implements
|
||||
|
||||
|
||||
@Override
|
||||
public List<ProductQuantityConsumption> getProductStockFromRedis(String storeId,Map<String, Double> redisHash) {
|
||||
public List<ProductQuantityConsumption> getProductStockFromRedis(String storeId,Map redisHash) {
|
||||
try {
|
||||
// 从 Redis 获取 hash 结构的所有键值对
|
||||
if (redisHash.isEmpty()) {
|
||||
@ -894,7 +894,8 @@ public class SyncThirdDataServiceImpl extends SyncBaseThirdSxAbstract implements
|
||||
List<ProductQuantityConsumption> productQuantityConsumptionList=new ArrayList<>();
|
||||
redisHash.forEach((k, v)->{
|
||||
ProductQuantityConsumption productQuantityConsumption=new ProductQuantityConsumption();
|
||||
String[] productKeyArrys=k.split("-");
|
||||
String productKey= (String) k;
|
||||
String[] productKeyArrys=productKey.split("-");
|
||||
if(productKeyArrys.length!=2){
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user