ZhuDeKang 5 mesi fa
parent
commit
12f78913a4

+ 2 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/PtServiceController.java

@@ -187,4 +187,6 @@ public class PtServiceController extends BaseController {
     }
 
 
+
+
 }

+ 2 - 2
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/PtTreeCateController.java

@@ -169,7 +169,7 @@ public class PtTreeCateController extends BaseController {
             for (MdModelInfo mdModelInfo : mdModelInfos) {
                 if (StringUtils.isNotNull(mdModelInfo.getMdid()) && StringUtils.isNotNull(mdModelInfo.getCateid())
                         && StringUtils.isNotNull(mdModelInfo.getName())) {
-                    ptTreeCates.add(new PtTreeCate(mdModelInfo.getMdid(), mdModelInfo.getCateid(), mdModelInfo.getName(), "MODEL"));
+                    ptTreeCates.add(new PtTreeCate(mdModelInfo.getMdid(), mdModelInfo.getCateid(), mdModelInfo.getName(), "MODEL",null));
                 }
             }
         }
@@ -179,7 +179,7 @@ public class PtTreeCateController extends BaseController {
                 if (StringUtils.isNotNull(ptService.getSrvId()) &&
                         StringUtils.isNotNull(ptService.getMdid()) &&
                         StringUtils.isNotNull(ptService.getName())) {
-                    ptTreeCates.add(new PtTreeCate(ptService.getSrvId(), ptService.getMdid(), ptService.getName(), "SERVICE"));
+                    ptTreeCates.add(new PtTreeCate(ptService.getSrvId(), ptService.getMdid(), ptService.getName(), "SERVICE",ptService));
                 }
             }
         }

+ 12 - 3
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/PtTreeCate.java

@@ -31,6 +31,7 @@ public class PtTreeCate extends BaseEntity
     /** 父节点序号 */
     @Excel(name = "父节点序号")
     private String treePid;
+    private PtService service;
 
     /** 名称 */
     @Excel(name = "名称")
@@ -54,15 +55,23 @@ public class PtTreeCate extends BaseEntity
 
     private String nodeType;
 
-
-
     private List<PtTreeCate> children = new ArrayList<PtTreeCate>();
 
-    public PtTreeCate(String mdid, String cateid, String name, String model) {
+    public PtTreeCate(String mdid, String cateid, String name, String model,PtService service) {
         this.treeId=mdid;
         this.treePid=cateid;
         this.itemName=name;
         this.nodeType=model;
+        this.service=service;
+    }
+
+
+    public PtService getService() {
+        return service;
+    }
+
+    public void setService(PtService service) {
+        this.service = service;
     }
 
     public String getNodeType() {

+ 12 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/TreeSelectString.java

@@ -17,6 +17,8 @@ public class TreeSelectString  implements Serializable{
     private String label;
     private String nodeType;
 
+    private PtService service;
+
 
     /** 子节点 */
     @JsonInclude(JsonInclude.Include.NON_EMPTY)
@@ -38,9 +40,19 @@ public class TreeSelectString  implements Serializable{
         this.label = menu.getItemName();
         this.nodeType = menu.getNodeType();
         this.pid = menu.getTreePid();
+        this.service = menu.getService();
         this.children = menu.getChildren().stream().map(TreeSelectString::new).collect(Collectors.toList());
     }
 
+
+    public PtService getService() {
+        return service;
+    }
+
+    public void setService(PtService service) {
+        this.service = service;
+    }
+
     public String getPid() {
         return pid;
     }

+ 3 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/mapper/PtServiceParamMapper.java

@@ -1,5 +1,7 @@
 package com.ruoyi.interfaces.mapper;
 
+import com.ruoyi.common.annotation.DataSource;
+import com.ruoyi.common.enums.DataSourceType;
 import com.ruoyi.interfaces.domain.PtServiceParam;
 import com.ruoyi.interfaces.domain.PtServiceParamKey;
 import org.apache.ibatis.annotations.Param;
@@ -8,6 +10,7 @@ import org.springframework.stereotype.Repository;
 import java.util.List;
 
 @Repository
+@DataSource(DataSourceType.SLAVE)
 public interface PtServiceParamMapper {
 
     int deleteByPrimaryKey(PtServiceParamKey key);

+ 3 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/mapper/PtServiceReturnMapper.java

@@ -1,5 +1,7 @@
 package com.ruoyi.interfaces.mapper;
 
+import com.ruoyi.common.annotation.DataSource;
+import com.ruoyi.common.enums.DataSourceType;
 import com.ruoyi.interfaces.domain.PtServiceParamKey;
 import com.ruoyi.interfaces.domain.PtServiceReturn;
 import org.apache.ibatis.annotations.Param;
@@ -8,6 +10,7 @@ import org.springframework.stereotype.Repository;
 import java.util.List;
 
 @Repository
+@DataSource(DataSourceType.SLAVE)
 public interface PtServiceReturnMapper {
 
     int deleteByPrimaryKey(PtServiceParamKey key);

+ 1 - 2
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/PtServiceServiceImpl.java

@@ -142,8 +142,7 @@ public class PtServiceServiceImpl extends ServiceImpl<PtServiceMapper, PtService
 
     @Override
     public String testRun(PtService ptService) {
-        ptService.setUrl("http://localhost:8082/model/flow/list");
-        ptService.setRqtype("GET");
+
 
         String tokenUrl = "http://localhost:9002/sh-api/login";
         String bodyPar = "{\n" +

+ 1 - 1
ruoyi-api-patform/src/main/resources/mapper/interfaces/PtServiceMapper.xml

@@ -177,7 +177,7 @@
         #{developContacter,jdbcType=VARCHAR},
         #{maintainUnit,jdbcType=VARCHAR},
         #{maintainContacer,jdbcType=VARCHAR},
-        #{viewNum, jdbcType=INTEGER}
+        #{viewNum, jdbcType=INTEGER},
         #{sort, jdbcType=INTEGER}
     </sql>
     <sql id="page_where">