ZhuDeKang vor 5 Monaten
Ursprung
Commit
78abce1ba6
17 geänderte Dateien mit 199 neuen und 75 gelöschten Zeilen
  1. 3 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/MdModelParamsController.java
  2. 0 1
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/PtServiceController.java
  3. 3 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/PtServiceParamController.java
  4. 63 57
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/MdModelFlow.java
  5. 14 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/MdModelParams.java
  6. 5 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/PtService.java
  7. 10 0
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/PtServiceParam.java
  8. 11 1
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/SysMetaDatasource.java
  9. 12 6
      ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/PtServiceServiceImpl.java
  10. 1 0
      ruoyi-api-patform/src/main/resources/mapper/interfaces/MdDataCateMapper.xml
  11. 6 1
      ruoyi-api-patform/src/main/resources/mapper/interfaces/MdModelParamsMapper.xml
  12. 13 4
      ruoyi-api-patform/src/main/resources/mapper/interfaces/PtServiceMapper.xml
  13. 6 3
      ruoyi-api-patform/src/main/resources/mapper/interfaces/PtServiceParamMapper.xml
  14. 6 1
      ruoyi-api-patform/src/main/resources/mapper/interfaces/SysMetaDatasourceMapper.xml
  15. 1 0
      ruoyi-api-patform/src/main/resources/mapper/interfaces/SysMetaFieldMapper.xml
  16. 1 0
      ruoyi-api-patform/src/main/resources/mapper/interfaces/SysMetaTableMapper.xml
  17. 44 1
      ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java

+ 3 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/MdModelParamsController.java

@@ -105,6 +105,9 @@ public class MdModelParamsController extends BaseController
     {
         if (StringUtils.isEmpty(mdModelParams)) return AjaxResult.error("数据为空");
         mdModelParamsService.deleteMdModelParamsByMdid(mdModelParams.get(0).getMdid());
+        for (int i = 0; i < mdModelParams.size(); i++) {
+            mdModelParams.get(i).setSort(i);
+        }
         mdModelParams.forEach(mdModelParamsService::insertMdModelParams);
         return success("插入成功");
     }

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

