GraphLogicServiceImpl.kt 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. package com.persagy.labsl.services.impl
  2. import com.persagy.labsl.models.entities.tpt.Graph
  3. import com.persagy.labsl.models.entities.tpt.pub.GraphPub
  4. import com.persagy.labsl.services.GraphLogicService
  5. import com.persagy.labsl.services.GraphService
  6. import com.persagy.service.models.requests.SCreateRequest
  7. import com.persagy.service.models.requests.SUpdateRequest
  8. import com.persagy.service.models.responses.SBaseResponse
  9. import com.persagy.service.models.responses.SCreateResponse
  10. import lombok.extern.slf4j.Slf4j
  11. import org.springframework.stereotype.Service
  12. import org.springframework.transaction.annotation.Transactional
  13. /**
  14. * 图逻辑处理
  15. * @author : lijie
  16. * Update By 2022/5/27 18:25
  17. */
  18. @Slf4j
  19. @Service
  20. open class GraphLogicServiceImpl : GraphLogicService {
  21. /**
  22. * 草稿箱-创建图
  23. * @author : lijie
  24. * Update By 2022/5/27 18:26
  25. */
  26. @Transactional
  27. override fun draftsCreate(request: SCreateRequest<Graph>): SCreateResponse<Graph> {
  28. return GraphService.draftsCreate(request);
  29. }
  30. /**
  31. * 草稿箱-保存图
  32. * @author : lijie
  33. * Update By 2022/5/27 18:35
  34. */
  35. @Transactional
  36. override fun save(graph: Graph): SCreateResponse<Graph> {
  37. return GraphService.save(graph);
  38. }
  39. /**
  40. * 发布草稿图
  41. * @author : lijie
  42. * Update By 2022/5/27 18:48
  43. */
  44. @Transactional
  45. override fun pubDrawings(graph: GraphPub): SCreateResponse<GraphPub> {
  46. return GraphService.pubDrawings(graph)
  47. }
  48. /**
  49. * 草稿移出/移至回收站
  50. * @author : lijie
  51. * Update By 2022/5/31 19:23
  52. */
  53. @Transactional
  54. override fun recycle(idList: ArrayList<Graph>): SBaseResponse {
  55. return GraphService.recycle(idList)
  56. }
  57. /**
  58. * 已发布图形移出/移至回收站
  59. * @author : lijie
  60. * Update By 2022/5/31 19:24
  61. */
  62. @Transactional
  63. override fun recyclePub(idList: ArrayList<Graph>): SBaseResponse {
  64. return GraphService.recyclePub(idList)
  65. }
  66. /**
  67. * 草稿的更新操作
  68. * @author : lijie
  69. * Update By 2022/5/31 19:31
  70. */
  71. @Transactional
  72. override fun draftsUpdate(request: SUpdateRequest<Graph>): SBaseResponse {
  73. return GraphService.draftsUpdate(request)
  74. }
  75. /**
  76. * 已发布操作的更新操作
  77. * @author : lijie
  78. * Update By 2022/5/31 19:31
  79. */
  80. @Transactional
  81. override fun pubUpdate(request: SUpdateRequest<GraphPub>): SBaseResponse {
  82. return GraphService.pubUpdate(request)
  83. }
  84. /**
  85. * 从回收站恢复图形
  86. * @author : lijie
  87. * Update By 2022/5/31 19:40
  88. */
  89. @Transactional
  90. override fun recovery(graph: Graph): SBaseResponse {
  91. return GraphService.recovery(graph)
  92. }
  93. /**
  94. * 根据id删除图形
  95. * @author : lijie
  96. * Update By 2022/5/31 19:43
  97. */
  98. @Transactional
  99. override fun deleteByKeysList(idList: ArrayList<Graph>): SBaseResponse {
  100. return GraphService.deleteByKeysList(idList)
  101. }
  102. }