配置迁移到数据库表里
This commit is contained in:
14
scripts/Check.java
Normal file
14
scripts/Check.java
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import java.sql.*;
|
||||||
|
public class Check {
|
||||||
|
public static void main(String[] a) throws Exception {
|
||||||
|
Class.forName("com.mysql.cj.jdbc.Driver");
|
||||||
|
try (Connection c = DriverManager.getConnection(
|
||||||
|
"jdbc:mysql://101.35.52.237:13319/ai_smart_ee?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true",
|
||||||
|
"root", "cstcom.123!")) {
|
||||||
|
try (Statement s = c.createStatement();
|
||||||
|
ResultSet r = s.executeQuery("SHOW COLUMNS FROM lb_third_integration_config WHERE Field IN ('cookie','phpsid','goods_api_token','goods_api_app_str','cookie_cipher')")) {
|
||||||
|
while (r.next()) System.out.println(r.getString("Field") + " " + r.getString("Type"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
scripts/MigrateLbThirdIntegrationPlaintext.class
Normal file
BIN
scripts/MigrateLbThirdIntegrationPlaintext.class
Normal file
Binary file not shown.
11
src/main/java/com/rj/dto/hxr/HxrAdminOrderApiContext.java
Normal file
11
src/main/java/com/rj/dto/hxr/HxrAdminOrderApiContext.java
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
package com.rj.dto.hxr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调用 hxrd 后台订单 API 所需的运行时配置(由 {@code lb_third_integration_config} 解析而来)。
|
||||||
|
*/
|
||||||
|
public record HxrAdminOrderApiContext(
|
||||||
|
String orderSelectBaseUrl,
|
||||||
|
int pageLimit,
|
||||||
|
String cookieHeader,
|
||||||
|
String referer) {
|
||||||
|
}
|
||||||
11
src/main/java/com/rj/dto/hxr/HxrAdminUserApiContext.java
Normal file
11
src/main/java/com/rj/dto/hxr/HxrAdminUserApiContext.java
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
package com.rj.dto.hxr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 调用 hxrd 后台用户 API 所需的运行时配置(由 {@code lb_third_integration_config} 解析而来)。
|
||||||
|
*/
|
||||||
|
public record HxrAdminUserApiContext(
|
||||||
|
String userSelectBaseUrl,
|
||||||
|
int pageLimit,
|
||||||
|
String cookieHeader,
|
||||||
|
String referer) {
|
||||||
|
}
|
||||||
12
src/main/sql/lb_third_integration_config_alter_plaintext.sql
Normal file
12
src/main/sql/lb_third_integration_config_alter_plaintext.sql
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
-- =============================================================================
|
||||||
|
-- 升级脚本:lb_third_integration_config 凭证列由密文 VARBINARY 改为明文 VARCHAR
|
||||||
|
-- 注意:原加密数据无法自动还原,执行后需重新录入凭证
|
||||||
|
-- =============================================================================
|
||||||
|
|
||||||
|
SET NAMES utf8mb4;
|
||||||
|
|
||||||
|
ALTER TABLE `lb_third_integration_config`
|
||||||
|
CHANGE COLUMN `cookie_cipher` `cookie` VARCHAR(1024) DEFAULT NULL COMMENT '完整 Cookie 明文(优先使用)',
|
||||||
|
CHANGE COLUMN `phpsid_cipher` `phpsid` VARCHAR(512) DEFAULT NULL COMMENT 'PHPSID 值明文',
|
||||||
|
CHANGE COLUMN `goods_api_token_cipher` `goods_api_token` VARCHAR(512) DEFAULT NULL COMMENT '货品/抢购 token 明文',
|
||||||
|
CHANGE COLUMN `goods_api_app_str_cipher` `goods_api_app_str` VARCHAR(512) DEFAULT NULL COMMENT '签名密钥 appStr 明文';
|
||||||
Reference in New Issue
Block a user