Merge branch 'dev'
This commit is contained in:
commit
58571833ab
|
@ -31,10 +31,7 @@ public class SysDictTypeServiceImpl extends BaseServiceImpl<SysDictTypeDao, SysD
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageData<SysDictTypeDTO> page(Map<String, Object> params) {
|
public PageData<SysDictTypeDTO> page(Map<String, Object> params) {
|
||||||
IPage<SysDictTypeEntity> page = baseDao.selectPage(
|
IPage<SysDictTypeEntity> page = baseDao.selectPage(getPage(params, "sort", true), getWrapper(params));
|
||||||
getPage(params, "sort", true),
|
|
||||||
getWrapper(params)
|
|
||||||
);
|
|
||||||
|
|
||||||
return getPageData(page, SysDictTypeDTO.class);
|
return getPageData(page, SysDictTypeDTO.class);
|
||||||
}
|
}
|
||||||
|
@ -42,15 +39,14 @@ public class SysDictTypeServiceImpl extends BaseServiceImpl<SysDictTypeDao, SysD
|
||||||
private QueryWrapper<SysDictTypeEntity> getWrapper(Map<String, Object> params) {
|
private QueryWrapper<SysDictTypeEntity> getWrapper(Map<String, Object> params) {
|
||||||
String dictType = (String) params.get("dictType");
|
String dictType = (String) params.get("dictType");
|
||||||
String dictName = (String) params.get("dictName");
|
String dictName = (String) params.get("dictName");
|
||||||
|
String dictLabel = params.containsKey("dictLabel") ? (String) params.get("dictLabel") : "";
|
||||||
String dictLabel = (String) params.get("dictLabel");
|
String dictValue = params.containsKey("dictValue") ? (String) params.get("dictValue") : "";
|
||||||
String dictValue = (String) params.get("dictValue");
|
|
||||||
|
|
||||||
QueryWrapper<SysDictTypeEntity> wrapper = new QueryWrapper<>();
|
QueryWrapper<SysDictTypeEntity> wrapper = new QueryWrapper<>();
|
||||||
wrapper.like(StringUtils.isNotBlank(dictType), "dict_type", dictType);
|
wrapper.like(StringUtils.isNotBlank(dictType), "dict_type", dictType);
|
||||||
wrapper.like(StringUtils.isNotBlank(dictName), "dict_name", dictName);
|
wrapper.like(StringUtils.isNotBlank(dictName), "dict_name", dictName);
|
||||||
wrapper.exists(StringUtils.isNotBlank(dictLabel), String.format("SELECT 1 FROM sys_dict_data sdd WHERE sdd.dict_type_id = sys_dict_type.id AND sdd.dict_label LIKE CONCAT( '%', '%s', '%' ) ", dictLabel));
|
wrapper.exists(StringUtils.isNotEmpty(dictLabel), String.format("SELECT 1 FROM sys_dict_data sdd WHERE sdd.dict_type_id = sys_dict_type.id AND sdd.dict_label LIKE CONCAT( '%%', '%s', '%%' ) ", dictLabel));
|
||||||
wrapper.exists(StringUtils.isNotBlank(dictValue), String.format("SELECT 1 FROM sys_dict_data sdd WHERE sdd.dict_type_id = sys_dict_type.id AND sdd.dict_value =1", dictValue));
|
wrapper.exists(StringUtils.isNotEmpty(dictValue), String.format("SELECT 1 FROM sys_dict_data sdd WHERE sdd.dict_type_id = sys_dict_type.id AND sdd.dict_value =1", dictValue));
|
||||||
return wrapper;
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue