From 72a051ca86ba2377e503c4985b7fd82627dcd626 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Fri, 1 Nov 2024 13:50:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E5=85=B8=E7=B1=BB=E5=9E=8B=E3=80=81?= =?UTF-8?q?=E5=AD=97=E5=85=B8=E6=95=B0=E6=8D=AE=E6=8E=A5=E5=8F=A3=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/dictionary/mapper/mapping/DictTypeMapper.xml | 2 +- .../gather/system/dictionary/pojo/param/DictDataParam.java | 5 +++++ .../gather/system/dictionary/pojo/param/DictTypeParam.java | 4 ++++ .../system/dictionary/service/impl/DictDataServiceImpl.java | 4 ++-- .../system/dictionary/service/impl/DictTypeServiceImpl.java | 5 ++--- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/mapper/mapping/DictTypeMapper.xml b/system/src/main/java/com/njcn/gather/system/dictionary/mapper/mapping/DictTypeMapper.xml index 6fba457c..faedbfb2 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/mapper/mapping/DictTypeMapper.xml +++ b/system/src/main/java/com/njcn/gather/system/dictionary/mapper/mapping/DictTypeMapper.xml @@ -1,5 +1,5 @@ - + diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictDataParam.java b/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictDataParam.java index ebb10b17..d2e4953d 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictDataParam.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictDataParam.java @@ -92,6 +92,11 @@ public class DictDataParam { @Pattern(regexp = PatternRegex.SYSTEM_ID, message = SystemValidMessage.DICT_TYPE_ID_FORMAT_ERROR) private String typeId; + @ApiModelProperty("名称") + private String name; + + @ApiModelProperty("编码") + private String code; } } diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictTypeParam.java b/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictTypeParam.java index 11db9dc8..6fd67b27 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictTypeParam.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictTypeParam.java @@ -73,7 +73,11 @@ public class DictTypeParam { @Data @EqualsAndHashCode(callSuper = true) public static class DictTypeQueryParam extends BaseParam { + @ApiModelProperty("名称") + private String name; + @ApiModelProperty("编码") + private String code; } diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictDataServiceImpl.java b/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictDataServiceImpl.java index 1ea45578..e3693960 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictDataServiceImpl.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictDataServiceImpl.java @@ -43,8 +43,8 @@ public class DictDataServiceImpl extends ServiceImpl i public Page getTypeIdData(DictDataParam.DicTypeIdQueryParam queryParam) { QueryWrapper queryWrapper = new QueryWrapper<>(); if (ObjectUtil.isNotNull(queryParam)) { - //查询条件待补充,曹泽辉根据页面实际情况调整 todo... - + queryWrapper.like(StrUtil.isNotBlank(queryParam.getName()), "sys_dict_data.name", queryParam.getName()); + queryWrapper.like(StrUtil.isNotBlank(queryParam.getCode()), "sys_dict_data.code", queryParam.getCode()); //排序 if (ObjectUtil.isAllNotEmpty(queryParam.getSortBy(), queryParam.getOrderBy())) { queryWrapper.orderBy(true, queryParam.getOrderBy().equals(DbConstant.ASC), StrUtil.toUnderlineCase(queryParam.getSortBy())); diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictTypeServiceImpl.java b/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictTypeServiceImpl.java index 04ba9d49..2ce29c0c 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictTypeServiceImpl.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictTypeServiceImpl.java @@ -33,9 +33,8 @@ public class DictTypeServiceImpl extends ServiceImpl i public Page listDictTypes(DictTypeParam.DictTypeQueryParam queryParam) { QueryWrapper queryWrapper = new QueryWrapper<>(); if (ObjectUtil.isNotNull(queryParam)) { - //查询条件待补充,曹泽辉根据页面实际情况调整 todo... - - + queryWrapper.like(StrUtil.isNotBlank(queryParam.getName()), "sys_dict_type.name", queryParam.getName()); + queryWrapper.like(StrUtil.isNotBlank(queryParam.getCode()), "sys_dict_type.code", queryParam.getCode()); //排序 if (ObjectUtil.isAllNotEmpty(queryParam.getSortBy(), queryParam.getOrderBy())) { queryWrapper.orderBy(true, queryParam.getOrderBy().equals(DbConstant.ASC), StrUtil.toUnderlineCase(queryParam.getSortBy()));