PtServiceMapper.xml 30 KB

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