Commit 80723fe8 authored by 332784038@qq.com's avatar 332784038@qq.com Committed by wux

批量修改价格的缓存key格式修改

(cherry picked from commit c286e83a)
parent 3d0f4f0b
...@@ -133,7 +133,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -133,7 +133,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
// private ZTestMapper3 zTestMapper; // private ZTestMapper3 zTestMapper;
private static final String PREFIX = "price_batch_update_"; private static final String PREFIX = "price_batch_update:";
private static final Integer DATA_THRESHOLD = 30; private static final Integer DATA_THRESHOLD = 30;
private static final String BATCH_DEL_SCRIPT = "for k,v in pairs(ARGV) do \n " + private static final String BATCH_DEL_SCRIPT = "for k,v in pairs(ARGV) do \n " +
...@@ -699,7 +699,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -699,7 +699,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
List<Long> dbStepIdList = dbStepList.stream() List<Long> dbStepIdList = dbStepList.stream()
.map(ProductPriceStepDO::getId) .map(ProductPriceStepDO::getId)
.collect(toList()); .collect(toList());
if (!batchUpdate) { // if (!batchUpdate) {
List<Long> updateIdList = updateList.stream() List<Long> updateIdList = updateList.stream()
.map(ProductPriceStepDO::getId) .map(ProductPriceStepDO::getId)
.collect(toList()); .collect(toList());
...@@ -708,7 +708,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -708,7 +708,7 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
if (CollectionUtil.isNotEmpty(dbIdList)) { if (CollectionUtil.isNotEmpty(dbIdList)) {
productPriceStepMapper.physicsDeleteById(Joiner.on(",").join(dbIdList)); productPriceStepMapper.physicsDeleteById(Joiner.on(",").join(dbIdList));
} }
} // }
insertList1.addAll(updateList); insertList1.addAll(updateList);
List<ProductPriceStepSpecialDO> allUpdateStepSpecialList = insertList1.stream() List<ProductPriceStepSpecialDO> allUpdateStepSpecialList = insertList1.stream()
...@@ -902,15 +902,15 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper, ...@@ -902,15 +902,15 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
.collect(toList()); .collect(toList());
productPriceStepPackagingMapper.deleteBatchIds(dIdList); productPriceStepPackagingMapper.deleteBatchIds(dIdList);
} }
if (!batchUpdate) { // if (!batchUpdate) {
List<Long> updateIdList = packagingUpdateList.stream() List<Long> updatePackingIdList = packagingUpdateList.stream()
.map(ProductPriceStepPackagingDO::getId) .map(ProductPriceStepPackagingDO::getId)
.collect(toList()); .collect(toList());
dbPackingIdList.removeAll(updateIdList); dbPackingIdList.removeAll(updatePackingIdList);
if (CollectionUtil.isNotEmpty(dbPackingIdList)) { if (CollectionUtil.isNotEmpty(dbPackingIdList)) {
productPriceStepPackagingMapper.physicsDeleteById(Joiner.on(",").join(dbPackingIdList)); productPriceStepPackagingMapper.physicsDeleteById(Joiner.on(",").join(dbPackingIdList));
} }
} // }
} }
private void initBasePackagingPrice(BasePackagingPrice basePackagingPrice, String transportType) { private void initBasePackagingPrice(BasePackagingPrice basePackagingPrice, String transportType) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment