管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-10-31 be1c643d8e723dc717be2e4c1d8c329da648524b
src/main/java/com/lf/server/controller/all/BaseQueryController.java
@@ -6,6 +6,7 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lf.server.aspect.SysLog;
import com.lf.server.entity.all.ResponseMsg;
import com.lf.server.entity.ctrl.IdNameEntity;
import com.lf.server.helper.AesHelper;
import com.lf.server.helper.StringHelper;
import com.lf.server.mapper.all.BasicMapper;
@@ -118,14 +119,14 @@
    }
    @SysLog()
    @ApiOperation(value = "模糊搜索")
    @ApiOperation(value = "模糊搜索字段")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "映射名称", dataType = "String", paramType = "query", example = "dlgAgnp"),
            @ApiImplicitParam(name = "field", value = "字段", dataType = "String", paramType = "query", example = "name"),
            @ApiImplicitParam(name = "value", value = "值", dataType = "String", paramType = "query", example = "'县'")
    })
    @GetMapping(value = "/selectFuzzy")
    public ResponseMsg<List<String>> selectFuzzy(String name, String field, String value) {
    @GetMapping(value = "/selectFieldFuzzy")
    public ResponseMsg<List<String>> selectFieldFuzzy(String name, String field, String value) {
        try {
            BasicMapper baseMapper = baseQueryService.getBasicMapper(name);
            if (baseMapper == null) {
@@ -141,7 +142,39 @@
            }
            value = value == null ? StringHelper.getLikeStr("") : StringHelper.getLikeStr(value.replace("'", ""));
            List<String> rs = baseMapper.selectFuzzy(tab, field, value);
            List<String> rs = baseMapper.selectFieldFuzzy(tab, field, value);
            return success(rs);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
        }
    }
    @SysLog()
    @ApiOperation(value = "模糊搜索用户")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "用户名", dataType = "String", paramType = "query", example = "室")
    })
    @GetMapping(value = "/selectUserFuzzy")
    public ResponseMsg<List<IdNameEntity>> selectUserFuzzy(String name) {
        try {
            List<IdNameEntity> rs = baseQueryService.selectUserFuzzy(name);
            return success(rs);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
        }
    }
    @SysLog()
    @ApiOperation(value = "模糊搜索单位")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "单位名", dataType = "String", paramType = "query", example = "司")
    })
    @GetMapping(value = "/selectDepFuzzy")
    public ResponseMsg<List<IdNameEntity>> selectDepFuzzy(String name) {
        try {
            List<IdNameEntity> rs = baseQueryService.selectDepFuzzy(name);
            return success(rs);
        } catch (Exception ex) {