Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
5619441f
提交
5619441f
authored
2月 03, 2023
作者:
YunaiV
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完善 AdminUserServiceImpl 单元测试
上级
6474fba9
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
101 行增加
和
55 行删除
+101
-55
DataPermissionUtils.java
...amework/datapermission/core/util/DataPermissionUtils.java
+43
-0
DataPermissionUtilsTest.java
...rk/datapermission/core/utils/DataPermissionUtilsTest.java
+16
-0
BpmTaskAssignRuleServiceImpl.java
.../bpm/service/definition/BpmTaskAssignRuleServiceImpl.java
+3
-3
BpmTaskAssignRuleServiceImplTest.java
.../service/definition/BpmTaskAssignRuleServiceImplTest.java
+2
-2
AdminUserApi.java
...cn/iocoder/yudao/module/system/api/user/AdminUserApi.java
+5
-5
AdminUserApiImpl.java
...ocoder/yudao/module/system/api/user/AdminUserApiImpl.java
+8
-8
UserController.java
...o/module/system/controller/admin/user/UserController.java
+8
-8
AdminUserMapper.java
...r/yudao/module/system/dal/mysql/user/AdminUserMapper.java
+3
-8
OperateLogServiceImpl.java
...o/module/system/service/logger/OperateLogServiceImpl.java
+2
-2
AdminUserService.java
...er/yudao/module/system/service/user/AdminUserService.java
+9
-17
AdminUserServiceImpl.java
...udao/module/system/service/user/AdminUserServiceImpl.java
+0
-0
OperateLogServiceImplTest.java
...dule/system/service/logger/OperateLogServiceImplTest.java
+2
-2
AdminUserServiceImplTest.java
.../module/system/service/user/AdminUserServiceImplTest.java
+0
-0
没有找到文件。
yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/core/util/DataPermissionUtils.java
0 → 100644
浏览文件 @
5619441f
package
cn
.
iocoder
.
yudao
.
framework
.
datapermission
.
core
.
util
;
import
cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission
;
import
cn.iocoder.yudao.framework.datapermission.core.aop.DataPermissionContextHolder
;
import
lombok.SneakyThrows
;
/**
* 数据权限 Util
*
* @author 芋道源码
*/
public
class
DataPermissionUtils
{
private
static
DataPermission
DATA_PERMISSION_DISABLE
;
@DataPermission
(
enable
=
false
)
@SneakyThrows
private
static
DataPermission
getDisableDataPermissionDisable
()
{
if
(
DATA_PERMISSION_DISABLE
==
null
)
{
DATA_PERMISSION_DISABLE
=
DataPermissionUtils
.
class
.
getDeclaredMethod
(
"getDisableDataPermissionDisable"
)
.
getAnnotation
(
DataPermission
.
class
);
}
return
DATA_PERMISSION_DISABLE
;
}
/**
* 忽略数据权限,执行对应的逻辑
*
* @param runnable 逻辑
*/
public
static
void
executeIgnore
(
Runnable
runnable
)
{
DataPermission
dataPermission
=
getDisableDataPermissionDisable
();
DataPermissionContextHolder
.
add
(
dataPermission
);
try
{
// 执行 runnable
runnable
.
run
();
}
finally
{
DataPermissionContextHolder
.
remove
();
}
}
}
yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/test/java/cn/iocoder/yudao/framework/datapermission/core/utils/DataPermissionUtilsTest.java
0 → 100644
浏览文件 @
5619441f
package
cn
.
iocoder
.
yudao
.
framework
.
datapermission
.
core
.
utils
;
import
cn.iocoder.yudao.framework.datapermission.core.aop.DataPermissionContextHolder
;
import
cn.iocoder.yudao.framework.datapermission.core.util.DataPermissionUtils
;
import
org.junit.jupiter.api.Test
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.*;
public
class
DataPermissionUtilsTest
{
@Test
public
void
testExecuteIgnore
()
{
DataPermissionUtils
.
executeIgnore
(()
->
assertFalse
(
DataPermissionContextHolder
.
get
().
enable
()));
}
}
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImpl.java
浏览文件 @
5619441f
...
...
@@ -220,7 +220,7 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService {
}
else
if
(
Objects
.
equals
(
type
,
BpmTaskAssignRuleTypeEnum
.
POST
.
getType
()))
{
postApi
.
validPostList
(
options
);
}
else
if
(
Objects
.
equals
(
type
,
BpmTaskAssignRuleTypeEnum
.
USER
.
getType
()))
{
adminUserApi
.
validUser
s
(
options
);
adminUserApi
.
validUser
List
(
options
);
}
else
if
(
Objects
.
equals
(
type
,
BpmTaskAssignRuleTypeEnum
.
USER_GROUP
.
getType
()))
{
userGroupService
.
validUserGroups
(
options
);
}
else
if
(
Objects
.
equals
(
type
,
BpmTaskAssignRuleTypeEnum
.
SCRIPT
.
getType
()))
{
...
...
@@ -288,7 +288,7 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService {
}
private
Set
<
Long
>
calculateTaskCandidateUsersByDeptMember
(
BpmTaskAssignRuleDO
rule
)
{
List
<
AdminUserRespDTO
>
users
=
adminUserApi
.
getUser
s
ByDeptIds
(
rule
.
getOptions
()).
getCheckedData
();
List
<
AdminUserRespDTO
>
users
=
adminUserApi
.
getUser
List
ByDeptIds
(
rule
.
getOptions
()).
getCheckedData
();
return
convertSet
(
users
,
AdminUserRespDTO:
:
getId
);
}
...
...
@@ -298,7 +298,7 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService {
}
private
Set
<
Long
>
calculateTaskCandidateUsersByPost
(
BpmTaskAssignRuleDO
rule
)
{
List
<
AdminUserRespDTO
>
users
=
adminUserApi
.
getUser
s
ByPostIds
(
rule
.
getOptions
()).
getCheckedData
();
List
<
AdminUserRespDTO
>
users
=
adminUserApi
.
getUser
List
ByPostIds
(
rule
.
getOptions
()).
getCheckedData
();
return
convertSet
(
users
,
AdminUserRespDTO:
:
getId
);
}
...
...
yudao-module-bpm/yudao-module-bpm-biz/src/test/java/cn/iocoder/yudao/module/bpm/service/definition/BpmTaskAssignRuleServiceImplTest.java
浏览文件 @
5619441f
...
...
@@ -87,7 +87,7 @@ public class BpmTaskAssignRuleServiceImplTest extends BaseDbUnitTest {
// mock 方法
List
<
AdminUserRespDTO
>
users
=
CollectionUtils
.
convertList
(
asSet
(
11L
,
22L
),
id
->
new
AdminUserRespDTO
().
setId
(
id
));
when
(
adminUserApi
.
getUser
s
ByDeptIds
(
eq
(
rule
.
getOptions
()))).
thenReturn
(
success
(
users
));
when
(
adminUserApi
.
getUser
List
ByDeptIds
(
eq
(
rule
.
getOptions
()))).
thenReturn
(
success
(
users
));
mockGetUserMap
(
asSet
(
11L
,
22L
));
// 调用
...
...
@@ -121,7 +121,7 @@ public class BpmTaskAssignRuleServiceImplTest extends BaseDbUnitTest {
// mock 方法
List
<
AdminUserRespDTO
>
users
=
CollectionUtils
.
convertList
(
asSet
(
11L
,
22L
),
id
->
new
AdminUserRespDTO
().
setId
(
id
));
when
(
adminUserApi
.
getUser
s
ByPostIds
(
eq
(
rule
.
getOptions
()))).
thenReturn
(
success
(
users
));
when
(
adminUserApi
.
getUser
List
ByPostIds
(
eq
(
rule
.
getOptions
()))).
thenReturn
(
success
(
users
));
mockGetUserMap
(
asSet
(
11L
,
22L
));
// 调用
...
...
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApi.java
浏览文件 @
5619441f
...
...
@@ -30,17 +30,17 @@ public interface AdminUserApi {
@GetMapping
(
PREFIX
+
"/list"
)
@ApiOperation
(
"通过用户 ID 查询用户们"
)
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"部门编号数组"
,
example
=
"1,2"
,
required
=
true
,
allowMultiple
=
true
)
CommonResult
<
List
<
AdminUserRespDTO
>>
getUser
s
(
@RequestParam
(
"ids"
)
Collection
<
Long
>
ids
);
CommonResult
<
List
<
AdminUserRespDTO
>>
getUser
List
(
@RequestParam
(
"ids"
)
Collection
<
Long
>
ids
);
@GetMapping
(
PREFIX
+
"/list-by-dept-id"
)
@ApiOperation
(
"获得指定部门的用户数组"
)
@ApiImplicitParam
(
name
=
"deptIds"
,
value
=
"部门编号数组"
,
example
=
"1,2"
,
required
=
true
,
allowMultiple
=
true
)
CommonResult
<
List
<
AdminUserRespDTO
>>
getUser
s
ByDeptIds
(
@RequestParam
(
"deptIds"
)
Collection
<
Long
>
deptIds
);
CommonResult
<
List
<
AdminUserRespDTO
>>
getUser
List
ByDeptIds
(
@RequestParam
(
"deptIds"
)
Collection
<
Long
>
deptIds
);
@GetMapping
(
PREFIX
+
"/list-by-post-id"
)
@ApiOperation
(
"获得指定岗位的用户数组"
)
@ApiImplicitParam
(
name
=
"postIds"
,
value
=
"岗位编号数组"
,
example
=
"2,3"
,
required
=
true
,
allowMultiple
=
true
)
CommonResult
<
List
<
AdminUserRespDTO
>>
getUser
s
ByPostIds
(
@RequestParam
(
"postIds"
)
Collection
<
Long
>
postIds
);
CommonResult
<
List
<
AdminUserRespDTO
>>
getUser
List
ByPostIds
(
@RequestParam
(
"postIds"
)
Collection
<
Long
>
postIds
);
/**
* 获得用户 Map
...
...
@@ -49,12 +49,12 @@ public interface AdminUserApi {
* @return 用户 Map
*/
default
Map
<
Long
,
AdminUserRespDTO
>
getUserMap
(
Collection
<
Long
>
ids
)
{
return
CollectionUtils
.
convertMap
(
getUser
s
(
ids
).
getCheckedData
(),
AdminUserRespDTO:
:
getId
);
return
CollectionUtils
.
convertMap
(
getUser
List
(
ids
).
getCheckedData
(),
AdminUserRespDTO:
:
getId
);
}
@GetMapping
(
PREFIX
+
"/valid"
)
@ApiOperation
(
"校验用户们是否有效"
)
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"用户编号数组"
,
example
=
"3,5"
,
required
=
true
)
CommonResult
<
Boolean
>
validUser
s
(
@RequestParam
(
"ids"
)
Set
<
Long
>
ids
);
CommonResult
<
Boolean
>
validUser
List
(
@RequestParam
(
"ids"
)
Set
<
Long
>
ids
);
}
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/user/AdminUserApiImpl.java
浏览文件 @
5619441f
...
...
@@ -33,26 +33,26 @@ public class AdminUserApiImpl implements AdminUserApi {
}
@Override
public
CommonResult
<
List
<
AdminUserRespDTO
>>
getUser
s
(
Collection
<
Long
>
ids
)
{
List
<
AdminUserDO
>
users
=
userService
.
getUser
s
(
ids
);
public
CommonResult
<
List
<
AdminUserRespDTO
>>
getUser
List
(
Collection
<
Long
>
ids
)
{
List
<
AdminUserDO
>
users
=
userService
.
getUser
List
(
ids
);
return
success
(
UserConvert
.
INSTANCE
.
convertList4
(
users
));
}
@Override
public
CommonResult
<
List
<
AdminUserRespDTO
>>
getUser
s
ByDeptIds
(
Collection
<
Long
>
deptIds
)
{
List
<
AdminUserDO
>
users
=
userService
.
getUser
s
ByDeptIds
(
deptIds
);
public
CommonResult
<
List
<
AdminUserRespDTO
>>
getUser
List
ByDeptIds
(
Collection
<
Long
>
deptIds
)
{
List
<
AdminUserDO
>
users
=
userService
.
getUser
List
ByDeptIds
(
deptIds
);
return
success
(
UserConvert
.
INSTANCE
.
convertList4
(
users
));
}
@Override
public
CommonResult
<
List
<
AdminUserRespDTO
>>
getUser
s
ByPostIds
(
Collection
<
Long
>
postIds
)
{
List
<
AdminUserDO
>
users
=
userService
.
getUser
s
ByPostIds
(
postIds
);
public
CommonResult
<
List
<
AdminUserRespDTO
>>
getUser
List
ByPostIds
(
Collection
<
Long
>
postIds
)
{
List
<
AdminUserDO
>
users
=
userService
.
getUser
List
ByPostIds
(
postIds
);
return
success
(
UserConvert
.
INSTANCE
.
convertList4
(
users
));
}
@Override
public
CommonResult
<
Boolean
>
validUser
s
(
Set
<
Long
>
ids
)
{
userService
.
valid
Users
(
ids
);
public
CommonResult
<
Boolean
>
validUser
List
(
Set
<
Long
>
ids
)
{
userService
.
valid
ateUserList
(
ids
);
return
success
(
true
);
}
...
...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java
浏览文件 @
5619441f
...
...
@@ -111,9 +111,9 @@ public class UserController {
@GetMapping
(
"/list-all-simple"
)
@ApiOperation
(
value
=
"获取用户精简信息列表"
,
notes
=
"只包含被开启的用户,主要用于前端的下拉选项"
)
public
CommonResult
<
List
<
UserSimpleRespVO
>>
getSimpleUser
s
()
{
// 获用户
门
列表,只要开启状态的
List
<
AdminUserDO
>
list
=
userService
.
getUser
s
ByStatus
(
CommonStatusEnum
.
ENABLE
.
getStatus
());
public
CommonResult
<
List
<
UserSimpleRespVO
>>
getSimpleUser
List
()
{
// 获用户列表,只要开启状态的
List
<
AdminUserDO
>
list
=
userService
.
getUser
List
ByStatus
(
CommonStatusEnum
.
ENABLE
.
getStatus
());
// 排序后,返回给前端
return
success
(
UserConvert
.
INSTANCE
.
convertList04
(
list
));
}
...
...
@@ -122,7 +122,7 @@ public class UserController {
@ApiOperation
(
"获得用户详情"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
@PreAuthorize
(
"@ss.hasPermission('system:user:query')"
)
public
CommonResult
<
UserRespVO
>
get
Info
(
@RequestParam
(
"id"
)
Long
id
)
{
public
CommonResult
<
UserRespVO
>
get
User
(
@RequestParam
(
"id"
)
Long
id
)
{
return
success
(
UserConvert
.
INSTANCE
.
convert
(
userService
.
getUser
(
id
)));
}
...
...
@@ -130,10 +130,10 @@ public class UserController {
@ApiOperation
(
"导出用户"
)
@PreAuthorize
(
"@ss.hasPermission('system:user:export')"
)
@OperateLog
(
type
=
EXPORT
)
public
void
exportUser
s
(
@Validated
UserExportReqVO
reqVO
,
HttpServletResponse
response
)
throws
IOException
{
public
void
exportUser
List
(
@Validated
UserExportReqVO
reqVO
,
HttpServletResponse
response
)
throws
IOException
{
// 获得用户列表
List
<
AdminUserDO
>
users
=
userService
.
getUser
s
(
reqVO
);
List
<
AdminUserDO
>
users
=
userService
.
getUser
List
(
reqVO
);
// 获得拼接需要的数据
Collection
<
Long
>
deptIds
=
convertList
(
users
,
AdminUserDO:
:
getDeptId
);
...
...
@@ -183,7 +183,7 @@ public class UserController {
public
CommonResult
<
UserImportRespVO
>
importExcel
(
@RequestParam
(
"file"
)
MultipartFile
file
,
@RequestParam
(
value
=
"updateSupport"
,
required
=
false
,
defaultValue
=
"false"
)
Boolean
updateSupport
)
throws
Exception
{
List
<
UserImportExcelVO
>
list
=
ExcelUtils
.
read
(
file
,
UserImportExcelVO
.
class
);
return
success
(
userService
.
importUser
s
(
list
,
updateSupport
));
return
success
(
userService
.
importUser
List
(
list
,
updateSupport
));
}
}
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/user/AdminUserMapper.java
浏览文件 @
5619441f
...
...
@@ -6,7 +6,6 @@ import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import
cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserExportReqVO
;
import
cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserPageReqVO
;
import
cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.Collection
;
...
...
@@ -16,15 +15,15 @@ import java.util.List;
public
interface
AdminUserMapper
extends
BaseMapperX
<
AdminUserDO
>
{
default
AdminUserDO
selectByUsername
(
String
username
)
{
return
selectOne
(
new
LambdaQueryWrapper
<
AdminUserDO
>().
eq
(
AdminUserDO:
:
getUsername
,
username
)
);
return
selectOne
(
AdminUserDO:
:
getUsername
,
username
);
}
default
AdminUserDO
selectByEmail
(
String
email
)
{
return
selectOne
(
new
LambdaQueryWrapper
<
AdminUserDO
>().
eq
(
AdminUserDO:
:
getEmail
,
email
)
);
return
selectOne
(
AdminUserDO:
:
getEmail
,
email
);
}
default
AdminUserDO
selectByMobile
(
String
mobile
)
{
return
selectOne
(
new
LambdaQueryWrapper
<
AdminUserDO
>().
eq
(
AdminUserDO:
:
getMobile
,
mobile
)
);
return
selectOne
(
AdminUserDO:
:
getMobile
,
mobile
);
}
default
PageResult
<
AdminUserDO
>
selectPage
(
UserPageReqVO
reqVO
,
Collection
<
Long
>
deptIds
)
{
...
...
@@ -50,10 +49,6 @@ public interface AdminUserMapper extends BaseMapperX<AdminUserDO> {
return
selectList
(
new
LambdaQueryWrapperX
<
AdminUserDO
>().
like
(
AdminUserDO:
:
getNickname
,
nickname
));
}
default
List
<
AdminUserDO
>
selectListByUsername
(
String
username
)
{
return
selectList
(
new
LambdaQueryWrapperX
<
AdminUserDO
>().
like
(
AdminUserDO:
:
getUsername
,
username
));
}
default
List
<
AdminUserDO
>
selectListByStatus
(
Integer
status
)
{
return
selectList
(
AdminUserDO:
:
getStatus
,
status
);
}
...
...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImpl.java
浏览文件 @
5619441f
...
...
@@ -49,7 +49,7 @@ public class OperateLogServiceImpl implements OperateLogService {
// 处理基于用户昵称的查询
Collection
<
Long
>
userIds
=
null
;
if
(
StrUtil
.
isNotEmpty
(
reqVO
.
getUserNickname
()))
{
userIds
=
convertSet
(
userService
.
getUser
s
ByNickname
(
reqVO
.
getUserNickname
()),
AdminUserDO:
:
getId
);
userIds
=
convertSet
(
userService
.
getUser
List
ByNickname
(
reqVO
.
getUserNickname
()),
AdminUserDO:
:
getId
);
if
(
CollUtil
.
isEmpty
(
userIds
))
{
return
PageResult
.
empty
();
}
...
...
@@ -63,7 +63,7 @@ public class OperateLogServiceImpl implements OperateLogService {
// 处理基于用户昵称的查询
Collection
<
Long
>
userIds
=
null
;
if
(
StrUtil
.
isNotEmpty
(
reqVO
.
getUserNickname
()))
{
userIds
=
convertSet
(
userService
.
getUser
s
ByNickname
(
reqVO
.
getUserNickname
()),
AdminUserDO:
:
getId
);
userIds
=
convertSet
(
userService
.
getUser
List
ByNickname
(
reqVO
.
getUserNickname
()),
AdminUserDO:
:
getId
);
if
(
CollUtil
.
isEmpty
(
userIds
))
{
return
Collections
.
emptyList
();
}
...
...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserService.java
浏览文件 @
5619441f
...
...
@@ -127,7 +127,7 @@ public interface AdminUserService {
* @param deptIds 部门数组
* @return 用户数组
*/
List
<
AdminUserDO
>
getUser
s
ByDeptIds
(
Collection
<
Long
>
deptIds
);
List
<
AdminUserDO
>
getUser
List
ByDeptIds
(
Collection
<
Long
>
deptIds
);
/**
* 获得指定岗位的用户数组
...
...
@@ -135,7 +135,7 @@ public interface AdminUserService {
* @param postIds 岗位数组
* @return 用户数组
*/
List
<
AdminUserDO
>
getUser
s
ByPostIds
(
Collection
<
Long
>
postIds
);
List
<
AdminUserDO
>
getUser
List
ByPostIds
(
Collection
<
Long
>
postIds
);
/**
* 获得用户列表
...
...
@@ -143,7 +143,7 @@ public interface AdminUserService {
* @param ids 用户编号数组
* @return 用户列表
*/
List
<
AdminUserDO
>
getUser
s
(
Collection
<
Long
>
ids
);
List
<
AdminUserDO
>
getUser
List
(
Collection
<
Long
>
ids
);
/**
* 校验用户们是否有效。如下情况,视为无效:
...
...
@@ -152,7 +152,7 @@ public interface AdminUserService {
*
* @param ids 用户编号数组
*/
void
valid
Users
(
Set
<
Long
>
ids
);
void
valid
ateUserList
(
Collection
<
Long
>
ids
);
/**
* 获得用户 Map
...
...
@@ -164,7 +164,7 @@ public interface AdminUserService {
if
(
CollUtil
.
isEmpty
(
ids
))
{
return
new
HashMap
<>();
}
return
CollectionUtils
.
convertMap
(
getUser
s
(
ids
),
AdminUserDO:
:
getId
);
return
CollectionUtils
.
convertMap
(
getUser
List
(
ids
),
AdminUserDO:
:
getId
);
}
/**
...
...
@@ -173,7 +173,7 @@ public interface AdminUserService {
* @param reqVO 列表请求
* @return 用户列表
*/
List
<
AdminUserDO
>
getUser
s
(
UserExportReqVO
reqVO
);
List
<
AdminUserDO
>
getUser
List
(
UserExportReqVO
reqVO
);
/**
* 获得用户列表,基于昵称模糊匹配
...
...
@@ -181,15 +181,7 @@ public interface AdminUserService {
* @param nickname 昵称
* @return 用户列表
*/
List
<
AdminUserDO
>
getUsersByNickname
(
String
nickname
);
/**
* 获得用户列表,基于用户账号模糊匹配
*
* @param username 用户账号
* @return 用户列表
*/
List
<
AdminUserDO
>
getUsersByUsername
(
String
username
);
List
<
AdminUserDO
>
getUserListByNickname
(
String
nickname
);
/**
* 批量导入用户
...
...
@@ -198,7 +190,7 @@ public interface AdminUserService {
* @param isUpdateSupport 是否支持更新
* @return 导入结果
*/
UserImportRespVO
importUser
s
(
List
<
UserImportExcelVO
>
importUsers
,
boolean
isUpdateSupport
);
UserImportRespVO
importUser
List
(
List
<
UserImportExcelVO
>
importUsers
,
boolean
isUpdateSupport
);
/**
* 获得指定状态的用户们
...
...
@@ -206,7 +198,7 @@ public interface AdminUserService {
* @param status 状态
* @return 用户们
*/
List
<
AdminUserDO
>
getUser
s
ByStatus
(
Integer
status
);
List
<
AdminUserDO
>
getUser
List
ByStatus
(
Integer
status
);
/**
* 判断密码是否匹配
...
...
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java
浏览文件 @
5619441f
差异被折叠。
点击展开。
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/logger/OperateLogServiceImplTest.java
浏览文件 @
5619441f
...
...
@@ -64,7 +64,7 @@ public class OperateLogServiceImplTest extends BaseDbUnitTest {
o
.
setNickname
(
"wang"
);
o
.
setStatus
(
CommonStatusEnum
.
ENABLE
.
getStatus
());
});
when
(
userService
.
getUser
s
ByNickname
(
"wang"
)).
thenReturn
(
Collections
.
singletonList
(
user
));
when
(
userService
.
getUser
List
ByNickname
(
"wang"
)).
thenReturn
(
Collections
.
singletonList
(
user
));
Long
userId
=
user
.
getId
();
// 构造操作日志
...
...
@@ -112,7 +112,7 @@ public class OperateLogServiceImplTest extends BaseDbUnitTest {
o
.
setNickname
(
"wang"
);
o
.
setStatus
(
CommonStatusEnum
.
ENABLE
.
getStatus
());
});
when
(
userService
.
getUser
s
ByNickname
(
"wang"
)).
thenReturn
(
Collections
.
singletonList
(
user
));
when
(
userService
.
getUser
List
ByNickname
(
"wang"
)).
thenReturn
(
Collections
.
singletonList
(
user
));
Long
userId
=
user
.
getId
();
// 构造操作日志
...
...
yudao-module-system/yudao-module-system-biz/src/test/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImplTest.java
浏览文件 @
5619441f
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论