Browse Source

fix bug: 修复自研框架无法找到对应mapper问题

lijie 2 years ago
parent
commit
1c398134c0

+ 3 - 8
labsl/src/main/kotlin/com/persagy/labsl/controller/MarkersController.kt

@@ -1,7 +1,6 @@
 package com.persagy.labsl.controller
 
 import com.persagy.labsl.models.entities.tpt.Markers
-import com.persagy.labsl.services.MarkersLogicService
 import com.persagy.labsl.services.MarkersService
 import com.persagy.service.models.requests.SCreateRequest
 import com.persagy.service.models.requests.SQueryRequest
@@ -11,7 +10,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
@@ -26,9 +24,6 @@ import org.springframework.web.bind.annotation.RestController
 @RestController
 @RequestMapping("/marker")
 class MarkersController {
-    @Autowired
-    lateinit var markersLogicService: MarkersLogicService
-
 
     /**
      * 注释说明
@@ -39,7 +34,7 @@ class MarkersController {
    @Operation(summary="注释说明创建", description ="id 为系统图的图对象id,graphId 为系统图的图 id ,markerId 为当前标识的id,id 和 graphId 必须填为某一个系统图中的 id,markerId 是当前要创建的对象id不传会自动生成(32位uuid)")
     @PostMapping("/create")
     fun create(@RequestBody request: SCreateRequest<Markers>): SCreateResponse<Markers> {
-        return markersLogicService.creates(request)
+        return MarkersService.creates(request)
     }
 
     /**
@@ -51,7 +46,7 @@ class MarkersController {
    @Operation(summary = "根据批量删除标识信息对象", description = "创建中有介绍id的说明请查看,删除时必须传入 id、graphId、markerId 才能确认删除的是当前的标识对象")
     @PostMapping(value = ["/delete"])
     fun delete(@RequestBody idList: ArrayList<Markers>): SBaseResponse {
-        return markersLogicService.deletes(idList)
+        return MarkersService.deletes(idList)
     }
 
     /**
@@ -63,7 +58,7 @@ class MarkersController {
    @Operation(summary = "批量更新标识信息", description = "创建中有介绍id的说明请查看,id、graphId、markerId 为必填信息点,参考创建后的对象信息点,修改哪个信息点直接写在对象里面即可,详细的使用方式参考 web 端接口使用规范")
     @PostMapping(value = ["/update"])
     fun update(@RequestBody request: SUpdateRequest<Markers>): SBaseResponse {
-        return markersLogicService.updateList(request)
+        return MarkersService.updateList(request)
     }
 
     /**

+ 3 - 7
labsl/src/main/kotlin/com/persagy/labsl/controller/NodeController.kt

@@ -1,7 +1,6 @@
 package com.persagy.labsl.controller
 
 import com.persagy.labsl.models.entities.tpt.Node
-import com.persagy.labsl.services.NodeLogicService
 import com.persagy.labsl.services.NodeService
 import com.persagy.service.models.requests.SCreateRequest
 import com.persagy.service.models.requests.SQueryRequest
@@ -12,7 +11,6 @@ import com.persagy.service.models.responses.SQueryResponse
 import io.swagger.v3.oas.annotations.Operation
 import io.swagger.v3.oas.annotations.tags.Tag
 import lombok.extern.slf4j.Slf4j
-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
@@ -28,8 +26,6 @@ import org.springframework.web.bind.annotation.RestController
 @RequestMapping("/node")
 @Slf4j
 class NodeController {
-    @Autowired
-    lateinit var nodeLogicService: NodeLogicService
 
     /**
      * 图例节点
@@ -40,7 +36,7 @@ class NodeController {
    @Operation(summary="创建设备节点", description ="id 为系统图的图对象id,graphId 为系统图的图id ,nodeId 为当前节点的id,id 和 graphId 必须填为某一个系统图中的 id,nodeId 是当前要创建的对象id不传会自动生成(32位uuid)")
     @PostMapping("/create")
     fun create(@RequestBody request: SCreateRequest<Node>): SCreateResponse<Node> {
-        return nodeLogicService.creates(request)
+        return NodeService.creates(request)
     } // Function create()
 
     /**
@@ -52,7 +48,7 @@ class NodeController {
    @Operation(summary = "根据id删除图例节点信息", description = "创建中有介绍id的说明请查看,删除时必须传入 id、graphId、nodeId 才能确认删除的是当前的设备节点")
     @PostMapping(value = ["/delete"])
     fun delete(@RequestBody idList: ArrayList<Node>): SBaseResponse {
-        return nodeLogicService.deletes(idList)
+        return NodeService.deletes(idList)
     } // Function delete()
 
     /**
@@ -64,7 +60,7 @@ class NodeController {
    @Operation(summary = "更新图例节点信息", description = "创建中有介绍 id 的说明请查看,id、graphId、nodeId 为必填信息点,参考创建后的对象信息点,然后修改了哪个信息点传哪个信息点,详细的使用方式参考 web 端接口使用规范")
     @PostMapping(value = ["/update"])
     fun update(@RequestBody request: SUpdateRequest<Node>): SBaseResponse {
-        return nodeLogicService.updateList(request)
+        return NodeService.updateList(request)
     } // Function update()
 
     /**

+ 3 - 7
labsl/src/main/kotlin/com/persagy/labsl/controller/RelationController.kt

@@ -1,7 +1,6 @@
 package com.persagy.labsl.controller
 
 import com.persagy.labsl.models.entities.tpt.Relation
-import com.persagy.labsl.services.RelationLogicService
 import com.persagy.labsl.services.RelationService
 import com.persagy.service.models.requests.SCreateRequest
 import com.persagy.service.models.requests.SQueryRequest
@@ -11,7 +10,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
@@ -26,8 +24,6 @@ import org.springframework.web.bind.annotation.RestController
 @RestController
 @RequestMapping("/relation")
 class RelationController {
-    @Autowired
-    lateinit var relationLogicService: RelationLogicService
 
     /**
      * 管线创建
@@ -38,7 +34,7 @@ class RelationController {
    @Operation(summary="管线创建", description ="id 为系统图的图对象id,graphId 为系统图的图id ,relationId 为当前管线对象的id,id 和 graphId 必须填为某一个系统图中的id,relationId 是当前要创建的对象 id 不传会自动生成(32位uuid)")
     @PostMapping("/create")
     fun create(@RequestBody request: SCreateRequest<Relation>): SCreateResponse<Relation> {
-        return relationLogicService.creates(request)
+        return RelationService.creates(request)
     }
 
     /**
@@ -50,7 +46,7 @@ class RelationController {
    @Operation(summary = "根据id删除管线信息", description = "创建中有介绍id的说明请查看,删除时必须传入 id、graphId、relationId 才能确认删除的是当前的标识对象")
     @PostMapping(value = ["/delete"])
     fun delete(@RequestBody idList: ArrayList<Relation>): SBaseResponse {
-        return relationLogicService.deletes(idList)
+        return RelationService.deletes(idList)
     }
 
     /**
@@ -62,7 +58,7 @@ class RelationController {
    @Operation(summary = "更新管线信息", description = "创建中有介绍id的说明请查看,id、graphId、relationId 为必填信息点,参考创建后的对象信息点,修改哪个信息点直接写在对象里面即可,详细的使用方式参考 web 端接口使用规范")
     @PostMapping(value = ["/update"])
     fun update(@RequestBody request: SUpdateRequest<Relation>): SBaseResponse {
-        return relationLogicService.updateList(request)
+        return RelationService.updateList(request)
     }
 
     /**

+ 3 - 3
labsl/src/main/kotlin/com/persagy/labsl/services/MarkersLogicService.kt

@@ -18,17 +18,17 @@ interface MarkersLogicService {
      * @author : lijie
      * Update By 2022/5/31 19:51
      */
-    fun creates(request: SCreateRequest<Markers>): SCreateResponse<Markers>
+    fun createsLogic(request: SCreateRequest<Markers>): SCreateResponse<Markers>
     /**
      * 删除注释说明
      * @author : lijie
      * Update By 2022/5/31 19:52
      */
-    fun deletes(idList: ArrayList<Markers>): SBaseResponse
+    fun deletesLogic(idList: ArrayList<Markers>): SBaseResponse
     /**
      * 更新注释说明
      * @author : lijie
      * Update By 2022/5/31 19:53
      */
-    fun updateList(request: SUpdateRequest<Markers>): SBaseResponse
+    fun updateListLogic(request: SUpdateRequest<Markers>): SBaseResponse
 }

