Commit d0ce8a1f authored by Quxl's avatar Quxl

x

parent 4914e2e0
......@@ -11,4 +11,6 @@ public interface LogService {
void saveErrorLog(Throwable ex);
List<Map<String, Object>> queryErrorList(Page page);
}
......@@ -62,4 +62,9 @@ public class LogServiceImpl implements LogService {
return stack;
}
@Override
public List<Map<String, Object>> queryErrorList(Page page) {
return jdbcTemplate.limit("select * from fc_logs_error", page);
}
}
......@@ -43,4 +43,20 @@ public class AdminLogController {
return Rjx.jsonOk().setData(list).setPage(page);
}
@ResponseBody
@PostMapping("getErrorList")
@ApiOperation("查询日志")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="long", required=false, name="index", value="分页编号"),
@ApiImplicitParam(paramType="query", dataType="long", required=false, name="limit", value="分页大小"),
@ApiImplicitParam(paramType="query", dataType="string", required=false, name="limitKey", value="排序"),
})
public Object getErrorList(String[] limitKey, Long index, Long limit) {
index = index == null ? 1 : index;
limit = limit == null ? 20 : limit;
Page page = new Page(index, limit, limitKey == null || limitKey.length == 0 ? new String[] {"id desc"} : limitKey);
List<Map<String, Object>> list = service.queryErrorList(page);
return Rjx.jsonOk().setData(list).setPage(page);
}
}
......@@ -30,7 +30,6 @@ import sun.misc.BASE64Encoder;
* 视频点播OpenAPI调用示例
* 以GetVideoPlayAuth接口为例,其他接口请替换相应接口名称及私有参数
*/
@SuppressWarnings("restriction")
public class AliyunSign {
//账号AK信息请填写(必选)
private static String access_key_id = "LTAIOtHCCpDLXYp8";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment