@Test public void testList1() { LideaLogReq req = new LideaLogReq(); req.setAppName("cabinet-base-server"); req.setServiceName("com.fcbox.edms.terminal.api.CabinetServiceFacade"); req.setMethodName("getCabinetInfo"); req.setFrom(1565057370000L); req.setTo(1565057370000L); req.setSize(100); LideaLogErrorDetailResp resp = lideaLogService.listError(req); System.out.println("=========================================================================================="); System.out.println(JSON.toJSONString(resp)); }
public LideaLogErrorDetailResp listError(LideaLogReq req) { LideaLogResp traceResp = null; if (req.getFrom() == req.getTo()) { traceResp = lideaLogDAO.get(req); } else { traceResp = lideaLogDAO.scan(req); } List<String> traceIds = traceResp.getData().stream().flatMap(m -> Arrays.stream(m.getTraceIds().split(","))).collect(Collectors.toList()); List<LideaLogErrorDetailBO> datas = lideaLogErrorDAO.list(traceIds); LideaLogErrorDetailResp resp = new LideaLogErrorDetailResp(); resp.setAppName(req.getAppName()); resp.setServiceName(req.getServiceName()); resp.setMethodName(req.getMethodName()); resp.setData(datas); return resp; }
LideaLogService { public LideaLogErrorDetailResp listError(LideaLogReq req) { LideaLogResp traceResp = null; if (req.getFrom() == req.getTo()) { traceResp = lideaLogDAO.get(req); } else { traceResp = lideaLogDAO.scan(req); } List<String> traceIds = traceResp.getData().stream().flatMap(m -> Arrays.stream(m.getTraceIds().split(","))).collect(Collectors.toList()); List<LideaLogErrorDetailBO> datas = lideaLogErrorDAO.list(traceIds); LideaLogErrorDetailResp resp = new LideaLogErrorDetailResp(); resp.setAppName(req.getAppName()); resp.setServiceName(req.getServiceName()); resp.setMethodName(req.getMethodName()); resp.setData(datas); return resp; } }
LideaLogService { public LideaLogErrorDetailResp listError(LideaLogReq req) { LideaLogResp traceResp = null; if (req.getFrom() == req.getTo()) { traceResp = lideaLogDAO.get(req); } else { traceResp = lideaLogDAO.scan(req); } List<String> traceIds = traceResp.getData().stream().flatMap(m -> Arrays.stream(m.getTraceIds().split(","))).collect(Collectors.toList()); List<LideaLogErrorDetailBO> datas = lideaLogErrorDAO.list(traceIds); LideaLogErrorDetailResp resp = new LideaLogErrorDetailResp(); resp.setAppName(req.getAppName()); resp.setServiceName(req.getServiceName()); resp.setMethodName(req.getMethodName()); resp.setData(datas); return resp; }  }
LideaLogService { public LideaLogErrorDetailResp listError(LideaLogReq req) { LideaLogResp traceResp = null; if (req.getFrom() == req.getTo()) { traceResp = lideaLogDAO.get(req); } else { traceResp = lideaLogDAO.scan(req); } List<String> traceIds = traceResp.getData().stream().flatMap(m -> Arrays.stream(m.getTraceIds().split(","))).collect(Collectors.toList()); List<LideaLogErrorDetailBO> datas = lideaLogErrorDAO.list(traceIds); LideaLogErrorDetailResp resp = new LideaLogErrorDetailResp(); resp.setAppName(req.getAppName()); resp.setServiceName(req.getServiceName()); resp.setMethodName(req.getMethodName()); resp.setData(datas); return resp; }  LideaLogErrorDetailResp listError(LideaLogReq req); LideaAppResp listApps(); LideaServiceResp listServices(LideaServiceReq req); LideaMethodResp listMethods(LideaMethodReq req); LideaLogResp listAccess(LideaLogReq req); }
LideaLogService { public LideaLogErrorDetailResp listError(LideaLogReq req) { LideaLogResp traceResp = null; if (req.getFrom() == req.getTo()) { traceResp = lideaLogDAO.get(req); } else { traceResp = lideaLogDAO.scan(req); } List<String> traceIds = traceResp.getData().stream().flatMap(m -> Arrays.stream(m.getTraceIds().split(","))).collect(Collectors.toList()); List<LideaLogErrorDetailBO> datas = lideaLogErrorDAO.list(traceIds); LideaLogErrorDetailResp resp = new LideaLogErrorDetailResp(); resp.setAppName(req.getAppName()); resp.setServiceName(req.getServiceName()); resp.setMethodName(req.getMethodName()); resp.setData(datas); return resp; }  LideaLogErrorDetailResp listError(LideaLogReq req); LideaAppResp listApps(); LideaServiceResp listServices(LideaServiceReq req); LideaMethodResp listMethods(LideaMethodReq req); LideaLogResp listAccess(LideaLogReq req);  }