|
|
@@ -22,6 +22,7 @@ import com.etotem.cfc.mapper.UserMapper;
|
|
|
import com.etotem.cfc.service.TaskStatsService;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
@@ -36,6 +37,7 @@ import java.util.Map;
|
|
|
import java.util.concurrent.CompletableFuture;
|
|
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
|
|
|
|
|
+@Slf4j
|
|
|
@Tag(name = "任务统计", description = "任务完成率分析")
|
|
|
@RestController
|
|
|
@RequestMapping("/api/stats")
|
|
|
@@ -111,7 +113,8 @@ public class StatsController {
|
|
|
data.put("pendingRefundCount", pendingRefundFuture.get());
|
|
|
data.put("recentTasks", recentTasksFuture.get());
|
|
|
} catch (Exception e) {
|
|
|
- return Result.error("获取仪表盘数据失败");
|
|
|
+ log.error("获取仪表盘数据失败", e);
|
|
|
+ return Result.error("获取仪表盘数据失败: " + e.getMessage());
|
|
|
}
|
|
|
|
|
|
return Result.success(data);
|