配置迁移到数据库表里

This commit is contained in:
2026-05-30 23:32:23 +08:00
parent bf685417e7
commit 8aa1a619b9
13 changed files with 423 additions and 145 deletions

View File

@@ -97,7 +97,8 @@ public class LbOrderRowController {
@PostMapping("/sync-order-from-third")
@Operation(
summary = "从 外部系统 同步订单",
description = "按购买时间区间、租户 id、转卖状态调用后台 order/select将结果写入 lb_order_row按 tenant_id + 订单 id upsert")
description = "按购买时间区间、租户 id、转卖状态调用后台 order/select将结果写入 lb_order_row按 tenant_id + 订单 id upsert"
+ "cookie、URL、Referer 等从 lb_third_integration_config 按 tenantId 读取")
public ResponseEntity<Map<String, Object>> syncFromHxr(
@Parameter(description = "同步条件", required = true) @RequestBody LbOrderRowSyncFromHxrRequest request) {
Map<String, Object> result =

View File

@@ -28,7 +28,7 @@ public class LbThirdIntegrationConfigController {
@PostMapping("/add")
@Operation(summary = "新增")
public ResponseEntity<Map<String, Object>> add(
@Parameter(description = "配置实体(凭证请传 *Plain 明文字段)", required = true)
@Parameter(description = "配置实体(凭证请传 cookie、phpsid、goodsApiToken、goodsApiAppStr 明文字段)", required = true)
@RequestBody LbThirdIntegrationConfig entity) {
Map<String, Object> result = lbThirdIntegrationConfigService.add(entity);
Boolean success = (Boolean) result.get("success");
@@ -41,7 +41,7 @@ public class LbThirdIntegrationConfigController {
@PutMapping("/update")
@Operation(summary = "更新")
public ResponseEntity<Map<String, Object>> update(
@Parameter(description = "配置实体(仅传需修改字段;凭证 *Plain 非空时才轮换", required = true)
@Parameter(description = "配置实体(仅传需修改字段;凭证字段非空时才更新", required = true)
@RequestBody LbThirdIntegrationConfig entity) {
Map<String, Object> result = lbThirdIntegrationConfigService.update(entity);
Boolean success = (Boolean) result.get("success");
@@ -97,8 +97,8 @@ public class LbThirdIntegrationConfigController {
@GetMapping("/credential/{tenantId}")
@Operation(
summary = "查询租户凭证(含明文)",
description = "按 tenantId 解密返回 cookie、phpsid、goodsApiToken、goodsApiAppStr 明文,便于管理查看")
summary = "查询租户凭证",
description = "按 tenantId 返回 cookie、phpsid、goodsApiToken、goodsApiAppStr 明文")
public ResponseEntity<Map<String, Object>> getCredentialStatus(
@Parameter(description = "租户 id", required = true) @PathVariable String tenantId) {
Map<String, Object> result = lbThirdIntegrationConfigService.getCredentialStatusByTenantId(tenantId);
@@ -117,8 +117,8 @@ public class LbThirdIntegrationConfigController {
summary = "更新租户凭证",
description =
"仅更新 cookie/phpsid/goodsApiToken/goodsApiAppStr 凭证列;"
+ "传明文则加密入库并 credential_version+1"
+ "传 clear* 为 true 则清除对应密文;至少操作一项")
+ "传明文则直接入库并 credential_version+1"
+ "传 clear* 为 true 则清除对应凭证;至少操作一项")
public ResponseEntity<Map<String, Object>> updateCredential(
@Parameter(description = "租户 id", required = true) @PathVariable String tenantId,
@Parameter(description = "凭证更新请求", required = true)

View File

@@ -124,8 +124,8 @@ public class LbUserController {
@Operation(
summary = "从 hxrd 后台同步用户",
description =
"分页调用 /app/admin/user/select(每页 limit=90,将 data 解析为 LbUser 后立即 upsert 到 lb_user"
+ "需配置 hxr.admin.cookie 或 phpsid")
"分页调用 /app/admin/user/select将 data 解析为 LbUser 后立即 upsert 到 lb_user"
+ "cookie、URL、Referer 等从 lb_third_integration_config 按 tenantId 读取")
public ResponseEntity<Map<String, Object>> syncFromHxr(
@Parameter(description = "租户 id", required = true) @RequestParam String tenantId) {
Map<String, Object> result = lbUserService.syncFromHxrAdmin(tenantId);