Showing
1 changed file
with
5 additions
and
3 deletions
@@ -46,11 +46,11 @@ public class StorageUpdateTimeLogicService { | @@ -46,11 +46,11 @@ public class StorageUpdateTimeLogicService { | ||
46 | } | 46 | } |
47 | List<ProductTiming> productTimings = productTimingService.selectBySkns(productSkns); | 47 | List<ProductTiming> productTimings = productTimingService.selectBySkns(productSkns); |
48 | Map<Integer, Integer> outSaleTimeMap = new HashMap<>(); | 48 | Map<Integer, Integer> outSaleTimeMap = new HashMap<>(); |
49 | - for(ProductTiming productTiming:productTimings){ | ||
50 | - if(outSaleTimeMap.containsKey(productTiming.getProductSkn())){ | 49 | + for (ProductTiming productTiming : productTimings) { |
50 | + if (outSaleTimeMap.containsKey(productTiming.getProductSkn())) { | ||
51 | continue; | 51 | continue; |
52 | } | 52 | } |
53 | - outSaleTimeMap.put(productTiming.getProductSkn(),productTiming.getOutSaleTime()); | 53 | + outSaleTimeMap.put(productTiming.getProductSkn(), productTiming.getOutSaleTime()); |
54 | } | 54 | } |
55 | Map<Integer, Integer> sknMap = new HashMap<>(); | 55 | Map<Integer, Integer> sknMap = new HashMap<>(); |
56 | List<Product> products = productService.selectListByIds(productIds); | 56 | List<Product> products = productService.selectListByIds(productIds); |
@@ -67,7 +67,9 @@ public class StorageUpdateTimeLogicService { | @@ -67,7 +67,9 @@ public class StorageUpdateTimeLogicService { | ||
67 | if (outSaleTime == null) { | 67 | if (outSaleTime == null) { |
68 | outSaleTime = new Integer(0); | 68 | outSaleTime = new Integer(0); |
69 | } | 69 | } |
70 | + if (outSaleTime > 0) { | ||
70 | updateTime = DateUtil.getLastTimeSecond(DateUtil.addTimeSecondByDayAmount(updateTime, outSaleTime)); | 71 | updateTime = DateUtil.getLastTimeSecond(DateUtil.addTimeSecondByDayAmount(updateTime, outSaleTime)); |
72 | + } | ||
71 | storageUpdateTime.setStorageUpdateTime(updateTime); | 73 | storageUpdateTime.setStorageUpdateTime(updateTime); |
72 | } | 74 | } |
73 | return storageUpdateTimes; | 75 | return storageUpdateTimes; |
-
Please register or login to post a comment