refactor(系统设置): 用户组更新接口不传name会报错
--bug=1029536 --user=陈建星 系统设置-用户组-后台问题汇总 https://www.tapd.cn/55049933/s/1411174
This commit is contained in:
parent
7e4bbd595d
commit
db472f10a3
|
@ -87,6 +87,10 @@ public class GlobalUserRoleService extends BaseUserRoleService {
|
|||
}
|
||||
|
||||
public void checkExist(UserRole userRole) {
|
||||
if (StringUtils.isBlank(userRole.getName())) {
|
||||
return;
|
||||
}
|
||||
|
||||
UserRoleExample example = new UserRoleExample();
|
||||
UserRoleExample.Criteria criteria = example.createCriteria()
|
||||
.andNameEqualTo(userRole.getName())
|
||||
|
|
|
@ -116,6 +116,11 @@ class GlobalUserRoleControllerTests extends BaseTest {
|
|||
Assertions.assertEquals(request.getType(), userRoleResult.getType());
|
||||
Assertions.assertEquals(request.getDescription(), userRoleResult.getDescription());
|
||||
|
||||
// 不修改信息
|
||||
UserRoleUpdateRequest emptyRequest = new UserRoleUpdateRequest();
|
||||
emptyRequest.setId(addUserRole.getId());
|
||||
this.requestPostWithOk(DEFAULT_UPDATE, emptyRequest);
|
||||
|
||||
// @@校验日志
|
||||
checkLog(request.getId(), OperationLogType.UPDATE);
|
||||
|
||||
|
|
Loading…
Reference in New Issue