| | |
| | | WebHelper.writeInfo(HttpStatus.ERROR, ex.getMessage(), res); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "请求实体数据下载") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "name", value = "映射名称", dataType = "String", paramType = "query", example = "dlgagnp"), |
| | | @ApiImplicitParam(name = "filter", value = "过滤条件", dataType = "String", paramType = "query", example = "gid >= 50 and name like '县' and objectid < 5000.0"), |
| | | @ApiImplicitParam(name = "pwd", value = "密码", dataType = "String", paramType = "query", example = "") |
| | | }) |
| | | @GetMapping(value = "/downloadEntityReq") |
| | | public ResponseMsg<Object> downloadEntityReq(String name, String filter, String pwd, HttpServletRequest req, HttpServletResponse res) { |
| | | try { |
| | | if (StringHelper.isEmpty(pwd)) { |
| | | return fail("密码不能为空"); |
| | | } |
| | | pwd = RsaHelper.decrypt(pwd); |
| | | if (StringHelper.isPwdInvalid(pwd)) { |
| | | return fail("密码不符合要求"); |
| | | } |
| | | |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | String guid = dataLibService.zipDbData(ue, name, filter, pwd); |
| | | |
| | | return success(guid); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | } |