| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "Integer", paramType = "query", example = "10"), |
| | | @ApiImplicitParam(name = "pageIndex", value = "分页数(从1开始)", dataType = "Integer", paramType = "query", example = "1") |
| | | }) |
| | | @GetMapping(value = "/selectByPage") |
| | | public ResponseMsg<Object> selectByPage(Integer pageSize, Integer pageIndex) { |
| | | try { |
| | | if (null == pageSize || pageSize < 1) { |
| | | pageSize = 10; |
| | | } |
| | | if (null == pageIndex || pageIndex < 1) { |
| | | pageIndex = 1; |
| | | } |
| | | int count = qiYeMapper.selectCount(); |
| | | List<EntEntity> list = qiYeMapper.selectByPage(pageSize, StaticData.I100 * (pageIndex - 1)); |
| | | |
| | | return success(count, list); |
| | | } catch (Exception ex) { |
| | | return fail(ex, -1); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "批量更新企业坐标") |
| | | @GetMapping({"/updateCoords"}) |
| | | public ResponseMsg<Object> updateCoords() { |
| | |
| | | } |
| | | |
| | | int pages = (count - 1) / StaticData.I100 + 1; |
| | | for (int i = 0; i < pages; i++) { |
| | | for (int i = 1; i <= pages; i++) { |
| | | List<EntEntity> list = qiYeMapper.selectByPage(StaticData.I100, StaticData.I100 * (i - 1)); |
| | | if (null == list || list.isEmpty()) { |
| | | continue; |