PtServiceMapper.xml 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.ruoyi.interfaces.mapper.PtServiceMapper">
  4. <resultMap id="BaseResultMap" type="com.ruoyi.interfaces.domain.PtService">
  5. <id column="SRV_ID" jdbcType="VARCHAR" property="srvId"/>
  6. <id column="MDID" jdbcType="VARCHAR" property="mdid"/>
  7. <result column="CATE_CODE" jdbcType="VARCHAR" property="cateCode"/>
  8. <result column="NAME" jdbcType="VARCHAR" property="name"/>
  9. <result column="TYPE" jdbcType="VARCHAR" property="type"/>
  10. <result column="INTRO" jdbcType="VARCHAR" property="intro"/>
  11. <result column="URL" jdbcType="VARCHAR" property="url"/>
  12. <result column="RQTYPE" jdbcType="VARCHAR" property="rqtype"/>
  13. <result column="RPTYPE" jdbcType="VARCHAR" property="rptype"/>
  14. <result column="STATUS" jdbcType="VARCHAR" property="status"/>
  15. <result column="CNT" jdbcType="DECIMAL" property="cnt"/>
  16. <result column="USER_ID" jdbcType="VARCHAR" property="userId"/>
  17. <result column="RPCONTENT" jdbcType="CLOB" property="rpcontent"/>
  18. <result column="NOTE" jdbcType="CLOB" property="note"/>
  19. <result column="EXAMPLE" jdbcType="CLOB" property="example"/>
  20. <result column="PROXY_ADDRESS" jdbcType="VARCHAR" property="proxyAddress"/>
  21. <result column="PROXY_PATH" jdbcType="VARCHAR" property="proxyPath"/>
  22. <result column="SERVICE_SOURCE" jdbcType="VARCHAR" property="serviceSource"/>
  23. <result property="serviceDept" column="SERVICE_DEPT" jdbcType="VARCHAR"/>
  24. <result property="manageName" column="MANAGE_NAME" jdbcType="VARCHAR"/>
  25. <result property="releaseTime" column="RELEASE_TIME" jdbcType="TIMESTAMP"/>
  26. <result property="developUnit" column="DEVELOP_UNIT" jdbcType="VARCHAR"/>
  27. <result property="developContacter" column="DEVELOP_CONTACTER" jdbcType="VARCHAR"/>
  28. <result property="maintainUnit" column="MAINTAIN_UNIT" jdbcType="VARCHAR"/>
  29. <result property="maintainContacer" column="MAINTAIN_CONTACER" jdbcType="VARCHAR"/>
  30. <result column="VIEW_NUM" jdbcType="DECIMAL" property="viewNum"/>
  31. <result column="UP_CYCL" property="upCycl" jdbcType="VARCHAR"/>
  32. <result column="OPEN_CNDTN" property="openCndtn" jdbcType="VARCHAR"/>
  33. <result column="AD_NAME" property="adName" jdbcType="VARCHAR"/>
  34. <result column="DATA_FIELD" property="dataField" jdbcType="VARCHAR"/>
  35. <result column="TM" jdbcType="DATE" property="tm"/>
  36. <result column="UPTM" property="uptm" jdbcType="DATE"/>
  37. <result column="RLSTM" property="rlstm" jdbcType="DATE"/>
  38. <result column="DATA_RANGE" property="dataRange" jdbcType="VARCHAR"/>
  39. <result column="APPLY_NUM" property="applyNum" jdbcType="INTEGER"/>
  40. <result column="DATA_NUM" property="dataNum" jdbcType="INTEGER"/>
  41. <result column="SORT" property="sort" jdbcType="INTEGER"/>
  42. <result column="AUDIT" property="audit" jdbcType="VARCHAR"/>
  43. <result column="AUDIT_BY" property="auditBy" jdbcType="VARCHAR"/>
  44. <result column="AUDIT_TIME" property="auditTime"/>
  45. <result column="AUDIT_REMARK" property="auditRemark" jdbcType="VARCHAR"/>
  46. <result column="PUBLISH" property="publish" jdbcType="VARCHAR"/>
  47. <result column="PUBLISH_BY" property="publishBy" jdbcType="VARCHAR"/>
  48. <result column="PUBLISH_TIME" property="publishTime"/>
  49. </resultMap>
  50. <resultMap id="AuthVoResultMap" type="com.ruoyi.interfaces.domain.vo.PtServiceVo">
  51. <result property="id" jdbcType="VARCHAR" column="ID"/>
  52. <result property="deadline" column="DEADLINE"/>
  53. <result property="appId" jdbcType="VARCHAR" column="APP_ID"/>
  54. <result property="srvId" jdbcType="VARCHAR" column="SRV_ID"/>
  55. <result property="userId" jdbcType="VARCHAR" column="USER_ID"/>
  56. <result column="SRV_ID" jdbcType="VARCHAR" property="srvId"/>
  57. <result column="CATE_CODE" jdbcType="VARCHAR" property="cateCode"/>
  58. <result column="NAME" jdbcType="VARCHAR" property="name"/>
  59. <result column="TYPE" jdbcType="VARCHAR" property="type"/>
  60. <result column="INTRO" jdbcType="VARCHAR" property="intro"/>
  61. <result column="URL" jdbcType="VARCHAR" property="url"/>
  62. <result column="RQTYPE" jdbcType="VARCHAR" property="rqtype"/>
  63. <result column="RPTYPE" jdbcType="VARCHAR" property="rptype"/>
  64. <result column="STATUS" jdbcType="VARCHAR" property="status"/>
  65. <result column="CNT" jdbcType="INTEGER" property="cnt"/>
  66. <result column="TM" jdbcType="DATE" property="tm"/>
  67. <result column="RPCONTENT" jdbcType="CLOB" property="rpcontent"/>
  68. <result column="NOTE" jdbcType="CLOB" property="note"/>
  69. <result column="EXAMPLE" jdbcType="CLOB" property="example"/>
  70. <result column="PROXY_ADDRESS" jdbcType="VARCHAR" property="proxyAddress"/>
  71. <result column="PROXY_PATH" jdbcType="VARCHAR" property="proxyPath"/>
  72. <result column="SERVICE_SOURCE" jdbcType="VARCHAR" property="serviceSource"/>
  73. <result property="serviceDept" column="SERVICE_DEPT" jdbcType="VARCHAR"/>
  74. <result property="manageName" column="MANAGE_NAME" jdbcType="VARCHAR"/>
  75. <result property="releaseTime" column="RELEASE_TIME" jdbcType="TIMESTAMP"/>
  76. <result property="developUnit" column="DEVELOP_UNIT" jdbcType="VARCHAR"/>
  77. <result property="developContacter" column="DEVELOP_CONTACTER" jdbcType="VARCHAR"/>
  78. <result property="maintainUnit" column="MAINTAIN_UNIT" jdbcType="VARCHAR"/>
  79. <result property="maintainContacer" column="MAINTAIN_CONTACER" jdbcType="VARCHAR"/>
  80. <result column="VIEW_NUM" jdbcType="DECIMAL" property="viewNum"/>
  81. <result column="UP_CYCL" property="upCycl" jdbcType="VARCHAR"/>
  82. <result column="OPEN_CNDTN" property="openCndtn" jdbcType="VARCHAR"/>
  83. <result column="AD_NAME" property="adName" jdbcType="VARCHAR"/>
  84. <result column="DATA_FIELD" property="dataField" jdbcType="VARCHAR"/>
  85. <result column="UPTM" property="uptm" jdbcType="DATE"/>
  86. <result column="RLSTM" property="rlstm" jdbcType="DATE"/>
  87. <result column="DATA_RANGE" property="dataRange" jdbcType="VARCHAR"/>
  88. <result column="APPLY_NUM" property="applyNum" jdbcType="INTEGER"/>
  89. <result column="DATA_NUM" property="dataNum" jdbcType="INTEGER"/>
  90. <result column="AUDIT" property="audit" jdbcType="VARCHAR"/>
  91. <result column="AUDIT_BY" property="auditBy" jdbcType="VARCHAR"/>
  92. <result column="AUDIT_TIME" property="auditTime"/>
  93. <result column="AUDIT_REMARK" property="auditRemark" jdbcType="VARCHAR"/>
  94. <result column="PUBLISH" property="publish" jdbcType="VARCHAR"/>
  95. <result column="PUBLISH_BY" property="publishBy" jdbcType="VARCHAR"/>
  96. <result column="PUBLISH_TIME" property="publishTime"/>
  97. </resultMap>
  98. <sql id="Base_Column_List">
  99. SRV_ID
  100. ,MDID
  101. , CATE_CODE, NAME, TYPE, INTRO, STATUS, USER_ID,
  102. DEVELOP_UNIT,DEVELOP_CONTACTER,MAINTAIN_UNIT,MAINTAIN_CONTACER,
  103. SERVICE_SOURCE,SERVICE_DEPT, MANAGE_NAME,DATA_RANGE, OPEN_CNDTN, DATA_FIELD,
  104. URL, RQTYPE, RPTYPE, PROXY_ADDRESS,PROXY_PATH,
  105. TM, RELEASE_TIME, RLSTM, UPTM,
  106. VIEW_NUM, CNT, APPLY_NUM, DATA_NUM,"AUDIT",AUDIT_BY,
  107. AUDIT_TIME,
  108. AUDIT_REMARK,
  109. PUBLISH,
  110. PUBLISH_BY,
  111. PUBLISH_TIME
  112. </sql>
  113. <sql id="Blob_Column_List">
  114. RPCONTENT
  115. , NOTE, EXAMPLE
  116. </sql>
  117. <sql id="SRV_INFO_List">
  118. SRV_ID
  119. , NAME, TYPE, INTRO, URL, RQTYPE, RPTYPE, STATUS, CNT, USER_ID, TM,PROXY_ADDRESS,PROXY_PATH,SERVICE_SOURCE,CATE_CODE,
  120. SERVICE_DEPT, MANAGE_NAME,RELEASE_TIME,DEVELOP_UNIT,DEVELOP_CONTACTER,MAINTAIN_UNIT,MAINTAIN_CONTACER,VIEW_NUM,"AUDIT",AUDIT_BY,
  121. AUDIT_TIME,
  122. AUDIT_REMARK,
  123. PUBLISH,
  124. PUBLISH_BY,
  125. PUBLISH_TIME
  126. </sql>
  127. <sql id="table_columns">
  128. MDID
  129. ,
  130. UP_CYCL,
  131. OPEN_CNDTN,
  132. AD_NAME,
  133. DATA_FIELD,
  134. UPTM,
  135. RLSTM,
  136. DATA_RANGE,
  137. APPLY_NUM,
  138. DATA_NUM,
  139. SRV_ID,
  140. CATE_CODE,
  141. NAME,
  142. TYPE,
  143. INTRO,
  144. URL,
  145. RQTYPE,
  146. RPTYPE,
  147. RPCONTENT,
  148. NOTE,
  149. EXAMPLE,
  150. STATUS,
  151. CNT,
  152. USER_ID,
  153. TM,
  154. PROXY_ADDRESS,
  155. PROXY_PATH,
  156. SERVICE_SOURCE,
  157. SERVICE_DEPT,
  158. MANAGE_NAME,
  159. RELEASE_TIME,
  160. DEVELOP_UNIT,
  161. DEVELOP_CONTACTER,
  162. MAINTAIN_UNIT,
  163. MAINTAIN_CONTACER,
  164. VIEW_NUM,
  165. SORT,
  166. "AUDIT",
  167. AUDIT_BY,
  168. AUDIT_TIME,
  169. AUDIT_REMARK,
  170. PUBLISH,
  171. PUBLISH_BY,
  172. PUBLISH_TIME
  173. </sql>
  174. <sql id="entity_properties">
  175. #{mdid,jdbcType=VARCHAR},
  176. #{upCycl,jdbcType=VARCHAR},
  177. #{openCndtn,jdbcType=VARCHAR},
  178. #{adName,jdbcType=VARCHAR},
  179. #{dataField,jdbcType=VARCHAR},
  180. #{uptm, jdbcType=DATE},
  181. #{rlstm, jdbcType=DATE},
  182. #{dataRange,jdbcType=VARCHAR},
  183. #{applyNum, jdbcType=INTEGER},
  184. #{dataNum, jdbcType=INTEGER},
  185. #{srvId,jdbcType=VARCHAR},
  186. #{cateCode,jdbcType=VARCHAR},
  187. #{name,jdbcType=VARCHAR},
  188. #{type,jdbcType=VARCHAR},
  189. #{intro,jdbcType=VARCHAR},
  190. #{url,jdbcType=VARCHAR},
  191. #{rqtype,jdbcType=VARCHAR},
  192. #{rptype,jdbcType=VARCHAR},
  193. #{rpcontent,jdbcType=VARCHAR},
  194. #{note,jdbcType=VARCHAR},
  195. #{example,jdbcType=VARCHAR},
  196. #{status,jdbcType=VARCHAR},
  197. #{cnt, jdbcType=INTEGER},
  198. #{userId,jdbcType=VARCHAR},
  199. #{tm, jdbcType=DATE},
  200. #{proxyAddress,jdbcType=VARCHAR},
  201. #{proxyPath,jdbcType=VARCHAR},
  202. #{serviceSource,jdbcType=VARCHAR},
  203. #{serviceDept,jdbcType=VARCHAR},
  204. #{manageName,jdbcType=VARCHAR},
  205. #{releaseTime, jdbcType=DATE},
  206. #{developUnit,jdbcType=VARCHAR},
  207. #{developContacter,jdbcType=VARCHAR},
  208. #{maintainUnit,jdbcType=VARCHAR},
  209. #{maintainContacer,jdbcType=VARCHAR},
  210. #{viewNum,jdbcType=INTEGER},
  211. #{sort,jdbcType=INTEGER},
  212. #{audit,jdbcType=VARCHAR},
  213. #{auditBy,jdbcType=VARCHAR},
  214. #{auditTime,jdbcType=DATE},
  215. #{auditRemark,jdbcType=VARCHAR},
  216. #{publish,jdbcType=VARCHAR},
  217. #{publishBy,jdbcType=VARCHAR},
  218. #{publishTime,jdbcType=DATE}
  219. </sql>
  220. <sql id="page_where">
  221. <trim prefix="where" prefixOverrides="and | or ">
  222. <if test="mdid != null and mdid != ''">
  223. and MDID = #{mdid,jdbcType=VARCHAR}
  224. </if>
  225. <if test="upCycl != null and upCycl != ''">
  226. and UP_CYCL = #{upCycl,jdbcType=VARCHAR}
  227. </if>
  228. <if test="openCndtn != null and openCndtn != ''">
  229. and OPEN_CNDTN = #{openCndtn}
  230. </if>
  231. <if test="adName != null and adName != ''">
  232. and AD_NAME = #{adName}
  233. </if>
  234. <if test="dataField != null and dataField != ''">
  235. and DATA_FIELD = #{dataField}
  236. </if>
  237. <if test="uptm != null">
  238. and UPTM = #{uptm}
  239. </if>
  240. <if test="rlstm != null">
  241. and RLSTM = #{rlstm}
  242. </if>
  243. <if test="dataRange != null and dataRange != ''">
  244. and DATA_RANGE = #{dataRange}
  245. </if>
  246. <if test="applyNum != null and applyNum != ''">
  247. and APPLY_NUM = #{applyNum}
  248. </if>
  249. <if test="dataNum != null and dataNum != ''">
  250. and DATA_NUM = #{dataNum}
  251. </if>
  252. <if test="srvId != null and srvId != ''">
  253. and SRV_ID = #{srvId}
  254. </if>
  255. <if test="cateCode != null and cateCode != ''">
  256. and CATE_CODE = #{cateCode}
  257. </if>
  258. <if test="name != null and name != ''">
  259. and NAME = #{name}
  260. </if>
  261. <if test="type != null and type != ''">
  262. and TYPE = #{type}
  263. </if>
  264. <if test="intro != null and intro != ''">
  265. and INTRO = #{intro}
  266. </if>
  267. <if test="url != null and url != ''">
  268. and URL = #{url}
  269. </if>
  270. <if test="rqtype != null and rqtype != ''">
  271. and RQTYPE = #{rqtype}
  272. </if>
  273. <if test="rptype != null and rptype != ''">
  274. and RPTYPE = #{rptype}
  275. </if>
  276. <if test="rpcontent != null and rpcontent != ''">
  277. and RPCONTENT = #{rpcontent}
  278. </if>
  279. <if test="note != null and note != ''">
  280. and NOTE = #{note}
  281. </if>
  282. <if test="example != null and example != ''">
  283. and EXAMPLE = #{example}
  284. </if>
  285. <if test="status != null and status != ''">
  286. and STATUS = #{status}
  287. </if>
  288. <if test="cnt != null and cnt != ''">
  289. and CNT = #{cnt}
  290. </if>
  291. <if test="userId != null and userId != ''">
  292. and USER_ID = #{userId}
  293. </if>
  294. <if test="tm != null">
  295. and TM = #{tm}
  296. </if>
  297. <if test="proxyAddress != null and proxyAddress != ''">
  298. and PROXY_ADDRESS = #{proxyAddress}
  299. </if>
  300. <if test="proxyPath != null and proxyPath != ''">
  301. and PROXY_PATH = #{proxyPath}
  302. </if>
  303. <if test="serviceSource != null and serviceSource != ''">
  304. and SERVICE_SOURCE = #{serviceSource}
  305. </if>
  306. <if test="serviceDept != null and serviceDept != ''">
  307. and SERVICE_DEPT = #{serviceDept}
  308. </if>
  309. <if test="manageName != null and manageName != ''">
  310. and MANAGE_NAME = #{manageName}
  311. </if>
  312. <if test="releaseTime != null">
  313. and RELEASE_TIME = #{releaseTime}
  314. </if>
  315. <if test="developUnit != null and developUnit != ''">
  316. and DEVELOP_UNIT = #{developUnit}
  317. </if>
  318. <if test="developContacter != null and developContacter != ''">
  319. and DEVELOP_CONTACTER = #{developContacter}
  320. </if>
  321. <if test="maintainUnit != null and maintainUnit != ''">
  322. and MAINTAIN_UNIT = #{maintainUnit}
  323. </if>
  324. <if test="maintainContacer != null and maintainContacer != ''">
  325. and MAINTAIN_CONTACER = #{maintainContacer}
  326. </if>
  327. <if test="viewNum != null and viewNum != ''">
  328. and VIEW_NUM = #{viewNum}
  329. </if>
  330. <if test="audit != null and audit != ''">
  331. and "AUDIT" = #{audit}
  332. </if>
  333. <if test="publish != null and publish != ''">
  334. and PUBLISH = #{publish}
  335. </if>
  336. </trim>
  337. </sql>
  338. <!--查询数据列表-->
  339. <select id="selectAll" parameterType="com.ruoyi.interfaces.domain.PtService" resultMap="BaseResultMap">
  340. select
  341. <include refid="Base_Column_List"/>
  342. ,
  343. <include refid="Blob_Column_List"/>
  344. from PT_SERVICE
  345. <if test="cateCode !=null and cateCode !=''">
  346. where CATE_CODE = #{cateCode}
  347. </if>
  348. order by SORT
  349. </select>
  350. <!--查询数据列表-->
  351. <select id="selectAllColumns" parameterType="com.ruoyi.interfaces.domain.PtService" resultMap="BaseResultMap">
  352. select
  353. <include refid="table_columns"/>
  354. from PT_SERVICE
  355. <include refid="page_where"/>
  356. order by SORT
  357. </select>
  358. <select id="selectAllPublic" parameterType="com.ruoyi.interfaces.domain.PtService" resultMap="BaseResultMap">
  359. select
  360. <include refid="Base_Column_List"/>
  361. ,
  362. <include refid="Blob_Column_List"/>
  363. from PT_SERVICE
  364. <where>
  365. <if test="cateCode !=null and cateCode !=''">
  366. AND CATE_CODE like CONCAT('%', #{cateCode}, '%')
  367. </if>
  368. <if test="name !=null and name !=''">
  369. AND NAME like CONCAT('%', #{name}, '%')
  370. </if>
  371. <if test="status !=null and status !=''">
  372. AND STATUS = #{status}
  373. </if>
  374. <if test="dataField !=null and dataField !=''">
  375. AND DATA_FIELD IN
  376. <foreach collection='dataField.split(",")' item="df" open="(" separator="," close=")">
  377. #{df}
  378. </foreach>
  379. </if>
  380. </where>
  381. order by SORT
  382. </select>
  383. <!--根据主键获取数据-->
  384. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  385. SELECT
  386. <include refid="Base_Column_List"/>
  387. ,
  388. <include refid="Blob_Column_List"/>
  389. FROM PT_SERVICE
  390. where SRV_ID = #{srvId,jdbcType=VARCHAR}
  391. </select>
  392. <!--添加数据-->
  393. <insert id="insert" parameterType="com.ruoyi.interfaces.domain.PtService">
  394. insert into PT_SERVICE(
  395. <include refid="table_columns"/>
  396. )
  397. values (
  398. <include refid="entity_properties"/>
  399. )
  400. </insert>
  401. <!--根据主键更新数据-->
  402. <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.interfaces.domain.PtService">
  403. update PT_SERVICE
  404. <trim prefix="set" suffixOverrides=",">
  405. <if test="upCycl != null and upCycl != ''">UP_CYCL = #{upCycl,jdbcType=VARCHAR},</if>
  406. <if test="openCndtn != null and openCndtn != ''">OPEN_CNDTN = #{openCndtn},</if>
  407. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  408. <if test="dataField != null and dataField != ''">DATA_FIELD = #{dataField},</if>
  409. <if test="dataRange != null and dataRange != ''">DATA_RANGE = #{dataRange},</if>
  410. <if test="applyNum != null and applyNum != ''">APPLY_NUM = #{applyNum},</if>
  411. <if test="dataNum != null and dataNum != ''">DATA_NUM = #{dataNum},</if>
  412. <if test="cateCode != null and cateCode != ''">CATE_CODE = #{cateCode},</if>
  413. <if test="name != null and name != ''">NAME = #{name},</if>
  414. <if test="type != null and type != ''">TYPE = #{type},</if>
  415. <if test="intro != null and intro != ''">INTRO = #{intro},</if>
  416. <if test="url != null and url != ''">URL = #{url},</if>
  417. <if test="rqtype != null and rqtype != ''">RQTYPE = #{rqtype},</if>
  418. <if test="rptype != null and rptype != ''">RPTYPE = #{rptype},</if>
  419. <if test="rpcontent != null and rpcontent != ''">RPCONTENT = #{rpcontent},</if>
  420. <if test="note != null and note != ''">NOTE = #{note},</if>
  421. <if test="example != null and example != ''">EXAMPLE = #{example},</if>
  422. <if test="status != null and status != ''">STATUS = #{status},</if>
  423. <if test="cnt != null and cnt != ''">CNT = #{cnt},</if>
  424. <if test="userId != null and userId != ''">USER_ID = #{userId},</if>
  425. <if test="proxyAddress != null and proxyAddress != ''">PROXY_ADDRESS = #{proxyAddress},</if>
  426. <if test="proxyPath != null and proxyPath != ''">PROXY_PATH = #{proxyPath},</if>
  427. <if test="serviceSource != null and serviceSource != ''">SERVICE_SOURCE = #{serviceSource},</if>
  428. <if test="serviceDept != null and serviceDept != ''">SERVICE_DEPT = #{serviceDept},</if>
  429. <if test="manageName != null and manageName != ''">MANAGE_NAME = #{manageName},</if>
  430. <if test="developUnit != null and developUnit != ''">DEVELOP_UNIT = #{developUnit},</if>
  431. <if test="developContacter != null and developContacter != ''">DEVELOP_CONTACTER = #{developContacter},</if>
  432. <if test="maintainUnit != null and maintainUnit != ''">MAINTAIN_UNIT = #{maintainUnit},</if>
  433. <if test="maintainContacer != null and maintainContacer != ''">MAINTAIN_CONTACER = #{maintainContacer},</if>
  434. <if test="viewNum != null and viewNum != ''">VIEW_NUM = #{viewNum},</if>
  435. <if test="tm != null">TM = #{tm},</if>
  436. <if test="releaseTime != null">RELEASE_TIME = #{releaseTime},</if>
  437. <if test="uptm != null">UPTM = #{uptm},</if>
  438. <if test="rlstm != null">RLSTM = #{rlstm},</if>
  439. <if test="sort != null">SORT = #{sort},</if>
  440. </trim>
  441. where SRV_ID = #{srvId,jdbcType=VARCHAR}
  442. </update>
  443. <update id="audit">
  444. update PT_SERVICE
  445. set "AUDIT" = #{audit},
  446. AUDIT_BY = #{auditBy},
  447. AUDIT_TIME = #{auditTime},
  448. AUDIT_REMARK = #{auditRemark}
  449. where SRV_ID = #{srvId}
  450. </update>
  451. <update id="updatePtServicePublish">
  452. update PT_SERVICE
  453. set PUBLISH = #{publish},
  454. PUBLISH_BY = #{publishBy},
  455. PUBLISH_TIME = #{publishTime}
  456. where SRV_ID = #{srvId}
  457. </update>
  458. <update id="updatePtServicePublishByMdid">
  459. update PT_SERVICE
  460. set PUBLISH = #{publish},
  461. PUBLISH_BY = #{publishBy},
  462. PUBLISH_TIME = #{publishTime}
  463. where mdid = #{mdid}
  464. </update>
  465. <!--根据主键删除数据-->
  466. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  467. delete
  468. from PT_SERVICE
  469. where SRV_ID = #{srvId,jdbcType=VARCHAR}
  470. </delete>
  471. <select id="listOfCntTop10" parameterType="java.lang.String" resultMap="BaseResultMap">
  472. SELECT * FROM (
  473. SELECT
  474. <include refid="table_columns"/>
  475. FROM PT_SERVICE
  476. ORDER BY CNT DESC
  477. ) A
  478. LIMIT 10
  479. </select>
  480. <select id="listOfTmTop20" parameterType="java.lang.String" resultMap="BaseResultMap">
  481. SELECT * FROM (
  482. SELECT
  483. <include refid="table_columns"/>
  484. FROM PT_SERVICE
  485. ORDER BY RLSTM DESC
  486. ) A
  487. LIMIT 20
  488. </select>
  489. <select id="listByUserService" resultMap="AuthVoResultMap">
  490. SELECT A.ID,
  491. A.DEADLINE,
  492. A.APP_ID,
  493. A.USER_ID,
  494. P.UP_CYCL,
  495. P.OPEN_CNDTN,
  496. P.AD_NAME,
  497. P.DATA_FIELD,
  498. P.RLSTM,
  499. P.DATA_RANGE,
  500. P.APPLY_NUM,
  501. P.DATA_NUM,
  502. P.SRV_ID,
  503. P.CATE_CODE,
  504. P.NAME,
  505. P.TYPE,
  506. P.INTRO,
  507. P.URL,
  508. P.RQTYPE,
  509. P.RPTYPE,
  510. P.RPCONTENT,
  511. P.NOTE,
  512. P.EXAMPLE,
  513. P.STATUS,
  514. P.CNT,
  515. P.TM,
  516. P.PROXY_ADDRESS,
  517. P.PROXY_PATH,
  518. P.SERVICE_SOURCE,
  519. P.SERVICE_DEPT,
  520. P.MANAGE_NAME,
  521. P.RELEASE_TIME,
  522. P.DEVELOP_UNIT,
  523. P.DEVELOP_CONTACTER,
  524. P.MAINTAIN_UNIT,
  525. P.MAINTAIN_CONTACER,
  526. P.VIEW_NUM
  527. FROM PT_SERVICE P
  528. JOIN PT_SERVICE_AUTH A ON P.SRV_ID = A.SRV_ID
  529. WHERE A.USER_ID = #{userId}
  530. ORDER BY RLSTM DESC
  531. </select>
  532. <resultMap id="MdModelInfoVoMap" type="com.ruoyi.interfaces.domain.vo.MdModelInfoVo">
  533. <result property="mdid" column="MDID"/>
  534. <result property="name" column="M_NAME"/>
  535. <result property="enname" column="ENNAME"/>
  536. <result property="cateid" column="CATEID"/>
  537. <result property="devlang" column="DEVLANG"/>
  538. <result property="version" column="VERSION"/>
  539. <result property="intro" column="M_INTRO"/>
  540. <result property="type" column="M_TYPE"/>
  541. <result property="tags" column="TAGS"/>
  542. <result property="kind" column="KIND"/>
  543. <result property="purpose" column="PURPOSE"/>
  544. <result property="israte" column="ISRATE"/>
  545. <result property="weight" column="WEIGHT"/>
  546. <result property="devkind" column="DEVKIND"/>
  547. <result property="author" column="AUTHOR"/>
  548. <result property="ispublic" column="ISPUBLIC"/>
  549. <result property="isapproved" column="ISAPPROVED"/>
  550. <result property="status" column="M_STATUS"/>
  551. <result property="classname" column="CLASSNAME"/>
  552. <result property="mdRunCmd" column="MD_RUN_CMD"/>
  553. <result property="mdUrl" column="MD_URL"/>
  554. <result property="mdAuth" column="MD_AUTH"/>
  555. <result property="mdHeader" column="MD_HEADER"/>
  556. <result property="mdSecret" column="MD_SECRET"/>
  557. <result property="mdUnit" column="MD_UNIT"/>
  558. <result property="mdContact" column="MD_CONTACT"/>
  559. <result property="devUnit" column="DEV_UNIT"/>
  560. <result property="devContact" column="DEV_CONTACT"/>
  561. <result property="whFlag" column="WH_FLAG"/>
  562. <result property="whUrl" column="WH_URL"/>
  563. <result property="whMethod" column="WH_METHOD"/>
  564. <result property="whAuth" column="WH_AUTH"/>
  565. <result property="whHeader" column="WH_HEADER"/>
  566. <result property="whSecret" column="WH_SECRET"/>
  567. <result property="envOs" column="ENV_OS"/>
  568. <result property="evnArmX86" column="EVN_ARM_X86"/>
  569. <result property="envCpu" column="ENV_CPU"/>
  570. <result property="envGpuType" column="ENV_GPU_TYPE"/>
  571. <result property="envGpuNum" column="ENV_GPU_NUM"/>
  572. <result property="envGpuMem" column="ENV_GPU_MEM"/>
  573. <result property="envDisk" column="ENV_DISK"/>
  574. <result property="envMem" column="ENV_MEM"/>
  575. <result property="deployIp" column="DEPLOY_IP"/>
  576. <result property="deployDir" column="DEPLOY_DIR"/>
  577. <result property="deployPort" column="DEPLOY_PORT"/>
  578. <result property="deployNote" column="DEPLOY_NOTE"/>
  579. <result property="mdInName" column="MD_IN_NAME"/>
  580. <result property="mdInFile" column="MD_IN_FILE"/>
  581. <result property="mdInNote" column="MD_IN_NOTE"/>
  582. <result property="mdOutName" column="MD_OUT_NAME"/>
  583. <result property="mdOutFile" column="MD_OUT_FILE"/>
  584. <result property="mdOutNote" column="MD_OUT_NOTE"/>
  585. <result property="mirrorImageName" column="MIRROR_IMAGE_NAME"/>
  586. <result property="mirrorImageUrl" column="MIRROR_IMAGE_URL"/>
  587. <result property="mirrorImageDesc" column="MIRROR_IMAGE_DESC"/>
  588. <result property="mdAuthUrl" column="MD_AUTH_URL"/>
  589. <result property="createby" column="CREATEBY"/>
  590. <result property="modifyby" column="MODIFYBY"/>
  591. <result property="regUser" column="REG_USER"/>
  592. <result property="sort" column="SORT"/>
  593. <result property="audit" column="AUDIT"/>
  594. <collection property="serviceList" ofType="com.ruoyi.interfaces.domain.PtService" resultMap="PtServiceVoMap"/>
  595. </resultMap>
  596. <resultMap id="PtServiceVoMap" type="com.ruoyi.interfaces.domain.PtService">
  597. <id column="SRV_ID" jdbcType="VARCHAR" property="srvId"/>
  598. <result column="CATE_CODE" jdbcType="VARCHAR" property="cateCode"/>
  599. <result column="s_name" jdbcType="VARCHAR" property="name"/>
  600. <result column="s_type" jdbcType="VARCHAR" property="type"/>
  601. <result column="s_intro" jdbcType="VARCHAR" property="intro"/>
  602. <result column="URL" jdbcType="VARCHAR" property="url"/>
  603. <result column="RQTYPE" jdbcType="VARCHAR" property="rqtype"/>
  604. <result column="RPTYPE" jdbcType="VARCHAR" property="rptype"/>
  605. <result column="S_STATUS" jdbcType="VARCHAR" property="status"/>
  606. <result column="CNT" jdbcType="DECIMAL" property="cnt"/>
  607. <result column="USER_ID" jdbcType="VARCHAR" property="userId"/>
  608. <result column="RPCONTENT" jdbcType="CLOB" property="rpcontent"/>
  609. <result column="NOTE" jdbcType="CLOB" property="note"/>
  610. <result column="EXAMPLE" jdbcType="CLOB" property="example"/>
  611. <result column="PROXY_ADDRESS" jdbcType="VARCHAR" property="proxyAddress"/>
  612. <result column="PROXY_PATH" jdbcType="VARCHAR" property="proxyPath"/>
  613. <result column="SERVICE_SOURCE" jdbcType="VARCHAR" property="serviceSource"/>
  614. <result property="serviceDept" column="SERVICE_DEPT" jdbcType="VARCHAR"/>
  615. <result property="manageName" column="MANAGE_NAME" jdbcType="VARCHAR"/>
  616. <result property="releaseTime" column="RELEASE_TIME" jdbcType="TIMESTAMP"/>
  617. <result property="developUnit" column="DEVELOP_UNIT" jdbcType="VARCHAR"/>
  618. <result property="developContacter" column="DEVELOP_CONTACTER" jdbcType="VARCHAR"/>
  619. <result property="maintainUnit" column="MAINTAIN_UNIT" jdbcType="VARCHAR"/>
  620. <result property="maintainContacer" column="MAINTAIN_CONTACER" jdbcType="VARCHAR"/>
  621. <result column="VIEW_NUM" jdbcType="DECIMAL" property="viewNum"/>
  622. <result column="UP_CYCL" property="upCycl" jdbcType="VARCHAR"/>
  623. <result column="OPEN_CNDTN" property="openCndtn" jdbcType="VARCHAR"/>
  624. <result column="AD_NAME" property="adName" jdbcType="VARCHAR"/>
  625. <result column="DATA_FIELD" property="dataField" jdbcType="VARCHAR"/>
  626. <result column="TM" jdbcType="DATE" property="tm"/>
  627. <result column="UPTM" property="uptm" jdbcType="DATE"/>
  628. <result column="RLSTM" property="rlstm" jdbcType="DATE"/>
  629. <result column="DATA_RANGE" property="dataRange" jdbcType="VARCHAR"/>
  630. <result column="APPLY_NUM" property="applyNum" jdbcType="INTEGER"/>
  631. <result column="DATA_NUM" property="dataNum" jdbcType="INTEGER"/>
  632. <result column="SEN_STATE" property="senState" jdbcType="INTEGER"/>
  633. <result column="S_AUDIT" property="audit" jdbcType="VARCHAR"/>
  634. <result column="S_AUDIT_BY" property="auditBy" jdbcType="VARCHAR"/>
  635. <result column="S_AUDIT_TIME" property="auditTime"/>
  636. <result column="S_AUDIT_REMARK" property="auditRemark" jdbcType="VARCHAR"/>
  637. <result column="S_PUBLISH" property="publish" jdbcType="VARCHAR"/>
  638. <result column="S_PUBLISH_BY" property="publishBy" jdbcType="VARCHAR"/>
  639. <result column="S_PUBLISH_TIME" property="publishTime"/>
  640. </resultMap>
  641. <select id="selectModelService" resultMap="MdModelInfoVoMap">
  642. select
  643. m.MDID,
  644. m.NAME as M_NAME,
  645. m.ENNAME,
  646. m.CATEID,
  647. m.DEVLANG,
  648. m.VERSION,
  649. m.INTRO as M_INTRO,
  650. m.TYPE AS M_TYPE,
  651. m.TAGS,
  652. m.KIND,
  653. m.PURPOSE,
  654. m.ISRATE,
  655. m.WEIGHT,
  656. m.DEVKIND,
  657. m.AUTHOR,
  658. m.ISPUBLIC,
  659. m.ISAPPROVED,
  660. m.STATUS AS M_STATUS,
  661. m.CLASSNAME,
  662. m.MD_RUN_CMD,
  663. m.MD_URL,
  664. m.MD_AUTH,
  665. m.MD_HEADER,
  666. m.MD_SECRET,
  667. m.MD_UNIT,
  668. m.MD_CONTACT,
  669. m.DEV_UNIT,
  670. m.DEV_CONTACT,
  671. m.WH_FLAG,
  672. m.WH_URL,
  673. m.WH_METHOD,
  674. m.WH_AUTH,
  675. m.WH_HEADER,
  676. m.WH_SECRET,
  677. m.ENV_OS,
  678. m.EVN_ARM_X86,
  679. m.ENV_CPU,
  680. m.ENV_GPU_TYPE,
  681. m.ENV_GPU_NUM,
  682. m.ENV_GPU_MEM,
  683. m.ENV_DISK,
  684. m.ENV_MEM,
  685. m.DEPLOY_IP,
  686. m.DEPLOY_DIR,
  687. m.DEPLOY_PORT,
  688. m.DEPLOY_NOTE,
  689. m.MD_IN_NAME,
  690. m.MD_IN_FILE,
  691. m.MD_IN_NOTE,
  692. m.MD_OUT_NAME,
  693. m.MD_OUT_FILE,
  694. m.MD_OUT_NOTE,
  695. m.MIRROR_IMAGE_NAME,
  696. m.MIRROR_IMAGE_URL,
  697. m.MIRROR_IMAGE_DESC,
  698. m.MD_AUTH_URL,
  699. m.CREATEBY,
  700. m.MODIFYBY,
  701. m.REG_USER,
  702. m.SORT,
  703. m."AUDIT",
  704. s.UP_CYCL,
  705. s.OPEN_CNDTN,
  706. s.AD_NAME,
  707. s.DATA_FIELD,
  708. s.UPTM,
  709. s.RLSTM,
  710. s.DATA_RANGE,
  711. s.APPLY_NUM,
  712. s.DATA_NUM,
  713. s.SRV_ID,
  714. s.CATE_CODE,
  715. s.NAME as s_name,
  716. s.TYPE s_type,
  717. s.INTRO s_intro,
  718. s.URL,
  719. s.RQTYPE,
  720. s.RPTYPE,
  721. s.RPCONTENT,
  722. s.NOTE,
  723. s.EXAMPLE,
  724. s.STATUS S_STATUS,
  725. s.CNT,
  726. s.USER_ID,
  727. s.TM,
  728. s.PROXY_ADDRESS,
  729. s.PROXY_PATH,
  730. s.SERVICE_SOURCE,
  731. s.SERVICE_DEPT,
  732. s.MANAGE_NAME,
  733. s.RELEASE_TIME,
  734. s.DEVELOP_UNIT,
  735. s.DEVELOP_CONTACTER,
  736. s.MAINTAIN_UNIT,
  737. s.MAINTAIN_CONTACER,
  738. s.VIEW_NUM,
  739. s."AUDIT" as S_AUDIT,
  740. s.AUDIT_BY AS S_AUDIT_BY,
  741. s.AUDIT_TIME AS S_AUDIT_TIME,
  742. s.AUDIT_REMARK AS S_AUDIT_REMARK,
  743. s.PUBLISH AS S_PUBLISH,
  744. s.PUBLISH_BY AS S_PUBLISH_BY,
  745. s.PUBLISH_TIME AS S_PUBLISH_TIME,
  746. r.SEN_STATE
  747. from md_model_info m left join pt_service s on m.mdid = s.MDID
  748. LEFT JOIN (
  749. SELECT ser_id, sen_state FROM (
  750. SELECT t.* ,
  751. ROW_NUMBER () OVER (PARTITION BY ser_id ORDER BY run_tm DESC ) rn
  752. FROM pt_service_run_log t
  753. ) WHERE rn = 1
  754. ) r ON s.SRV_ID =
  755. r.ser_id
  756. <where>
  757. <if test="mdid != null ">and m.mdid = #{mdid}</if>
  758. </where>
  759. order by s.sort
  760. </select>
  761. </mapper>