EntityRelationController.java 文件源码

java
阅读 27 收藏 0 点赞 0 评论 0

项目:iotplatform 作者:
@PreAuthorize("hasAnyAuthority('SYS_ADMIN', 'TENANT_ADMIN', 'CUSTOMER_USER')")
@RequestMapping(value = "/relation", method = RequestMethod.POST)
@ResponseStatus(value = HttpStatus.OK)
public void saveRelation(@RequestBody EntityRelation relation) throws IoTPException {
  try {
    checkNotNull(relation);
    checkEntityId(relation.getFrom());
    checkEntityId(relation.getTo());
    if (relation.getTypeGroup() == null) {
      relation.setTypeGroup(RelationTypeGroup.COMMON);
    }
    relationService.saveRelation(relation).get();
  } catch (Exception e) {
    throw handleException(e);
  }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号