+ 30 - 2
labsl/src/main/kotlin/com/persagy/labsl/services/MarkersService.kt

@@ -6,8 +6,10 @@ import com.persagy.mybatis.SMybatisDao
 import com.persagy.service.SObjectService
 import com.persagy.service.models.enums.SResponseType
 import com.persagy.service.models.requests.SCreateRequest
+import com.persagy.service.models.requests.SUpdateRequest
 import com.persagy.service.models.responses.SBaseResponse
 import com.persagy.service.models.responses.SCreateResponse
+import org.springframework.transaction.annotation.Transactional
 import org.springframework.web.bind.annotation.RequestBody
 import java.util.*
 
@@ -17,7 +19,7 @@ import java.util.*
  * @author wx  <zhangweixin@sagacloud.com>
  */
 object MarkersService : SObjectService<Markers>(SMybatisDao(
-    Markers::class.java)) {
+    Markers::class.java)),MarkersLogicService {
     /**
      * 创建说明
      *
@@ -119,5 +121,31 @@ object MarkersService : SObjectService<Markers>(SMybatisDao(
             SBaseResponse(SResponseType.failure,e.message!!)
         }
     }
-
+    /**
+     * 创建注释说明
+     * @author : lijie
+     * Update By 2022/6/1 11:53
+     */
+    @Transactional
+    override fun createsLogic(request: SCreateRequest<Markers>): SCreateResponse<Markers> {
+       return creates(request)
+    }
+    /**
+     * 删除注释说明
+     * @author : lijie
+     * Update By 2022/6/1 11:53
+     */
+    @Transactional
+    override fun deletesLogic(idList: ArrayList<Markers>): SBaseResponse {
+       return deletes(idList)
+    }
+    /**
+     * 更新注释说明
+     * @author : lijie
+     * Update By 2022/6/1 11:54
+     */
+    @Transactional
+    override fun updateListLogic(request: SUpdateRequest<Markers>): SBaseResponse {
+        return updateList(request)
+    }
 }

