update 优化 增加删除标志位常量优化查询代码
This commit is contained in:
parent
b615a3b088
commit
2b0efd1f93
@ -67,6 +67,16 @@ public interface UserConstants {
|
|||||||
*/
|
*/
|
||||||
String DICT_NORMAL = "0";
|
String DICT_NORMAL = "0";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通用存在标志
|
||||||
|
*/
|
||||||
|
String DEL_FLAG_NORMAL = "0";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通用删除标志
|
||||||
|
*/
|
||||||
|
String DEL_FLAG_REMOVED = "2";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否为系统默认(是)
|
* 是否为系统默认(是)
|
||||||
*/
|
*/
|
||||||
|
@ -78,7 +78,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
|||||||
|
|
||||||
private LambdaQueryWrapper<SysDept> buildQueryWrapper(SysDeptBo bo) {
|
private LambdaQueryWrapper<SysDept> buildQueryWrapper(SysDeptBo bo) {
|
||||||
LambdaQueryWrapper<SysDept> lqw = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<SysDept> lqw = Wrappers.lambdaQuery();
|
||||||
lqw.eq(SysDept::getDelFlag, "0");
|
lqw.eq(SysDept::getDelFlag, UserConstants.DEL_FLAG_NORMAL);
|
||||||
lqw.eq(ObjectUtil.isNotNull(bo.getDeptId()), SysDept::getDeptId, bo.getDeptId());
|
lqw.eq(ObjectUtil.isNotNull(bo.getDeptId()), SysDept::getDeptId, bo.getDeptId());
|
||||||
lqw.eq(ObjectUtil.isNotNull(bo.getParentId()), SysDept::getParentId, bo.getParentId());
|
lqw.eq(ObjectUtil.isNotNull(bo.getParentId()), SysDept::getParentId, bo.getParentId());
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getDeptName()), SysDept::getDeptName, bo.getDeptName());
|
lqw.like(StringUtils.isNotBlank(bo.getDeptName()), SysDept::getDeptName, bo.getDeptName());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user