fix: 修复审批详情显示实际审批人和飞书消息emoji编码

1. 审批详情显示修复
   - 新增 ApprovalService::getDetail() 方法
   - 从 form_data 获取用户实际选择的审批人和抄送人
   - 返回每个节点的 actual_approvers 和 approver_statuses
   - 修复详情页显示默认审批人而非实际审批人的问题

2. 飞书消息emoji编码修复
   - 修复 content 字段格式:应为 card 对象JSON字符串,不是 {"card":{...}}
   - 使用 JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES
   - 新增 HttpClient::httpPostJson() 方法处理预编码字段
   - 修复消息发送错误码 200621

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-03-01 10:02:53 +08:00
parent 8403d24be3
commit 3ebbbefb8d
4 changed files with 209 additions and 12 deletions
@@ -60,10 +60,12 @@ class ApprovalController extends BaseController
{
$id = (int) $this->getRouteParam($request, 'id');
$approval = ApprovalOrder::with(['flow.nodes', 'applicant', 'records.approver'])
->findOrFail($id);
return $this->success($approval);
try {
$detail = $this->service->getDetail($id);
return $this->success($detail);
} catch (\Exception $e) {
return $this->error($e->getMessage());
}
}
/**