+ 3 - 3
labsl/src/main/kotlin/com/persagy/labsl/services/NodeLogicService.kt

@@ -18,17 +18,17 @@ interface NodeLogicService {
      * @author : lijie
      * Update By 2022/5/31 19:51
      */
-    fun creates(request: SCreateRequest<Node>): SCreateResponse<Node>
+    fun createsLogic(request: SCreateRequest<Node>): SCreateResponse<Node>
     /**
      * 删除注释说明
      * @author : lijie
      * Update By 2022/5/31 19:52
      */
-    fun deletes(idList: ArrayList<Node>): SBaseResponse
+    fun deletesLogic(idList: ArrayList<Node>): SBaseResponse
     /**
      * 更新注释说明
      * @author : lijie
      * Update By 2022/5/31 19:53
      */
-    fun updateList(request: SUpdateRequest<Node>): SBaseResponse
+    fun updateListLogic(request: SUpdateRequest<Node>): SBaseResponse
 }

+ 30 - 2
labsl/src/main/kotlin/com/persagy/labsl/services/NodeService.kt

@@ -6,8 +6,10 @@ import com.persagy.mybatis.SMybatisDao
 import com.persagy.service.SObjectService
 import com.persagy.service.models.enums.SResponseType
 import com.persagy.service.models.requests.SCreateRequest
+import com.persagy.service.models.requests.SUpdateRequest
 import com.persagy.service.models.responses.SBaseResponse
 import com.persagy.service.models.responses.SCreateResponse
+import org.springframework.transaction.annotation.Transactional
 import org.springframework.web.bind.annotation.RequestBody
 import java.util.*
 
@@ -17,7 +19,7 @@ import java.util.*
  * @author wx  <zhangweixin@sagacloud.com>
  */
 object NodeService : SObjectService<Node>(SMybatisDao(
-    Node::class.java)) {
+    Node::class.java)),NodeLogicService {
     /**
      * 创建之前
      *
@@ -131,6 +133,32 @@ object NodeService : SObjectService<Node>(SMybatisDao(
             SBaseResponse(SResponseType.failure,e.message!!)
         }
     }
+    /**
+     * 创建节点
+     * @author : lijie
+     * Update By 2022/6/1 11:56
+     */
+    @Transactional
+    override fun createsLogic(request: SCreateRequest<Node>): SCreateResponse<Node> {
+       return creates(request)
+    }
 
-
+    /**
+     * 删除节点
+     * @author : lijie
+     * Update By 2022/6/1 11:57
+     */
+    @Transactional
+    override fun deletesLogic(idList: ArrayList<Node>): SBaseResponse {
+        return deletes(idList)
+    }
+    /**
+     * 编辑节点
+     * @author : lijie
+     * Update By 2022/6/1 11:58
+     */
+    @Transactional
+    override fun updateListLogic(request: SUpdateRequest<Node>): SBaseResponse {
+        return updateList(request)
+    }
 }

