You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
2.0 KiB
Java
53 lines
2.0 KiB
Java
package com.supervision.nebula.controller;
|
|
|
|
|
|
import com.supervision.nebula.dto.graph.GraphAddAttribute;
|
|
import com.supervision.nebula.dto.graph.GraphDelAttribute;
|
|
import com.supervision.nebula.dto.graph.GraphDropAttribute;
|
|
import com.supervision.nebula.service.AttributeService;
|
|
import com.supervision.nebula.service.GraphCommonService;
|
|
import com.supervision.nebula.util.NebulaUtil;
|
|
import com.supervision.nebula.vo.CommonVo;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import lombok.RequiredArgsConstructor;
|
|
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;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* @author fulin
|
|
*/
|
|
@RestController
|
|
@RequestMapping("/attribute")
|
|
@Tag(name = "属性编辑控制器")
|
|
@RequiredArgsConstructor
|
|
public class AttributeManageController {
|
|
|
|
private final GraphCommonService graphCommonService;
|
|
|
|
private final AttributeService attributeService;
|
|
|
|
@PostMapping("/dropAttribute")
|
|
@Operation(summary = "删除属性(删除 space空间 tag标签 edge边类型)")
|
|
public List<CommonVo> dropAttribute(@RequestBody GraphDropAttribute graphDropAttribute) {
|
|
return attributeService.dropAttribute(graphDropAttribute);
|
|
}
|
|
|
|
@PostMapping("/addAttributeProperty")
|
|
@Operation(summary = "增加属性的子属性(tag标签的属性 edge边类型的属性)")
|
|
public List<CommonVo> addAttributeProperty(@RequestBody GraphAddAttribute graphAddAttribute) {
|
|
return attributeService.addAttributeProperty(graphAddAttribute);
|
|
}
|
|
|
|
@PostMapping("/delAttributeProperty")
|
|
@Operation(summary = "删除属性的子属性(tag标签的属性 edge边类型的属性)")
|
|
public List<CommonVo> delAttributeProperty(@RequestBody GraphDelAttribute graphDelAttribute) {
|
|
return graphCommonService.executeJson(NebulaUtil.delAttributeProperty(graphDelAttribute), CommonVo.class);
|
|
}
|
|
|
|
}
|