浏览代码

模型更新

ZhuDeKang 5 月之前
父节点
当前提交
315af01a3d

+ 9 - 7
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/controller/test.java

@@ -1,9 +1,8 @@
 package com.ruoyi.interfaces.controller;
 
-import com.agentsflex.core.chain.Chain;
-import com.agentsflex.core.chain.ChainEvent;
-import com.agentsflex.core.chain.ChainSuspendException;
+import com.agentsflex.core.chain.*;
 import com.agentsflex.core.chain.event.*;
+import com.agentsflex.core.chain.listener.ChainErrorListener;
 import com.agentsflex.core.chain.listener.ChainEventListener;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
@@ -27,6 +26,13 @@ public class test {
         Tinyflow tinyflow = new Tinyflow(json);
 
         Chain chain = tinyflow.toChain();
+
+        chain.addErrorListener(new ChainErrorListener() {
+            @Override
+            public void onError(Throwable error, Chain chain) {
+                System.out.println("============出错了=============");
+            }
+        });
         chain.addEventListener(new ChainEventListener() {
             /*@Override
             public void onEvent(ChainEvent event, Chain chain) {
@@ -78,12 +84,8 @@ public class test {
 /*        map.put("username","123");
         map.put("password","123");*/
         // 执行执行链
-        try {
 
             Map<String, Object> result = chain.executeForResult(map);
-        } catch (Exception e){
 
-        }
-        System.out.println();
     }
 }

+ 9 - 11
ruoyi-api-patform/src/main/java/com/ruoyi/interfaces/domain/MdModelInfo.java

@@ -8,8 +8,6 @@ import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
 
-import javax.validation.constraints.NotNull;
-
 /**
  * 模型信息对象 md_model_info
  *
@@ -89,9 +87,9 @@ public class MdModelInfo extends BaseEntity {
      */
     private Double weight;
     /**
-     * 模型排序号
+     * 区分系统内的模型,还是第三方的模型
      */
-    private Integer msort;
+    private String devkind;
 
 
     /**
@@ -367,13 +365,13 @@ public class MdModelInfo extends BaseEntity {
     /**
      * 顺序
      */
-    private String sort;
+    private Integer sort;
 
-    public String getSort() {
+    public Integer getSort() {
         return sort;
     }
 
-    public void setSort(String sort) {
+    public void setSort(Integer sort) {
         this.sort = sort;
     }
 
@@ -414,12 +412,12 @@ public class MdModelInfo extends BaseEntity {
         this.weight = weight;
     }
 
-    public Integer getMsort() {
-        return msort;
+    public String getDevkind() {
+        return devkind;
     }
 
-    public void setMsort(Integer msort) {
-        this.msort = msort;
+    public void setDevkind(String devkind) {
+        this.devkind = devkind;
     }
 
     public Date getCreateby() {

+ 64 - 64
ruoyi-api-patform/src/main/resources/mapper/interfaces/MdModelInfoMapper.xml

@@ -18,7 +18,7 @@
         <result property="purpose"    column="PURPOSE"    />
         <result property="israte"    column="ISRATE"    />
         <result property="weight"    column="WEIGHT"    />
-        <result property="msort"    column="MSORT"    />
+        <result property="devkind"    column="DEVKIND"    />
         <result property="author"    column="AUTHOR"    />
         <result property="ispublic"    column="ISPUBLIC"    />
         <result property="isapproved"    column="ISAPPROVED"    />
@@ -81,7 +81,7 @@
                PURPOSE,
                ISRATE,
                WEIGHT,
-               MSORT,
+               DEVKIND,
                AUTHOR,
                ISPUBLIC,
                ISAPPROVED,
@@ -146,7 +146,7 @@
             <if test="purpose != null  "> and PURPOSE = #{purpose}</if>
             <if test="israte != null  "> and ISRATE = #{israte}</if>
             <if test="weight != null  "> and WEIGHT = #{weight}</if>
-            <if test="msort != null  "> and MSORT = #{msort}</if>
+            <if test="devkind != null  "> and DEVKIND = #{devkind}</if>
             <if test="tags != null  and tags != ''"> and TAGS = #{tags}</if>
             <if test="tags != null  and tags != ''"> and TAGS = #{tags}</if>
             <if test="author != null  and author != ''"> and AUTHOR = #{author}</if>
@@ -220,7 +220,7 @@
             <if test="purpose != null">PURPOSE,</if>
             <if test="israte != null">ISRATE,</if>
             <if test="weight != null">WEIGHT,</if>
-            <if test="msort != null">MSORT,</if>
+            <if test="devkind != null">DEVKIND,</if>
             <if test="author != null">AUTHOR,</if>
             <if test="ispublic != null">ISPUBLIC,</if>
             <if test="isapproved != null">ISAPPROVED,</if>
@@ -282,7 +282,7 @@
             <if test="purpose != null">#{purpose},</if>
             <if test="israte != null">#{israte},</if>
             <if test="weight != null">#{weight},</if>
-            <if test="msort != null">#{msort},</if>
+            <if test="devkind != null">#{devkind},</if>
             <if test="author != null">#{author},</if>
             <if test="ispublic != null">#{ispublic},</if>
             <if test="isapproved != null">#{isapproved},</if>
@@ -335,65 +335,65 @@
     <update id="updateMdModelInfo" parameterType="com.ruoyi.interfaces.domain.MdModelInfo">
         update md_model_info
         <trim prefix="SET" suffixOverrides=",">
-            <if test="name != null">NAME = #{name},</if>
-            <if test="enname != null">ENNAME = #{enname},</if>
-            <if test="cateid != null">CATEID = #{cateid},</if>
-            <if test="devlang != null">DEVLANG = #{devlang},</if>
-            <if test="version != null">VERSION = #{version},</if>
-            <if test="intro != null">INTRO = #{intro},</if>
-            <if test="type != null">TYPE = #{type},</if>
-            <if test="tags != null">TAGS = #{tags},</if>
-            <if test="kind != null">KIND = #{kind},</if>
-            <if test="purpose != null">PURPOSE = #{purpose},</if>
-            <if test="israte != null">ISRATE = #{israte},</if>
-            <if test="weight != null">WEIGHT = #{weight},</if>
-            <if test="msort != null">MSORT = #{msort},</if>
-            <if test="author != null">AUTHOR = #{author},</if>
-            <if test="ispublic != null">ISPUBLIC = #{ispublic},</if>
-            <if test="isapproved != null">ISAPPROVED = #{isapproved},</if>
-            <if test="status != null">STATUS = #{status},</if>
-            <if test="classname != null">CLASSNAME = #{classname},</if>
-            <if test="mdRunCmd != null">MD_RUN_CMD = #{mdRunCmd},</if>
-            <if test="mdUrl != null">MD_URL = #{mdUrl},</if>
-            <if test="mdAuth != null">MD_AUTH = #{mdAuth},</if>
-            <if test="mdHeader != null">MD_HEADER = #{mdHeader},</if>
-            <if test="mdSecret != null">MD_SECRET = #{mdSecret},</if>
-            <if test="mdUnit != null">MD_UNIT = #{mdUnit},</if>
-            <if test="mdContact != null">MD_CONTACT = #{mdContact},</if>
-            <if test="devUnit != null">DEV_UNIT = #{devUnit},</if>
-            <if test="devContact != null">DEV_CONTACT = #{devContact},</if>
-            <if test="whFlag != null">WH_FLAG = #{whFlag},</if>
-            <if test="whUrl != null">WH_URL = #{whUrl},</if>
-            <if test="whMethod != null">WH_METHOD = #{whMethod},</if>
-            <if test="whAuth != null">WH_AUTH = #{whAuth},</if>
-            <if test="whHeader != null">WH_HEADER = #{whHeader},</if>
-            <if test="whSecret != null">WH_SECRET = #{whSecret},</if>
-            <if test="envOs != null">ENV_OS = #{envOs},</if>
-            <if test="evnArmX86 != null">EVN_ARM_X86 = #{evnArmX86},</if>
-            <if test="envCpu != null">ENV_CPU = #{envCpu},</if>
-            <if test="envGpuType != null">ENV_GPU_TYPE = #{envGpuType},</if>
-            <if test="envGpuNum != null">ENV_GPU_NUM = #{envGpuNum},</if>
-            <if test="envGpuMem != null">ENV_GPU_MEM = #{envGpuMem},</if>
-            <if test="envDisk != null">ENV_DISK = #{envDisk},</if>
-            <if test="envMem != null">ENV_MEM = #{envMem},</if>
-            <if test="deployIp != null">DEPLOY_IP = #{deployIp},</if>
-            <if test="deployDir != null">DEPLOY_DIR = #{deployDir},</if>
-            <if test="deployPort != null">DEPLOY_PORT = #{deployPort},</if>
-            <if test="deployNote != null">DEPLOY_NOTE = #{deployNote},</if>
-            <if test="mdInName != null">MD_IN_NAME = #{mdInName},</if>
-            <if test="mdInFile != null">MD_IN_FILE = #{mdInFile},</if>
-            <if test="mdInNote != null">MD_IN_NOTE = #{mdInNote},</if>
-            <if test="mdOutName != null">MD_OUT_NAME = #{mdOutName},</if>
-            <if test="mdOutFile != null">MD_OUT_FILE = #{mdOutFile},</if>
-            <if test="mdOutNote != null">MD_OUT_NOTE = #{mdOutNote},</if>
-            <if test="mirrorImageName != null">MIRROR_IMAGE_NAME = #{mirrorImageName},</if>
-            <if test="mirrorImageUrl != null">MIRROR_IMAGE_URL = #{mirrorImageUrl},</if>
-            <if test="mirrorImageDesc != null">MIRROR_IMAGE_DESC = #{mirrorImageDesc},</if>
-            <if test="mdAuthUrl != null">MD_AUTH_URL = #{mdAuthUrl},</if>
-            <if test="createby != null">CREATEBY = #{createby},</if>
-            <if test="modifyby != null">MODIFYBY = #{modifyby},</if>
-            <if test="regUser != null">REG_USER = #{regUser},</if>
-            <if test="sort != null">SORT = #{sort},</if>
+            NAME = #{name,jdbcType=VARCHAR},
+            ENNAME = #{enname,jdbcType=VARCHAR},
+            CATEID = #{cateid,jdbcType=VARCHAR},
+            DEVLANG = #{devlang,jdbcType=VARCHAR},
+            VERSION = #{version,jdbcType=VARCHAR},
+            INTRO = #{intro,jdbcType=VARCHAR},
+            TYPE = #{type,jdbcType=VARCHAR},
+            TAGS = #{tags,jdbcType=VARCHAR},
+            KIND = #{kind,jdbcType=VARCHAR},
+            PURPOSE = #{purpose,jdbcType=VARCHAR},
+            ISRATE = #{israte,jdbcType=INTEGER},
+            WEIGHT = #{weight,jdbcType=DOUBLE},
+            DEVKIND = #{devkind,jdbcType=VARCHAR},
+            AUTHOR = #{author,jdbcType=VARCHAR},
+            ISPUBLIC = #{ispublic,jdbcType=INTEGER},
+            ISAPPROVED = #{isapproved,jdbcType=INTEGER},
+            STATUS = #{status,jdbcType=INTEGER},
+            CLASSNAME = #{classname,jdbcType=VARCHAR},
+            MD_RUN_CMD = #{mdRunCmd,jdbcType=VARCHAR},
+            MD_URL = #{mdUrl,jdbcType=VARCHAR},
+            MD_AUTH = #{mdAuth,jdbcType=VARCHAR},
+            MD_HEADER = #{mdHeader,jdbcType=VARCHAR},
+            MD_SECRET = #{mdSecret,jdbcType=VARCHAR},
+            MD_UNIT = #{mdUnit,jdbcType=VARCHAR},
+            MD_CONTACT = #{mdContact,jdbcType=VARCHAR},
+            DEV_UNIT = #{devUnit,jdbcType=VARCHAR},
+            DEV_CONTACT = #{devContact,jdbcType=VARCHAR},
+            WH_FLAG = #{whFlag,jdbcType=INTEGER},
+            WH_URL = #{whUrl,jdbcType=VARCHAR},
+            WH_METHOD = #{whMethod,jdbcType=VARCHAR},
+            WH_AUTH = #{whAuth,jdbcType=VARCHAR},
+            WH_HEADER = #{whHeader,jdbcType=VARCHAR},
+            WH_SECRET = #{whSecret,jdbcType=VARCHAR},
+            ENV_OS = #{envOs,jdbcType=VARCHAR},
+            EVN_ARM_X86 = #{evnArmX86,jdbcType=VARCHAR},
+            ENV_CPU = #{envCpu,jdbcType=INTEGER},
+            ENV_GPU_TYPE = #{envGpuType,jdbcType=VARCHAR},
+            ENV_GPU_NUM = #{envGpuNum,jdbcType=INTEGER},
+            ENV_GPU_MEM = #{envGpuMem,jdbcType=INTEGER},
+            ENV_DISK = #{envDisk,jdbcType=INTEGER},
+            ENV_MEM = #{envMem,jdbcType=INTEGER},
+            DEPLOY_IP = #{deployIp,jdbcType=VARCHAR},
+            DEPLOY_DIR = #{deployDir,jdbcType=VARCHAR},
+            DEPLOY_PORT = #{deployPort,jdbcType=VARCHAR},
+            DEPLOY_NOTE = #{deployNote,jdbcType=VARCHAR},
+            MD_IN_NAME = #{mdInName,jdbcType=VARCHAR},
+            MD_IN_FILE = #{mdInFile,jdbcType=VARCHAR},
+            MD_IN_NOTE = #{mdInNote,jdbcType=VARCHAR},
+            MD_OUT_NAME = #{mdOutName,jdbcType=VARCHAR},
+            MD_OUT_FILE = #{mdOutFile,jdbcType=VARCHAR},
+            MD_OUT_NOTE = #{mdOutNote,jdbcType=VARCHAR},
+            MIRROR_IMAGE_NAME = #{mirrorImageName,jdbcType=VARCHAR},
+            MIRROR_IMAGE_URL = #{mirrorImageUrl,jdbcType=VARCHAR},
+            MIRROR_IMAGE_DESC = #{mirrorImageDesc,jdbcType=VARCHAR},
+            MD_AUTH_URL = #{mdAuthUrl,jdbcType=VARCHAR},
+            CREATEBY = #{createby,jdbcType=TIMESTAMP},
+            MODIFYBY = #{modifyby,jdbcType=TIMESTAMP},
+            REG_USER = #{regUser,jdbcType=VARCHAR},
+            SORT = #{sort,jdbcType=INTEGER},
         </trim>
         where MDID = #{mdid}
     </update>