|
@@ -932,8 +932,12 @@ public class AssetService {
|
|
|
@Scheduled(cron = "0 0 0/1 * * ?")
|
|
@Scheduled(cron = "0 0 0/1 * * ?")
|
|
|
public void offTheShelfAll() {
|
|
public void offTheShelfAll() {
|
|
|
LocalDateTime lastTime = LocalDateTime.now().minusDays(15);
|
|
LocalDateTime lastTime = LocalDateTime.now().minusDays(15);
|
|
|
|
|
+ LocalDateTime newRuleStartTime = LocalDateTime.of(2022, 12, 9, 17, 0, 0);
|
|
|
Set<Long> assetIds = collectionRepo
|
|
Set<Long> assetIds = collectionRepo
|
|
|
- .findResaleCollectionOverTime(lastTime);
|
|
|
|
|
|
|
+ .findResaleCollectionOverTime(lastTime, newRuleStartTime);
|
|
|
|
|
+ LocalDateTime newRuleLastTime = LocalDateTime.now().minusDays(30);
|
|
|
|
|
+ assetIds.addAll(collectionRepo
|
|
|
|
|
+ .findResaleCollectionOverTimeV2(newRuleLastTime, newRuleStartTime));
|
|
|
assetIds.forEach(this::cancelConsignmentBySystem);
|
|
assetIds.forEach(this::cancelConsignmentBySystem);
|
|
|
}
|
|
}
|
|
|
|
|
|