feat (farm): 设备商接口重构

- 设备厂接口 - 吉水两山 代码临时性解决现场问题
This commit is contained in:
达富斌
2025-09-29 16:06:51 +08:00
parent b28b1463f7
commit e7cf08ff2e
28 changed files with 456 additions and 187 deletions

View File

@@ -47,22 +47,22 @@ spring:
primary: master
datasource:
master:
url: jdbc:mysql://223.83.129.121:3360/farming-platform?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
username: farming-platform
password: wCM7fBMhFP3zNdJ3
url: ${mysql.url}
username: ${mysql.username}
password: ${mysql.password}
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度
url: jdbc:mysql://223.83.129.121:3360/farming-platform?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
username: farming-platform
password: wCM7fBMhFP3zNdJ3
url: ${mysql.url}
username: ${mysql.username}
password: ${mysql.password}
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data:
redis:
host: 223.83.152.93 # 地址
port: 65532 # 端口
database: 5 # 数据库索引
password: luxifa970219 # 密码,建议生产环境开启
host: ${redis.host}
port: ${redis.port}
database: ${redis.database}
password: ${redis.password}
mongodb:
uri: mongodb://mongo_BiKBdR:mongo_KaShrX@223.83.129.121:27017/farming-platform-iot?authSource=farming-platform-iot
auto-index-creation: true
@@ -154,16 +154,16 @@ logging:
wx: # 参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档
mp:
# 公众号配置(必填)
app-id: wxde87f69bb4a2cf5c
secret: a5e114df50a86c2578af255adba1c3e7
app-id: ${wm.wx.mp.app-id}
secret: ${wm.wx.mp.secret}
# 存储配置,解决 AccessToken 的跨节点的共享
config-storage:
type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
key-prefix: wx # Redis Key 的前缀
http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
miniapp: # 小程序配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-miniapp-spring-boot-starter/README.md 文档
appid: wxde87f69bb4a2cf5c
secret: a5e114df50a86c2578af255adba1c3e7
appid: ${wm.wx.miniapp.app-id}
secret: ${wm.wx.miniapp.secret}
config-storage:
type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
key-prefix: wa # Redis Key 的前缀

View File

@@ -4,7 +4,9 @@ spring:
profiles:
active: dev
config:
import:
- classpath:db.properties
main:
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
@@ -349,7 +351,7 @@ wms:
device-manager:
# 四情 (文档来源: 物连网农业四情采集api协议.pdf 版本:v2.0.3 日期:2022.08.16)
four-situations:
hosts: http://farm.0531yun.cn/#/ # http://farm.0531yun.cn/#/
hosts: http://api.farm.0531yun.cn # http://farm.0531yun.cn/#/
username: cq250904jxtr
password: cq250904jxtr
global:

View File

@@ -0,0 +1,31 @@
# local
#mysql.url=jdbc:mysql://223.83.129.121:3360/farming-platform?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
#mysql.username=farming-platform
#mysql.password=wCM7fBMhFP3zNdJ3
#
#redis.host=223.83.152.93
#redis.port=65532
#redis.database=5
#redis.password=luxifa970219
#
#wm.wx.mp.app-id=wxde87f69bb4a2cf5c
#wm.wx.mp.secret=a5e114df50a86c2578af255adba1c3e7
#wm.wx.miniapp.app-id=wxde87f69bb4a2cf5c
#wm.wx.miniapp.secret=a5e114df50a86c2578af255adba1c3e7
# ????
mysql.url=jdbc:mysql://rm-bp10c7f0fou5efc95fo.mysql.rds.aliyuncs.com:3306/farming-platform?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
mysql.username=root
mysql.password=Jsnm2025
redis.host=r-bp14zubs85fmfuhnw7pd.redis.rds.aliyuncs.com
redis.port=6379
redis.database=1
redis.password=m&wRPVcyy7Gl
wm.wx.mp.app-id=wxde87f69bb4a2cf5c
wm.wx.mp.secret=a5e114df50a86c2578af255adba1c3e7
wm.wx.miniapp.app-id=wxde87f69bb4a2cf5c
wm.wx.miniapp.secret=a5e114df50a86c2578af255adba1c3e7