模版编制相关实现

This commit is contained in:
潘荣晟
2025-09-26 17:13:10 +08:00
parent abf9607c43
commit fa7c08a493
3 changed files with 20 additions and 21 deletions

View File

@@ -31,9 +31,9 @@ public class OnlyOfficeCallbackController {
@PostMapping("/callback/{id}")
@PermitAll
@TenantIgnore
public ResponseEntity<Map<String, Integer>> handleCallback(@RequestBody OnlyOfficeCallback callback, @PathVariable String id) {
public ResponseEntity<Map<String, Integer>> handleCallback(@RequestBody OnlyOfficeCallback callback, @PathVariable String id,@RequestParam("fileName") String fileName) {
// 处理回调逻辑
callbackService.processCallback(callback,id);
callbackService.processCallback(callback,id,fileName);
// 返回必须的响应否则OnlyOffice会显示错误
Map<String, Integer> response = new HashMap<>();
response.put("error", 0);

View File

@@ -8,5 +8,5 @@ public interface OnlyOfficeCallbackService {
* 处理OnlyOffice回调
* @param callback 回调数据
*/
void processCallback(OnlyOfficeCallback callback,String id);
void processCallback(OnlyOfficeCallback callback,String id,String fileName);
}