北京经济技术开发区经开区虚拟城市项目-【后端】-服务,Poi,企业,地块等定制接口
13693261870
2023-10-06 e6c4ff41f4b65dd1d925215f3019164ad31021b4
src/main/java/com/smartearth/poiexcel/controller/EntController.java
@@ -130,6 +130,29 @@
        }
    }
    @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() {
@@ -141,7 +164,7 @@
            }
            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;