|
@@ -0,0 +1,35 @@
|
|
|
|
+package org.jeecg.modules.adweb.dmp.service.google;
|
|
|
|
+
|
|
|
|
+import jakarta.annotation.PostConstruct;
|
|
|
|
+
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
|
+
|
|
|
|
+import org.jeecg.modules.adweb.common.util.RestTemplateUtil;
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
|
+import org.springframework.web.client.RestTemplate;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * Google Analytics数据同步 - http://data-bridge.v3.adwebcloud.com:9002/swagger-ui/index.html
|
|
|
|
+ *
|
|
|
|
+ * @author wfansh
|
|
|
|
+ */
|
|
|
|
+@Slf4j
|
|
|
|
+@Service
|
|
|
|
+public class GAReportService {
|
|
|
|
+
|
|
|
|
+ @Value("${data-bridge.api.host}")
|
|
|
|
+ private String dataBridgeApiHost;
|
|
|
|
+
|
|
|
|
+ @Value("${data-bridge.api.token}")
|
|
|
|
+ private String dataBridgeApiToken;
|
|
|
|
+
|
|
|
|
+ private RestTemplate restTemplate;
|
|
|
|
+
|
|
|
|
+ @PostConstruct
|
|
|
|
+ private void init() {
|
|
|
|
+ this.restTemplate = RestTemplateUtil.getRestTemplate(30, 30, dataBridgeApiToken);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+}
|