|
|
@@ -64,13 +64,13 @@ public class CollectionService {
|
|
|
|
|
|
@PostConstruct
|
|
|
public void init() {
|
|
|
+ if (Arrays.asList(env.getActiveProfiles()).contains("dev")) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
List<Collection> collections = collectionRepo.findByScheduleSaleTrueAndOnShelfFalseAndStartTimeBeforeAndDelFalse(LocalDateTime.now());
|
|
|
for (Collection collection : collections) {
|
|
|
onShelfTask(collection);
|
|
|
}
|
|
|
- if (Arrays.asList(env.getActiveProfiles()).contains("dev")) {
|
|
|
- return;
|
|
|
- }
|
|
|
for (CollectionStockAndSale collection : collectionRepo.getStockAndSale()) {
|
|
|
if (redisTemplate.opsForValue().get("collectionStock::" + collection.getId()) == null) {
|
|
|
redisTemplate.opsForValue().set("collectionStock::" + collection.getId(), collection.getStock());
|