Browse Source

7.19后端完毕

huangqizheng/feature-20250719105717-后端完毕
huangqizhen 4 weeks ago
parent
commit
8d19f81ffb
  1. 6
      src/main/java/com/example/demo/Util/FeiShuAlertUtil.java
  2. 72
      src/main/resources/application-dev.yml
  3. 74
      src/main/resources/application-prod.yml
  4. 74
      src/main/resources/application-test.yml
  5. 2
      src/main/resources/application.yml
  6. 12
      src/main/resources/mapper/GoldDetailMapper.xml

6
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 {

72
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

74
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

74
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

2
src/main/resources/application.yml

@ -1,4 +1,6 @@
spring:
profiles:
active: dev
jackson:
deserialization:
fail-on-unknown-properties: false

12
src/main/resources/mapper/GoldDetailMapper.xml

@ -24,7 +24,7 @@
<if test="type != null">
and `ugr`.type = #{type}
</if>
<if test="markets!= null">
<if test="markets!= null and markets.size > 0">
AND user.market IN
<foreach collection="markets" item="markets" open="(" separator="," close=")">
#{markets}
@ -59,7 +59,7 @@
<if test="type != null">
and `ugr`.type = #{type}
</if>
<if test="markets != null">
<if test="markets!= null and markets.size > 0">
AND user.market IN
<foreach collection="markets" item="markets" open="(" separator="," close=")">
#{market}
@ -77,10 +77,10 @@
<if test="jwcode != null">
and jwcode = #{jwcode}
</if>
<if test="markets != null">
<if test="markets != null and markets.size > 0">
AND user.market IN
<foreach collection="markets" item="markets" open="(" separator="," close=")">
#{markets}
<foreach collection="markets" item="market" open="(" separator="," close=")">
#{market}
</foreach>
</if>
</where>
@ -104,7 +104,7 @@
<if test="jwcode != null ">
and jwcode = #{jwcode}
</if>
<if test="markets != null">
<if test="markets!= null and markets.size > 0">
AND user.market IN
<foreach collection="markets" item="markets" open="(" separator="," close=")">
#{markets}

Loading…
Cancel
Save