|
@@ -126,4 +126,81 @@ public class LogController {
|
|
|
|
|
|
return msgResult;
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value="车辆日志列表")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "userId",value = "用户编号", paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "url",value = "url", paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "remoteIP",value = "远程IP", paramType="form"),
|
|
|
+ @ApiImplicitParam(name = "startTime",value = "开始时间", paramType="form"),
|
|
|
+ @ApiImplicitParam(name = "endTime",value = "结束时间", paramType="form"),
|
|
|
+ @ApiImplicitParam(name = "elapseMin",value = "耗时大于(毫秒)", paramType="form"),
|
|
|
+ @ApiImplicitParam(name = "elapseMax",value = "耗时小于(毫秒)", paramType="form"),
|
|
|
+ @ApiImplicitParam(name = "pointcut",value = "切入口", paramType="form"),
|
|
|
+ @ApiImplicitParam(name = "remoteIP",value = "远程IP", paramType="form"),
|
|
|
+ @ApiImplicitParam(name = "remark",value = "备注", paramType="form")
|
|
|
+ })
|
|
|
+ @RequestMapping(value = "busList",method = RequestMethod.POST)
|
|
|
+ public MessageResult<Map> busList(
|
|
|
+ String userId,
|
|
|
+ String url,
|
|
|
+ String remoteIP,
|
|
|
+ Long elapseMin,
|
|
|
+ Long elapseMax,
|
|
|
+ String pointcut,
|
|
|
+ String remark,
|
|
|
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") Date startTime,
|
|
|
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") Date endTime,
|
|
|
+ @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
|
+ @RequestParam(value="pageSize",defaultValue="20") int pageSize){
|
|
|
+ MessageResult<Map> msgResult = new MessageResult<>();
|
|
|
+
|
|
|
+ Map<String,Object> searchParams = new HashMap<>();
|
|
|
+
|
|
|
+ List<Sort> sortList = new ArrayList<>();
|
|
|
+ sortList.add(new Sort("create_time","desc"));
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(userId)) {
|
|
|
+ searchParams.put("userId",userId);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(url)) {
|
|
|
+ searchParams.put("url",url + "%");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(remoteIP)) {
|
|
|
+ searchParams.put("remoteIP",remoteIP + "%");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(pointcut)) {
|
|
|
+ searchParams.put("pointcut",pointcut + "%");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (startTime!=null) {
|
|
|
+ searchParams.put("startTime",startTime);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (endTime!=null) {
|
|
|
+ searchParams.put("endTime",endTime);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (elapseMin!=null){
|
|
|
+ searchParams.put("elapseMin",elapseMin);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (elapseMax!=null){
|
|
|
+ searchParams.put("elapseMax",elapseMax);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(remark)) {
|
|
|
+ searchParams.put("remark","%" + remark + "%");
|
|
|
+ }
|
|
|
+
|
|
|
+ Page<SysLog> page = sysLogService.pageSearch(searchParams,pageIndex,pageSize,sortList);
|
|
|
+
|
|
|
+ msgResult.setResult(true);
|
|
|
+ msgResult.setData(PojoUtils.pageWrapper(page));
|
|
|
+
|
|
|
+ return msgResult;
|
|
|
+ }
|
|
|
}
|