管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2024-12-18 0c8cd957630d43aa71183d34ecb1faf60689f8a4
src/main/java/com/lf/server/controller/data/DictController.java
@@ -3,7 +3,7 @@
import com.lf.server.annotation.SysLog;
import com.lf.server.controller.all.BaseController;
import com.lf.server.entity.all.ResponseMsg;
import com.lf.server.entity.ctrl.KeyValueEntity;
import com.lf.server.entity.ctrl.TabEntity;
import com.lf.server.entity.data.DictEntity;
import com.lf.server.entity.sys.UserEntity;
import com.lf.server.service.data.DictService;
@@ -45,7 +45,7 @@
            return success(count);
        } catch (Exception ex) {
            return fail(ex.getMessage(), -1);
            return fail(ex, -1);
        }
    }
@@ -68,7 +68,7 @@
            return success(rs);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
            return fail(ex, null);
        }
    }
@@ -96,20 +96,7 @@
            return success(count, rs);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
        }
    }
    @SysLog()
    @ApiOperation(value = "查询所有")
    @GetMapping(value = "/selectAll")
    public ResponseMsg<List<DictEntity>> selectAll() {
        try {
            List<DictEntity> list = dictService.selectAll();
            return success(list);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
            return fail(ex, null);
        }
    }
@@ -125,20 +112,24 @@
            return success(entity);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
            return fail(ex, null);
        }
    }
    @SysLog()
    @ApiOperation(value = "查询字典表结构")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", example = "点"),
            @ApiImplicitParam(name = "hasGeom", value = "含有Geom字段", dataType = "Boolean", paramType = "query", example = "false")
    })
    @GetMapping(value = "/selectDictTab")
    public ResponseMsg<List<KeyValueEntity>> selectDictTab() {
    public ResponseMsg<List<TabEntity>> selectDictTab(String name, Boolean hasGeom) {
        try {
            List<KeyValueEntity> list = dictService.selectDictTab();
            List<TabEntity> list = dictService.selectDictTab(name, null == hasGeom || !hasGeom ? "gid" : "geom");
            return success(list);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
            return fail(ex, null);
        }
    }
@@ -159,7 +150,7 @@
            return success(count);
        } catch (Exception ex) {
            return fail(ex.getMessage(), -1);
            return fail(ex, -1);
        }
    }
@@ -182,7 +173,7 @@
            return success(count);
        } catch (Exception ex) {
            return fail(ex.getMessage(), -1);
            return fail(ex, -1);
        }
    }
@@ -198,7 +189,7 @@
            return success(count);
        } catch (Exception ex) {
            return fail(ex.getMessage(), -1);
            return fail(ex, -1);
        }
    }
@@ -218,7 +209,7 @@
            return success(count);
        } catch (Exception ex) {
            return fail(ex.getMessage(), -1);
            return fail(ex, -1);
        }
    }
@@ -240,7 +231,7 @@
            return success(count);
        } catch (Exception ex) {
            return fail(ex.getMessage(), -1);
            return fail(ex, -1);
        }
    }
@@ -264,7 +255,7 @@
            return success(count);
        } catch (Exception ex) {
            return fail(ex.getMessage(), -1);
            return fail(ex, -1);
        }
    }
}