数据返回
This commit is contained in:
parent
d8be530787
commit
d14002251f
@ -26,7 +26,29 @@ public class CustomerDashboardDailyCapabilityHandler implements AgentCapabilityH
|
||||
|
||||
@Override
|
||||
public AgentCapabilityResponse handle(AgentRequestContext context) {
|
||||
WecomStudentContactStats stats = studentContactStatsService.fetchTodayStats();
|
||||
WecomStudentContactStats stats;
|
||||
try {
|
||||
stats = studentContactStatsService.fetchTodayStats();
|
||||
} catch (Exception e) {
|
||||
return new AgentCapabilityResponse(
|
||||
intent().code(),
|
||||
intent().title(),
|
||||
intent().mcpGroup(),
|
||||
"degraded",
|
||||
"""
|
||||
学员联系数据暂时无法获取,不影响身份信息查询。
|
||||
|
||||
学员总数:暂未获取
|
||||
今日新增:暂未获取
|
||||
跟进成员数:暂未获取
|
||||
今日收款:暂未接入
|
||||
""".trim(),
|
||||
List.of("企业微信学员联系 API"),
|
||||
Map.of("error", e.getMessage() == null ? "api forbidden" : e.getMessage()),
|
||||
Instant.now()
|
||||
);
|
||||
}
|
||||
|
||||
return new AgentCapabilityResponse(
|
||||
intent().code(),
|
||||
intent().title(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user