+ 6 - 6
labsl/src/main/kotlin/com/persagy/labsl/services/RelationLogicService.kt

@@ -14,21 +14,21 @@ import com.persagy.service.models.responses.SCreateResponse
 interface RelationLogicService {
 
     /**
-     * 创建注释说明
+     * 创建连线数据
      * @author : lijie
      * Update By 2022/5/31 19:51
      */
-    fun creates(request: SCreateRequest<Relation>): SCreateResponse<Relation>
+    fun createsLogic(request: SCreateRequest<Relation>): SCreateResponse<Relation>
     /**
-     * 删除注释说明
+     * 删除连线数据
      * @author : lijie
      * Update By 2022/5/31 19:52
      */
-    fun deletes(idList: ArrayList<Relation>): SBaseResponse
+    fun deletesLogic(idList: ArrayList<Relation>): SBaseResponse
     /**
-     * 更新注释说明
+     * 更新连线数据
      * @author : lijie
      * Update By 2022/5/31 19:53
      */
-    fun updateList(request: SUpdateRequest<Relation>): SBaseResponse
+    fun updateListLogic(request: SUpdateRequest<Relation>): SBaseResponse
 }

+ 30 - 3
labsl/src/main/kotlin/com/persagy/labsl/services/RelationService.kt

@@ -6,8 +6,10 @@ import com.persagy.mybatis.SMybatisDao
 import com.persagy.service.SObjectService
 import com.persagy.service.models.enums.SResponseType
 import com.persagy.service.models.requests.SCreateRequest
+import com.persagy.service.models.requests.SUpdateRequest
 import com.persagy.service.models.responses.SBaseResponse
 import com.persagy.service.models.responses.SCreateResponse
+import org.springframework.transaction.annotation.Transactional
 import org.springframework.web.bind.annotation.RequestBody
 import java.util.*
 
@@ -17,7 +19,7 @@ import java.util.*
  * @author wx  <zhangweixin@sagacloud.com>
  */
 object RelationService : SObjectService<Relation>(SMybatisDao(
-    Relation::class.java)){
+    Relation::class.java)),RelationLogicService {
     /**
      * 创建之前的操作
      *
@@ -133,6 +135,31 @@ object RelationService : SObjectService<Relation>(SMybatisDao(
             SBaseResponse(SResponseType.failure,e.message!!)
         }
     }
-
-
+    /**
+     * 创建连线数据
+     * @author : lijie
+     * Update By 2022/6/1 11:59
+     */
+    @Transactional
+    override fun createsLogic(request: SCreateRequest<Relation>): SCreateResponse<Relation> {
+        return creates(request)
+    }
+    /**
+     * 删除连线数据
+     * @author : lijie
+     * Update By 2022/6/1 12:00
+     */
+    @Transactional
+    override fun deletesLogic(idList: ArrayList<Relation>): SBaseResponse {
+        return deletes(idList)
+    }
+    /**
+     * 更新连线数据
+     * @author : lijie
+     * Update By 2022/6/1 12:01
+     */
+    @Transactional
+    override fun updateListLogic(request: SUpdateRequest<Relation>): SBaseResponse {
+        return updateList(request)
+    }
 }

+ 0 - 44
labsl/src/main/kotlin/com/persagy/labsl/services/impl/MarkersLogicServiceImpl.kt

