Bläddra i källkod

模型信息bug修复

ZhuDeKang 6 månader sedan
förälder
incheckning
32a876b80c

+ 7 - 4
ruoyi-admin/src/main/resources/application-test.yml

@@ -6,14 +6,16 @@ spring:
     druid:
       # 主库数据源
       master:
-        url: jdbc:mysql://192.168.0.146:3306/sh_project?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+        #url: jdbc:mysql://192.168.0.146:3306/sh_project?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+        url: jdbc:mysql://39.98.38.2:13306/sh_project?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
         username: shmodel
         password: shmodel#$0526
       # 从库数据源
       slave:
         # 从数据源开关/默认关闭
         enabled: false
-        url: jdbc:mysql://192.168.0.146:3306/sh_project?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+        #url: jdbc:mysql://192.168.0.146:3306/sh_project?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
+        url: jdbc:mysql://39.98.38.2:13306/sh_model?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
         username: shmodel
         password: shmodel#$0526
       # 初始连接数
@@ -62,9 +64,10 @@ spring:
   # redis 配置
   redis:
     # 地址
-    host: 192.168.0.146
+    #host: 192.168.0.146
+    host: 39.98.38.2
     # 端口,默认为6379
-    port: 6379
+    port: 16379
     # 数据库索引
     database: 6
     # 密码

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