@@ -183,7 +183,6 @@ public class PtServiceController extends BaseController {
     @PostMapping("/testRun")
     public AjaxResult testRun(@RequestBody PtService ptService){
         ptServiceService.testRun(ptService);
-
         return success();
     }
 

+ 3 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/PtServiceParamController.java

@@ -51,6 +51,9 @@ public class PtServiceParamController extends BaseController {
 
         String srvId = ptServiceParamList.get(0).getSrvId();
         ptServiceParamMapper.deleteBySrvId(srvId);
+        for (int i = 0; i < ptServiceParamList.size(); i++) {
+            ptServiceParamList.get(i).setSort(i);
+        }
         ptServiceParamList.forEach(ptServiceParamMapper::insert);
         return AjaxResult.success();
     }

+ 63 - 57
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/MdModelFlow.java

@@ -7,134 +7,140 @@ import com.ruoyi.common.core.domain.BaseEntity;
 
 /**
  * 模型流程对象 md_model_flow
- * 
+ *
  * @author 朱得糠
  * @date 2025-08-02
  */
-public class MdModelFlow extends BaseEntity
-{
+public class MdModelFlow extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
-    /** 流程图ID */
+    /**
+     * 流程图ID
+     */
     private Long flowId;
 
-    /** 模型ID */
+    /**
+     * 模型ID
+     */
     @Excel(name = "模型ID")
     private String mdid;
 
-    /** 流程图名称 */
+    /**
+     * 流程图名称
+     */
     @Excel(name = "流程图名称")
     private String flowName;
 
-    /** 流程图 */
+    /**
+     * 流程图
+     */
     @Excel(name = "流程图")
     private String flowGraph;
 
-    /** 流程图描述 */
+    /**
+     * 流程图描述
+     */
     @Excel(name = "流程图描述")
     private String flowNote;
 
-    /** 流程图状态 */
+    /**
+     * 流程图状态
+     */
     @Excel(name = "流程图状态")
     private Integer flowStatus;
 
-    /** 流程排序 */
+    /**
+     * 流程排序
+     */
     @Excel(name = "流程排序")
     private Integer flowSort;
 
-    /** 流程类型 */
+    /**
+     * 流程类型
+     */
     @Excel(name = "流程类型")
     private String flowType;
 
-    public void setFlowId(Long flowId) 
-    {
+    public void setFlowId(Long flowId) {
         this.flowId = flowId;
     }
 
-    public Long getFlowId() 
-    {
+    public Long getFlowId() {
         return flowId;
     }
-    public void setMdid(String mdid) 
-    {
+
+    public void setMdid(String mdid) {
         this.mdid = mdid;
     }
 
-    public String getMdid() 
-    {
+    public String getMdid() {
         return mdid;
     }
-    public void setFlowName(String flowName) 
-    {
+
+    public void setFlowName(String flowName) {
         this.flowName = flowName;
     }
 
-    public String getFlowName() 
-    {
+    public String getFlowName() {
         return flowName;
     }
-    public void setFlowGraph(String flowGraph) 
-    {
+
+    public void setFlowGraph(String flowGraph) {
         this.flowGraph = flowGraph;
     }
 
-    public String getFlowGraph() 
-    {
+    public String getFlowGraph() {
         return flowGraph;
     }
-    public void setFlowNote(String flowNote) 
-    {
+
+    public void setFlowNote(String flowNote) {
         this.flowNote = flowNote;
     }
 
-    public String getFlowNote() 
-    {
+    public String getFlowNote() {
         return flowNote;
     }
-    public void setFlowStatus(Integer flowStatus) 
-    {
+
+    public void setFlowStatus(Integer flowStatus) {
         this.flowStatus = flowStatus;
     }
 
-    public Integer getFlowStatus() 
-    {
+    public Integer getFlowStatus() {
         return flowStatus;
     }
-    public void setFlowSort(Integer flowSort) 
-    {
+
+    public void setFlowSort(Integer flowSort) {
         this.flowSort = flowSort;
     }
 
-    public Integer getFlowSort() 
-    {
+    public Integer getFlowSort() {
         return flowSort;
     }
-    public void setFlowType(String flowType) 
-    {
+
+    public void setFlowType(String flowType) {
         this.flowType = flowType;
     }
 
-    public String getFlowType() 
-    {
+    public String getFlowType() {
         return flowType;
     }
 
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("flowId", getFlowId())
-            .append("mdid", getMdid())
-            .append("flowName", getFlowName())
-            .append("flowGraph", getFlowGraph())
-            .append("flowNote", getFlowNote())
-            .append("flowStatus", getFlowStatus())
-            .append("flowSort", getFlowSort())
-            .append("flowType", getFlowType())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .toString();
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("flowId", getFlowId())
+                .append("mdid", getMdid())
+                .append("flowName", getFlowName())
+                .append("flowGraph", getFlowGraph())
+                .append("flowNote", getFlowNote())
+                .append("flowStatus", getFlowStatus())
+                .append("flowSort", getFlowSort())
+                .append("flowType", getFlowType())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .toString();
     }
 }
 

+ 14 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/MdModelParams.java

@@ -92,6 +92,20 @@ public class MdModelParams extends BaseEntity
     @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date createby;
 
+    /**
+     * 排序
+     */
+    private Integer sort;
+
+
+    public Integer getSort() {
+        return sort;
+    }
+
+    public void setSort(Integer sort) {
+        this.sort = sort;
+    }
+
     public Date getCreateby() {
         return createby;
     }

+ 5 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/PtService.java

@@ -113,4 +113,9 @@ public class PtService implements Serializable {
     public PtService(String mdid) {
         this.mdid = mdid;
     }
+
+    /**
+     * 排序
+     */
+    private Integer sort;
 }

+ 10 - 0
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/PtServiceParam.java

@@ -16,6 +16,16 @@ public class PtServiceParam extends PtServiceParamKey implements Serializable {
 
     private String paramNote;
 
+    private Integer sort;
+
+    public Integer getSort() {
+        return sort;
+    }
+
+    public void setSort(Integer sort) {
+        this.sort = sort;
+    }
+
     private static final long serialVersionUID = 1L;
 
     @Override

+ 11 - 1
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/SysMetaDatasource.java

@@ -50,7 +50,17 @@ public class SysMetaDatasource extends BaseEntity
     @Excel(name = "说明")
     private String dsNode;
 
-    public void setDsCode(String dsCode) 
+    private Integer sort;
+
+    public Integer getSort() {
+        return sort;
+    }
+
+    public void setSort(Integer sort) {
+        this.sort = sort;
+    }
+
+    public void setDsCode(String dsCode)
     {
         this.dsCode = dsCode;
     }

+ 12 - 6
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/service/impl/PtServiceServiceImpl.java

@@ -2,6 +2,7 @@ package com.ruoyi.interfaces.service.impl;
 
 import com.alibaba.fastjson2.JSON;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.common.constant.Constants;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.JsonUtils;
 import com.ruoyi.common.utils.RedisOperator;
@@ -141,6 +142,7 @@ public class PtServiceServiceImpl extends ServiceImpl<PtServiceMapper, PtService
 
     @Override
     public String testRun(PtService ptService) {
+        ptService.setUrl("http://localhost:8082/model/flow/list");
 
         String tokenUrl = "http://localhost:9002/sh-api/login";
         String bodyPar = "{\n" +
@@ -155,16 +157,20 @@ public class PtServiceServiceImpl extends ServiceImpl<PtServiceMapper, PtService
         } catch (IOException e) {
             throw new RuntimeException(e);
         }
-
-
-       /* List<PtServiceParam> ptServiceParams = ptServiceParamMapper.selectAll(ptService.getSrvId());
-        String paramString = ptServiceParams.stream().map(p -> p.getParamCode() + "=" + p.getParamValue()).collect(Collectors.joining());
+        HashMap hashMap = JsonUtils.jsonToPojo(token, HashMap.class);
+        String token1 = hashMap.get("token").toString();
+        System.out.println(token1);
+        HashMap<String, String> map = new HashMap<>();
+        map.put("authorization",token1);
+        //List<PtServiceParam> ptServiceParams = ptServiceParamMapper.selectAll(ptService.getSrvId());
+        //String paramString = ptServiceParams.stream().map(p -> p.getParamCode() + "=" + p.getParamValue()).collect(Collectors.joining());
+        String paramString = "pageNum=1&pageSize=20";
         switch (ptService.getRqtype()) {
             case "POST":
             return HttpUtils.sendPost(ptService.getUrl(),paramString);
             case "GET":
-                return HttpUtils.sendGet(ptService.getUrl(),paramString);
-        }*/
+                return HttpUtils.sendGet(ptService.getUrl(),paramString, Constants.UTF8,map);
+        }
         return null;
     }
 

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

@@ -28,6 +28,7 @@
             <if test="createby != null "> and CREATEBY = #{createby}</if>
             <if test="modifyby != null "> and MODIFYBY = #{modifyby}</if>
         </where>
+        order by ITEM_NO
     </select>
 
     <select id="selectMdDataCateByCateId" parameterType="String" resultMap="MdDataCateResult">

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

@@ -24,10 +24,11 @@
         <result property="parStatus"    column="PAR_STATUS"    />
         <result property="createby"    column="CREATEBY"    />
         <result property="modifyby"    column="MODIFYBY"    />
+        <result property="sort"    column="SORT"    />
     </resultMap>
 
     <sql id="selectMdModelParamsVo">
-        select PARID, MDID, PAR_CATE, PAR_GROUP, PAR_NAME, PAR_ENNAME, PAR_NOTE, PAR_TYPE, PAR_LINE, PAR_DIMEN, PAR_DIDEN_SORT, PAR_EXPR, PAR_DEF_VAL, PAR_UNIT, PAR_RANGE, PAR_VERSION, PAR_STATUS, CREATEBY, MODIFYBY from md_model_params
+        select PARID, MDID, PAR_CATE, PAR_GROUP, PAR_NAME, PAR_ENNAME, PAR_NOTE, PAR_TYPE, PAR_LINE, PAR_DIMEN, PAR_DIDEN_SORT, PAR_EXPR, PAR_DEF_VAL, PAR_UNIT, PAR_RANGE, PAR_VERSION, PAR_STATUS, CREATEBY, MODIFYBY,SORT from md_model_params
     </sql>
 
     <select id="selectMdModelParamsList" parameterType="com.ruoyi.interfaces.domain.MdModelParams" resultMap="MdModelParamsResult">
@@ -52,6 +53,7 @@
             <if test="createby != null "> and CREATEBY = #{createby}</if>
             <if test="modifyby != null "> and MODIFYBY = #{modifyby}</if>
         </where>
+        order by SORT
     </select>
 
     <select id="selectMdModelParamsByParid" parameterType="String" resultMap="MdModelParamsResult">
@@ -81,6 +83,7 @@
             <if test="parStatus != null">PAR_STATUS,</if>
             <if test="createby != null">CREATEBY,</if>
             <if test="modifyby != null">MODIFYBY,</if>
+            <if test="sort != null">SORT,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="parid != null">#{parid},</if>
@@ -102,6 +105,7 @@
             <if test="parStatus != null">#{parStatus},</if>
             <if test="createby != null">#{createby},</if>
             <if test="modifyby != null">#{modifyby},</if>
+            <if test="sort != null">#{sort},</if>
         </trim>
     </insert>
 
@@ -126,6 +130,7 @@
             <if test="parStatus != null">PAR_STATUS = #{parStatus},</if>
             <if test="createby != null">CREATEBY = #{createby},</if>
             <if test="modifyby != null">MODIFYBY = #{modifyby},</if>
+            <if test="sort != null">SORT = #{sort},</if>
         </trim>
         where PARID = #{parid}
     </update>

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

@@ -38,6 +38,7 @@
         <result column="DATA_RANGE" property="dataRange" jdbcType="VARCHAR"/>
         <result column="APPLY_NUM" property="applyNum" jdbcType="INTEGER"/>
         <result column="DATA_NUM" property="dataNum" jdbcType="INTEGER"/>
+        <result column="SORT" property="sort" jdbcType="INTEGER"/>
     </resultMap>
     <resultMap id="AuthVoResultMap" type="com.ruoyi.interfaces.domain.vo.PtServiceVo">
         <result property="id" jdbcType="VARCHAR" column="ID"/>
@@ -82,7 +83,8 @@
     </resultMap>
 
     <sql id="Base_Column_List">
-        SRV_ID ,MDID
+        SRV_ID
+        ,MDID
         , CATE_CODE, NAME, TYPE, INTRO, STATUS, USER_ID,
     DEVELOP_UNIT,DEVELOP_CONTACTER,MAINTAIN_UNIT,MAINTAIN_CONTACER,
     SERVICE_SOURCE,SERVICE_DEPT, MANAGE_NAME,DATA_RANGE, OPEN_CNDTN, DATA_FIELD,
@@ -100,7 +102,8 @@
     SERVICE_DEPT, MANAGE_NAME,RELEASE_TIME,DEVELOP_UNIT,DEVELOP_CONTACTER,MAINTAIN_UNIT,MAINTAIN_CONTACER,VIEW_NUM
     </sql>
     <sql id="table_columns">
-        MDID,
+        MDID
+        ,
         UP_CYCL,
             OPEN_CNDTN,
             AD_NAME,
@@ -135,10 +138,11 @@
             DEVELOP_CONTACTER,
             MAINTAIN_UNIT,
             MAINTAIN_CONTACER,
-            VIEW_NUM
+            VIEW_NUM,SORT
     </sql>
     <sql id="entity_properties">
-        #{mdid,jdbcType=VARCHAR},
+        #{mdid,jdbcType=VARCHAR}
+        ,
         #{upCycl,jdbcType=VARCHAR},
         #{openCndtn,jdbcType=VARCHAR},
         #{adName,jdbcType=VARCHAR},
@@ -174,6 +178,7 @@
         #{maintainUnit,jdbcType=VARCHAR},
         #{maintainContacer,jdbcType=VARCHAR},
         #{viewNum, jdbcType=INTEGER}
+        #{sort, jdbcType=INTEGER}
     </sql>
     <sql id="page_where">
         <trim prefix="where" prefixOverrides="and | or ">
@@ -298,6 +303,7 @@
         <if test="cateCode !=null and cateCode !=''">
             where CATE_CODE = #{cateCode}
         </if>
+        order by SORT
     </select>
 
     <!--查询数据列表-->
@@ -306,6 +312,7 @@
         <include refid="table_columns"/>
         from PT_SERVICE
         <include refid="page_where"/>
+        order by SORT
     </select>
 
 
@@ -332,6 +339,7 @@
                 </foreach>
             </if>
         </where>
+order by SORT
     </select>
 
     <!--根据主键获取数据-->
@@ -392,6 +400,7 @@
             <if test="releaseTime != null">RELEASE_TIME = #{releaseTime},</if>
             <if test="uptm != null">UPTM = #{uptm},</if>
             <if test="rlstm != null">RLSTM = #{rlstm},</if>
+            <if test="sort != null">SORT = #{sort},</if>
         </trim>
         where SRV_ID = #{srvId,jdbcType=VARCHAR}
     </update>

+ 6 - 3
ruoyi-api-patform/src/main/resources/mapper/interfaces/PtServiceParamMapper.xml

@@ -9,10 +9,11 @@
         <result column="PARAM_VALUE" jdbcType="VARCHAR" property="paramValue"/>
         <result column="PARAM_FORMAT" jdbcType="VARCHAR" property="paramFormat"/>
         <result column="PARAM_NOTE" jdbcType="VARCHAR" property="paramNote"/>
+        <result column="SORT" jdbcType="INTEGER" property="sort"/>
     </resultMap>
     <sql id="Base_Column_List">
         SRV_ID
-        , PARAM_CODE, PARAM_NAME, PARAM_TYPE, PARAM_VALUE, PARAM_FORMAT, PARAM_NOTE
+        , PARAM_CODE, PARAM_NAME, PARAM_TYPE, PARAM_VALUE, PARAM_FORMAT, PARAM_NOTE,SORT
     </sql>
     <select id="selectByPrimaryKey" parameterType="com.ruoyi.interfaces.domain.PtServiceParamKey"
             resultMap="BaseResultMap">
@@ -39,10 +40,10 @@
     <insert id="insert" parameterType="com.ruoyi.interfaces.domain.PtServiceParam">
         insert into PT_SERVICE_PARAM (SRV_ID, PARAM_CODE, PARAM_NAME,
                                       PARAM_TYPE, PARAM_VALUE, PARAM_FORMAT,
-                                      PARAM_NOTE)
+                                      PARAM_NOTE,SORT)
         values (#{srvId,jdbcType=VARCHAR}, #{paramCode,jdbcType=VARCHAR}, #{paramName,jdbcType=VARCHAR},
                 #{paramType,jdbcType=VARCHAR}, #{paramValue,jdbcType=VARCHAR}, #{paramFormat,jdbcType=VARCHAR},
-                #{paramNote,jdbcType=VARCHAR})
+                #{paramNote,jdbcType=VARCHAR},#{sort,jdbcType=INTEGER})
     </insert>
 
     <insert id="insertSelective" parameterType="com.ruoyi.interfaces.domain.PtServiceParam">
@@ -132,6 +133,7 @@
         select
         <include refid="Base_Column_List"/>
         from PT_SERVICE_PARAM where SRV_ID = #{srvId,jdbcType=VARCHAR}
+order by sort
     </select>
 
     <select id="listBySrvId" parameterType="string" resultMap="BaseResultMap">
@@ -139,6 +141,7 @@
         <include refid="Base_Column_List"/>
         FROM PT_SERVICE_PARAM
         WHERE SRV_ID = #{srvId,jdbcType=VARCHAR}
+        order by sort
     </select>
 
 </mapper>

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

@@ -14,10 +14,11 @@
         <result property="dsUser"    column="DS_USER"    />
         <result property="dsPass"    column="DS_PASS"    />
         <result property="dsNode"    column="DS_NODE"    />
+        <result property="sort"    column="SORT"    />
     </resultMap>
 
     <sql id="selectSysMetaDatasourceVo">
-        select DS_CODE, DS_TITLE, DS_TYPE, DS_DBNAME, DS_IP, DS_PORT, DS_USER, DS_PASS, DS_NODE from sys_meta_datasource
+        select DS_CODE, DS_TITLE, DS_TYPE, DS_DBNAME, DS_IP, DS_PORT, DS_USER, DS_PASS, DS_NODE,SORT from sys_meta_datasource
     </sql>
 
     <select id="selectSysMetaDatasourceList" parameterType="com.ruoyi.interfaces.domain.SysMetaDatasource" resultMap="SysMetaDatasourceResult">
@@ -32,6 +33,7 @@
             <if test="dsPass != null  and dsPass != ''"> and DS_PASS = #{dsPass}</if>
             <if test="dsNode != null  and dsNode != ''"> and DS_NODE like concat('%', #{dsNode}, '%')</if>
         </where>
+        order by SORT
     </select>
 
     <select id="selectSysMetaDatasourceByDsCode" parameterType="String" resultMap="SysMetaDatasourceResult">
@@ -51,6 +53,7 @@
             <if test="dsUser != null">DS_USER,</if>
             <if test="dsPass != null">DS_PASS,</if>
             <if test="dsNode != null">DS_NODE,</if>
+            <if test="sort != null">SORT,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="dsCode != null">#{dsCode},</if>
@@ -62,6 +65,7 @@
             <if test="dsUser != null">#{dsUser},</if>
             <if test="dsPass != null">#{dsPass},</if>
             <if test="dsNode != null">#{dsNode},</if>
+            <if test="sort != null">#{sort},</if>
         </trim>
     </insert>
 
@@ -76,6 +80,7 @@
             <if test="dsUser != null">DS_USER = #{dsUser},</if>
             <if test="dsPass != null">DS_PASS = #{dsPass},</if>
             <if test="dsNode != null">DS_NODE = #{dsNode},</if>
+            <if test="sort != null">SORT = #{sort},</if>
         </trim>
         where DS_CODE = #{dsCode}
     </update>

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

@@ -52,6 +52,7 @@
             <if test="fieldViewType != null  and fieldViewType != ''"> and FIELD_VIEW_TYPE = #{fieldViewType}</if>
             <if test="fieldDict != null  and fieldDict != ''"> and FIELD_DICT = #{fieldDict}</if>
         </where>
+        order by FIELD_ORDER
     </select>
 
     <select id="selectSysMetaFieldByDsCode" parameterType="String" resultMap="SysMetaFieldResult">

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

@@ -31,6 +31,7 @@
             <if test="metaNote != null  and metaNote != ''">and META_NOTE = #{metaNote}</if>
             <if test="metaSort != null">and META_SORT = #{metaSort}</if>
         </where>
+        order by META_SORT
     </select>
 
     <select id="selectSysMetaTableByDsCode" parameterType="String" resultMap="SysMetaTableResult">

+ 44 - 1
ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java

@@ -120,6 +120,49 @@ public class HttpUtils {
         return result.toString();
     }
 
+    public static String sendGet(String url, String param, String contentType, HashMap<String, String> headers) {
+        StringBuilder result = new StringBuilder();
+        BufferedReader in = null;
+        try {
+            String urlNameString = StringUtils.isNotBlank(param) ? url + "?" + param : url;
+            log.info("sendGet - {}", urlNameString);
+            URL realUrl = new URL(urlNameString);
+            URLConnection connection = realUrl.openConnection();
+            connection.setRequestProperty("accept", "*/*");
+            connection.setRequestProperty("connection", "Keep-Alive");
+            connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
+            if (StringUtils.isNotEmpty(headers)) {
+                //headers.remove("Content-Type"); // 防御性移除外部可能传入的冲突头
+                headers.forEach(connection::setRequestProperty);
+            }
+
+            connection.connect();
+            in = new BufferedReader(new InputStreamReader(connection.getInputStream(), contentType));
+            String line;
+            while ((line = in.readLine()) != null) {
+                result.append(line);
+            }
+            log.info("recv - {}", result);
+        } catch (ConnectException e) {
+            log.error("调用HttpUtils.sendGet ConnectException, url=" + url + ",param=" + param, e);
+        } catch (SocketTimeoutException e) {
+            log.error("调用HttpUtils.sendGet SocketTimeoutException, url=" + url + ",param=" + param, e);
+        } catch (IOException e) {
+            log.error("调用HttpUtils.sendGet IOException, url=" + url + ",param=" + param, e);
+        } catch (Exception e) {
+            log.error("调用HttpsUtil.sendGet Exception, url=" + url + ",param=" + param, e);
+        } finally {
+            try {
+                if (in != null) {
+                    in.close();
+                }
+            } catch (Exception ex) {
+                log.error("调用in.close Exception, url=" + url + ",param=" + param, ex);
+            }
+        }
+        return result.toString();
+    }
+
     /**
      * 向指定 URL 发送POST方法的请求
      *
@@ -244,7 +287,7 @@ public class HttpUtils {
             conn.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
             conn.setRequestProperty("Accept", "application/json");
             if (StringUtils.isNotEmpty(headers)) {
-                headers.remove("Content-Type"); // 防御性移除外部可能传入的冲突头
+                //headers.remove("Content-Type"); // 防御性移除外部可能传入的冲突头
                 headers.forEach(conn::setRequestProperty);
             }