| | |
| | | import com.lf.server.aspect.SysLog; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.ctrl.IdNameEntity; |
| | | import com.lf.server.entity.data.DictEntity; |
| | | import com.lf.server.helper.AesHelper; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.mapper.all.BasicMapper; |
| | |
| | | if (StringHelper.isEmpty(field) || StringHelper.isSqlInjection(field)) { |
| | | return fail("查询字段不正确", null); |
| | | } |
| | | if (!StringHelper.isEmpty(value)) { |
| | | value = value.trim().replace("'", ""); |
| | | } |
| | | |
| | | value = value == null ? StringHelper.getLikeStr("") : StringHelper.getLikeStr(value.replace("'", "")); |
| | | value = StringHelper.getLikeStr2(value); |
| | | List<String> rs = baseMapper.selectFieldFuzzy(tab, field, value); |
| | | |
| | | return success(rs); |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "name", value = "用户名", dataType = "String", paramType = "query", example = "室") |
| | | }) |
| | | @GetMapping(value = "/selectFieldFuzzy") |
| | | @GetMapping(value = "/selectUserFuzzy") |
| | | public ResponseMsg<List<IdNameEntity>> selectUserFuzzy(String name) { |
| | | try { |
| | | List<IdNameEntity> rs = null; |
| | | List<IdNameEntity> rs = baseQueryService.selectUserFuzzy(name); |
| | | |
| | | return success(rs); |
| | | } catch (Exception ex) { |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "name", value = "单位名", dataType = "String", paramType = "query", example = "司") |
| | | }) |
| | | @GetMapping(value = "/selectFieldFuzzy") |
| | | @GetMapping(value = "/selectDepFuzzy") |
| | | public ResponseMsg<List<IdNameEntity>> selectDepFuzzy(String name) { |
| | | try { |
| | | List<IdNameEntity> rs = null; |
| | | List<IdNameEntity> rs = baseQueryService.selectDepFuzzy(name); |
| | | |
| | | return success(rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询所有表") |
| | | @GetMapping(value = "/selectTabs") |
| | | public ResponseMsg<List<DictEntity>> selectTabs() { |
| | | try { |
| | | List<DictEntity> list = baseQueryService.selectTabs(); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | } |