Merge branch 'dev' into test

This commit is contained in:
lzx
2026-01-09 17:00:09 +08:00

View File

@@ -41,7 +41,7 @@ public class DatabusDeptProviderApiImpl implements DatabusDeptProviderApi {
public CommonResult<CursorPageResult<DatabusDeptData>> getPageByCursor(CursorPageReqDTO reqDTO) { public CommonResult<CursorPageResult<DatabusDeptData>> getPageByCursor(CursorPageReqDTO reqDTO) {
// 构建游标查询条件 // 构建游标查询条件
LambdaQueryWrapper<DeptDO> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<DeptDO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(DeptDO::getDeptSource, 3);
// 游标条件create_time > cursorTime OR (create_time = cursorTime AND id > cursorId) // 游标条件create_time > cursorTime OR (create_time = cursorTime AND id > cursorId)
if (!reqDTO.isFirstPage()) { if (!reqDTO.isFirstPage()) {
queryWrapper.and(w -> w queryWrapper.and(w -> w
@@ -105,6 +105,7 @@ public class DatabusDeptProviderApiImpl implements DatabusDeptProviderApi {
Long total = null; Long total = null;
if (reqDTO.isFirstPage()) { if (reqDTO.isFirstPage()) {
LambdaQueryWrapper<DeptDO> countWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<DeptDO> countWrapper = new LambdaQueryWrapper<>();
countWrapper.eq(DeptDO::getDeptSource, 3);
if (reqDTO.getTenantId() != null) { if (reqDTO.getTenantId() != null) {
countWrapper.eq(DeptDO::getTenantId, reqDTO.getTenantId()); countWrapper.eq(DeptDO::getTenantId, reqDTO.getTenantId());
} }
@@ -175,6 +176,8 @@ public class DatabusDeptProviderApiImpl implements DatabusDeptProviderApi {
@Override @Override
public CommonResult<Long> count(Long tenantId) { public CommonResult<Long> count(Long tenantId) {
LambdaQueryWrapper<DeptDO> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<DeptDO> queryWrapper = new LambdaQueryWrapper<>();
// ⚠️ 只统计 userSource = 3 的用户
queryWrapper.eq(DeptDO::getDeptSource, 3);
if (tenantId != null) { if (tenantId != null) {
queryWrapper.eq(DeptDO::getTenantId, tenantId); queryWrapper.eq(DeptDO::getTenantId, tenantId);
} }