| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800 |
- <?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="gateway_id" jdbcType="VARCHAR" property="gatewayId"/>
- <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"/>
- <result column="SORT" property="sort" jdbcType="INTEGER"/>
- <result column="AUDIT" property="audit" jdbcType="VARCHAR"/>
- <result column="AUDIT_BY" property="auditBy" jdbcType="VARCHAR"/>
- <result column="AUDIT_TIME" property="auditTime"/>
- <result column="AUDIT_REMARK" property="auditRemark" jdbcType="VARCHAR"/>
- <result column="PUBLISH" property="publish" jdbcType="VARCHAR"/>
- <result column="PUBLISH_BY" property="publishBy" jdbcType="VARCHAR"/>
- <result column="state" property="state" jdbcType="VARCHAR"/>
- <result column="PUBLISH_TIME" property="publishTime"/>
- </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="gatewayId" jdbcType="VARCHAR" column="gateway_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="gateway_id" jdbcType="VARCHAR" property="gatewayId"/>
- <result column="state" jdbcType="VARCHAR" property="state"/>
- <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"/>
- <result column="AUDIT" property="audit" jdbcType="VARCHAR"/>
- <result column="AUDIT_BY" property="auditBy" jdbcType="VARCHAR"/>
- <result column="AUDIT_TIME" property="auditTime"/>
- <result column="AUDIT_REMARK" property="auditRemark" jdbcType="VARCHAR"/>
- <result column="PUBLISH" property="publish" jdbcType="VARCHAR"/>
- <result column="PUBLISH_BY" property="publishBy" jdbcType="VARCHAR"/>
- <result column="PUBLISH_TIME" property="publishTime"/>
- </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,"AUDIT",AUDIT_BY,
- AUDIT_TIME,
- AUDIT_REMARK,
- PUBLISH,
- PUBLISH_BY,
- PUBLISH_TIME,
- GATEWAY_ID,
- state
- </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,"AUDIT",AUDIT_BY,
- AUDIT_TIME,
- AUDIT_REMARK,
- PUBLISH,
- PUBLISH_BY,
- PUBLISH_TIME
- ,GATEWAY_ID,
- state
- </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,
- SORT,
- "AUDIT",
- AUDIT_BY,
- AUDIT_TIME,
- AUDIT_REMARK,
- PUBLISH,
- PUBLISH_BY,
- PUBLISH_TIME,
- GATEWAY_ID,
- state
- </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},
- #{gatewayId,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},
- #{sort,jdbcType=INTEGER},
- #{audit,jdbcType=VARCHAR},
- #{auditBy,jdbcType=VARCHAR},
- #{auditTime,jdbcType=DATE},
- #{auditRemark,jdbcType=VARCHAR},
- #{publish,jdbcType=VARCHAR},
- #{publishBy,jdbcType=VARCHAR},
- #{publishTime,jdbcType=DATE}
- #{gatewayId,jdbcType=DATE}
- </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="gatewayId != null and gatewayId != ''">
- and gateway_id = #{gatewayId}
- </if> <if test="state != null and state != ''">
- and state = #{state}
- </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>
- <if test="audit != null and audit != ''">
- and "AUDIT" = #{audit}
- </if>
- <if test="publish != null and publish != ''">
- and PUBLISH = #{publish}
- </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>
- order by SORT
- </select>
- <!--查询数据列表-->
- <select id="selectAllColumns" parameterType="com.ruoyi.interfaces.domain.PtService" resultMap="BaseResultMap">
- select
- <include refid="table_columns"/>
- from PT_SERVICE
- <include refid="page_where"/>
- order by SORT
- </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>
- order by SORT
- </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="gatewayId != null and gatewayId != ''">gateway_id = #{gatewayId},</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>
- <if test="sort != null">SORT = #{sort},</if>
- </trim>
- where SRV_ID = #{srvId,jdbcType=VARCHAR}
- </update>
- <update id="audit">
- update PT_SERVICE
- set "AUDIT" = #{audit},
- AUDIT_BY = #{auditBy},
- AUDIT_TIME = #{auditTime},
- AUDIT_REMARK = #{auditRemark}
- where SRV_ID = #{srvId}
- </update>
- <update id="updatePtServicePublish">
- update PT_SERVICE
- set PUBLISH = #{publish},
- PUBLISH_BY = #{publishBy},
- PUBLISH_TIME = #{publishTime}
- where SRV_ID = #{srvId}
- </update>
- <update id="updatePtServicePublishByMdid">
- update PT_SERVICE
- set PUBLISH = #{publish},
- PUBLISH_BY = #{publishBy},
- PUBLISH_TIME = #{publishTime}
- where mdid = #{mdid}
- </update>
- <update id="updateState">
- update PT_SERVICE
- set state = #{state}
- where SRV_ID = #{srvId}
- </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.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,
- P.state,
- P.gateway_id,
- 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">
- <result 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="kind" column="KIND"/>
- <result property="purpose" column="PURPOSE"/>
- <result property="israte" column="ISRATE"/>
- <result property="weight" column="WEIGHT"/>
- <result property="devkind" column="DEVKIND"/>
- <result property="author" column="AUTHOR"/>
- <result property="ispublic" column="ISPUBLIC"/>
- <result property="isapproved" column="ISAPPROVED"/>
- <result property="status" column="M_STATUS"/>
- <result property="classname" column="CLASSNAME"/>
- <result property="mdRunCmd" column="MD_RUN_CMD"/>
- <result property="mdUrl" column="MD_URL"/>
- <result property="mdAuth" column="MD_AUTH"/>
- <result property="mdHeader" column="MD_HEADER"/>
- <result property="mdSecret" column="MD_SECRET"/>
- <result property="mdUnit" column="MD_UNIT"/>
- <result property="mdContact" column="MD_CONTACT"/>
- <result property="devUnit" column="DEV_UNIT"/>
- <result property="devContact" column="DEV_CONTACT"/>
- <result property="whFlag" column="WH_FLAG"/>
- <result property="whUrl" column="WH_URL"/>
- <result property="whMethod" column="WH_METHOD"/>
- <result property="whAuth" column="WH_AUTH"/>
- <result property="whHeader" column="WH_HEADER"/>
- <result property="whSecret" column="WH_SECRET"/>
- <result property="envOs" column="ENV_OS"/>
- <result property="evnArmX86" column="EVN_ARM_X86"/>
- <result property="envCpu" column="ENV_CPU"/>
- <result property="envGpuType" column="ENV_GPU_TYPE"/>
- <result property="envGpuNum" column="ENV_GPU_NUM"/>
- <result property="envGpuMem" column="ENV_GPU_MEM"/>
- <result property="envDisk" column="ENV_DISK"/>
- <result property="envMem" column="ENV_MEM"/>
- <result property="deployIp" column="DEPLOY_IP"/>
- <result property="deployDir" column="DEPLOY_DIR"/>
- <result property="deployPort" column="DEPLOY_PORT"/>
- <result property="deployNote" column="DEPLOY_NOTE"/>
- <result property="mdInName" column="MD_IN_NAME"/>
- <result property="mdInFile" column="MD_IN_FILE"/>
- <result property="mdInNote" column="MD_IN_NOTE"/>
- <result property="mdOutName" column="MD_OUT_NAME"/>
- <result property="mdOutFile" column="MD_OUT_FILE"/>
- <result property="mdOutNote" column="MD_OUT_NOTE"/>
- <result property="mirrorImageName" column="MIRROR_IMAGE_NAME"/>
- <result property="mirrorImageUrl" column="MIRROR_IMAGE_URL"/>
- <result property="mirrorImageDesc" column="MIRROR_IMAGE_DESC"/>
- <result property="mdAuthUrl" column="MD_AUTH_URL"/>
- <result property="createby" column="CREATEBY"/>
- <result property="modifyby" column="MODIFYBY"/>
- <result property="regUser" column="REG_USER"/>
- <result property="sort" column="SORT"/>
- <result property="audit" column="AUDIT"/>
- <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="S_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="gateway_id" jdbcType="VARCHAR" property="gatewayId"/>
- <result column="state" jdbcType="VARCHAR" property="state"/>
- <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"/>
- <result column="SEN_STATE" property="senState" jdbcType="INTEGER"/>
- <result column="S_AUDIT" property="audit" jdbcType="VARCHAR"/>
- <result column="S_AUDIT_BY" property="auditBy" jdbcType="VARCHAR"/>
- <result column="S_AUDIT_TIME" property="auditTime"/>
- <result column="S_AUDIT_REMARK" property="auditRemark" jdbcType="VARCHAR"/>
- <result column="S_PUBLISH" property="publish" jdbcType="VARCHAR"/>
- <result column="S_PUBLISH_BY" property="publishBy" jdbcType="VARCHAR"/>
- <result column="S_PUBLISH_TIME" property="publishTime"/>
- </resultMap>
- <select id="selectModelService" resultMap="MdModelInfoVoMap">
- select
- m.MDID,
- m.NAME as M_NAME,
- m.ENNAME,
- m.CATEID,
- m.DEVLANG,
- m.VERSION,
- m.INTRO as M_INTRO,
- m.TYPE AS M_TYPE,
- m.TAGS,
- m.KIND,
- m.PURPOSE,
- m.ISRATE,
- m.WEIGHT,
- m.DEVKIND,
- m.AUTHOR,
- m.ISPUBLIC,
- m.ISAPPROVED,
- m.STATUS AS M_STATUS,
- m.CLASSNAME,
- m.MD_RUN_CMD,
- m.MD_URL,
- m.MD_AUTH,
- m.MD_HEADER,
- m.MD_SECRET,
- m.MD_UNIT,
- m.MD_CONTACT,
- m.DEV_UNIT,
- m.DEV_CONTACT,
- m.WH_FLAG,
- m.WH_URL,
- m.WH_METHOD,
- m.WH_AUTH,
- m.WH_HEADER,
- m.WH_SECRET,
- m.ENV_OS,
- m.EVN_ARM_X86,
- m.ENV_CPU,
- m.ENV_GPU_TYPE,
- m.ENV_GPU_NUM,
- m.ENV_GPU_MEM,
- m.ENV_DISK,
- m.ENV_MEM,
- m.DEPLOY_IP,
- m.DEPLOY_DIR,
- m.DEPLOY_PORT,
- m.DEPLOY_NOTE,
- m.MD_IN_NAME,
- m.MD_IN_FILE,
- m.MD_IN_NOTE,
- m.MD_OUT_NAME,
- m.MD_OUT_FILE,
- m.MD_OUT_NOTE,
- m.MIRROR_IMAGE_NAME,
- m.MIRROR_IMAGE_URL,
- m.MIRROR_IMAGE_DESC,
- m.MD_AUTH_URL,
- m.CREATEBY,
- m.MODIFYBY,
- m.REG_USER,
- m.SORT,
- m."AUDIT",
- 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_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,
- s."AUDIT" as S_AUDIT,
- s.AUDIT_BY AS S_AUDIT_BY,
- s.AUDIT_TIME AS S_AUDIT_TIME,
- s.AUDIT_REMARK AS S_AUDIT_REMARK,
- s.PUBLISH AS S_PUBLISH,
- s.PUBLISH_BY AS S_PUBLISH_BY,
- s.PUBLISH_TIME AS S_PUBLISH_TIME,
- s.state,
- r.SEN_STATE
- from md_model_info m left join pt_service s on m.mdid = s.MDID
- LEFT JOIN (
- SELECT ser_id, sen_state FROM (
- SELECT t.* ,
- ROW_NUMBER () OVER (PARTITION BY ser_id ORDER BY run_tm DESC ) rn
- FROM pt_service_run_log t
- ) WHERE rn = 1
- ) r ON s.SRV_ID =
- r.ser_id
- <where>
- <if test="mdid != null ">and m.mdid = #{mdid}</if>
- </where>
- order by s.sort
- </select>
- </mapper>
|