FengChaoYu 9 hónapja
szülő
commit
3a8f211255

+ 2 - 0
mall-server-api/src/main/java/com/gree/mall/manager/schedule/NewPartsChangeSalesSchedule.java

@@ -19,6 +19,7 @@ import com.gree.mall.manager.plus.service.WebsitPartsRefundConfigService;
 import com.gree.mall.manager.plus.service.WebsitPartsSalesService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
 import org.springframework.integration.redis.util.RedisLockRegistry;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
@@ -33,6 +34,7 @@ import java.util.concurrent.locks.Lock;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 
+@ConditionalOnProperty(name = "schedule.enable", havingValue = "true", matchIfMissing = true)
 @Component
 @Slf4j
 public class NewPartsChangeSalesSchedule {