新增角色标签
This commit is contained in:
parent
57e0f025b5
commit
71a60043b3
@ -1,10 +1,17 @@
|
||||
package com.qqchen.deploy.backend.api;
|
||||
|
||||
import com.qqchen.deploy.backend.entity.Role;
|
||||
import com.qqchen.deploy.backend.framework.api.Response;
|
||||
import com.qqchen.deploy.backend.framework.controller.BaseController;
|
||||
import com.qqchen.deploy.backend.model.RoleDTO;
|
||||
import com.qqchen.deploy.backend.model.query.RoleQuery;
|
||||
import com.qqchen.deploy.backend.service.IRoleService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@ -15,6 +22,16 @@ import java.util.List;
|
||||
@RequestMapping("/api/v1/role")
|
||||
public class RoleApiController extends BaseController<Role, RoleDTO, Long, RoleQuery> {
|
||||
|
||||
@Resource
|
||||
private IRoleService roleService;
|
||||
|
||||
@Operation(summary = "分配标签")
|
||||
@PostMapping("/{id}/tags")
|
||||
public Response<Void> assignTags(@PathVariable Long id, @RequestBody List<Long> tagIds) {
|
||||
roleService.assignTags(id, tagIds);
|
||||
return Response.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void exportData(jakarta.servlet.http.HttpServletResponse response, List<RoleDTO> data) {
|
||||
// TODO: 实现导出功能
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
package com.qqchen.deploy.backend.api;
|
||||
|
||||
import com.qqchen.deploy.backend.entity.RoleTag;
|
||||
import com.qqchen.deploy.backend.framework.controller.BaseController;
|
||||
import com.qqchen.deploy.backend.framework.query.BaseQuery;
|
||||
import com.qqchen.deploy.backend.model.RoleTagDTO;
|
||||
import com.qqchen.deploy.backend.model.query.RoleTagQuery;
|
||||
import com.qqchen.deploy.backend.service.IRoleTagService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import java.util.List;
|
||||
|
||||
@Tag(name = "角色标签管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/v1/role-tag")
|
||||
public class RoleTagApiController extends BaseController<RoleTag, RoleTagDTO, Long, RoleTagQuery> {
|
||||
|
||||
@Resource
|
||||
private IRoleTagService roleTagService;
|
||||
|
||||
@Override
|
||||
protected void exportData(HttpServletResponse response, List<RoleTagDTO> data) {
|
||||
|
||||
}
|
||||
}
|
||||
@ -4,8 +4,34 @@ import com.qqchen.deploy.backend.model.RoleDTO;
|
||||
import com.qqchen.deploy.backend.entity.Role;
|
||||
import com.qqchen.deploy.backend.framework.converter.BaseConverter;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.MappingTarget;
|
||||
import org.mapstruct.Mappings;
|
||||
|
||||
@Mapper(config = BaseConverter.class)
|
||||
public interface RoleConverter extends BaseConverter<Role, RoleDTO> {
|
||||
// MapStruct 会自动实现所有方法
|
||||
|
||||
@Override
|
||||
@Mappings({
|
||||
@Mapping(target = "id", ignore = true),
|
||||
@Mapping(target = "createTime", ignore = true),
|
||||
@Mapping(target = "createBy", ignore = true),
|
||||
@Mapping(target = "updateTime", ignore = true),
|
||||
@Mapping(target = "updateBy", ignore = true),
|
||||
@Mapping(target = "version", ignore = true),
|
||||
@Mapping(target = "deleted", ignore = true)
|
||||
})
|
||||
void updateEntity(@MappingTarget Role entity, RoleDTO dto);
|
||||
|
||||
@Override
|
||||
@Mappings({
|
||||
@Mapping(target = "tags", source = "tags")
|
||||
})
|
||||
RoleDTO toDto(Role entity);
|
||||
|
||||
@Override
|
||||
@Mappings({
|
||||
@Mapping(target = "tags", source = "tags")
|
||||
})
|
||||
Role toEntity(RoleDTO dto);
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.qqchen.deploy.backend.converter;
|
||||
|
||||
import com.qqchen.deploy.backend.entity.RoleTag;
|
||||
import com.qqchen.deploy.backend.framework.converter.BaseConverter;
|
||||
import com.qqchen.deploy.backend.model.RoleTagDTO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.MappingTarget;
|
||||
import org.mapstruct.Mappings;
|
||||
|
||||
@Mapper(config = BaseConverter.class)
|
||||
public interface RoleTagConverter extends BaseConverter<RoleTag, RoleTagDTO> {
|
||||
|
||||
@Override
|
||||
@Mappings({
|
||||
@Mapping(target = "id", ignore = true),
|
||||
@Mapping(target = "roles", ignore = true),
|
||||
@Mapping(target = "createTime", ignore = true),
|
||||
@Mapping(target = "createBy", ignore = true),
|
||||
@Mapping(target = "updateTime", ignore = true),
|
||||
@Mapping(target = "updateBy", ignore = true),
|
||||
@Mapping(target = "version", ignore = true),
|
||||
@Mapping(target = "deleted", ignore = true)
|
||||
})
|
||||
void updateEntity(@MappingTarget RoleTag entity, RoleTagDTO dto);
|
||||
}
|
||||
@ -29,6 +29,7 @@ public interface UserConverter extends BaseConverter<User, UserDTO> {
|
||||
@Mappings({
|
||||
@Mapping(target = "id", ignore = true),
|
||||
@Mapping(target = "password", ignore = true),
|
||||
@Mapping(target = "roles", ignore = true),
|
||||
@Mapping(target = "createTime", ignore = true),
|
||||
@Mapping(target = "createBy", ignore = true),
|
||||
@Mapping(target = "updateTime", ignore = true),
|
||||
|
||||
@ -14,7 +14,7 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = true, exclude = {"menus", "tags"})
|
||||
@jakarta.persistence.Entity
|
||||
@Table(name = "sys_role")
|
||||
@LogicDelete
|
||||
@ -40,7 +40,7 @@ public class Role extends Entity<Long> {
|
||||
)
|
||||
private Set<Menu> menus = new HashSet<>();
|
||||
|
||||
@ManyToMany(fetch = FetchType.LAZY)
|
||||
@ManyToMany(fetch = FetchType.EAGER)
|
||||
@JoinTable(
|
||||
name = "sys_role_tag_relation",
|
||||
joinColumns = @JoinColumn(name = "role_id"),
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
package com.qqchen.deploy.backend.entity;
|
||||
|
||||
import com.qqchen.deploy.backend.framework.annotation.LogicDelete;
|
||||
import com.qqchen.deploy.backend.framework.domain.Entity;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.ManyToMany;
|
||||
import jakarta.persistence.Table;
|
||||
import jakarta.persistence.ManyToMany;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
@ -13,8 +15,10 @@ import java.util.Set;
|
||||
* 角色标签实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true, exclude = "roles")
|
||||
@jakarta.persistence.Entity
|
||||
@Table(name = "sys_role_tag")
|
||||
@LogicDelete
|
||||
public class RoleTag extends Entity<Long> {
|
||||
|
||||
/**
|
||||
@ -29,6 +33,12 @@ public class RoleTag extends Entity<Long> {
|
||||
@Column(length = 20)
|
||||
private String color;
|
||||
|
||||
/**
|
||||
* 标签描述
|
||||
*/
|
||||
@Column(length = 200)
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 关联的角色列表
|
||||
*/
|
||||
|
||||
@ -44,7 +44,12 @@ public enum ResponseCode {
|
||||
// JWT相关错误码 (2200-2299)
|
||||
JWT_EXPIRED(2200, "jwt.token.expired"),
|
||||
JWT_INVALID(2201, "jwt.token.invalid"),
|
||||
JWT_MISSING(2202, "jwt.token.missing");
|
||||
JWT_MISSING(2202, "jwt.token.missing"),
|
||||
|
||||
// 角色标签相关错误码 (4300-4399)
|
||||
ROLE_TAG_NAME_EXISTS(4300, "role.tag.name.exists"),
|
||||
ROLE_TAG_NOT_FOUND(4301, "role.tag.not.found"),
|
||||
ROLE_TAG_IN_USE(4302, "role.tag.in.use");
|
||||
|
||||
private final int code;
|
||||
private final String messageKey; // 国际化消息key
|
||||
|
||||
@ -3,6 +3,7 @@ package com.qqchen.deploy.backend.model;
|
||||
import com.qqchen.deploy.backend.framework.dto.BaseDTO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Set;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ -16,4 +17,6 @@ public class RoleDTO extends BaseDTO {
|
||||
|
||||
private Integer sort;
|
||||
|
||||
private Set<RoleTagDTO> tags;
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.qqchen.deploy.backend.model;
|
||||
|
||||
import com.qqchen.deploy.backend.framework.dto.BaseDTO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RoleTagDTO extends BaseDTO {
|
||||
|
||||
private String name;
|
||||
|
||||
private String color;
|
||||
|
||||
private String description;
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.qqchen.deploy.backend.model.query;
|
||||
|
||||
import com.qqchen.deploy.backend.framework.query.BaseQuery;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RoleTagQuery extends BaseQuery {
|
||||
|
||||
/**
|
||||
* 标签名称
|
||||
*/
|
||||
private String name;
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package com.qqchen.deploy.backend.repository;
|
||||
|
||||
import com.qqchen.deploy.backend.entity.RoleTag;
|
||||
import com.qqchen.deploy.backend.framework.repository.IBaseRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public interface IRoleTagRepository extends IBaseRepository<RoleTag, Long> {
|
||||
|
||||
boolean existsByNameAndDeletedFalse(String name);
|
||||
}
|
||||
@ -22,4 +22,9 @@ public interface IRoleService extends IBaseService<Role, RoleDTO, Long> {
|
||||
* 获取用户的所有角色ID
|
||||
*/
|
||||
List<Long> getUserRoleIds(Long userId);
|
||||
|
||||
/**
|
||||
* 分配标签
|
||||
*/
|
||||
void assignTags(Long roleId, List<Long> tagIds);
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
package com.qqchen.deploy.backend.service;
|
||||
|
||||
import com.qqchen.deploy.backend.entity.RoleTag;
|
||||
import com.qqchen.deploy.backend.framework.service.IBaseService;
|
||||
import com.qqchen.deploy.backend.model.RoleTagDTO;
|
||||
import java.util.List;
|
||||
|
||||
public interface IRoleTagService extends IBaseService<RoleTag, RoleTagDTO, Long> {
|
||||
|
||||
}
|
||||
@ -1,19 +1,24 @@
|
||||
package com.qqchen.deploy.backend.service.impl;
|
||||
|
||||
import com.qqchen.deploy.backend.entity.Role;
|
||||
import com.qqchen.deploy.backend.entity.RoleTag;
|
||||
import com.qqchen.deploy.backend.framework.enums.ResponseCode;
|
||||
import com.qqchen.deploy.backend.framework.exception.BusinessException;
|
||||
import com.qqchen.deploy.backend.framework.exception.UniqueConstraintException;
|
||||
import com.qqchen.deploy.backend.model.RoleDTO;
|
||||
import com.qqchen.deploy.backend.framework.service.impl.BaseServiceImpl;
|
||||
import com.qqchen.deploy.backend.repository.IRoleRepository;
|
||||
import com.qqchen.deploy.backend.repository.IRoleTagRepository;
|
||||
import com.qqchen.deploy.backend.service.IRoleService;
|
||||
import com.qqchen.deploy.backend.framework.annotation.ServiceType;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.qqchen.deploy.backend.framework.annotation.ServiceType.Type.DATABASE;
|
||||
|
||||
@ -25,6 +30,9 @@ public class RoleServiceImpl extends BaseServiceImpl<Role, RoleDTO, Long> implem
|
||||
@Resource
|
||||
private IRoleRepository roleRepository;
|
||||
|
||||
@Resource
|
||||
private IRoleTagRepository roleTagRepository;
|
||||
|
||||
@Override
|
||||
public List<Long> getUserRoleIds(Long userId) {
|
||||
return roleRepository.findRoleIdsByUserId(userId);
|
||||
@ -56,4 +64,18 @@ public class RoleServiceImpl extends BaseServiceImpl<Role, RoleDTO, Long> implem
|
||||
throw new UniqueConstraintException(ResponseCode.ROLE_NAME_EXISTS, "name", dto.getName());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void assignTags(Long roleId, List<Long> tagIds) {
|
||||
Role role = findEntityById(roleId);
|
||||
// 先清除原有关系
|
||||
role.getTags().clear();
|
||||
// 设置新的关系
|
||||
Set<RoleTag> tags = roleTagRepository.findAllById(tagIds)
|
||||
.stream()
|
||||
.collect(Collectors.toSet());
|
||||
role.setTags(tags);
|
||||
roleRepository.save(role);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package com.qqchen.deploy.backend.service.impl;
|
||||
|
||||
import com.qqchen.deploy.backend.entity.RoleTag;
|
||||
import com.qqchen.deploy.backend.framework.enums.ResponseCode;
|
||||
import com.qqchen.deploy.backend.framework.exception.UniqueConstraintException;
|
||||
import com.qqchen.deploy.backend.framework.service.impl.BaseServiceImpl;
|
||||
import com.qqchen.deploy.backend.model.RoleTagDTO;
|
||||
import com.qqchen.deploy.backend.repository.IRoleTagRepository;
|
||||
import com.qqchen.deploy.backend.service.IRoleTagService;
|
||||
import com.qqchen.deploy.backend.framework.annotation.ServiceType;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
import static com.qqchen.deploy.backend.framework.annotation.ServiceType.Type.DATABASE;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@ServiceType(DATABASE)
|
||||
public class RoleTagServiceImpl extends BaseServiceImpl<RoleTag, RoleTagDTO, Long> implements IRoleTagService {
|
||||
|
||||
@Resource
|
||||
private IRoleTagRepository roleTagRepository;
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void validateUniqueConstraints(RoleTagDTO dto) {
|
||||
// 检查标签名称唯一性
|
||||
if (roleTagRepository.existsByNameAndDeletedFalse(dto.getName())) {
|
||||
throw new UniqueConstraintException(ResponseCode.ROLE_TAG_NAME_EXISTS, "name", dto.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,49 +1,52 @@
|
||||
# 通用响应
|
||||
response.success=操作成功
|
||||
response.error=系统错误
|
||||
response.invalid.param=无效的参数
|
||||
response.unauthorized=未授权
|
||||
response.forbidden=禁止访问
|
||||
response.not.found=资源未找到
|
||||
response.conflict=资源冲突
|
||||
response.unauthorized.full=访问此资源需要完全身份验证
|
||||
# \u901A\u7528\u54CD\u5E94
|
||||
response.success=\u64CD\u4F5C\u6210\u529F
|
||||
response.error=\u7CFB\u7EDF\u9519\u8BEF
|
||||
response.invalid.param=\u65E0\u6548\u7684\u53C2\u6570
|
||||
response.unauthorized=\u672A\u6388\u6743
|
||||
response.forbidden=\u7981\u6B62\u8BBF\u95EE
|
||||
response.not.found=\u8D44\u6E90\u672A\u627E\u5230
|
||||
response.conflict=\u8D44\u6E90\u51B2\u7A81
|
||||
response.unauthorized.full=\u8BBF\u95EE\u6B64\u8D44\u6E90\u9700\u8981\u5B8C\u5168\u8EAB\u4EFD\u9A8C\u8BC1
|
||||
|
||||
# 业务错误
|
||||
tenant.not.found=租户不存在
|
||||
data.not.found=找不到ID为{0}的{1}
|
||||
# \u4E1A\u52A1\u9519\u8BEF
|
||||
tenant.not.found=\u79DF\u6237\u4E0D\u5B58\u5728
|
||||
data.not.found=\u627E\u4E0D\u5230ID\u4E3A{0}\u7684{1}
|
||||
|
||||
# 用户相关
|
||||
user.not.found=用户不存在
|
||||
user.username.exists=用户名"{0}"已存在
|
||||
user.email.exists=邮箱"{0}"已存在
|
||||
user.login.error=用户名或密码错误
|
||||
# \u7528\u6237\u76F8\u5173
|
||||
user.not.found=\u7528\u6237\u4E0D\u5B58\u5728
|
||||
user.username.exists=\u7528\u6237\u540D"{0}"\u5DF2\u5B58\u5728
|
||||
user.email.exists=\u90AE\u7BB1"{0}"\u5DF2\u5B58\u5728
|
||||
user.login.error=\u7528\u6237\u540D\u6216\u5BC6\u7801\u9519\u8BEF
|
||||
|
||||
# 系统异常消息
|
||||
system.optimistic.lock.error=数据已被其他用户修改,请刷新后重试
|
||||
system.pessimistic.lock.error=数据正被其他用户操作,请稍后重试
|
||||
system.concurrent.update.error=并发更新冲突,请重试
|
||||
system.retry.exceeded.error=操作重试次数超限,请稍后再试
|
||||
# \u7CFB\u7EDF\u5F02\u5E38\u6D88\u606F
|
||||
system.optimistic.lock.error=\u6570\u636E\u5DF2\u88AB\u5176\u4ED6\u7528\u6237\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5
|
||||
system.pessimistic.lock.error=\u6570\u636E\u6B63\u88AB\u5176\u4ED6\u7528\u6237\u64CD\u4F5C\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5
|
||||
system.concurrent.update.error=\u5E76\u53D1\u66F4\u65B0\u51B2\u7A81\uFF0C\u8BF7\u91CD\u8BD5
|
||||
system.retry.exceeded.error=\u64CD\u4F5C\u91CD\u8BD5\u6B21\u6570\u8D85\u9650\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5
|
||||
|
||||
# Entity Not Found Messages
|
||||
entity.not.found.id=找不到ID为{0}的实体
|
||||
entity.not.found.id=\u627E\u4E0D\u5230ID\u4E3A{0}\u7684\u5B9E\u4F53
|
||||
entity.not.found.message={0}
|
||||
entity.not.found.name.id=找不到ID为{1}的{0}
|
||||
entity.not.found.name.id=\u627E\u4E0D\u5230ID\u4E3A{1}\u7684{0}
|
||||
|
||||
# 依赖注入相关
|
||||
dependency.injection.service.not.found=找不到实体 {0} 对应的服务 (尝试过的bean名称: {1})
|
||||
dependency.injection.repository.not.found=找不到实体 {0} 对应的Repository: {1}
|
||||
dependency.injection.converter.not.found=找不到实体 {0} 对应的Converter: {1}
|
||||
dependency.injection.entitypath.failed=初始化实体 {0} 的EntityPath失败: {1}
|
||||
# \u4F9D\u8D56\u6CE8\u5165\u76F8\u5173
|
||||
dependency.injection.service.not.found=\u627E\u4E0D\u5230\u5B9E\u4F53 {0} \u5BF9\u5E94\u7684\u670D\u52A1 (\u5C1D\u8BD5\u8FC7\u7684bean\u540D\u79F0: {1})
|
||||
dependency.injection.repository.not.found=\u627E\u4E0D\u5230\u5B9E\u4F53 {0} \u5BF9\u5E94\u7684Repository: {1}
|
||||
dependency.injection.converter.not.found=\u627E\u4E0D\u5230\u5B9E\u4F53 {0} \u5BF9\u5E94\u7684Converter: {1}
|
||||
dependency.injection.entitypath.failed=\u521D\u59CB\u5316\u5B9E\u4F53 {0} \u7684EntityPath\u5931\u8D25: {1}
|
||||
|
||||
# JWT相关
|
||||
jwt.token.expired=登录已过期,请重新登录
|
||||
jwt.token.invalid=无效的登录凭证
|
||||
jwt.token.missing=未提供登录凭证
|
||||
# JWT\u76F8\u5173
|
||||
jwt.token.expired=\u767B\u5F55\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55
|
||||
jwt.token.invalid=\u65E0\u6548\u7684\u767B\u5F55\u51ED\u8BC1
|
||||
jwt.token.missing=\u672A\u63D0\u4F9B\u767B\u5F55\u51ED\u8BC1
|
||||
|
||||
# 角色相关错误消息
|
||||
role.not.found=角色不存在
|
||||
role.code.exists=角色编码"{0}"已存在
|
||||
role.name.exists=角色名称"{0}"已存在
|
||||
role.in.use=角色正在使用中,无法删除
|
||||
role.admin.cannot.delete=不能删除超级管理员角色
|
||||
role.admin.cannot.update=不能修改超级管理员角色
|
||||
# \u89D2\u8272\u76F8\u5173\u9519\u8BEF\u6D88\u606F
|
||||
role.not.found=\u89D2\u8272\u4E0D\u5B58\u5728
|
||||
role.code.exists=\u89D2\u8272\u7F16\u7801"{0}"\u5DF2\u5B58\u5728
|
||||
role.name.exists=\u89D2\u8272\u540D\u79F0"{0}"\u5DF2\u5B58\u5728
|
||||
role.in.use=\u89D2\u8272\u6B63\u5728\u4F7F\u7528\u4E2D\uFF0C\u65E0\u6CD5\u5220\u9664
|
||||
role.admin.cannot.delete=\u4E0D\u80FD\u5220\u9664\u8D85\u7EA7\u7BA1\u7406\u5458\u89D2\u8272
|
||||
role.admin.cannot.update=\u4E0D\u80FD\u4FEE\u6539\u8D85\u7EA7\u7BA1\u7406\u5458\u89D2\u8272
|
||||
role.tag.name.exists=\u6807\u7B7E\u540D\u79F0\u5DF2\u5B58\u5728
|
||||
role.tag.not.found=\u6807\u7B7E\u4E0D\u5B58\u5728
|
||||
role.tag.in.use=\u6807\u7B7E\u6B63\u5728\u4F7F\u7528\u4E2D\uFF0C\u65E0\u6CD5\u5220\u9664
|
||||
@ -46,4 +46,7 @@ role.code.exists=Role code already exists
|
||||
role.name.exists=Role name already exists
|
||||
role.in.use=Role is in use and cannot be deleted
|
||||
role.admin.cannot.delete=Cannot delete admin role
|
||||
role.admin.cannot.update=Cannot update admin role
|
||||
role.admin.cannot.update=Cannot update admin role
|
||||
role.tag.name.exists=Tag name already exists
|
||||
role.tag.not.found=Tag not found
|
||||
role.tag.in.use=Tag is in use and cannot be deleted
|
||||
@ -1,47 +1,47 @@
|
||||
# 通用响应
|
||||
response.success=操作成功
|
||||
response.error=系统错误
|
||||
response.invalid.param=无效的参数
|
||||
response.unauthorized=未授权
|
||||
response.forbidden=禁止访问
|
||||
response.not.found=资源未找到
|
||||
response.conflict=资源冲突
|
||||
response.unauthorized.full=访问此资源需要完全身份验证
|
||||
# \u901A\u7528\u54CD\u5E94
|
||||
response.success=\u64CD\u4F5C\u6210\u529F
|
||||
response.error=\u7CFB\u7EDF\u9519\u8BEF
|
||||
response.invalid.param=\u65E0\u6548\u7684\u53C2\u6570
|
||||
response.unauthorized=\u672A\u6388\u6743
|
||||
response.forbidden=\u7981\u6B62\u8BBF\u95EE
|
||||
response.not.found=\u8D44\u6E90\u672A\u627E\u5230
|
||||
response.conflict=\u8D44\u6E90\u51B2\u7A81
|
||||
response.unauthorized.full=\u8BBF\u95EE\u6B64\u8D44\u6E90\u9700\u8981\u5B8C\u5168\u8EAB\u4EFD\u9A8C\u8BC1
|
||||
|
||||
# 业务错误
|
||||
tenant.not.found=租户不存在
|
||||
data.not.found=数据不存在
|
||||
# \u4E1A\u52A1\u9519\u8BEF
|
||||
tenant.not.found=\u79DF\u6237\u4E0D\u5B58\u5728
|
||||
data.not.found=\u6570\u636E\u4E0D\u5B58\u5728
|
||||
|
||||
# 用户相关
|
||||
user.not.found=用户不存在
|
||||
user.username.exists=用户名已存在
|
||||
user.email.exists=邮箱已存在
|
||||
user.login.error=用户名或密码错误
|
||||
# \u7528\u6237\u76F8\u5173
|
||||
user.not.found=\u7528\u6237\u4E0D\u5B58\u5728
|
||||
user.username.exists=\u7528\u6237\u540D\u5DF2\u5B58\u5728
|
||||
user.email.exists=\u90AE\u7BB1\u5DF2\u5B58\u5728
|
||||
user.login.error=\u7528\u6237\u540D\u6216\u5BC6\u7801\u9519\u8BEF
|
||||
|
||||
# 系统异常消息
|
||||
system.optimistic.lock.error=数据已被其他用户修改,请刷新后重试
|
||||
system.pessimistic.lock.error=数据正被其他用户操作,请稍后重试
|
||||
system.concurrent.update.error=并发更新冲突,请重试
|
||||
system.retry.exceeded.error=操作重试次数超限,请稍后再试
|
||||
# \u7CFB\u7EDF\u5F02\u5E38\u6D88\u606F
|
||||
system.optimistic.lock.error=\u6570\u636E\u5DF2\u88AB\u5176\u4ED6\u7528\u6237\u4FEE\u6539\uFF0C\u8BF7\u5237\u65B0\u540E\u91CD\u8BD5
|
||||
system.pessimistic.lock.error=\u6570\u636E\u6B63\u88AB\u5176\u4ED6\u7528\u6237\u64CD\u4F5C\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5
|
||||
system.concurrent.update.error=\u5E76\u53D1\u66F4\u65B0\u51B2\u7A81\uFF0C\u8BF7\u91CD\u8BD5
|
||||
system.retry.exceeded.error=\u64CD\u4F5C\u91CD\u8BD5\u6B21\u6570\u8D85\u9650\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5
|
||||
|
||||
# Entity Not Found Messages
|
||||
entity.not.found.id=找不到ID为{0}的实体
|
||||
entity.not.found.id=\u627E\u4E0D\u5230ID\u4E3A{0}\u7684\u5B9E\u4F53
|
||||
entity.not.found.message={0}
|
||||
entity.not.found.name.id=找不到ID为{1}的{0}
|
||||
entity.not.found.name.id=\u627E\u4E0D\u5230ID\u4E3A{1}\u7684{0}
|
||||
|
||||
# 依赖注入相关
|
||||
dependency.injection.service.not.found=找不到实体 {0} 对应的服务 (尝试过的bean名称: {1})
|
||||
dependency.injection.repository.not.found=找不到实体 {0} 对应的Repository: {1}
|
||||
dependency.injection.converter.not.found=找不到实体 {0} 对应的Converter: {1}
|
||||
dependency.injection.entitypath.failed=初始化实体 {0} 的EntityPath失败: {1}
|
||||
# \u4F9D\u8D56\u6CE8\u5165\u76F8\u5173
|
||||
dependency.injection.service.not.found=\u627E\u4E0D\u5230\u5B9E\u4F53 {0} \u5BF9\u5E94\u7684\u670D\u52A1 (\u5C1D\u8BD5\u8FC7\u7684bean\u540D\u79F0: {1})
|
||||
dependency.injection.repository.not.found=\u627E\u4E0D\u5230\u5B9E\u4F53 {0} \u5BF9\u5E94\u7684Repository: {1}
|
||||
dependency.injection.converter.not.found=\u627E\u4E0D\u5230\u5B9E\u4F53 {0} \u5BF9\u5E94\u7684Converter: {1}
|
||||
dependency.injection.entitypath.failed=\u521D\u59CB\u5316\u5B9E\u4F53 {0} \u7684EntityPath\u5931\u8D25: {1}
|
||||
|
||||
# 角色相关错误消息
|
||||
role.not.found=角色不存在
|
||||
role.code.exists=角色编码已存在
|
||||
role.name.exists=角色名称已存在
|
||||
role.in.use=角色正在使用中,无法删除
|
||||
role.admin.cannot.delete=不能删除超级管理员角色
|
||||
role.admin.cannot.update=不能修改超级管理员角色
|
||||
|
||||
# 请求相关错误消息
|
||||
request.api.not.found=请求的API不存在: {0}
|
||||
# \u89D2\u8272\u76F8\u5173\u9519\u8BEF\u6D88\u606F
|
||||
role.not.found=\u89D2\u8272\u4E0D\u5B58\u5728
|
||||
role.code.exists=\u89D2\u8272\u7F16\u7801\u5DF2\u5B58\u5728
|
||||
role.name.exists=\u89D2\u8272\u540D\u79F0\u5DF2\u5B58\u5728
|
||||
role.in.use=\u89D2\u8272\u6B63\u5728\u4F7F\u7528\u4E2D\uFF0C\u65E0\u6CD5\u5220\u9664
|
||||
role.admin.cannot.delete=\u4E0D\u80FD\u5220\u9664\u8D85\u7EA7\u7BA1\u7406\u5458\u89D2\u8272
|
||||
role.admin.cannot.update=\u4E0D\u80FD\u4FEE\u6539\u8D85\u7EA7\u7BA1\u7406\u5458\u89D2\u8272
|
||||
role.tag.name.exists=\u6807\u7B7E\u540D\u79F0\u5DF2\u5B58\u5728
|
||||
role.tag.not.found=\u6807\u7B7E\u4E0D\u5B58\u5728
|
||||
role.tag.in.use=\u6807\u7B7E\u6B63\u5728\u4F7F\u7528\u4E2D\uFF0C\u65E0\u6CD5\u5220\u9664
|
||||
Loading…
Reference in New Issue
Block a user