@@ -1,44 +0,0 @@
-package com.persagy.labsl.services.impl
-
-import com.persagy.labsl.models.entities.tpt.Markers
-import com.persagy.labsl.services.MarkersLogicService
-import com.persagy.labsl.services.MarkersService
-import com.persagy.service.models.requests.SCreateRequest
-import com.persagy.service.models.requests.SUpdateRequest
-import com.persagy.service.models.responses.SBaseResponse
-import com.persagy.service.models.responses.SCreateResponse
-import lombok.extern.slf4j.Slf4j
-import org.springframework.stereotype.Service
-import org.springframework.transaction.annotation.Transactional
-
-@Slf4j
-@Service
-open class MarkersLogicServiceImpl: MarkersLogicService {
-    /**
-     * 批量创建注释说明
-     * @author : lijie
-     * Update By 2022/5/31 19:54
-     */
-    @Transactional
-    override fun creates(request: SCreateRequest<Markers>): SCreateResponse<Markers> {
-        return MarkersService.creates(request)
-    }
-    /**
-     * 批量删除注释说明
-     * @author : lijie
-     * Update By 2022/5/31 19:54
-     */
-    @Transactional
-    override fun deletes(idList: ArrayList<Markers>): SBaseResponse {
-        return MarkersService.deletes(idList)
-    }
-    /**
-     * 批量更新注释说明
-     * @author : lijie
-     * Update By 2022/5/31 19:55
-     */
-    @Transactional
-    override fun updateList(request: SUpdateRequest<Markers>): SBaseResponse {
-        return MarkersService.updateList(request)
-    }
-}

+ 0 - 44
labsl/src/main/kotlin/com/persagy/labsl/services/impl/NodeLogicServiceImpl.kt

@@ -1,44 +0,0 @@
-package com.persagy.labsl.services.impl
-
-import com.persagy.labsl.models.entities.tpt.Node
-import com.persagy.labsl.services.NodeLogicService
-import com.persagy.labsl.services.NodeService
-import com.persagy.service.models.requests.SCreateRequest
-import com.persagy.service.models.requests.SUpdateRequest
-import com.persagy.service.models.responses.SBaseResponse
-import com.persagy.service.models.responses.SCreateResponse
-import lombok.extern.slf4j.Slf4j
-import org.springframework.stereotype.Service
-import org.springframework.transaction.annotation.Transactional
-
-@Slf4j
-@Service
-open class NodeLogicServiceImpl: NodeLogicService {
-    /**
-     * 批量创建注释说明
-     * @author : lijie
-     * Update By 2022/5/31 19:54
-     */
-    @Transactional
-    override fun creates(request: SCreateRequest<Node>): SCreateResponse<Node> {
-        return NodeService.creates(request)
-    }
-    /**
-     * 批量删除注释说明
-     * @author : lijie
-     * Update By 2022/5/31 19:54
-     */
-    @Transactional
-    override fun deletes(idList: ArrayList<Node>): SBaseResponse {
-        return NodeService.deletes(idList)
-    }
-    /**
-     * 批量更新注释说明
-     * @author : lijie
-     * Update By 2022/5/31 19:55
-     */
-    @Transactional
-    override fun updateList(request: SUpdateRequest<Node>): SBaseResponse {
-        return NodeService.updateList(request)
-    }
-}

+ 0 - 44
labsl/src/main/kotlin/com/persagy/labsl/services/impl/RelationLogicServiceImpl.kt

@@ -1,44 +0,0 @@
-package com.persagy.labsl.services.impl
-
-import com.persagy.labsl.models.entities.tpt.Relation
-import com.persagy.labsl.services.RelationLogicService
-import com.persagy.labsl.services.RelationService
-import com.persagy.service.models.requests.SCreateRequest
-import com.persagy.service.models.requests.SUpdateRequest
-import com.persagy.service.models.responses.SBaseResponse
-import com.persagy.service.models.responses.SCreateResponse
-import lombok.extern.slf4j.Slf4j
-import org.springframework.stereotype.Service
-import org.springframework.transaction.annotation.Transactional
-
-@Slf4j
-@Service
-open class RelationLogicServiceImpl: RelationLogicService {
-    /**
-     * 批量创建注释说明
-     * @author : lijie
-     * Update By 2022/5/31 19:54
-     */
-    @Transactional
-    override fun creates(request: SCreateRequest<Relation>): SCreateResponse<Relation> {
-        return RelationService.creates(request)
-    }
-    /**
-     * 批量删除注释说明
-     * @author : lijie
-     * Update By 2022/5/31 19:54
-     */
-    @Transactional
-    override fun deletes(idList: ArrayList<Relation>): SBaseResponse {
-        return RelationService.deletes(idList)
-    }
-    /**
-     * 批量更新注释说明
-     * @author : lijie
-     * Update By 2022/5/31 19:55
-     */
-    @Transactional
-    override fun updateList(request: SUpdateRequest<Relation>): SBaseResponse {
-        return RelationService.updateList(request)
-    }
-}