<?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.PtServiceMapper">
    <resultMap id="BaseResultMap" type="com.ruoyi.interfaces.domain.PtService">
        <id column="SRV_ID" jdbcType="VARCHAR" property="srvId"/>
        <id column="MDID" jdbcType="VARCHAR" property="mdid"/>
        <result column="CATE_CODE" jdbcType="VARCHAR" property="cateCode"/>
        <result column="NAME" jdbcType="VARCHAR" property="name"/>
        <result column="TYPE" jdbcType="VARCHAR" property="type"/>
        <result column="INTRO" jdbcType="VARCHAR" property="intro"/>
        <result column="URL" jdbcType="VARCHAR" property="url"/>
        <result column="RQTYPE" jdbcType="VARCHAR" property="rqtype"/>
        <result column="RPTYPE" jdbcType="VARCHAR" property="rptype"/>
        <result column="STATUS" jdbcType="VARCHAR" property="status"/>
        <result column="CNT" jdbcType="DECIMAL" property="cnt"/>
        <result column="USER_ID" jdbcType="VARCHAR" property="userId"/>
        <result column="RPCONTENT" jdbcType="CLOB" property="rpcontent"/>
        <result column="NOTE" jdbcType="CLOB" property="note"/>
        <result column="EXAMPLE" jdbcType="CLOB" property="example"/>
        <result column="PROXY_ADDRESS" jdbcType="VARCHAR" property="proxyAddress"/>
        <result column="PROXY_PATH" jdbcType="VARCHAR" property="proxyPath"/>
        <result column="SERVICE_SOURCE" jdbcType="VARCHAR" property="serviceSource"/>
        <result property="serviceDept" column="SERVICE_DEPT" jdbcType="VARCHAR"/>
        <result property="manageName" column="MANAGE_NAME" jdbcType="VARCHAR"/>
        <result property="releaseTime" column="RELEASE_TIME" jdbcType="TIMESTAMP"/>
        <result property="developUnit" column="DEVELOP_UNIT" jdbcType="VARCHAR"/>
        <result property="developContacter" column="DEVELOP_CONTACTER" jdbcType="VARCHAR"/>
        <result property="maintainUnit" column="MAINTAIN_UNIT" jdbcType="VARCHAR"/>
        <result property="maintainContacer" column="MAINTAIN_CONTACER" jdbcType="VARCHAR"/>
        <result column="VIEW_NUM" jdbcType="DECIMAL" property="viewNum"/>
        <result column="UP_CYCL" property="upCycl" jdbcType="VARCHAR"/>
        <result column="OPEN_CNDTN" property="openCndtn" jdbcType="VARCHAR"/>
        <result column="AD_NAME" property="adName" jdbcType="VARCHAR"/>
        <result column="DATA_FIELD" property="dataField" jdbcType="VARCHAR"/>
        <result column="TM" jdbcType="DATE" property="tm"/>
        <result column="UPTM" property="uptm" jdbcType="DATE"/>
        <result column="RLSTM" property="rlstm" jdbcType="DATE"/>
        <result column="DATA_RANGE" property="dataRange" jdbcType="VARCHAR"/>
        <result column="APPLY_NUM" property="applyNum" jdbcType="INTEGER"/>
        <result column="DATA_NUM" property="dataNum" jdbcType="INTEGER"/>
    </resultMap>
    <resultMap id="AuthVoResultMap" type="com.ruoyi.interfaces.domain.vo.PtServiceVo">
        <result property="id" jdbcType="VARCHAR" column="ID"/>
        <result property="deadline" column="DEADLINE"/>
        <result property="appId" jdbcType="VARCHAR" column="APP_ID"/>
        <result property="srvId" jdbcType="VARCHAR" column="SRV_ID"/>
        <result property="userId" jdbcType="VARCHAR" column="USER_ID"/>
        <result column="SRV_ID" jdbcType="VARCHAR" property="srvId"/>
        <result column="CATE_CODE" jdbcType="VARCHAR" property="cateCode"/>
        <result column="NAME" jdbcType="VARCHAR" property="name"/>
        <result column="TYPE" jdbcType="VARCHAR" property="type"/>
        <result column="INTRO" jdbcType="VARCHAR" property="intro"/>
        <result column="URL" jdbcType="VARCHAR" property="url"/>
        <result column="RQTYPE" jdbcType="VARCHAR" property="rqtype"/>
        <result column="RPTYPE" jdbcType="VARCHAR" property="rptype"/>
        <result column="STATUS" jdbcType="VARCHAR" property="status"/>
        <result column="CNT" jdbcType="INTEGER" property="cnt"/>
        <result column="TM" jdbcType="DATE" property="tm"/>
        <result column="RPCONTENT" jdbcType="CLOB" property="rpcontent"/>
        <result column="NOTE" jdbcType="CLOB" property="note"/>
        <result column="EXAMPLE" jdbcType="CLOB" property="example"/>
        <result column="PROXY_ADDRESS" jdbcType="VARCHAR" property="proxyAddress"/>
        <result column="PROXY_PATH" jdbcType="VARCHAR" property="proxyPath"/>
        <result column="SERVICE_SOURCE" jdbcType="VARCHAR" property="serviceSource"/>
        <result property="serviceDept" column="SERVICE_DEPT" jdbcType="VARCHAR"/>
        <result property="manageName" column="MANAGE_NAME" jdbcType="VARCHAR"/>
        <result property="releaseTime" column="RELEASE_TIME" jdbcType="TIMESTAMP"/>
        <result property="developUnit" column="DEVELOP_UNIT" jdbcType="VARCHAR"/>
        <result property="developContacter" column="DEVELOP_CONTACTER" jdbcType="VARCHAR"/>
        <result property="maintainUnit" column="MAINTAIN_UNIT" jdbcType="VARCHAR"/>
        <result property="maintainContacer" column="MAINTAIN_CONTACER" jdbcType="VARCHAR"/>
        <result column="VIEW_NUM" jdbcType="DECIMAL" property="viewNum"/>
        <result column="UP_CYCL" property="upCycl" jdbcType="VARCHAR"/>
        <result column="OPEN_CNDTN" property="openCndtn" jdbcType="VARCHAR"/>
        <result column="AD_NAME" property="adName" jdbcType="VARCHAR"/>
        <result column="DATA_FIELD" property="dataField" jdbcType="VARCHAR"/>
        <result column="UPTM" property="uptm" jdbcType="DATE"/>
        <result column="RLSTM" property="rlstm" jdbcType="DATE"/>
        <result column="DATA_RANGE" property="dataRange" jdbcType="VARCHAR"/>
        <result column="APPLY_NUM" property="applyNum" jdbcType="INTEGER"/>
        <result column="DATA_NUM" property="dataNum" jdbcType="INTEGER"/>
    </resultMap>

    <sql id="Base_Column_List">
        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,
    URL, RQTYPE, RPTYPE, PROXY_ADDRESS,PROXY_PATH,
    TM, RELEASE_TIME, RLSTM, UPTM,
    VIEW_NUM, CNT, APPLY_NUM, DATA_NUM
    </sql>
    <sql id="Blob_Column_List">
        RPCONTENT
        , NOTE, EXAMPLE
    </sql>
    <sql id="SRV_INFO_List">
        SRV_ID
        , NAME, TYPE, INTRO, URL, RQTYPE, RPTYPE, STATUS, CNT, USER_ID, TM,PROXY_ADDRESS,PROXY_PATH,SERVICE_SOURCE,CATE_CODE,
    SERVICE_DEPT, MANAGE_NAME,RELEASE_TIME,DEVELOP_UNIT,DEVELOP_CONTACTER,MAINTAIN_UNIT,MAINTAIN_CONTACER,VIEW_NUM
    </sql>
    <sql id="table_columns">
        MDID,
        UP_CYCL,
            OPEN_CNDTN,
            AD_NAME,
            DATA_FIELD,
            UPTM,
            RLSTM,
            DATA_RANGE,
            APPLY_NUM,
            DATA_NUM,
            SRV_ID,
            CATE_CODE,
            NAME,
            TYPE,
            INTRO,
            URL,
            RQTYPE,
            RPTYPE,
            RPCONTENT,
            NOTE,
            EXAMPLE,
            STATUS,
            CNT,
            USER_ID,
            TM,
            PROXY_ADDRESS,
            PROXY_PATH,
            SERVICE_SOURCE,
            SERVICE_DEPT,
            MANAGE_NAME,
            RELEASE_TIME,
            DEVELOP_UNIT,
            DEVELOP_CONTACTER,
            MAINTAIN_UNIT,
            MAINTAIN_CONTACER,
            VIEW_NUM
    </sql>
    <sql id="entity_properties">
        #{mdid,jdbcType=VARCHAR},
        #{upCycl,jdbcType=VARCHAR},
        #{openCndtn,jdbcType=VARCHAR},
        #{adName,jdbcType=VARCHAR},
        #{dataField,jdbcType=VARCHAR},
        #{uptm, jdbcType=DATE},
        #{rlstm, jdbcType=DATE},
        #{dataRange,jdbcType=VARCHAR},
        #{applyNum, jdbcType=INTEGER},
        #{dataNum, jdbcType=INTEGER},
        #{srvId,jdbcType=VARCHAR},
        #{cateCode,jdbcType=VARCHAR},
        #{name,jdbcType=VARCHAR},
        #{type,jdbcType=VARCHAR},
        #{intro,jdbcType=VARCHAR},
        #{url,jdbcType=VARCHAR},
        #{rqtype,jdbcType=VARCHAR},
        #{rptype,jdbcType=VARCHAR},
        #{rpcontent,jdbcType=VARCHAR},
        #{note,jdbcType=VARCHAR},
        #{example,jdbcType=VARCHAR},
        #{status,jdbcType=VARCHAR},
        #{cnt, jdbcType=INTEGER},
        #{userId,jdbcType=VARCHAR},
        #{tm, jdbcType=DATE},
        #{proxyAddress,jdbcType=VARCHAR},
        #{proxyPath,jdbcType=VARCHAR},
        #{serviceSource,jdbcType=VARCHAR},
        #{serviceDept,jdbcType=VARCHAR},
        #{manageName,jdbcType=VARCHAR},
        #{releaseTime, jdbcType=DATE},
        #{developUnit,jdbcType=VARCHAR},
        #{developContacter,jdbcType=VARCHAR},
        #{maintainUnit,jdbcType=VARCHAR},
        #{maintainContacer,jdbcType=VARCHAR},
        #{viewNum, jdbcType=INTEGER}
    </sql>
    <sql id="page_where">
        <trim prefix="where" prefixOverrides="and | or ">
            <if test="mdid != null and mdid != ''">
                and MDID = #{mdid,jdbcType=VARCHAR}
            </if>
            <if test="upCycl != null and upCycl != ''">
                and UP_CYCL = #{upCycl,jdbcType=VARCHAR}
            </if>
            <if test="openCndtn != null and openCndtn != ''">
                and OPEN_CNDTN = #{openCndtn}
            </if>
            <if test="adName != null and adName != ''">
                and AD_NAME = #{adName}
            </if>
            <if test="dataField != null and dataField != ''">
                and DATA_FIELD = #{dataField}
            </if>
            <if test="uptm != null">
                and UPTM = #{uptm}
            </if>
            <if test="rlstm != null">
                and RLSTM = #{rlstm}
            </if>
            <if test="dataRange != null and dataRange != ''">
                and DATA_RANGE = #{dataRange}
            </if>
            <if test="applyNum != null and applyNum != ''">
                and APPLY_NUM = #{applyNum}
            </if>
            <if test="dataNum != null and dataNum != ''">
                and DATA_NUM = #{dataNum}
            </if>
            <if test="srvId != null and srvId != ''">
                and SRV_ID = #{srvId}
            </if>
            <if test="cateCode != null and cateCode != ''">
                and CATE_CODE = #{cateCode}
            </if>
            <if test="name != null and name != ''">
                and NAME = #{name}
            </if>
            <if test="type != null and type != ''">
                and TYPE = #{type}
            </if>
            <if test="intro != null and intro != ''">
                and INTRO = #{intro}
            </if>
            <if test="url != null and url != ''">
                and URL = #{url}
            </if>
            <if test="rqtype != null and rqtype != ''">
                and RQTYPE = #{rqtype}
            </if>
            <if test="rptype != null and rptype != ''">
                and RPTYPE = #{rptype}
            </if>
            <if test="rpcontent != null and rpcontent != ''">
                and RPCONTENT = #{rpcontent}
            </if>
            <if test="note != null and note != ''">
                and NOTE = #{note}
            </if>
            <if test="example != null and example != ''">
                and EXAMPLE = #{example}
            </if>
            <if test="status != null and status != ''">
                and STATUS = #{status}
            </if>
            <if test="cnt != null and cnt != ''">
                and CNT = #{cnt}
            </if>
            <if test="userId != null and userId != ''">
                and USER_ID = #{userId}
            </if>
            <if test="tm != null">
                and TM = #{tm}
            </if>
            <if test="proxyAddress != null and proxyAddress != ''">
                and PROXY_ADDRESS = #{proxyAddress}
            </if>
            <if test="proxyPath != null and proxyPath != ''">
                and PROXY_PATH = #{proxyPath}
            </if>
            <if test="serviceSource != null and serviceSource != ''">
                and SERVICE_SOURCE = #{serviceSource}
            </if>
            <if test="serviceDept != null and serviceDept != ''">
                and SERVICE_DEPT = #{serviceDept}
            </if>
            <if test="manageName != null and manageName != ''">
                and MANAGE_NAME = #{manageName}
            </if>
            <if test="releaseTime != null">
                and RELEASE_TIME = #{releaseTime}
            </if>
            <if test="developUnit != null and developUnit != ''">
                and DEVELOP_UNIT = #{developUnit}
            </if>
            <if test="developContacter != null and developContacter != ''">
                and DEVELOP_CONTACTER = #{developContacter}
            </if>
            <if test="maintainUnit != null and maintainUnit != ''">
                and MAINTAIN_UNIT = #{maintainUnit}
            </if>
            <if test="maintainContacer != null and maintainContacer != ''">
                and MAINTAIN_CONTACER = #{maintainContacer}
            </if>
            <if test="viewNum != null and viewNum != ''">
                and VIEW_NUM = #{viewNum}
            </if>
        </trim>
    </sql>

    <!--查询数据列表-->
    <select id="selectAll" parameterType="com.ruoyi.interfaces.domain.PtService" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        ,
        <include refid="Blob_Column_List"/>
        from PT_SERVICE
        <if test="cateCode !=null and cateCode !=''">
            where CATE_CODE = #{cateCode}
        </if>
    </select>

    <!--查询数据列表-->
    <select id="selectAllColumns" parameterType="com.ruoyi.interfaces.domain.PtService" resultMap="BaseResultMap">
        select
        <include refid="table_columns"/>
        from PT_SERVICE
        <include refid="page_where"/>
    </select>


    <select id="selectAllPublic" parameterType="com.ruoyi.interfaces.domain.PtService" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        ,
        <include refid="Blob_Column_List"/>
        from PT_SERVICE
        <where>
            <if test="cateCode !=null and cateCode !=''">
                AND CATE_CODE like CONCAT('%', #{cateCode}, '%')
            </if>
            <if test="name !=null and name !=''">
                AND NAME like CONCAT('%', #{name}, '%')
            </if>
            <if test="status !=null and status !=''">
                AND STATUS = #{status}
            </if>
            <if test="dataField !=null and dataField !=''">
                AND DATA_FIELD IN
                <foreach collection='dataField.split(",")' item="df" open="(" separator="," close=")">
                    #{df}
                </foreach>
            </if>
        </where>
    </select>

    <!--根据主键获取数据-->
    <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
        SELECT
        <include refid="Base_Column_List"/>
        ,
        <include refid="Blob_Column_List"/>
        FROM PT_SERVICE
        where SRV_ID = #{srvId,jdbcType=VARCHAR}
    </select>

    <!--添加数据-->
    <insert id="insert" parameterType="com.ruoyi.interfaces.domain.PtService">
        insert into PT_SERVICE(
        <include refid="table_columns"/>
        )
        values (
        <include refid="entity_properties"/>
        )
    </insert>

    <!--根据主键更新数据-->
    <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.interfaces.domain.PtService">
        update PT_SERVICE
        <trim prefix="set" suffixOverrides=",">
            <if test="upCycl != null and upCycl != ''">UP_CYCL = #{upCycl,jdbcType=VARCHAR},</if>
            <if test="openCndtn != null and openCndtn != ''">OPEN_CNDTN = #{openCndtn},</if>
            <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
            <if test="dataField != null and dataField != ''">DATA_FIELD = #{dataField},</if>
            <if test="dataRange != null and dataRange != ''">DATA_RANGE = #{dataRange},</if>
            <if test="applyNum != null and applyNum != ''">APPLY_NUM = #{applyNum},</if>
            <if test="dataNum != null and dataNum != ''">DATA_NUM = #{dataNum},</if>
            <if test="cateCode != null and cateCode != ''">CATE_CODE = #{cateCode},</if>
            <if test="name != null and name != ''">NAME = #{name},</if>
            <if test="type != null and type != ''">TYPE = #{type},</if>
            <if test="intro != null and intro != ''">INTRO = #{intro},</if>
            <if test="url != null and url != ''">URL = #{url},</if>
            <if test="rqtype != null and rqtype != ''">RQTYPE = #{rqtype},</if>
            <if test="rptype != null and rptype != ''">RPTYPE = #{rptype},</if>
            <if test="rpcontent != null and rpcontent != ''">RPCONTENT = #{rpcontent},</if>
            <if test="note != null and note != ''">NOTE = #{note},</if>
            <if test="example != null and example != ''">EXAMPLE = #{example},</if>
            <if test="status != null and status != ''">STATUS = #{status},</if>
            <if test="cnt != null and cnt != ''">CNT = #{cnt},</if>
            <if test="userId != null and userId != ''">USER_ID = #{userId},</if>
            <if test="proxyAddress != null and proxyAddress != ''">PROXY_ADDRESS = #{proxyAddress},</if>
            <if test="proxyPath != null and proxyPath != ''">PROXY_PATH = #{proxyPath},</if>
            <if test="serviceSource != null and serviceSource != ''">SERVICE_SOURCE = #{serviceSource},</if>
            <if test="serviceDept != null and serviceDept != ''">SERVICE_DEPT = #{serviceDept},</if>
            <if test="manageName != null and manageName != ''">MANAGE_NAME = #{manageName},</if>
            <if test="developUnit != null and developUnit != ''">DEVELOP_UNIT = #{developUnit},</if>
            <if test="developContacter != null and developContacter != ''">DEVELOP_CONTACTER = #{developContacter},</if>
            <if test="maintainUnit != null and maintainUnit != ''">MAINTAIN_UNIT = #{maintainUnit},</if>
            <if test="maintainContacer != null and maintainContacer != ''">MAINTAIN_CONTACER = #{maintainContacer},</if>
            <if test="viewNum != null and viewNum != ''">VIEW_NUM = #{viewNum},</if>
            <if test="tm != null">TM = #{tm},</if>
            <if test="releaseTime != null">RELEASE_TIME = #{releaseTime},</if>
            <if test="uptm != null">UPTM = #{uptm},</if>
            <if test="rlstm != null">RLSTM = #{rlstm},</if>
        </trim>
        where SRV_ID = #{srvId,jdbcType=VARCHAR}
    </update>

    <!--根据主键删除数据-->
    <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
        delete
        from PT_SERVICE
        where SRV_ID = #{srvId,jdbcType=VARCHAR}
    </delete>

    <select id="listOfCntTop10" parameterType="java.lang.String" resultMap="BaseResultMap">
        SELECT * FROM (
        SELECT
        <include refid="table_columns"/>
        FROM PT_SERVICE
        ORDER BY CNT DESC
        ) A
        LIMIT 10
    </select>
    <select id="listOfTmTop20" parameterType="java.lang.String" resultMap="BaseResultMap">
        SELECT * FROM (
        SELECT
        <include refid="table_columns"/>
        FROM PT_SERVICE
        ORDER BY RLSTM DESC
        ) A
        LIMIT 20
    </select>
    <select id="listByUserService" resultMap="AuthVoResultMap">
        SELECT A.ID,
               A.DEADLINE,
               A.APP_ID,
               A.USER_ID,
               P.UP_CYCL,
               P.OPEN_CNDTN,
               P.AD_NAME,
               P.DATA_FIELD,
               P.RLSTM,
               P.DATA_RANGE,
               P.APPLY_NUM,
               P.DATA_NUM,
               P.SRV_ID,
               P.CATE_CODE,
               P.NAME,
               P.TYPE,
               P.INTRO,
               P.URL,
               P.RQTYPE,
               P.RPTYPE,
               P.RPCONTENT,
               P.NOTE,
               P.EXAMPLE,
               P.STATUS,
               P.CNT,
               P.TM,
               P.PROXY_ADDRESS,
               P.PROXY_PATH,
               P.SERVICE_SOURCE,
               P.SERVICE_DEPT,
               P.MANAGE_NAME,
               P.RELEASE_TIME,
               P.DEVELOP_UNIT,
               P.DEVELOP_CONTACTER,
               P.MAINTAIN_UNIT,
               P.MAINTAIN_CONTACER,
               P.VIEW_NUM
        FROM PT_SERVICE P
                 JOIN PT_SERVICE_AUTH A ON P.SRV_ID = A.SRV_ID
        WHERE A.USER_ID = #{userId}
        ORDER BY RLSTM DESC
    </select>
    <resultMap id="MdModelInfoVoMap" type="com.ruoyi.interfaces.domain.vo.MdModelInfoVo">
        <id property="mdid" column="mdid"/>
        <result property="name" column="m_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="m_intro"/>
        <result property="type" column="m_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"/>
        <result property="registrant" column="registrant"/>
        <collection property="serviceList" ofType="com.ruoyi.interfaces.domain.PtService" resultMap="PtServiceVoMap"/>
    </resultMap>
    <resultMap id="PtServiceVoMap" type="com.ruoyi.interfaces.domain.PtService">
        <id column="SRV_ID" jdbcType="VARCHAR" property="srvId"/>
        <result column="CATE_CODE" jdbcType="VARCHAR" property="cateCode"/>
        <result column="s_name" jdbcType="VARCHAR" property="name"/>
        <result column="s_type" jdbcType="VARCHAR" property="type"/>
        <result column="s_intro" jdbcType="VARCHAR" property="intro"/>
        <result column="URL" jdbcType="VARCHAR" property="url"/>
        <result column="RQTYPE" jdbcType="VARCHAR" property="rqtype"/>
        <result column="RPTYPE" jdbcType="VARCHAR" property="rptype"/>
        <result column="STATUS" jdbcType="VARCHAR" property="status"/>
        <result column="CNT" jdbcType="DECIMAL" property="cnt"/>
        <result column="USER_ID" jdbcType="VARCHAR" property="userId"/>
        <result column="RPCONTENT" jdbcType="CLOB" property="rpcontent"/>
        <result column="NOTE" jdbcType="CLOB" property="note"/>
        <result column="EXAMPLE" jdbcType="CLOB" property="example"/>
        <result column="PROXY_ADDRESS" jdbcType="VARCHAR" property="proxyAddress"/>
        <result column="PROXY_PATH" jdbcType="VARCHAR" property="proxyPath"/>
        <result column="SERVICE_SOURCE" jdbcType="VARCHAR" property="serviceSource"/>
        <result property="serviceDept" column="SERVICE_DEPT" jdbcType="VARCHAR"/>
        <result property="manageName" column="MANAGE_NAME" jdbcType="VARCHAR"/>
        <result property="releaseTime" column="RELEASE_TIME" jdbcType="TIMESTAMP"/>
        <result property="developUnit" column="DEVELOP_UNIT" jdbcType="VARCHAR"/>
        <result property="developContacter" column="DEVELOP_CONTACTER" jdbcType="VARCHAR"/>
        <result property="maintainUnit" column="MAINTAIN_UNIT" jdbcType="VARCHAR"/>
        <result property="maintainContacer" column="MAINTAIN_CONTACER" jdbcType="VARCHAR"/>
        <result column="VIEW_NUM" jdbcType="DECIMAL" property="viewNum"/>
        <result column="UP_CYCL" property="upCycl" jdbcType="VARCHAR"/>
        <result column="OPEN_CNDTN" property="openCndtn" jdbcType="VARCHAR"/>
        <result column="AD_NAME" property="adName" jdbcType="VARCHAR"/>
        <result column="DATA_FIELD" property="dataField" jdbcType="VARCHAR"/>
        <result column="TM" jdbcType="DATE" property="tm"/>
        <result column="UPTM" property="uptm" jdbcType="DATE"/>
        <result column="RLSTM" property="rlstm" jdbcType="DATE"/>
        <result column="DATA_RANGE" property="dataRange" jdbcType="VARCHAR"/>
        <result column="APPLY_NUM" property="applyNum" jdbcType="INTEGER"/>
        <result column="DATA_NUM" property="dataNum" jdbcType="INTEGER"/>
    </resultMap>


    <select id="selectModelService" resultMap="MdModelInfoVoMap">
        select m.mdid,
        m.name as m_name,
        m.enname,
        m.cateid,
        m.devlang,
        m.version,
        m.intro m_intro,
        m.type m_type,
        m.tags,
        m.author,
        m.isPublic,
        m.isApproved,
        m.status,
        m.className,
        m.mdUnit,
        m.mdContact,
        m.developer,
        m.msgFlag,
        m.msgWebHook,
        m.mdCPU,
        m.mdGpu,
        m.mdRunEnv,
        m.mdRunCmd,
        m.mdInOutName,
        m.mdInOutNameEn,
        m.mirrorImageEg,
        m.mirrorImageUrl,
        m.mirrorImageDesc,
        m.createBy,
        m.modifyBy,
        m.registrant,
        s.UP_CYCL,
        s.OPEN_CNDTN,
        s.AD_NAME,
        s.DATA_FIELD,
        s.UPTM,
        s.RLSTM,
        s.DATA_RANGE,
        s.APPLY_NUM,
        s.DATA_NUM,
        s.SRV_ID,
        s.CATE_CODE,
        s.NAME as s_name,
        s.TYPE s_type,
        s.INTRO s_intro,
        s.URL,
        s.RQTYPE,
        s.RPTYPE,
        s.RPCONTENT,
        s.NOTE,
        s.EXAMPLE,
        s.STATUS,
        s.CNT,
        s.USER_ID,
        s.TM,
        s.PROXY_ADDRESS,
        s.PROXY_PATH,
        s.SERVICE_SOURCE,
        s.SERVICE_DEPT,
        s.MANAGE_NAME,
        s.RELEASE_TIME,
        s.DEVELOP_UNIT,
        s.DEVELOP_CONTACTER,
        s.MAINTAIN_UNIT,
        s.MAINTAIN_CONTACER,
        s.VIEW_NUM
        from md_model_info m left join pt_service s on m.mdid = s.MDID
        <where>
        </where>
    </select>
</mapper>
