MetricsMapper.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461
  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.gyee.frame.mapper.auto.MetricsMapper">
  4. <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Metrics">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. -->
  9. <id column="ID" jdbcType="DECIMAL" property="id" />
  10. <result column="THING" jdbcType="VARCHAR" property="thing" />
  11. <result column="METRICID" jdbcType="VARCHAR" property="metricid" />
  12. <result column="METRICNAME" jdbcType="VARCHAR" property="metricname" />
  13. <result column="UNITNAME" jdbcType="VARCHAR" property="unitname" />
  14. <result column="UNITNAMECN" jdbcType="VARCHAR" property="unitnamecn" />
  15. <result column="THINGSUB" jdbcType="VARCHAR" property="thingsub" />
  16. <result column="THINGSUBSUB" jdbcType="VARCHAR" property="thingsubsub" />
  17. <result column="CATEGORYDATA" jdbcType="VARCHAR" property="categorydata" />
  18. <result column="CATEGORYSCI" jdbcType="VARCHAR" property="categorysci" />
  19. <result column="CATEGORYSYS" jdbcType="VARCHAR" property="categorysys" />
  20. <result column="CATEGORYRES1" jdbcType="VARCHAR" property="categoryres1" />
  21. <result column="CATEGORYRES2" jdbcType="VARCHAR" property="categoryres2" />
  22. <result column="CATEGORYRES3" jdbcType="VARCHAR" property="categoryres3" />
  23. <result column="CATEGORYRES4" jdbcType="VARCHAR" property="categoryres4" />
  24. <result column="CATEGORYRES5" jdbcType="VARCHAR" property="categoryres5" />
  25. <result column="DESCRIPTION" jdbcType="VARCHAR" property="description" />
  26. </resultMap>
  27. <sql id="Example_Where_Clause">
  28. <!--
  29. WARNING - @mbg.generated
  30. This element is automatically generated by MyBatis Generator, do not modify.
  31. -->
  32. <where>
  33. <foreach collection="oredCriteria" item="criteria" separator="or">
  34. <if test="criteria.valid">
  35. <trim prefix="(" prefixOverrides="and" suffix=")">
  36. <foreach collection="criteria.criteria" item="criterion">
  37. <choose>
  38. <when test="criterion.noValue">
  39. and ${criterion.condition}
  40. </when>
  41. <when test="criterion.singleValue">
  42. and ${criterion.condition} #{criterion.value}
  43. </when>
  44. <when test="criterion.betweenValue">
  45. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  46. </when>
  47. <when test="criterion.listValue">
  48. and ${criterion.condition}
  49. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  50. #{listItem}
  51. </foreach>
  52. </when>
  53. </choose>
  54. </foreach>
  55. </trim>
  56. </if>
  57. </foreach>
  58. </where>
  59. </sql>
  60. <sql id="Update_By_Example_Where_Clause">
  61. <!--
  62. WARNING - @mbg.generated
  63. This element is automatically generated by MyBatis Generator, do not modify.
  64. -->
  65. <where>
  66. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  67. <if test="criteria.valid">
  68. <trim prefix="(" prefixOverrides="and" suffix=")">
  69. <foreach collection="criteria.criteria" item="criterion">
  70. <choose>
  71. <when test="criterion.noValue">
  72. and ${criterion.condition}
  73. </when>
  74. <when test="criterion.singleValue">
  75. and ${criterion.condition} #{criterion.value}
  76. </when>
  77. <when test="criterion.betweenValue">
  78. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  79. </when>
  80. <when test="criterion.listValue">
  81. and ${criterion.condition}
  82. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  83. #{listItem}
  84. </foreach>
  85. </when>
  86. </choose>
  87. </foreach>
  88. </trim>
  89. </if>
  90. </foreach>
  91. </where>
  92. </sql>
  93. <sql id="Base_Column_List">
  94. <!--
  95. WARNING - @mbg.generated
  96. This element is automatically generated by MyBatis Generator, do not modify.
  97. -->
  98. ID, THING, METRICID, METRICNAME, UNITNAME, UNITNAMECN, THINGSUB, THINGSUBSUB, CATEGORYDATA,
  99. CATEGORYSCI, CATEGORYSYS, CATEGORYRES1, CATEGORYRES2, CATEGORYRES3, CATEGORYRES4,
  100. CATEGORYRES5, DESCRIPTION
  101. </sql>
  102. <select id="selectByExample" parameterType="com.gyee.frame.model.auto.MetricsExample" resultMap="BaseResultMap">
  103. <!--
  104. WARNING - @mbg.generated
  105. This element is automatically generated by MyBatis Generator, do not modify.
  106. -->
  107. select
  108. <if test="distinct">
  109. distinct
  110. </if>
  111. <include refid="Base_Column_List" />
  112. from METRICS
  113. <if test="_parameter != null">
  114. <include refid="Example_Where_Clause" />
  115. </if>
  116. <if test="orderByClause != null">
  117. order by ${orderByClause}
  118. </if>
  119. </select>
  120. <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
  121. <!--
  122. WARNING - @mbg.generated
  123. This element is automatically generated by MyBatis Generator, do not modify.
  124. -->
  125. select
  126. <include refid="Base_Column_List" />
  127. from METRICS
  128. where ID = #{id,jdbcType=DECIMAL}
  129. </select>
  130. <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
  131. <!--
  132. WARNING - @mbg.generated
  133. This element is automatically generated by MyBatis Generator, do not modify.
  134. -->
  135. delete from METRICS
  136. where ID = #{id,jdbcType=DECIMAL}
  137. </delete>
  138. <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.MetricsExample">
  139. <!--
  140. WARNING - @mbg.generated
  141. This element is automatically generated by MyBatis Generator, do not modify.
  142. -->
  143. delete from METRICS
  144. <if test="_parameter != null">
  145. <include refid="Example_Where_Clause" />
  146. </if>
  147. </delete>
  148. <insert id="insert" parameterType="com.gyee.frame.model.auto.Metrics">
  149. <!--
  150. WARNING - @mbg.generated
  151. This element is automatically generated by MyBatis Generator, do not modify.
  152. -->
  153. insert into METRICS (ID, THING, METRICID,
  154. METRICNAME, UNITNAME, UNITNAMECN,
  155. THINGSUB, THINGSUBSUB, CATEGORYDATA,
  156. CATEGORYSCI, CATEGORYSYS, CATEGORYRES1,
  157. CATEGORYRES2, CATEGORYRES3, CATEGORYRES4,
  158. CATEGORYRES5, DESCRIPTION)
  159. values (#{id,jdbcType=DECIMAL}, #{thing,jdbcType=VARCHAR}, #{metricid,jdbcType=VARCHAR},
  160. #{metricname,jdbcType=VARCHAR}, #{unitname,jdbcType=VARCHAR}, #{unitnamecn,jdbcType=VARCHAR},
  161. #{thingsub,jdbcType=VARCHAR}, #{thingsubsub,jdbcType=VARCHAR}, #{categorydata,jdbcType=VARCHAR},
  162. #{categorysci,jdbcType=VARCHAR}, #{categorysys,jdbcType=VARCHAR}, #{categoryres1,jdbcType=VARCHAR},
  163. #{categoryres2,jdbcType=VARCHAR}, #{categoryres3,jdbcType=VARCHAR}, #{categoryres4,jdbcType=VARCHAR},
  164. #{categoryres5,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR})
  165. </insert>
  166. <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Metrics">
  167. <!--
  168. WARNING - @mbg.generated
  169. This element is automatically generated by MyBatis Generator, do not modify.
  170. -->
  171. insert into METRICS
  172. <trim prefix="(" suffix=")" suffixOverrides=",">
  173. <if test="id != null">
  174. ID,
  175. </if>
  176. <if test="thing != null">
  177. THING,
  178. </if>
  179. <if test="metricid != null">
  180. METRICID,
  181. </if>
  182. <if test="metricname != null">
  183. METRICNAME,
  184. </if>
  185. <if test="unitname != null">
  186. UNITNAME,
  187. </if>
  188. <if test="unitnamecn != null">
  189. UNITNAMECN,
  190. </if>
  191. <if test="thingsub != null">
  192. THINGSUB,
  193. </if>
  194. <if test="thingsubsub != null">
  195. THINGSUBSUB,
  196. </if>
  197. <if test="categorydata != null">
  198. CATEGORYDATA,
  199. </if>
  200. <if test="categorysci != null">
  201. CATEGORYSCI,
  202. </if>
  203. <if test="categorysys != null">
  204. CATEGORYSYS,
  205. </if>
  206. <if test="categoryres1 != null">
  207. CATEGORYRES1,
  208. </if>
  209. <if test="categoryres2 != null">
  210. CATEGORYRES2,
  211. </if>
  212. <if test="categoryres3 != null">
  213. CATEGORYRES3,
  214. </if>
  215. <if test="categoryres4 != null">
  216. CATEGORYRES4,
  217. </if>
  218. <if test="categoryres5 != null">
  219. CATEGORYRES5,
  220. </if>
  221. <if test="description != null">
  222. DESCRIPTION,
  223. </if>
  224. </trim>
  225. <trim prefix="values (" suffix=")" suffixOverrides=",">
  226. <if test="id != null">
  227. #{id,jdbcType=DECIMAL},
  228. </if>
  229. <if test="thing != null">
  230. #{thing,jdbcType=VARCHAR},
  231. </if>
  232. <if test="metricid != null">
  233. #{metricid,jdbcType=VARCHAR},
  234. </if>
  235. <if test="metricname != null">
  236. #{metricname,jdbcType=VARCHAR},
  237. </if>
  238. <if test="unitname != null">
  239. #{unitname,jdbcType=VARCHAR},
  240. </if>
  241. <if test="unitnamecn != null">
  242. #{unitnamecn,jdbcType=VARCHAR},
  243. </if>
  244. <if test="thingsub != null">
  245. #{thingsub,jdbcType=VARCHAR},
  246. </if>
  247. <if test="thingsubsub != null">
  248. #{thingsubsub,jdbcType=VARCHAR},
  249. </if>
  250. <if test="categorydata != null">
  251. #{categorydata,jdbcType=VARCHAR},
  252. </if>
  253. <if test="categorysci != null">
  254. #{categorysci,jdbcType=VARCHAR},
  255. </if>
  256. <if test="categorysys != null">
  257. #{categorysys,jdbcType=VARCHAR},
  258. </if>
  259. <if test="categoryres1 != null">
  260. #{categoryres1,jdbcType=VARCHAR},
  261. </if>
  262. <if test="categoryres2 != null">
  263. #{categoryres2,jdbcType=VARCHAR},
  264. </if>
  265. <if test="categoryres3 != null">
  266. #{categoryres3,jdbcType=VARCHAR},
  267. </if>
  268. <if test="categoryres4 != null">
  269. #{categoryres4,jdbcType=VARCHAR},
  270. </if>
  271. <if test="categoryres5 != null">
  272. #{categoryres5,jdbcType=VARCHAR},
  273. </if>
  274. <if test="description != null">
  275. #{description,jdbcType=VARCHAR},
  276. </if>
  277. </trim>
  278. </insert>
  279. <select id="countByExample" parameterType="com.gyee.frame.model.auto.MetricsExample" resultType="java.lang.Long">
  280. <!--
  281. WARNING - @mbg.generated
  282. This element is automatically generated by MyBatis Generator, do not modify.
  283. -->
  284. select count(*) from METRICS
  285. <if test="_parameter != null">
  286. <include refid="Example_Where_Clause" />
  287. </if>
  288. </select>
  289. <update id="updateByExampleSelective" parameterType="map">
  290. <!--
  291. WARNING - @mbg.generated
  292. This element is automatically generated by MyBatis Generator, do not modify.
  293. -->
  294. update METRICS
  295. <set>
  296. <if test="record.id != null">
  297. ID = #{record.id,jdbcType=DECIMAL},
  298. </if>
  299. <if test="record.thing != null">
  300. THING = #{record.thing,jdbcType=VARCHAR},
  301. </if>
  302. <if test="record.metricid != null">
  303. METRICID = #{record.metricid,jdbcType=VARCHAR},
  304. </if>
  305. <if test="record.metricname != null">
  306. METRICNAME = #{record.metricname,jdbcType=VARCHAR},
  307. </if>
  308. <if test="record.unitname != null">
  309. UNITNAME = #{record.unitname,jdbcType=VARCHAR},
  310. </if>
  311. <if test="record.unitnamecn != null">
  312. UNITNAMECN = #{record.unitnamecn,jdbcType=VARCHAR},
  313. </if>
  314. <if test="record.thingsub != null">
  315. THINGSUB = #{record.thingsub,jdbcType=VARCHAR},
  316. </if>
  317. <if test="record.thingsubsub != null">
  318. THINGSUBSUB = #{record.thingsubsub,jdbcType=VARCHAR},
  319. </if>
  320. <if test="record.categorydata != null">
  321. CATEGORYDATA = #{record.categorydata,jdbcType=VARCHAR},
  322. </if>
  323. <if test="record.categorysci != null">
  324. CATEGORYSCI = #{record.categorysci,jdbcType=VARCHAR},
  325. </if>
  326. <if test="record.categorysys != null">
  327. CATEGORYSYS = #{record.categorysys,jdbcType=VARCHAR},
  328. </if>
  329. <if test="record.categoryres1 != null">
  330. CATEGORYRES1 = #{record.categoryres1,jdbcType=VARCHAR},
  331. </if>
  332. <if test="record.categoryres2 != null">
  333. CATEGORYRES2 = #{record.categoryres2,jdbcType=VARCHAR},
  334. </if>
  335. <if test="record.categoryres3 != null">
  336. CATEGORYRES3 = #{record.categoryres3,jdbcType=VARCHAR},
  337. </if>
  338. <if test="record.categoryres4 != null">
  339. CATEGORYRES4 = #{record.categoryres4,jdbcType=VARCHAR},
  340. </if>
  341. <if test="record.categoryres5 != null">
  342. CATEGORYRES5 = #{record.categoryres5,jdbcType=VARCHAR},
  343. </if>
  344. <if test="record.description != null">
  345. DESCRIPTION = #{record.description,jdbcType=VARCHAR},
  346. </if>
  347. </set>
  348. <if test="_parameter != null">
  349. <include refid="Update_By_Example_Where_Clause" />
  350. </if>
  351. </update>
  352. <update id="updateByExample" parameterType="map">
  353. <!--
  354. WARNING - @mbg.generated
  355. This element is automatically generated by MyBatis Generator, do not modify.
  356. -->
  357. update METRICS
  358. set ID = #{record.id,jdbcType=DECIMAL},
  359. THING = #{record.thing,jdbcType=VARCHAR},
  360. METRICID = #{record.metricid,jdbcType=VARCHAR},
  361. METRICNAME = #{record.metricname,jdbcType=VARCHAR},
  362. UNITNAME = #{record.unitname,jdbcType=VARCHAR},
  363. UNITNAMECN = #{record.unitnamecn,jdbcType=VARCHAR},
  364. THINGSUB = #{record.thingsub,jdbcType=VARCHAR},
  365. THINGSUBSUB = #{record.thingsubsub,jdbcType=VARCHAR},
  366. CATEGORYDATA = #{record.categorydata,jdbcType=VARCHAR},
  367. CATEGORYSCI = #{record.categorysci,jdbcType=VARCHAR},
  368. CATEGORYSYS = #{record.categorysys,jdbcType=VARCHAR},
  369. CATEGORYRES1 = #{record.categoryres1,jdbcType=VARCHAR},
  370. CATEGORYRES2 = #{record.categoryres2,jdbcType=VARCHAR},
  371. CATEGORYRES3 = #{record.categoryres3,jdbcType=VARCHAR},
  372. CATEGORYRES4 = #{record.categoryres4,jdbcType=VARCHAR},
  373. CATEGORYRES5 = #{record.categoryres5,jdbcType=VARCHAR},
  374. DESCRIPTION = #{record.description,jdbcType=VARCHAR}
  375. <if test="_parameter != null">
  376. <include refid="Update_By_Example_Where_Clause" />
  377. </if>
  378. </update>
  379. <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Metrics">
  380. <!--
  381. WARNING - @mbg.generated
  382. This element is automatically generated by MyBatis Generator, do not modify.
  383. -->
  384. update METRICS
  385. <set>
  386. <if test="thing != null">
  387. THING = #{thing,jdbcType=VARCHAR},
  388. </if>
  389. <if test="metricid != null">
  390. METRICID = #{metricid,jdbcType=VARCHAR},
  391. </if>
  392. <if test="metricname != null">
  393. METRICNAME = #{metricname,jdbcType=VARCHAR},
  394. </if>
  395. <if test="unitname != null">
  396. UNITNAME = #{unitname,jdbcType=VARCHAR},
  397. </if>
  398. <if test="unitnamecn != null">
  399. UNITNAMECN = #{unitnamecn,jdbcType=VARCHAR},
  400. </if>
  401. <if test="thingsub != null">
  402. THINGSUB = #{thingsub,jdbcType=VARCHAR},
  403. </if>
  404. <if test="thingsubsub != null">
  405. THINGSUBSUB = #{thingsubsub,jdbcType=VARCHAR},
  406. </if>
  407. <if test="categorydata != null">
  408. CATEGORYDATA = #{categorydata,jdbcType=VARCHAR},
  409. </if>
  410. <if test="categorysci != null">
  411. CATEGORYSCI = #{categorysci,jdbcType=VARCHAR},
  412. </if>
  413. <if test="categorysys != null">
  414. CATEGORYSYS = #{categorysys,jdbcType=VARCHAR},
  415. </if>
  416. <if test="categoryres1 != null">
  417. CATEGORYRES1 = #{categoryres1,jdbcType=VARCHAR},
  418. </if>
  419. <if test="categoryres2 != null">
  420. CATEGORYRES2 = #{categoryres2,jdbcType=VARCHAR},
  421. </if>
  422. <if test="categoryres3 != null">
  423. CATEGORYRES3 = #{categoryres3,jdbcType=VARCHAR},
  424. </if>
  425. <if test="categoryres4 != null">
  426. CATEGORYRES4 = #{categoryres4,jdbcType=VARCHAR},
  427. </if>
  428. <if test="categoryres5 != null">
  429. CATEGORYRES5 = #{categoryres5,jdbcType=VARCHAR},
  430. </if>
  431. <if test="description != null">
  432. DESCRIPTION = #{description,jdbcType=VARCHAR},
  433. </if>
  434. </set>
  435. where ID = #{id,jdbcType=DECIMAL}
  436. </update>
  437. <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Metrics">
  438. <!--
  439. WARNING - @mbg.generated
  440. This element is automatically generated by MyBatis Generator, do not modify.
  441. -->
  442. update METRICS
  443. set THING = #{thing,jdbcType=VARCHAR},
  444. METRICID = #{metricid,jdbcType=VARCHAR},
  445. METRICNAME = #{metricname,jdbcType=VARCHAR},
  446. UNITNAME = #{unitname,jdbcType=VARCHAR},
  447. UNITNAMECN = #{unitnamecn,jdbcType=VARCHAR},
  448. THINGSUB = #{thingsub,jdbcType=VARCHAR},
  449. THINGSUBSUB = #{thingsubsub,jdbcType=VARCHAR},
  450. CATEGORYDATA = #{categorydata,jdbcType=VARCHAR},
  451. CATEGORYSCI = #{categorysci,jdbcType=VARCHAR},
  452. CATEGORYSYS = #{categorysys,jdbcType=VARCHAR},
  453. CATEGORYRES1 = #{categoryres1,jdbcType=VARCHAR},
  454. CATEGORYRES2 = #{categoryres2,jdbcType=VARCHAR},
  455. CATEGORYRES3 = #{categoryres3,jdbcType=VARCHAR},
  456. CATEGORYRES4 = #{categoryres4,jdbcType=VARCHAR},
  457. CATEGORYRES5 = #{categoryres5,jdbcType=VARCHAR},
  458. DESCRIPTION = #{description,jdbcType=VARCHAR}
  459. where ID = #{id,jdbcType=DECIMAL}
  460. </update>
  461. </mapper>