package jnpf.onlyoffice; import jnpf.base.ActionResult; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; /** ELN 记录修订与 OnlyOffice 编辑/保存之间的内部互斥契约。 */ @FeignClient(name = "jnpf-biz-common", path = "/Internal/onlyoffice/record-revision", contextId = "recordRevisionFenceApi") public interface RecordRevisionFenceApi { @PostMapping("/acquire") ActionResult acquire(@RequestParam("tenantId") String tenantId, @RequestParam("recordId") String recordId, @RequestParam("fileId") String fileId, @RequestParam("fileType") String fileType); /** 用调用方操作码幂等获取短时冻结 lease,网络响应丢失时可安全重试。 */ @PostMapping("/acquire-for-operation") ActionResult acquireForOperation(@RequestParam("tenantId") String tenantId, @RequestParam("recordId") String recordId, @RequestParam("fileId") String fileId, @RequestParam("fileType") String fileType, @RequestParam("operationCode") String operationCode); @PostMapping("/complete") ActionResult complete(@RequestParam("tenantId") String tenantId, @RequestParam("recordId") String recordId, @RequestParam("fileId") String fileId, @RequestParam("fileType") String fileType, @RequestParam("token") String token); @PostMapping("/release") ActionResult release(@RequestParam("tenantId") String tenantId, @RequestParam("recordId") String recordId, @RequestParam("fileId") String fileId, @RequestParam("fileType") String fileType, @RequestParam("token") String token); /** 释放短时 fence,并推进文档 key,避免重新打开时命中更新前的文档缓存。 */ @PostMapping("/release-after-document-update") ActionResult releaseAfterDocumentUpdate( @RequestParam("tenantId") String tenantId, @RequestParam("recordId") String recordId, @RequestParam("fileId") String fileId, @RequestParam("fileType") String fileType, @RequestParam("token") String token); }