Commit 2c3aaa8d7e96d65d2194bd1b2dac42a79590d442
1 parent
3afa09bd
修复字典数据(system_dict_data)查询操作有问题,会查出不属于本字典类型(dict_type)的数据
Showing
1 changed file
with
4 additions
and
3 deletions
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/dict/DictDataMapper.java
| @@ -38,14 +38,15 @@ public interface DictDataMapper extends BaseMapperX<DictDataDO> { | @@ -38,14 +38,15 @@ public interface DictDataMapper extends BaseMapperX<DictDataDO> { | ||
| 38 | default PageResult<DictDataDO> selectPage(DictDataPageReqVO reqVO) { | 38 | default PageResult<DictDataDO> selectPage(DictDataPageReqVO reqVO) { |
| 39 | return selectPage(reqVO, new LambdaQueryWrapperX<DictDataDO>() | 39 | return selectPage(reqVO, new LambdaQueryWrapperX<DictDataDO>() |
| 40 | .likeIfPresent(DictDataDO::getLabel, reqVO.getLabel()) | 40 | .likeIfPresent(DictDataDO::getLabel, reqVO.getLabel()) |
| 41 | - .likeIfPresent(DictDataDO::getDictType, reqVO.getDictType()) | 41 | + .eqIfPresent(DictDataDO::getDictType, reqVO.getDictType()) |
| 42 | .eqIfPresent(DictDataDO::getStatus, reqVO.getStatus()) | 42 | .eqIfPresent(DictDataDO::getStatus, reqVO.getStatus()) |
| 43 | .orderByDesc(Arrays.asList(DictDataDO::getDictType, DictDataDO::getSort))); | 43 | .orderByDesc(Arrays.asList(DictDataDO::getDictType, DictDataDO::getSort))); |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | default List<DictDataDO> selectList(DictDataExportReqVO reqVO) { | 46 | default List<DictDataDO> selectList(DictDataExportReqVO reqVO) { |
| 47 | - return selectList(new LambdaQueryWrapperX<DictDataDO>().likeIfPresent(DictDataDO::getLabel, reqVO.getLabel()) | ||
| 48 | - .likeIfPresent(DictDataDO::getDictType, reqVO.getDictType()) | 47 | + return selectList(new LambdaQueryWrapperX<DictDataDO>() |
| 48 | + .likeIfPresent(DictDataDO::getLabel, reqVO.getLabel()) | ||
| 49 | + .eqIfPresent(DictDataDO::getDictType, reqVO.getDictType()) | ||
| 49 | .eqIfPresent(DictDataDO::getStatus, reqVO.getStatus())); | 50 | .eqIfPresent(DictDataDO::getStatus, reqVO.getStatus())); |
| 50 | } | 51 | } |
| 51 | 52 |