PtServiceMapper.xml 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734
  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,SORT,AUDIT,AUDIT_BY,
  165. AUDIT_TIME,
  166. AUDIT_REMARK,
  167. PUBLISH,
  168. PUBLISH_BY,
  169. PUBLISH_TIME
  170. </sql>
  171. <sql id="entity_properties">
  172. #{mdid,jdbcType=VARCHAR}
  173. ,
  174. #{upCycl,jdbcType=VARCHAR},
  175. #{openCndtn,jdbcType=VARCHAR},
  176. #{adName,jdbcType=VARCHAR},
  177. #{dataField,jdbcType=VARCHAR},
  178. #{uptm, jdbcType=DATE},
  179. #{rlstm, jdbcType=DATE},
  180. #{dataRange,jdbcType=VARCHAR},
  181. #{applyNum, jdbcType=INTEGER},
  182. #{dataNum, jdbcType=INTEGER},
  183. #{srvId,jdbcType=VARCHAR},
  184. #{cateCode,jdbcType=VARCHAR},
  185. #{name,jdbcType=VARCHAR},
  186. #{type,jdbcType=VARCHAR},
  187. #{intro,jdbcType=VARCHAR},
  188. #{url,jdbcType=VARCHAR},
  189. #{rqtype,jdbcType=VARCHAR},
  190. #{rptype,jdbcType=VARCHAR},
  191. #{rpcontent,jdbcType=VARCHAR},
  192. #{note,jdbcType=VARCHAR},
  193. #{example,jdbcType=VARCHAR},
  194. #{status,jdbcType=VARCHAR},
  195. #{cnt, jdbcType=INTEGER},
  196. #{userId,jdbcType=VARCHAR},
  197. #{tm, jdbcType=DATE},
  198. #{proxyAddress,jdbcType=VARCHAR},
  199. #{proxyPath,jdbcType=VARCHAR},
  200. #{serviceSource,jdbcType=VARCHAR},
  201. #{serviceDept,jdbcType=VARCHAR},
  202. #{manageName,jdbcType=VARCHAR},
  203. #{releaseTime, jdbcType=DATE},
  204. #{developUnit,jdbcType=VARCHAR},
  205. #{developContacter,jdbcType=VARCHAR},
  206. #{maintainUnit,jdbcType=VARCHAR},
  207. #{maintainContacer,jdbcType=VARCHAR},
  208. #{viewNum, jdbcType=INTEGER},
  209. #{sort, jdbcType=INTEGER},
  210. #{audit, jdbcType=VARCHAR}
  211. </sql>
  212. <sql id="page_where">
  213. <trim prefix="where" prefixOverrides="and | or ">
  214. <if test="mdid != null and mdid != ''">
  215. and MDID = #{mdid,jdbcType=VARCHAR}
  216. </if>
  217. <if test="upCycl != null and upCycl != ''">
  218. and UP_CYCL = #{upCycl,jdbcType=VARCHAR}
  219. </if>
  220. <if test="openCndtn != null and openCndtn != ''">
  221. and OPEN_CNDTN = #{openCndtn}
  222. </if>
  223. <if test="adName != null and adName != ''">
  224. and AD_NAME = #{adName}
  225. </if>
  226. <if test="dataField != null and dataField != ''">
  227. and DATA_FIELD = #{dataField}
  228. </if>
  229. <if test="uptm != null">
  230. and UPTM = #{uptm}
  231. </if>
  232. <if test="rlstm != null">
  233. and RLSTM = #{rlstm}
  234. </if>
  235. <if test="dataRange != null and dataRange != ''">
  236. and DATA_RANGE = #{dataRange}
  237. </if>
  238. <if test="applyNum != null and applyNum != ''">
  239. and APPLY_NUM = #{applyNum}
  240. </if>
  241. <if test="dataNum != null and dataNum != ''">
  242. and DATA_NUM = #{dataNum}
  243. </if>
  244. <if test="srvId != null and srvId != ''">
  245. and SRV_ID = #{srvId}
  246. </if>
  247. <if test="cateCode != null and cateCode != ''">
  248. and CATE_CODE = #{cateCode}
  249. </if>
  250. <if test="name != null and name != ''">
  251. and NAME = #{name}
  252. </if>
  253. <if test="type != null and type != ''">
  254. and TYPE = #{type}
  255. </if>
  256. <if test="intro != null and intro != ''">
  257. and INTRO = #{intro}
  258. </if>
  259. <if test="url != null and url != ''">
  260. and URL = #{url}
  261. </if>
  262. <if test="rqtype != null and rqtype != ''">
  263. and RQTYPE = #{rqtype}
  264. </if>
  265. <if test="rptype != null and rptype != ''">
  266. and RPTYPE = #{rptype}
  267. </if>
  268. <if test="rpcontent != null and rpcontent != ''">
  269. and RPCONTENT = #{rpcontent}
  270. </if>
  271. <if test="note != null and note != ''">
  272. and NOTE = #{note}
  273. </if>
  274. <if test="example != null and example != ''">
  275. and EXAMPLE = #{example}
  276. </if>
  277. <if test="status != null and status != ''">
  278. and STATUS = #{status}
  279. </if>
  280. <if test="cnt != null and cnt != ''">
  281. and CNT = #{cnt}
  282. </if>
  283. <if test="userId != null and userId != ''">
  284. and USER_ID = #{userId}
  285. </if>
  286. <if test="tm != null">
  287. and TM = #{tm}
  288. </if>
  289. <if test="proxyAddress != null and proxyAddress != ''">
  290. and PROXY_ADDRESS = #{proxyAddress}
  291. </if>
  292. <if test="proxyPath != null and proxyPath != ''">
  293. and PROXY_PATH = #{proxyPath}
  294. </if>
  295. <if test="serviceSource != null and serviceSource != ''">
  296. and SERVICE_SOURCE = #{serviceSource}
  297. </if>
  298. <if test="serviceDept != null and serviceDept != ''">
  299. and SERVICE_DEPT = #{serviceDept}
  300. </if>
  301. <if test="manageName != null and manageName != ''">
  302. and MANAGE_NAME = #{manageName}
  303. </if>
  304. <if test="releaseTime != null">
  305. and RELEASE_TIME = #{releaseTime}
  306. </if>
  307. <if test="developUnit != null and developUnit != ''">
  308. and DEVELOP_UNIT = #{developUnit}
  309. </if>
  310. <if test="developContacter != null and developContacter != ''">
  311. and DEVELOP_CONTACTER = #{developContacter}
  312. </if>
  313. <if test="maintainUnit != null and maintainUnit != ''">
  314. and MAINTAIN_UNIT = #{maintainUnit}
  315. </if>
  316. <if test="maintainContacer != null and maintainContacer != ''">
  317. and MAINTAIN_CONTACER = #{maintainContacer}
  318. </if>
  319. <if test="viewNum != null and viewNum != ''">
  320. and VIEW_NUM = #{viewNum}
  321. </if>
  322. <if test="audit != null and audit != ''">
  323. and AUDIT = #{audit}
  324. </if>
  325. <if test="publish != null and publish != ''">
  326. and PUBLISH = #{publish}
  327. </if>
  328. </trim>
  329. </sql>
  330. <!--查询数据列表-->
  331. <select id="selectAll" parameterType="com.ruoyi.interfaces.domain.PtService" resultMap="BaseResultMap">
  332. select
  333. <include refid="Base_Column_List"/>
  334. ,
  335. <include refid="Blob_Column_List"/>
  336. from PT_SERVICE
  337. <if test="cateCode !=null and cateCode !=''">
  338. where CATE_CODE = #{cateCode}
  339. </if>
  340. order by SORT
  341. </select>
  342. <!--查询数据列表-->
  343. <select id="selectAllColumns" parameterType="com.ruoyi.interfaces.domain.PtService" resultMap="BaseResultMap">
  344. select
  345. <include refid="table_columns"/>
  346. from PT_SERVICE
  347. <include refid="page_where"/>
  348. order by SORT
  349. </select>
  350. <select id="selectAllPublic" parameterType="com.ruoyi.interfaces.domain.PtService" resultMap="BaseResultMap">
  351. select
  352. <include refid="Base_Column_List"/>
  353. ,
  354. <include refid="Blob_Column_List"/>
  355. from PT_SERVICE
  356. <where>
  357. <if test="cateCode !=null and cateCode !=''">
  358. AND CATE_CODE like CONCAT('%', #{cateCode}, '%')
  359. </if>
  360. <if test="name !=null and name !=''">
  361. AND NAME like CONCAT('%', #{name}, '%')
  362. </if>
  363. <if test="status !=null and status !=''">
  364. AND STATUS = #{status}
  365. </if>
  366. <if test="dataField !=null and dataField !=''">
  367. AND DATA_FIELD IN
  368. <foreach collection='dataField.split(",")' item="df" open="(" separator="," close=")">
  369. #{df}
  370. </foreach>
  371. </if>
  372. </where>
  373. order by SORT
  374. </select>
  375. <!--根据主键获取数据-->
  376. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  377. SELECT
  378. <include refid="Base_Column_List"/>
  379. ,
  380. <include refid="Blob_Column_List"/>
  381. FROM PT_SERVICE
  382. where SRV_ID = #{srvId,jdbcType=VARCHAR}
  383. </select>
  384. <!--添加数据-->
  385. <insert id="insert" parameterType="com.ruoyi.interfaces.domain.PtService">
  386. insert into PT_SERVICE(
  387. <include refid="table_columns"/>
  388. )
  389. values (
  390. <include refid="entity_properties"/>
  391. )
  392. </insert>
  393. <!--根据主键更新数据-->
  394. <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.interfaces.domain.PtService">
  395. update PT_SERVICE
  396. <trim prefix="set" suffixOverrides=",">
  397. <if test="upCycl != null and upCycl != ''">UP_CYCL = #{upCycl,jdbcType=VARCHAR},</if>
  398. <if test="openCndtn != null and openCndtn != ''">OPEN_CNDTN = #{openCndtn},</if>
  399. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  400. <if test="dataField != null and dataField != ''">DATA_FIELD = #{dataField},</if>
  401. <if test="dataRange != null and dataRange != ''">DATA_RANGE = #{dataRange},</if>
  402. <if test="applyNum != null and applyNum != ''">APPLY_NUM = #{applyNum},</if>
  403. <if test="dataNum != null and dataNum != ''">DATA_NUM = #{dataNum},</if>
  404. <if test="cateCode != null and cateCode != ''">CATE_CODE = #{cateCode},</if>
  405. <if test="name != null and name != ''">NAME = #{name},</if>
  406. <if test="type != null and type != ''">TYPE = #{type},</if>
  407. <if test="intro != null and intro != ''">INTRO = #{intro},</if>
  408. <if test="url != null and url != ''">URL = #{url},</if>
  409. <if test="rqtype != null and rqtype != ''">RQTYPE = #{rqtype},</if>
  410. <if test="rptype != null and rptype != ''">RPTYPE = #{rptype},</if>
  411. <if test="rpcontent != null and rpcontent != ''">RPCONTENT = #{rpcontent},</if>
  412. <if test="note != null and note != ''">NOTE = #{note},</if>
  413. <if test="example != null and example != ''">EXAMPLE = #{example},</if>
  414. <if test="status != null and status != ''">STATUS = #{status},</if>
  415. <if test="cnt != null and cnt != ''">CNT = #{cnt},</if>
  416. <if test="userId != null and userId != ''">USER_ID = #{userId},</if>
  417. <if test="proxyAddress != null and proxyAddress != ''">PROXY_ADDRESS = #{proxyAddress},</if>
  418. <if test="proxyPath != null and proxyPath != ''">PROXY_PATH = #{proxyPath},</if>
  419. <if test="serviceSource != null and serviceSource != ''">SERVICE_SOURCE = #{serviceSource},</if>
  420. <if test="serviceDept != null and serviceDept != ''">SERVICE_DEPT = #{serviceDept},</if>
  421. <if test="manageName != null and manageName != ''">MANAGE_NAME = #{manageName},</if>
  422. <if test="developUnit != null and developUnit != ''">DEVELOP_UNIT = #{developUnit},</if>
  423. <if test="developContacter != null and developContacter != ''">DEVELOP_CONTACTER = #{developContacter},</if>
  424. <if test="maintainUnit != null and maintainUnit != ''">MAINTAIN_UNIT = #{maintainUnit},</if>
  425. <if test="maintainContacer != null and maintainContacer != ''">MAINTAIN_CONTACER = #{maintainContacer},</if>
  426. <if test="viewNum != null and viewNum != ''">VIEW_NUM = #{viewNum},</if>
  427. <if test="tm != null">TM = #{tm},</if>
  428. <if test="releaseTime != null">RELEASE_TIME = #{releaseTime},</if>
  429. <if test="uptm != null">UPTM = #{uptm},</if>
  430. <if test="rlstm != null">RLSTM = #{rlstm},</if>
  431. <if test="sort != null">SORT = #{sort},</if>
  432. </trim>
  433. where SRV_ID = #{srvId,jdbcType=VARCHAR}
  434. </update>
  435. <update id="audit">
  436. update PT_SERVICE
  437. set AUDIT = #{audit},
  438. AUDIT_BY = #{auditBy},
  439. AUDIT_TIME = #{auditTime},
  440. AUDIT_REMARK = #{auditRemark}
  441. where SRV_ID = #{srvId}
  442. </update>
  443. <update id="updatePtServicePublish">
  444. update PT_SERVICE
  445. set PUBLISH = #{publish},
  446. PUBLISH_BY = #{publishBy},
  447. PUBLISH_TIME = #{publishTime}
  448. where SRV_ID = #{srvId}
  449. </update>
  450. <!--根据主键删除数据-->
  451. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  452. delete
  453. from PT_SERVICE
  454. where SRV_ID = #{srvId,jdbcType=VARCHAR}
  455. </delete>
  456. <select id="listOfCntTop10" parameterType="java.lang.String" resultMap="BaseResultMap">
  457. SELECT * FROM (
  458. SELECT
  459. <include refid="table_columns"/>
  460. FROM PT_SERVICE
  461. ORDER BY CNT DESC
  462. ) A
  463. LIMIT 10
  464. </select>
  465. <select id="listOfTmTop20" parameterType="java.lang.String" resultMap="BaseResultMap">
  466. SELECT * FROM (
  467. SELECT
  468. <include refid="table_columns"/>
  469. FROM PT_SERVICE
  470. ORDER BY RLSTM DESC
  471. ) A
  472. LIMIT 20
  473. </select>
  474. <select id="listByUserService" resultMap="AuthVoResultMap">
  475. SELECT A.ID,
  476. A.DEADLINE,
  477. A.APP_ID,
  478. A.USER_ID,
  479. P.UP_CYCL,
  480. P.OPEN_CNDTN,
  481. P.AD_NAME,
  482. P.DATA_FIELD,
  483. P.RLSTM,
  484. P.DATA_RANGE,
  485. P.APPLY_NUM,
  486. P.DATA_NUM,
  487. P.SRV_ID,
  488. P.CATE_CODE,
  489. P.NAME,
  490. P.TYPE,
  491. P.INTRO,
  492. P.URL,
  493. P.RQTYPE,
  494. P.RPTYPE,
  495. P.RPCONTENT,
  496. P.NOTE,
  497. P.EXAMPLE,
  498. P.STATUS,
  499. P.CNT,
  500. P.TM,
  501. P.PROXY_ADDRESS,
  502. P.PROXY_PATH,
  503. P.SERVICE_SOURCE,
  504. P.SERVICE_DEPT,
  505. P.MANAGE_NAME,
  506. P.RELEASE_TIME,
  507. P.DEVELOP_UNIT,
  508. P.DEVELOP_CONTACTER,
  509. P.MAINTAIN_UNIT,
  510. P.MAINTAIN_CONTACER,
  511. P.VIEW_NUM
  512. FROM PT_SERVICE P
  513. JOIN PT_SERVICE_AUTH A ON P.SRV_ID = A.SRV_ID
  514. WHERE A.USER_ID = #{userId}
  515. ORDER BY RLSTM DESC
  516. </select>
  517. <resultMap id="MdModelInfoVoMap" type="com.ruoyi.interfaces.domain.vo.MdModelInfoVo">
  518. <result property="mdid" column="MDID"/>
  519. <result property="name" column="M_NAME"/>
  520. <result property="enname" column="ENNAME"/>
  521. <result property="cateid" column="CATEID"/>
  522. <result property="devlang" column="DEVLANG"/>
  523. <result property="version" column="VERSION"/>
  524. <result property="intro" column="M_INTRO"/>
  525. <result property="type" column="M_TYPE"/>
  526. <result property="tags" column="TAGS"/>
  527. <result property="kind" column="KIND"/>
  528. <result property="purpose" column="PURPOSE"/>
  529. <result property="israte" column="ISRATE"/>
  530. <result property="weight" column="WEIGHT"/>
  531. <result property="devkind" column="DEVKIND"/>
  532. <result property="author" column="AUTHOR"/>
  533. <result property="ispublic" column="ISPUBLIC"/>
  534. <result property="isapproved" column="ISAPPROVED"/>
  535. <result property="status" column="M_STATUS"/>
  536. <result property="classname" column="CLASSNAME"/>
  537. <result property="mdRunCmd" column="MD_RUN_CMD"/>
  538. <result property="mdUrl" column="MD_URL"/>
  539. <result property="mdAuth" column="MD_AUTH"/>
  540. <result property="mdHeader" column="MD_HEADER"/>
  541. <result property="mdSecret" column="MD_SECRET"/>
  542. <result property="mdUnit" column="MD_UNIT"/>
  543. <result property="mdContact" column="MD_CONTACT"/>
  544. <result property="devUnit" column="DEV_UNIT"/>
  545. <result property="devContact" column="DEV_CONTACT"/>
  546. <result property="whFlag" column="WH_FLAG"/>
  547. <result property="whUrl" column="WH_URL"/>
  548. <result property="whMethod" column="WH_METHOD"/>
  549. <result property="whAuth" column="WH_AUTH"/>
  550. <result property="whHeader" column="WH_HEADER"/>
  551. <result property="whSecret" column="WH_SECRET"/>
  552. <result property="envOs" column="ENV_OS"/>
  553. <result property="evnArmX86" column="EVN_ARM_X86"/>
  554. <result property="envCpu" column="ENV_CPU"/>
  555. <result property="envGpuType" column="ENV_GPU_TYPE"/>
  556. <result property="envGpuNum" column="ENV_GPU_NUM"/>
  557. <result property="envGpuMem" column="ENV_GPU_MEM"/>
  558. <result property="envDisk" column="ENV_DISK"/>
  559. <result property="envMem" column="ENV_MEM"/>
  560. <result property="deployIp" column="DEPLOY_IP"/>
  561. <result property="deployDir" column="DEPLOY_DIR"/>
  562. <result property="deployPort" column="DEPLOY_PORT"/>
  563. <result property="deployNote" column="DEPLOY_NOTE"/>
  564. <result property="mdInName" column="MD_IN_NAME"/>
  565. <result property="mdInFile" column="MD_IN_FILE"/>
  566. <result property="mdInNote" column="MD_IN_NOTE"/>
  567. <result property="mdOutName" column="MD_OUT_NAME"/>
  568. <result property="mdOutFile" column="MD_OUT_FILE"/>
  569. <result property="mdOutNote" column="MD_OUT_NOTE"/>
  570. <result property="mirrorImageName" column="MIRROR_IMAGE_NAME"/>
  571. <result property="mirrorImageUrl" column="MIRROR_IMAGE_URL"/>
  572. <result property="mirrorImageDesc" column="MIRROR_IMAGE_DESC"/>
  573. <result property="mdAuthUrl" column="MD_AUTH_URL"/>
  574. <result property="createby" column="CREATEBY"/>
  575. <result property="modifyby" column="MODIFYBY"/>
  576. <result property="regUser" column="REG_USER"/>
  577. <result property="sort" column="SORT"/>
  578. <result property="audit" column="AUDIT"/>
  579. <collection property="serviceList" ofType="com.ruoyi.interfaces.domain.PtService" resultMap="PtServiceVoMap"/>
  580. </resultMap>
  581. <resultMap id="PtServiceVoMap" type="com.ruoyi.interfaces.domain.PtService">
  582. <id column="SRV_ID" jdbcType="VARCHAR" property="srvId"/>
  583. <result column="CATE_CODE" jdbcType="VARCHAR" property="cateCode"/>
  584. <result column="s_name" jdbcType="VARCHAR" property="name"/>
  585. <result column="s_type" jdbcType="VARCHAR" property="type"/>
  586. <result column="s_intro" jdbcType="VARCHAR" property="intro"/>
  587. <result column="URL" jdbcType="VARCHAR" property="url"/>
  588. <result column="RQTYPE" jdbcType="VARCHAR" property="rqtype"/>
  589. <result column="RPTYPE" jdbcType="VARCHAR" property="rptype"/>
  590. <result column="S_STATUS" jdbcType="VARCHAR" property="status"/>
  591. <result column="CNT" jdbcType="DECIMAL" property="cnt"/>
  592. <result column="USER_ID" jdbcType="VARCHAR" property="userId"/>
  593. <result column="RPCONTENT" jdbcType="CLOB" property="rpcontent"/>
  594. <result column="NOTE" jdbcType="CLOB" property="note"/>
  595. <result column="EXAMPLE" jdbcType="CLOB" property="example"/>
  596. <result column="PROXY_ADDRESS" jdbcType="VARCHAR" property="proxyAddress"/>
  597. <result column="PROXY_PATH" jdbcType="VARCHAR" property="proxyPath"/>
  598. <result column="SERVICE_SOURCE" jdbcType="VARCHAR" property="serviceSource"/>
  599. <result property="serviceDept" column="SERVICE_DEPT" jdbcType="VARCHAR"/>
  600. <result property="manageName" column="MANAGE_NAME" jdbcType="VARCHAR"/>
  601. <result property="releaseTime" column="RELEASE_TIME" jdbcType="TIMESTAMP"/>
  602. <result property="developUnit" column="DEVELOP_UNIT" jdbcType="VARCHAR"/>
  603. <result property="developContacter" column="DEVELOP_CONTACTER" jdbcType="VARCHAR"/>
  604. <result property="maintainUnit" column="MAINTAIN_UNIT" jdbcType="VARCHAR"/>
  605. <result property="maintainContacer" column="MAINTAIN_CONTACER" jdbcType="VARCHAR"/>
  606. <result column="VIEW_NUM" jdbcType="DECIMAL" property="viewNum"/>
  607. <result column="UP_CYCL" property="upCycl" jdbcType="VARCHAR"/>
  608. <result column="OPEN_CNDTN" property="openCndtn" jdbcType="VARCHAR"/>
  609. <result column="AD_NAME" property="adName" jdbcType="VARCHAR"/>
  610. <result column="DATA_FIELD" property="dataField" jdbcType="VARCHAR"/>
  611. <result column="TM" jdbcType="DATE" property="tm"/>
  612. <result column="UPTM" property="uptm" jdbcType="DATE"/>
  613. <result column="RLSTM" property="rlstm" jdbcType="DATE"/>
  614. <result column="DATA_RANGE" property="dataRange" jdbcType="VARCHAR"/>
  615. <result column="APPLY_NUM" property="applyNum" jdbcType="INTEGER"/>
  616. <result column="DATA_NUM" property="dataNum" jdbcType="INTEGER"/>
  617. </resultMap>
  618. <select id="selectModelService" resultMap="MdModelInfoVoMap">
  619. select
  620. m.MDID,
  621. m.NAME as M_NAME,
  622. m.ENNAME,
  623. m.CATEID,
  624. m.DEVLANG,
  625. m.VERSION,
  626. m.INTRO as M_INTRO,
  627. m.TYPE AS M_TYPE,
  628. m.TAGS,
  629. m.KIND,
  630. m.PURPOSE,
  631. m.ISRATE,
  632. m.WEIGHT,
  633. m.DEVKIND,
  634. m.AUTHOR,
  635. m.ISPUBLIC,
  636. m.ISAPPROVED,
  637. m.STATUS AS M_STATUS,
  638. m.CLASSNAME,
  639. m.MD_RUN_CMD,
  640. m.MD_URL,
  641. m.MD_AUTH,
  642. m.MD_HEADER,
  643. m.MD_SECRET,
  644. m.MD_UNIT,
  645. m.MD_CONTACT,
  646. m.DEV_UNIT,
  647. m.DEV_CONTACT,
  648. m.WH_FLAG,
  649. m.WH_URL,
  650. m.WH_METHOD,
  651. m.WH_AUTH,
  652. m.WH_HEADER,
  653. m.WH_SECRET,
  654. m.ENV_OS,
  655. m.EVN_ARM_X86,
  656. m.ENV_CPU,
  657. m.ENV_GPU_TYPE,
  658. m.ENV_GPU_NUM,
  659. m.ENV_GPU_MEM,
  660. m.ENV_DISK,
  661. m.ENV_MEM,
  662. m.DEPLOY_IP,
  663. m.DEPLOY_DIR,
  664. m.DEPLOY_PORT,
  665. m.DEPLOY_NOTE,
  666. m.MD_IN_NAME,
  667. m.MD_IN_FILE,
  668. m.MD_IN_NOTE,
  669. m.MD_OUT_NAME,
  670. m.MD_OUT_FILE,
  671. m.MD_OUT_NOTE,
  672. m.MIRROR_IMAGE_NAME,
  673. m.MIRROR_IMAGE_URL,
  674. m.MIRROR_IMAGE_DESC,
  675. m.MD_AUTH_URL,
  676. m.CREATEBY,
  677. m.MODIFYBY,
  678. m.REG_USER,
  679. m.SORT,
  680. m.AUDIT,
  681. s.UP_CYCL,
  682. s.OPEN_CNDTN,
  683. s.AD_NAME,
  684. s.DATA_FIELD,
  685. s.UPTM,
  686. s.RLSTM,
  687. s.DATA_RANGE,
  688. s.APPLY_NUM,
  689. s.DATA_NUM,
  690. s.SRV_ID,
  691. s.CATE_CODE,
  692. s.NAME as s_name,
  693. s.TYPE s_type,
  694. s.INTRO s_intro,
  695. s.URL,
  696. s.RQTYPE,
  697. s.RPTYPE,
  698. s.RPCONTENT,
  699. s.NOTE,
  700. s.EXAMPLE,
  701. s.STATUS S_STATUS,
  702. s.CNT,
  703. s.USER_ID,
  704. s.TM,
  705. s.PROXY_ADDRESS,
  706. s.PROXY_PATH,
  707. s.SERVICE_SOURCE,
  708. s.SERVICE_DEPT,
  709. s.MANAGE_NAME,
  710. s.RELEASE_TIME,
  711. s.DEVELOP_UNIT,
  712. s.DEVELOP_CONTACTER,
  713. s.MAINTAIN_UNIT,
  714. s.MAINTAIN_CONTACER,
  715. s.VIEW_NUM
  716. from md_model_info m left join pt_service s on m.mdid = s.MDID
  717. <where>
  718. <if test="mdid != null ">and m.mdid = #{mdid}</if>
  719. </where>
  720. </select>
  721. </mapper>