- 按 testapi.txt 的正式协议重写生产接口适配 - 将 pushConfig 调整为 POST + JSON 数组方式推送配置 - 将 pullConfig 调整为 GET + JSON 列表方式拉取配置 - 新增 login 接口适配,支持 token 获取与本地缓存 - 新增 prod_pull_ack 表、实体、仓储与服务,支持 ackSuc/ackFail 回传 - 在 ProdSyncCoordinator 中串联 pullConfig 成功/失败回执记录逻辑 - 为 Git -> PROD 链路增加最小增量推送能力,删除文件场景自动回退全量 - 扩展 WorkDirectoryService 与 FileTreeUtils,支持增量基线目录和选择性文件复制 - 更新 application.properties 与 application-prod-agent.properties 的生产接口配置项 - 重写 prod-api-v1.md,使接口文档与真实生产协议一致 - 补充 HTTP 层与主链路测试,覆盖 ack 参数回传和最小增量同步 - 保留 configContent 加解密逻辑为 TODO
43 lines
1.2 KiB
Java
43 lines
1.2 KiB
Java
package com.ftptool.sync.model;
|
|
|
|
import java.nio.file.Path;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* 生产 pull 接口返回结果在本地落盘后的封装对象。
|
|
*/
|
|
public class ProdPullResult {
|
|
|
|
/** 保存生产快照内容的目录。 */
|
|
private final Path contentDirectory;
|
|
/** 来源版本号,优先取服务端显式返回值。 */
|
|
private final String sourceVersion;
|
|
/** 响应体内容哈希。 */
|
|
private final String contentHash;
|
|
/** 本次 pull 返回的生产配置项 id 列表。 */
|
|
private final List<String> pulledConfigIds;
|
|
|
|
public ProdPullResult(Path contentDirectory, String sourceVersion, String contentHash, List<String> pulledConfigIds) {
|
|
this.contentDirectory = contentDirectory;
|
|
this.sourceVersion = sourceVersion;
|
|
this.contentHash = contentHash;
|
|
this.pulledConfigIds = pulledConfigIds;
|
|
}
|
|
|
|
public Path getContentDirectory() {
|
|
return contentDirectory;
|
|
}
|
|
|
|
public String getSourceVersion() {
|
|
return sourceVersion;
|
|
}
|
|
|
|
public String getContentHash() {
|
|
return contentHash;
|
|
}
|
|
|
|
public List<String> getPulledConfigIds() {
|
|
return pulledConfigIds;
|
|
}
|
|
}
|