Pre Merge pull request !571 from AprilWind/dev

This commit is contained in:
AprilWind 2024-08-02 02:03:17 +00:00 committed by Gitee
commit 32d380e4a3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 13 additions and 1 deletions

View File

@ -42,6 +42,16 @@ public interface Constants {
*/
String FAIL = "1";
/**
* 通用存在标志
*/
String DELETED_FLAG_EXIST = "0";
/**
* 通用删除标志
*/
String DELETED_FLAG_REMOVED = "2";
/**
* 登录成功
*/

View File

@ -36,6 +36,8 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import static org.dromara.common.core.constant.Constants.DELETED_FLAG_EXIST;
/**
* 部门管理 服务实现
*
@ -78,7 +80,7 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
private LambdaQueryWrapper<SysDept> buildQueryWrapper(SysDeptBo bo) {
LambdaQueryWrapper<SysDept> lqw = Wrappers.lambdaQuery();
lqw.eq(SysDept::getDelFlag, "0");
lqw.eq(SysDept::getDelFlag, DELETED_FLAG_EXIST);
lqw.eq(ObjectUtil.isNotNull(bo.getDeptId()), SysDept::getDeptId, bo.getDeptId());
lqw.eq(ObjectUtil.isNotNull(bo.getParentId()), SysDept::getParentId, bo.getParentId());
lqw.like(StringUtils.isNotBlank(bo.getDeptName()), SysDept::getDeptName, bo.getDeptName());