diff --git a/src/main/java/com/example/demo/Util/FeiShuAlertUtil.java b/src/main/java/com/example/demo/Util/FeiShuAlertUtil.java
index cf2a00e..45e1401 100644
--- a/src/main/java/com/example/demo/Util/FeiShuAlertUtil.java
+++ b/src/main/java/com/example/demo/Util/FeiShuAlertUtil.java
@@ -11,6 +11,7 @@ import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.io.IOException;
@@ -23,8 +24,11 @@ import java.util.*;
@Component
public class FeiShuAlertUtil {
+ @Value("${feishu.webhook.url}")
+ private static String webhookUrl;
+
private static final String FEISHU_WEBHOOK_URL_PROD = "https://open.feishu.cn/open-apis/bot/v2/hook/1a515b19-b64f-46b7-9486-35842b9539fe";
- private static final String FEISHU_WEBHOOK_URL_TEST = "https://open.feishu.cn/open-apis/bot/v2/hook/384c78aa-8df1-498b-9c47-04e890ed9877";
+ private static final String FEISHU_WEBHOOK_URL_TEST = webhookUrl;
private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
static {
diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml
new file mode 100644
index 0000000..d2ff5cc
--- /dev/null
+++ b/src/main/resources/application-dev.yml
@@ -0,0 +1,72 @@
+spring:
+ jackson:
+ deserialization:
+ fail-on-unknown-properties: false
+ datasource:
+ mysql1:
+ jdbc-url: jdbc:mysql://18.143.76.3:3306/hwgoldc?serverTimezone=Asia/Shanghai&useSSL=false&useUnicode=true
+ username: hwgoldc
+ password: zB48T55wCsHC8KPz
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ hikari:
+ pool-name: mysql1HikariCP
+ maximum-pool-size: 10
+ sqlserver1:
+ jdbc-url: jdbc:sqlserver://52.76.43.43:1433;databaseName=hwhcGold;encrypt=true;sslProtocol=TLSv1;trustServerCertificate=true;
+ username: hwhc_gold_query
+ password: hwhc_gold_query4564jkj
+ driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+
+ application:
+ name: demo
+ cache:
+ type: redis
+ redis:
+ time-to-live: 3600000
+ use-key-prefix: true
+ cache-null-values: true
+
+ servlet:
+ multipart:
+ enabled: true
+ max-file-size: 10MB
+ max-request-size: 10MB
+
+ data:
+ redis:
+ database: 0
+ host: localhost
+ port: 6379
+ password: 123456
+
+ lettuce:
+ pool:
+ max-active: 20
+ max-wait: -1
+ max-idle: 5
+
+mybatis:
+ configuration:
+ mysql1:
+ map-underscore-to-camel-case: true
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+ sqlserver1:
+ map-underscore-to-camel-case: true
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+upload:
+ path: D:\upload
+
+file:
+ upload:
+ url: http://39.101.133.168:8828/hljw/api/aws/upload
+feishu:
+ webhook:
+ url: https://open.feishu.cn/open-apis/bot/v2/hook/384c78aa-8df1-498b-9c47-04e890ed9877
+
+server:
+ port: 8081
+
+ logging:
+ level:
+ org.springframework.jdbc.core.JdbcTemplate: DEBUG
+ org.springframework.orm.jpa: DEBUG
\ No newline at end of file
diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml
new file mode 100644
index 0000000..8a26daa
--- /dev/null
+++ b/src/main/resources/application-prod.yml
@@ -0,0 +1,74 @@
+spring:
+ jackson:
+ deserialization:
+ fail-on-unknown-properties: false
+ datasource:
+ mysql1:
+ jdbc-url: jdbc:mysql://18.143.76.3:3306/hwgold?serverTimezone=Asia/Shanghai&useSSL=false&useUnicode=true
+ username: hwgold
+ password: aDiw7MERSATdfGta
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ hikari:
+ pool-name: mysql1HikariCP
+ maximum-pool-size: 10
+ sqlserver1:
+ jdbc-url: jdbc:sqlserver://52.76.43.43:1433;databaseName=hwhcGold;encrypt=true;sslProtocol=TLSv1;trustServerCertificate=true;
+ username: hwhc_gold_query
+ password: hwhc_gold_query4564jkj
+ driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+
+ application:
+ name: demo
+ cache:
+ type: redis
+ redis:
+ time-to-live: 3600000
+ use-key-prefix: true
+ cache-null-values: true
+
+ servlet:
+ multipart:
+ enabled: true
+ max-file-size: 10MB
+ max-request-size: 10MB
+
+ data:
+ redis:
+ database: 2
+ host: 18.143.76.3
+ port: 6379
+ password: Ngc0FYUTA6h3wC5J
+
+ lettuce:
+ pool:
+ max-active: 20
+ max-wait: -1
+ max-idle: 5
+
+mybatis:
+ configuration:
+ mysql1:
+ map-underscore-to-camel-case: true
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+ sqlserver1:
+ map-underscore-to-camel-case: true
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+upload:
+ path: D:\upload
+
+file:
+ upload:
+ url: https://api.homilychart.com/hljw/api/aws/upload
+feishu:
+ webhook:
+ url: https://open.feishu.cn/open-apis/bot/v2/hook/1a515b19-b64f-46b7-9486-35842b9539fe
+
+
+
+server:
+ port: 10705
+
+ logging:
+ level:
+ org.springframework.jdbc.core.JdbcTemplate: DEBUG
+ org.springframework.orm.jpa: DEBUG
\ No newline at end of file
diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml
new file mode 100644
index 0000000..0789572
--- /dev/null
+++ b/src/main/resources/application-test.yml
@@ -0,0 +1,74 @@
+spring:
+ jackson:
+ deserialization:
+ fail-on-unknown-properties: false
+ datasource:
+ mysql1:
+ jdbc-url: jdbc:mysql://18.143.76.3:3306/hwgoldc?serverTimezone=Asia/Shanghai&useSSL=false&useUnicode=true
+ username: hwgoldc
+ password: zB48T55wCsHC8KPz
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ hikari:
+ pool-name: mysql1HikariCP
+ maximum-pool-size: 10
+ sqlserver1:
+ jdbc-url: jdbc:sqlserver://52.76.43.43:1433;databaseName=hwhcGold;encrypt=true;sslProtocol=TLSv1;trustServerCertificate=true;
+ username: hwhc_gold_query
+ password: hwhc_gold_query4564jkj
+ driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
+
+ application:
+ name: demo
+ cache:
+ type: redis
+ redis:
+ time-to-live: 3600000
+ use-key-prefix: true
+ cache-null-values: true
+
+ servlet:
+ multipart:
+ enabled: true
+ max-file-size: 10MB
+ max-request-size: 10MB
+
+ data:
+ redis:
+ database: 1
+ host: 18.143.76.3
+ port: 6379
+ password: Ngc0FYUTA6h3wC5J
+
+ lettuce:
+ pool:
+ max-active: 20
+ max-wait: -1
+ max-idle: 5
+
+mybatis:
+ configuration:
+ mysql1:
+ map-underscore-to-camel-case: true
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+ sqlserver1:
+ map-underscore-to-camel-case: true
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+upload:
+ path: D:\upload
+
+file:
+ upload:
+ url: http://39.101.133.168:8828/hljw/api/aws/upload
+feishu:
+ webhook:
+ url: https://open.feishu.cn/open-apis/bot/v2/hook/384c78aa-8df1-498b-9c47-04e890ed9877
+
+
+
+server:
+ port: 10704
+
+ logging:
+ level:
+ org.springframework.jdbc.core.JdbcTemplate: DEBUG
+ org.springframework.orm.jpa: DEBUG
\ No newline at end of file
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index b02b7e9..70ce708 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -1,4 +1,6 @@
spring:
+ profiles:
+ active: dev
jackson:
deserialization:
fail-on-unknown-properties: false
diff --git a/src/main/resources/mapper/GoldDetailMapper.xml b/src/main/resources/mapper/GoldDetailMapper.xml
index 018605a..140c4cf 100644
--- a/src/main/resources/mapper/GoldDetailMapper.xml
+++ b/src/main/resources/mapper/GoldDetailMapper.xml
@@ -24,7 +24,7 @@
and `ugr`.type = #{type}
-
+
AND user.market IN
#{markets}
@@ -59,7 +59,7 @@
and `ugr`.type = #{type}
-
+
AND user.market IN
#{market}
@@ -77,10 +77,10 @@
and jwcode = #{jwcode}
-
+
AND user.market IN
-
- #{markets}
+
+ #{market}
@@ -104,7 +104,7 @@
and jwcode = #{jwcode}
-
+
AND user.market IN
#{markets}