WindpowerstationpointnewMapper.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477
  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.WindpowerstationpointnewMapper">
  4. <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Windpowerstationpointnew">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. -->
  9. <id column="ID" jdbcType="VARCHAR" property="id" />
  10. <result column="CODE" jdbcType="VARCHAR" property="code" />
  11. <result column="NAME" jdbcType="VARCHAR" property="name" />
  12. <result column="MODEL" jdbcType="VARCHAR" property="model" />
  13. <result column="VALUEUNIT" jdbcType="VARCHAR" property="valueunit" />
  14. <result column="ENGLISHNAME" jdbcType="VARCHAR" property="englishname" />
  15. <result column="TYPEID" jdbcType="VARCHAR" property="typeid" />
  16. <result column="MODELID" jdbcType="VARCHAR" property="modelid" />
  17. <result column="MAXVAL" jdbcType="DECIMAL" property="maxval" />
  18. <result column="MINVAL" jdbcType="DECIMAL" property="minval" />
  19. <result column="REASONABLEMAXVAL" jdbcType="DECIMAL" property="reasonablemaxval" />
  20. <result column="REASONABLEMINVAL" jdbcType="DECIMAL" property="reasonableminval" />
  21. <result column="UNIFORMCODE" jdbcType="VARCHAR" property="uniformcode" />
  22. <result column="SHORTID" jdbcType="VARCHAR" property="shortid" />
  23. <result column="LONGID" jdbcType="VARCHAR" property="longid" />
  24. <result column="WINDPOWERSTATIONID" jdbcType="VARCHAR" property="windpowerstationid" />
  25. <result column="REALTIMEID" jdbcType="VARCHAR" property="realtimeid" />
  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, CODE, NAME, MODEL, VALUEUNIT, ENGLISHNAME, TYPEID, MODELID, MAXVAL, MINVAL, REASONABLEMAXVAL,
  99. REASONABLEMINVAL, UNIFORMCODE, SHORTID, LONGID, WINDPOWERSTATIONID, REALTIMEID
  100. </sql>
  101. <select id="selectByExample" parameterType="com.gyee.frame.model.auto.WindpowerstationpointnewExample" resultMap="BaseResultMap">
  102. <!--
  103. WARNING - @mbg.generated
  104. This element is automatically generated by MyBatis Generator, do not modify.
  105. -->
  106. select
  107. <if test="distinct">
  108. distinct
  109. </if>
  110. <include refid="Base_Column_List" />
  111. from WINDPOWERSTATIONPOINTNEW
  112. <if test="_parameter != null">
  113. <include refid="Example_Where_Clause" />
  114. </if>
  115. <if test="orderByClause != null">
  116. order by ${orderByClause}
  117. </if>
  118. </select>
  119. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  120. <!--
  121. WARNING - @mbg.generated
  122. This element is automatically generated by MyBatis Generator, do not modify.
  123. -->
  124. select
  125. <include refid="Base_Column_List" />
  126. from WINDPOWERSTATIONPOINTNEW
  127. where ID = #{id,jdbcType=VARCHAR}
  128. </select>
  129. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  130. <!--
  131. WARNING - @mbg.generated
  132. This element is automatically generated by MyBatis Generator, do not modify.
  133. -->
  134. delete from WINDPOWERSTATIONPOINTNEW
  135. where ID = #{id,jdbcType=VARCHAR}
  136. </delete>
  137. <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.WindpowerstationpointnewExample">
  138. <!--
  139. WARNING - @mbg.generated
  140. This element is automatically generated by MyBatis Generator, do not modify.
  141. -->
  142. delete from WINDPOWERSTATIONPOINTNEW
  143. <if test="_parameter != null">
  144. <include refid="Example_Where_Clause" />
  145. </if>
  146. </delete>
  147. <insert id="insert" parameterType="com.gyee.frame.model.auto.Windpowerstationpointnew">
  148. <!--
  149. WARNING - @mbg.generated
  150. This element is automatically generated by MyBatis Generator, do not modify.
  151. -->
  152. insert into WINDPOWERSTATIONPOINTNEW (ID, CODE, NAME,
  153. MODEL, VALUEUNIT, ENGLISHNAME,
  154. TYPEID, MODELID, MAXVAL,
  155. MINVAL, REASONABLEMAXVAL, REASONABLEMINVAL,
  156. UNIFORMCODE, SHORTID, LONGID,
  157. WINDPOWERSTATIONID, REALTIMEID)
  158. values (#{id,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
  159. #{model,jdbcType=VARCHAR}, #{valueunit,jdbcType=VARCHAR}, #{englishname,jdbcType=VARCHAR},
  160. #{typeid,jdbcType=VARCHAR}, #{modelid,jdbcType=VARCHAR}, #{maxval,jdbcType=DECIMAL},
  161. #{minval,jdbcType=DECIMAL}, #{reasonablemaxval,jdbcType=DECIMAL}, #{reasonableminval,jdbcType=DECIMAL},
  162. #{uniformcode,jdbcType=VARCHAR}, #{shortid,jdbcType=VARCHAR}, #{longid,jdbcType=VARCHAR},
  163. #{windpowerstationid,jdbcType=VARCHAR}, #{realtimeid,jdbcType=VARCHAR})
  164. </insert>
  165. <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Windpowerstationpointnew">
  166. <!--
  167. WARNING - @mbg.generated
  168. This element is automatically generated by MyBatis Generator, do not modify.
  169. -->
  170. insert into WINDPOWERSTATIONPOINTNEW
  171. <trim prefix="(" suffix=")" suffixOverrides=",">
  172. <if test="id != null">
  173. ID,
  174. </if>
  175. <if test="code != null">
  176. CODE,
  177. </if>
  178. <if test="name != null">
  179. NAME,
  180. </if>
  181. <if test="model != null">
  182. MODEL,
  183. </if>
  184. <if test="valueunit != null">
  185. VALUEUNIT,
  186. </if>
  187. <if test="englishname != null">
  188. ENGLISHNAME,
  189. </if>
  190. <if test="typeid != null">
  191. TYPEID,
  192. </if>
  193. <if test="modelid != null">
  194. MODELID,
  195. </if>
  196. <if test="maxval != null">
  197. MAXVAL,
  198. </if>
  199. <if test="minval != null">
  200. MINVAL,
  201. </if>
  202. <if test="reasonablemaxval != null">
  203. REASONABLEMAXVAL,
  204. </if>
  205. <if test="reasonableminval != null">
  206. REASONABLEMINVAL,
  207. </if>
  208. <if test="uniformcode != null">
  209. UNIFORMCODE,
  210. </if>
  211. <if test="shortid != null">
  212. SHORTID,
  213. </if>
  214. <if test="longid != null">
  215. LONGID,
  216. </if>
  217. <if test="windpowerstationid != null">
  218. WINDPOWERSTATIONID,
  219. </if>
  220. <if test="realtimeid != null">
  221. REALTIMEID,
  222. </if>
  223. </trim>
  224. <trim prefix="values (" suffix=")" suffixOverrides=",">
  225. <if test="id != null">
  226. #{id,jdbcType=VARCHAR},
  227. </if>
  228. <if test="code != null">
  229. #{code,jdbcType=VARCHAR},
  230. </if>
  231. <if test="name != null">
  232. #{name,jdbcType=VARCHAR},
  233. </if>
  234. <if test="model != null">
  235. #{model,jdbcType=VARCHAR},
  236. </if>
  237. <if test="valueunit != null">
  238. #{valueunit,jdbcType=VARCHAR},
  239. </if>
  240. <if test="englishname != null">
  241. #{englishname,jdbcType=VARCHAR},
  242. </if>
  243. <if test="typeid != null">
  244. #{typeid,jdbcType=VARCHAR},
  245. </if>
  246. <if test="modelid != null">
  247. #{modelid,jdbcType=VARCHAR},
  248. </if>
  249. <if test="maxval != null">
  250. #{maxval,jdbcType=DECIMAL},
  251. </if>
  252. <if test="minval != null">
  253. #{minval,jdbcType=DECIMAL},
  254. </if>
  255. <if test="reasonablemaxval != null">
  256. #{reasonablemaxval,jdbcType=DECIMAL},
  257. </if>
  258. <if test="reasonableminval != null">
  259. #{reasonableminval,jdbcType=DECIMAL},
  260. </if>
  261. <if test="uniformcode != null">
  262. #{uniformcode,jdbcType=VARCHAR},
  263. </if>
  264. <if test="shortid != null">
  265. #{shortid,jdbcType=VARCHAR},
  266. </if>
  267. <if test="longid != null">
  268. #{longid,jdbcType=VARCHAR},
  269. </if>
  270. <if test="windpowerstationid != null">
  271. #{windpowerstationid,jdbcType=VARCHAR},
  272. </if>
  273. <if test="realtimeid != null">
  274. #{realtimeid,jdbcType=VARCHAR},
  275. </if>
  276. </trim>
  277. </insert>
  278. <select id="countByExample" parameterType="com.gyee.frame.model.auto.WindpowerstationpointnewExample" resultType="java.lang.Long">
  279. <!--
  280. WARNING - @mbg.generated
  281. This element is automatically generated by MyBatis Generator, do not modify.
  282. -->
  283. select count(*) from WINDPOWERSTATIONPOINTNEW
  284. <if test="_parameter != null">
  285. <include refid="Example_Where_Clause" />
  286. </if>
  287. </select>
  288. <update id="updateByExampleSelective" parameterType="map">
  289. <!--
  290. WARNING - @mbg.generated
  291. This element is automatically generated by MyBatis Generator, do not modify.
  292. -->
  293. update WINDPOWERSTATIONPOINTNEW
  294. <set>
  295. <if test="record.id != null">
  296. ID = #{record.id,jdbcType=VARCHAR},
  297. </if>
  298. <if test="record.code != null">
  299. CODE = #{record.code,jdbcType=VARCHAR},
  300. </if>
  301. <if test="record.name != null">
  302. NAME = #{record.name,jdbcType=VARCHAR},
  303. </if>
  304. <if test="record.model != null">
  305. MODEL = #{record.model,jdbcType=VARCHAR},
  306. </if>
  307. <if test="record.valueunit != null">
  308. VALUEUNIT = #{record.valueunit,jdbcType=VARCHAR},
  309. </if>
  310. <if test="record.englishname != null">
  311. ENGLISHNAME = #{record.englishname,jdbcType=VARCHAR},
  312. </if>
  313. <if test="record.typeid != null">
  314. TYPEID = #{record.typeid,jdbcType=VARCHAR},
  315. </if>
  316. <if test="record.modelid != null">
  317. MODELID = #{record.modelid,jdbcType=VARCHAR},
  318. </if>
  319. <if test="record.maxval != null">
  320. MAXVAL = #{record.maxval,jdbcType=DECIMAL},
  321. </if>
  322. <if test="record.minval != null">
  323. MINVAL = #{record.minval,jdbcType=DECIMAL},
  324. </if>
  325. <if test="record.reasonablemaxval != null">
  326. REASONABLEMAXVAL = #{record.reasonablemaxval,jdbcType=DECIMAL},
  327. </if>
  328. <if test="record.reasonableminval != null">
  329. REASONABLEMINVAL = #{record.reasonableminval,jdbcType=DECIMAL},
  330. </if>
  331. <if test="record.uniformcode != null">
  332. UNIFORMCODE = #{record.uniformcode,jdbcType=VARCHAR},
  333. </if>
  334. <if test="record.shortid != null">
  335. SHORTID = #{record.shortid,jdbcType=VARCHAR},
  336. </if>
  337. <if test="record.longid != null">
  338. LONGID = #{record.longid,jdbcType=VARCHAR},
  339. </if>
  340. <if test="record.windpowerstationid != null">
  341. WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
  342. </if>
  343. <if test="record.realtimeid != null">
  344. REALTIMEID = #{record.realtimeid,jdbcType=VARCHAR},
  345. </if>
  346. </set>
  347. <if test="_parameter != null">
  348. <include refid="Update_By_Example_Where_Clause" />
  349. </if>
  350. </update>
  351. <update id="updateByExample" parameterType="map">
  352. <!--
  353. WARNING - @mbg.generated
  354. This element is automatically generated by MyBatis Generator, do not modify.
  355. -->
  356. update WINDPOWERSTATIONPOINTNEW
  357. set ID = #{record.id,jdbcType=VARCHAR},
  358. CODE = #{record.code,jdbcType=VARCHAR},
  359. NAME = #{record.name,jdbcType=VARCHAR},
  360. MODEL = #{record.model,jdbcType=VARCHAR},
  361. VALUEUNIT = #{record.valueunit,jdbcType=VARCHAR},
  362. ENGLISHNAME = #{record.englishname,jdbcType=VARCHAR},
  363. TYPEID = #{record.typeid,jdbcType=VARCHAR},
  364. MODELID = #{record.modelid,jdbcType=VARCHAR},
  365. MAXVAL = #{record.maxval,jdbcType=DECIMAL},
  366. MINVAL = #{record.minval,jdbcType=DECIMAL},
  367. REASONABLEMAXVAL = #{record.reasonablemaxval,jdbcType=DECIMAL},
  368. REASONABLEMINVAL = #{record.reasonableminval,jdbcType=DECIMAL},
  369. UNIFORMCODE = #{record.uniformcode,jdbcType=VARCHAR},
  370. SHORTID = #{record.shortid,jdbcType=VARCHAR},
  371. LONGID = #{record.longid,jdbcType=VARCHAR},
  372. WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
  373. REALTIMEID = #{record.realtimeid,jdbcType=VARCHAR}
  374. <if test="_parameter != null">
  375. <include refid="Update_By_Example_Where_Clause" />
  376. </if>
  377. </update>
  378. <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Windpowerstationpointnew">
  379. <!--
  380. WARNING - @mbg.generated
  381. This element is automatically generated by MyBatis Generator, do not modify.
  382. -->
  383. update WINDPOWERSTATIONPOINTNEW
  384. <set>
  385. <if test="code != null">
  386. CODE = #{code,jdbcType=VARCHAR},
  387. </if>
  388. <if test="name != null">
  389. NAME = #{name,jdbcType=VARCHAR},
  390. </if>
  391. <if test="model != null">
  392. MODEL = #{model,jdbcType=VARCHAR},
  393. </if>
  394. <if test="valueunit != null">
  395. VALUEUNIT = #{valueunit,jdbcType=VARCHAR},
  396. </if>
  397. <if test="englishname != null">
  398. ENGLISHNAME = #{englishname,jdbcType=VARCHAR},
  399. </if>
  400. <if test="typeid != null">
  401. TYPEID = #{typeid,jdbcType=VARCHAR},
  402. </if>
  403. <if test="modelid != null">
  404. MODELID = #{modelid,jdbcType=VARCHAR},
  405. </if>
  406. <if test="maxval != null">
  407. MAXVAL = #{maxval,jdbcType=DECIMAL},
  408. </if>
  409. <if test="minval != null">
  410. MINVAL = #{minval,jdbcType=DECIMAL},
  411. </if>
  412. <if test="reasonablemaxval != null">
  413. REASONABLEMAXVAL = #{reasonablemaxval,jdbcType=DECIMAL},
  414. </if>
  415. <if test="reasonableminval != null">
  416. REASONABLEMINVAL = #{reasonableminval,jdbcType=DECIMAL},
  417. </if>
  418. <if test="uniformcode != null">
  419. UNIFORMCODE = #{uniformcode,jdbcType=VARCHAR},
  420. </if>
  421. <if test="shortid != null">
  422. SHORTID = #{shortid,jdbcType=VARCHAR},
  423. </if>
  424. <if test="longid != null">
  425. LONGID = #{longid,jdbcType=VARCHAR},
  426. </if>
  427. <if test="windpowerstationid != null">
  428. WINDPOWERSTATIONID = #{windpowerstationid,jdbcType=VARCHAR},
  429. </if>
  430. <if test="realtimeid != null">
  431. REALTIMEID = #{realtimeid,jdbcType=VARCHAR},
  432. </if>
  433. </set>
  434. where ID = #{id,jdbcType=VARCHAR}
  435. </update>
  436. <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Windpowerstationpointnew">
  437. <!--
  438. WARNING - @mbg.generated
  439. This element is automatically generated by MyBatis Generator, do not modify.
  440. -->
  441. update WINDPOWERSTATIONPOINTNEW
  442. set CODE = #{code,jdbcType=VARCHAR},
  443. NAME = #{name,jdbcType=VARCHAR},
  444. MODEL = #{model,jdbcType=VARCHAR},
  445. VALUEUNIT = #{valueunit,jdbcType=VARCHAR},
  446. ENGLISHNAME = #{englishname,jdbcType=VARCHAR},
  447. TYPEID = #{typeid,jdbcType=VARCHAR},
  448. MODELID = #{modelid,jdbcType=VARCHAR},
  449. MAXVAL = #{maxval,jdbcType=DECIMAL},
  450. MINVAL = #{minval,jdbcType=DECIMAL},
  451. REASONABLEMAXVAL = #{reasonablemaxval,jdbcType=DECIMAL},
  452. REASONABLEMINVAL = #{reasonableminval,jdbcType=DECIMAL},
  453. UNIFORMCODE = #{uniformcode,jdbcType=VARCHAR},
  454. SHORTID = #{shortid,jdbcType=VARCHAR},
  455. LONGID = #{longid,jdbcType=VARCHAR},
  456. WINDPOWERSTATIONID = #{windpowerstationid,jdbcType=VARCHAR},
  457. REALTIMEID = #{realtimeid,jdbcType=VARCHAR}
  458. where ID = #{id,jdbcType=VARCHAR}
  459. </update>
  460. <select id="getWpPointTotal" resultType="com.gyee.frame.model.custom.SimpleVo" >
  461. select count(*) value
  462. from view_tspoint where
  463. <if test="wpId != null">
  464. ID LIKE '%${wpId}%' and
  465. </if>
  466. <if test="type != null">
  467. id like '%JSFW%'
  468. </if>
  469. <if test="type == null">
  470. id not like '%JSFW%'
  471. </if>
  472. </select>
  473. </mapper>