|
@@ -5,7 +5,6 @@ import com.persagy.labsl.Opts
|
|
|
import com.persagy.labsl.models.entities.tpt.Graph
|
|
|
import com.persagy.labsl.models.entities.tpt.pub.GraphPub
|
|
|
import com.persagy.labsl.models.response.SCommonResponse
|
|
|
-import com.persagy.labsl.services.GraphLogicService
|
|
|
import com.persagy.labsl.services.GraphService
|
|
|
import com.persagy.labsl.services.pub.GraphPubService
|
|
|
import com.persagy.service.models.requests.SCreateRequest
|
|
@@ -16,7 +15,6 @@ import com.persagy.service.models.responses.SCreateResponse
|
|
|
import com.persagy.service.models.responses.SQueryResponse
|
|
|
import io.swagger.v3.oas.annotations.Operation
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag
|
|
|
-import org.springframework.beans.factory.annotation.Autowired
|
|
|
import org.springframework.web.bind.annotation.PostMapping
|
|
|
import org.springframework.web.bind.annotation.RequestBody
|
|
|
import org.springframework.web.bind.annotation.RequestMapping
|
|
@@ -31,8 +29,6 @@ import org.springframework.web.bind.annotation.RestController
|
|
|
@RestController
|
|
|
@RequestMapping("/graph")
|
|
|
class GraphController {
|
|
|
- @Autowired
|
|
|
- lateinit var graphLogicService: GraphLogicService
|
|
|
|
|
|
/**
|
|
|
* 创建图
|
|
@@ -43,7 +39,7 @@ class GraphController {
|
|
|
@Operation(summary ="草稿箱-创建图", description = "id和graphId为必填,图中会包含多个节点,详细节点结构见示例")
|
|
|
@PostMapping("/drafts/create")
|
|
|
fun create(@RequestBody request: SCreateRequest<Graph>): SCreateResponse<Graph> {
|
|
|
- return graphLogicService.draftsCreate(request)
|
|
|
+ return GraphService.draftsCreateLogic(request)
|
|
|
} // Function create()
|
|
|
|
|
|
/**
|
|
@@ -55,7 +51,7 @@ class GraphController {
|
|
|
@Operation(summary = "草稿箱-保存图形", description = "")
|
|
|
@PostMapping("/drafts/save")
|
|
|
fun save(@RequestBody graph: Graph): SCreateResponse<Graph> {
|
|
|
- return graphLogicService.save(graph)
|
|
|
+ return GraphService.saveLogic(graph)
|
|
|
} // Function save()
|
|
|
|
|
|
/**
|
|
@@ -67,7 +63,7 @@ class GraphController {
|
|
|
@Operation(summary="草稿箱-发布图形", description =" Id 和 GraphId 必须填写")
|
|
|
@PostMapping("/drafts/publish")
|
|
|
fun pubDrawings(@RequestBody graph: GraphPub): SCreateResponse<GraphPub>{
|
|
|
- return graphLogicService.pubDrawings(graph)
|
|
|
+ return GraphService.pubDrawings(graph)
|
|
|
} // Function pubDrawings()
|
|
|
|
|
|
|
|
@@ -80,7 +76,7 @@ class GraphController {
|
|
|
@Operation(summary = "草稿箱-移至回收站", description = " Id 和 GraphId 必填")
|
|
|
@PostMapping(value = ["/drafts/recycle"])
|
|
|
fun recycle(@RequestBody idList: ArrayList<Graph>): SBaseResponse {
|
|
|
- return graphLogicService.recycle(idList)
|
|
|
+ return GraphService.recycle(idList)
|
|
|
} // Function recycle()
|
|
|
|
|
|
/**
|
|
@@ -92,7 +88,7 @@ class GraphController {
|
|
|
@Operation(summary = "已发布-图形移至回收站", description = "Id 和 GraphId 必填")
|
|
|
@PostMapping(value = ["/pub/recycle"])
|
|
|
fun recyclePub(@RequestBody idList: ArrayList<Graph>): SBaseResponse{
|
|
|
- return graphLogicService.recyclePub(idList)
|
|
|
+ return GraphService.recyclePub(idList)
|
|
|
} // Function recyclePub()
|
|
|
|
|
|
/**
|
|
@@ -104,7 +100,7 @@ class GraphController {
|
|
|
@Operation(summary = "草稿箱-更新图形信息", description = "Id 和 GraphId 必填")
|
|
|
@PostMapping(value = ["/drafts/update"])
|
|
|
fun update(@RequestBody request: SUpdateRequest<Graph>): SBaseResponse {
|
|
|
- return graphLogicService.draftsUpdate(request)
|
|
|
+ return GraphService.draftsUpdate(request)
|
|
|
} // Function update()
|
|
|
|
|
|
/**
|
|
@@ -164,7 +160,7 @@ class GraphController {
|
|
|
@Operation(summary = "已发布-更新图形信息", description = "")
|
|
|
@PostMapping(value = ["/pub/update"])
|
|
|
fun updatePub(@RequestBody request: SUpdateRequest<GraphPub>): SBaseResponse {
|
|
|
- return graphLogicService.pubUpdate(request)
|
|
|
+ return GraphService.pubUpdate(request)
|
|
|
} // Function update()
|
|
|
|
|
|
/**
|
|
@@ -176,7 +172,7 @@ class GraphController {
|
|
|
@Operation(summary = "回收站- 恢复图形", description = "Id 和 GraphId 必填 ")
|
|
|
@PostMapping(value = ["recycle/recovery"])
|
|
|
fun recovery(@RequestBody graph: Graph): SBaseResponse{
|
|
|
- return graphLogicService.recovery(graph)
|
|
|
+ return GraphService.recovery(graph)
|
|
|
} // Fun recovery()
|
|
|
|
|
|
/**
|
|
@@ -188,7 +184,7 @@ class GraphController {
|
|
|
@Operation(summary = "回收站-根据id删除图形信息,删除草稿箱图形", description = "Id 和 GraphId 必填 ")
|
|
|
@PostMapping(value = ["recycle/delete"])
|
|
|
fun delete(@RequestBody idList: ArrayList<Graph>): SBaseResponse {
|
|
|
- return graphLogicService.deleteByKeysList(idList)
|
|
|
+ return GraphService.deleteByKeysList(idList)
|
|
|
} // Function delete()
|
|
|
|
|
|
|