@@ -0,0 +1,198 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.interfaces.mapper.MdModelInfoMapper">
+
+    <resultMap type="com.ruoyi.interfaces.domain.MdModelInfo" id="MdModelInfoResult">
+        <result property="mdid"    column="mdid"    />
+        <result property="name"    column="name"    />
+        <result property="enname"    column="enname"    />
+        <result property="cateid"    column="cateid"    />
+        <result property="devlang"    column="devlang"    />
+        <result property="version"    column="version"    />
+        <result property="intro"    column="intro"    />
+        <result property="type"    column="type"    />
+        <result property="tags"    column="tags"    />
+        <result property="author"    column="author"    />
+        <result property="isPublic"    column="isPublic"    />
+        <result property="isApproved"    column="isApproved"    />
+        <result property="status"    column="status"    />
+        <result property="className"    column="className"    />
+        <result property="mdUnit"    column="mdUnit"    />
+        <result property="mdContact"    column="mdContact"    />
+        <result property="developer"    column="developer"    />
+        <result property="msgFlag"    column="msgFlag"    />
+        <result property="msgWebHook"    column="msgWebHook"    />
+        <result property="mdCPU"    column="mdCPU"    />
+        <result property="mdGpu"    column="mdGpu"    />
+        <result property="mdRunEnv"    column="mdRunEnv"    />
+        <result property="mdRunCmd"    column="mdRunCmd"    />
+        <result property="mdInOutName"    column="mdInOutName"    />
+        <result property="mdInOutNameEn"    column="mdInOutNameEn"    />
+        <result property="mirrorImageEg"    column="mirrorImageEg"    />
+        <result property="mirrorImageUrl"    column="mirrorImageUrl"    />
+        <result property="mirrorImageDesc"    column="mirrorImageDesc"    />
+        <result property="createBy"    column="createBy"    />
+        <result property="modifyBy"    column="modifyBy"    />
+    </resultMap>
+
+    <sql id="selectMdModelInfoVo">
+        select mdid, name, enname, cateid, devlang, version, intro, type, tags, author, isPublic, isApproved, status, className, mdUnit, mdContact, developer, msgFlag, msgWebHook, mdCPU, mdGpu, mdRunEnv, mdRunCmd, mdInOutName, mdInOutNameEn, mirrorImageEg, mirrorImageUrl, mirrorImageDesc, createBy, modifyBy from md_model_info
+    </sql>
+
+    <select id="selectMdModelInfoList" parameterType="com.ruoyi.interfaces.domain.MdModelInfo" resultMap="MdModelInfoResult">
+        <include refid="selectMdModelInfoVo"/>
+        <where>
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="enname != null  and enname != ''"> and enname like concat('%', #{enname}, '%')</if>
+            <if test="cateid != null  and cateid != ''"> and cateid = #{cateid}</if>
+            <if test="devlang != null  and devlang != ''"> and devlang = #{devlang}</if>
+            <if test="version != null  and version != ''"> and version = #{version}</if>
+            <if test="intro != null  and intro != ''"> and intro = #{intro}</if>
+            <if test="type != null  and type != ''"> and type = #{type}</if>
+            <if test="tags != null  and tags != ''"> and tags = #{tags}</if>
+            <if test="author != null "> and author = #{author}</if>
+            <if test="isPublic != null "> and isPublic = #{isPublic}</if>
+            <if test="isApproved != null "> and isApproved = #{isApproved}</if>
+            <if test="status != null "> and status = #{status}</if>
+            <if test="className != null  and className != ''"> and className like concat('%', #{className}, '%')</if>
+            <if test="mdUnit != null  and mdUnit != ''"> and mdUnit = #{mdUnit}</if>
+            <if test="mdContact != null  and mdContact != ''"> and mdContact = #{mdContact}</if>
+            <if test="developer != null  and developer != ''"> and developer = #{developer}</if>
+            <if test="msgFlag != null "> and msgFlag = #{msgFlag}</if>
+            <if test="msgWebHook != null  and msgWebHook != ''"> and msgWebHook = #{msgWebHook}</if>
+            <if test="mdCPU != null "> and mdCPU = #{mdCPU}</if>
+            <if test="mdGpu != null "> and mdGpu = #{mdGpu}</if>
+            <if test="mdRunEnv != null  and mdRunEnv != ''"> and mdRunEnv = #{mdRunEnv}</if>
+            <if test="mdRunCmd != null  and mdRunCmd != ''"> and mdRunCmd = #{mdRunCmd}</if>
+            <if test="mdInOutName != null  and mdInOutName != ''"> and mdInOutName like concat('%', #{mdInOutName}, '%')</if>
+            <if test="mdInOutNameEn != null  and mdInOutNameEn != ''"> and mdInOutNameEn = #{mdInOutNameEn}</if>
+            <if test="mirrorImageEg != null  and mirrorImageEg != ''"> and mirrorImageEg = #{mirrorImageEg}</if>
+            <if test="mirrorImageUrl != null  and mirrorImageUrl != ''"> and mirrorImageUrl = #{mirrorImageUrl}</if>
+            <if test="mirrorImageDesc != null  and mirrorImageDesc != ''"> and mirrorImageDesc = #{mirrorImageDesc}</if>
+            <if test="createBy != null "> and createBy = #{createBy}</if>
+            <if test="modifyBy != null "> and modifyBy = #{modifyBy}</if>
+        </where>
+    </select>
+
+    <select id="selectMdModelInfoByMdid" parameterType="String" resultMap="MdModelInfoResult">
+        <include refid="selectMdModelInfoVo"/>
+        where mdid = #{mdid}
+    </select>
+
+    <insert id="insertMdModelInfo" parameterType="com.ruoyi.interfaces.domain.MdModelInfo">
+        insert into md_model_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="mdid != null">mdid,</if>
+            <if test="name != null">name,</if>
+            <if test="enname != null">enname,</if>
+            <if test="cateid != null">cateid,</if>
+            <if test="devlang != null">devlang,</if>
+            <if test="version != null">version,</if>
+            <if test="intro != null">intro,</if>
+            <if test="type != null">type,</if>
+            <if test="tags != null">tags,</if>
+            <if test="author != null">author,</if>
+            <if test="isPublic != null">isPublic,</if>
+            <if test="isApproved != null">isApproved,</if>
+            <if test="status != null">status,</if>
+            <if test="className != null">className,</if>
+            <if test="mdUnit != null">mdUnit,</if>
+            <if test="mdContact != null">mdContact,</if>
+            <if test="developer != null">developer,</if>
+            <if test="msgFlag != null">msgFlag,</if>
+            <if test="msgWebHook != null">msgWebHook,</if>
+            <if test="mdCPU != null">mdCPU,</if>
+            <if test="mdGpu != null">mdGpu,</if>
+            <if test="mdRunEnv != null">mdRunEnv,</if>
+            <if test="mdRunCmd != null">mdRunCmd,</if>
+            <if test="mdInOutName != null">mdInOutName,</if>
+            <if test="mdInOutNameEn != null">mdInOutNameEn,</if>
+            <if test="mirrorImageEg != null">mirrorImageEg,</if>
+            <if test="mirrorImageUrl != null">mirrorImageUrl,</if>
+            <if test="mirrorImageDesc != null">mirrorImageDesc,</if>
+            <if test="createBy != null">createBy,</if>
+            <if test="modifyBy != null">modifyBy,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="mdid != null">#{mdid},</if>
+            <if test="name != null">#{name},</if>
+            <if test="enname != null">#{enname},</if>
+            <if test="cateid != null">#{cateid},</if>
+            <if test="devlang != null">#{devlang},</if>
+            <if test="version != null">#{version},</if>
+            <if test="intro != null">#{intro},</if>
+            <if test="type != null">#{type},</if>
+            <if test="tags != null">#{tags},</if>
+            <if test="author != null">#{author},</if>
+            <if test="isPublic != null">#{isPublic},</if>
+            <if test="isApproved != null">#{isApproved},</if>
+            <if test="status != null">#{status},</if>
+            <if test="className != null">#{className},</if>
+            <if test="mdUnit != null">#{mdUnit},</if>
+            <if test="mdContact != null">#{mdContact},</if>
+            <if test="developer != null">#{developer},</if>
+            <if test="msgFlag != null">#{msgFlag},</if>
+            <if test="msgWebHook != null">#{msgWebHook},</if>
+            <if test="mdCPU != null">#{mdCPU},</if>
+            <if test="mdGpu != null">#{mdGpu},</if>
+            <if test="mdRunEnv != null">#{mdRunEnv},</if>
+            <if test="mdRunCmd != null">#{mdRunCmd},</if>
+            <if test="mdInOutName != null">#{mdInOutName},</if>
+            <if test="mdInOutNameEn != null">#{mdInOutNameEn},</if>
+            <if test="mirrorImageEg != null">#{mirrorImageEg},</if>
+            <if test="mirrorImageUrl != null">#{mirrorImageUrl},</if>
+            <if test="mirrorImageDesc != null">#{mirrorImageDesc},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="modifyBy != null">#{modifyBy},</if>
+        </trim>
+    </insert>
+
+    <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="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="mdUnit != null">mdUnit = #{mdUnit},</if>
+            <if test="mdContact != null">mdContact = #{mdContact},</if>
+            <if test="developer != null">developer = #{developer},</if>
+            <if test="msgFlag != null">msgFlag = #{msgFlag},</if>
+            <if test="msgWebHook != null">msgWebHook = #{msgWebHook},</if>
+            <if test="mdCPU != null">mdCPU = #{mdCPU},</if>
+            <if test="mdGpu != null">mdGpu = #{mdGpu},</if>
+            <if test="mdRunEnv != null">mdRunEnv = #{mdRunEnv},</if>
+            <if test="mdRunCmd != null">mdRunCmd = #{mdRunCmd},</if>
+            <if test="mdInOutName != null">mdInOutName = #{mdInOutName},</if>
+            <if test="mdInOutNameEn != null">mdInOutNameEn = #{mdInOutNameEn},</if>
+            <if test="mirrorImageEg != null">mirrorImageEg = #{mirrorImageEg},</if>
+            <if test="mirrorImageUrl != null">mirrorImageUrl = #{mirrorImageUrl},</if>
+            <if test="mirrorImageDesc != null">mirrorImageDesc = #{mirrorImageDesc},</if>
+            <if test="createBy != null">createBy = #{createBy},</if>
+            <if test="modifyBy != null">modifyBy = #{modifyBy},</if>
+        </trim>
+        where mdid = #{mdid}
+    </update>
+
+    <delete id="deleteMdModelInfoByMdid" parameterType="String">
+        delete from md_model_info where mdid = #{mdid}
+    </delete>
+
+    <delete id="deleteMdModelInfoByMdids" parameterType="String">
+        delete from md_model_info where mdid in
+        <foreach item="mdid" collection="array" open="(" separator="," close=")">
+            #{mdid}
+        </foreach>
+    </delete>
+</mapper>