|
|
@@ -3,6 +3,7 @@ package com.middle.platform.system.biz.service;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
+import com.middle.platform.common.constant.Global;
|
|
|
import com.middle.platform.common.modle.BasePara;
|
|
|
import com.middle.platform.pagehelper.core.PageRes;
|
|
|
import com.middle.platform.system.biz.entity.SysDict;
|
|
|
@@ -36,9 +37,15 @@ public class SysDictService {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 分页查询
|
|
|
+ *
|
|
|
+ * @param basePara
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public PageRes<SysDictVo> list(BasePara basePara) {
|
|
|
PageHelper.startPage(basePara.getPage(), basePara.getPageSize());
|
|
|
- List<SysDict> sysDicts = sysDictMapper.selectList(new LambdaQueryWrapper<>());
|
|
|
+ List<SysDict> sysDicts = sysDictMapper.selectList(new LambdaQueryWrapper<SysDict>().eq(SysDict::getDelFlag, Global.UN_DEL));
|
|
|
if (CollectionUtils.isEmpty(sysDicts)) {
|
|
|
return new PageRes<>(basePara.getPage(), basePara.getPageSize());
|
|
|
}
|
|
|
@@ -46,7 +53,6 @@ public class SysDictService {
|
|
|
SysDictVo sysDictVo = new SysDictVo();
|
|
|
BeanUtils.copyProperties(a, sysDictVo);
|
|
|
return sysDictVo;
|
|
|
-
|
|
|
}).collect(Collectors.toList());
|
|
|
return PageRes.build(new PageInfo<>(sysDicts), collect);
|
|
|
|