|
@@ -95,6 +95,10 @@ public class RoleController : BaseController
|
|
var clientId = jwtOption.Issuer;
|
|
var clientId = jwtOption.Issuer;
|
|
if (string.IsNullOrEmpty(clientId))
|
|
if (string.IsNullOrEmpty(clientId))
|
|
throw new UserFriendlyException("jwt.Issuer未配置");
|
|
throw new UserFriendlyException("jwt.Issuer未配置");
|
|
|
|
+
|
|
|
|
+ if (string.IsNullOrEmpty(dto.Name))
|
|
|
|
+ throw UserFriendlyException.SameMessage("角色编码不能为空");
|
|
|
|
+
|
|
var exists = await _roleRepository.Queryable(includeDeleted: true)
|
|
var exists = await _roleRepository.Queryable(includeDeleted: true)
|
|
.AnyAsync(d => d.ClientId == clientId && d.Name == dto.Name);
|
|
.AnyAsync(d => d.ClientId == clientId && d.Name == dto.Name);
|
|
if (exists)
|
|
if (exists)
|