Showing
1 changed file
with
19 additions
and
1 deletions
@@ -89,8 +89,26 @@ public class JavaAppInfoCtrl { | @@ -89,8 +89,26 @@ public class JavaAppInfoCtrl { | ||
89 | 89 | ||
90 | @RequestMapping("/queryhis") | 90 | @RequestMapping("/queryhis") |
91 | @ResponseBody | 91 | @ResponseBody |
92 | - public BaseResponse getJavaApiStatusHis() { | 92 | + public BaseResponse getJavaApiStatusHis(@RequestParam(required = false, defaultValue = "0") int api_id, |
93 | + @RequestParam(required = false, defaultValue = "0") int mobj_id, | ||
94 | + @RequestParam(required = false, defaultValue = "0") long start_time, | ||
95 | + @RequestParam(required = false, defaultValue = "0") long end_time, | ||
96 | + @RequestParam(required = false, defaultValue = "0") int page) { | ||
93 | BaseResponse rep = new BaseResponse(); | 97 | BaseResponse rep = new BaseResponse(); |
98 | + if (start_time == 0) { | ||
99 | + return getJavaApiStatusHisLatest(api_id, mobj_id); | ||
100 | + } | ||
101 | + | ||
102 | + if (end_time == 0) | ||
103 | + end_time = System.currentTimeMillis(); | ||
104 | + | ||
105 | + try { | ||
106 | + List<JavaApiStatusRep> javaApiStatusRepList = javaApiStatusService.getJavaApiStatusHisByTime(api_id, mobj_id, start_time, end_time, page); | ||
107 | + rep.setData(javaApiStatusRepList); | ||
108 | + } catch (Exception e) { | ||
109 | + rep.setCode(400); | ||
110 | + rep.setMessage(e.getMessage()); | ||
111 | + } | ||
94 | 112 | ||
95 | return rep; | 113 | return rep; |
96 | } | 114 | } |
-
Please register or login to post a comment