From 12112eaff727c3a4554b19840e735e2b60cbd1f2 Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Fri, 05 Jan 2024 11:19:07 +0800
Subject: [PATCH] 团队列表
---
src/main/java/cc/mrbird/febs/mall/quartz/WxxcxJob.java | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/mall/quartz/WxxcxJob.java b/src/main/java/cc/mrbird/febs/mall/quartz/WxxcxJob.java
index 5e39867..803c177 100644
--- a/src/main/java/cc/mrbird/febs/mall/quartz/WxxcxJob.java
+++ b/src/main/java/cc/mrbird/febs/mall/quartz/WxxcxJob.java
@@ -11,6 +11,7 @@
import com.baomidou.mybatisplus.extension.exceptions.ApiException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
@@ -22,6 +23,7 @@
@Slf4j
@Component
+@ConditionalOnProperty(prefix = "system", name = "job", havingValue = "true")
public class WxxcxJob {
private final XcxProperties xcxProperties = SpringContextHolder.getBean(XcxProperties.class);
@@ -30,11 +32,14 @@
private RedisUtils redisUtils;
@Resource
RestTemplate restTemplate;
+// @Autowired
+// private SpringContextHolder springContextHolder;
/**
* 获取access_token
* 有效期两小时
*/
@Scheduled(cron = "0 0 0/1 * * ? ")
+// @Scheduled(cron = "0 0/1 * * * ? ")
public void getAccessToken() throws IOException {
String appId = xcxProperties.getXcxAppid();
String appSecret = xcxProperties.getXcxSecret();
--
Gitblit v1.9.1