| | |
| | | @Resource |
| | | PathHelper pathHelper; |
| | | |
| | | @ApiOperation(value = "测试查询") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "seconds", value = "秒", dataType = "Integer", paramType = "query", example = "30") |
| | | }) |
| | | @GetMapping(value = "/selectForTest") |
| | | public ResponseMsg<Object> selectForTest(Integer seconds) { |
| | | try { |
| | | if (null == seconds || seconds < 1) { |
| | | seconds = 1; |
| | | } |
| | | |
| | | String str = publishService.selectForTest(seconds); |
| | | |
| | | return success(str); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "分页查询元数据") |
| | | @ApiImplicitParams({ |
| | |
| | | |
| | | return msg.getCount(); |
| | | } |
| | | |
| | | /** |
| | | * 测试查询 |
| | | */ |
| | | public String selectForTest(Integer seconds) { |
| | | String str = RestHelper.get(exportServer + "/TB/Wait?seconds=" + seconds); |
| | | if (StringHelper.isEmpty(str)) { |
| | | return null; |
| | | } |
| | | |
| | | ResponseMsg<String> msg = JSON.parseObject(str, ResponseMsg.class); |
| | | if (msg == null || msg.getCode() != StaticData.TWO_HUNDRED) { |
| | | return null; |
| | | } |
| | | |
| | | return msg.getResult(); |
| | | } |
| | | } |