|
|
@@ -876,7 +876,7 @@ public class AssetService {
|
|
|
|
|
|
@Scheduled(cron = "0 0 0/1 * * ?")
|
|
|
public void offTheShelfAll() {
|
|
|
- LocalDateTime lastTime = LocalDateTime.now().minusDays(10);
|
|
|
+ LocalDateTime lastTime = LocalDateTime.now().minusDays(15);
|
|
|
Set<Long> assetIds = collectionRepo
|
|
|
.findResaleCollectionOverTime(lastTime);
|
|
|
assetIds.forEach(this::cancelConsignmentBySystem);
|
|
|
@@ -894,10 +894,12 @@ public class AssetService {
|
|
|
collectionRepo.findById(asset.getPublicCollectionId())
|
|
|
.ifPresent(collection -> {
|
|
|
collection.setSalable(false);
|
|
|
+ collection.setOnShelf(false);
|
|
|
collectionRepo.save(collection);
|
|
|
});
|
|
|
}
|
|
|
asset.setConsignment(false);
|
|
|
+ asset.setPublicShow(false);
|
|
|
assetRepo.saveAndFlush(asset);
|
|
|
} catch (Exception e) {
|
|
|
log.info("自动下架报错,assetId:" + id);
|