PtServiceMapper.xml 34 KB

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