MainBrownouts2Mapper.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  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.MainBrownouts2Mapper">
  4. <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.MainBrownouts2">
  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="STOPTIME" jdbcType="TIMESTAMP" property="stoptime" />
  11. <result column="STARTTIME" jdbcType="TIMESTAMP" property="starttime" />
  12. <result column="STOPTYPEID" jdbcType="VARCHAR" property="stoptypeid" />
  13. <result column="DESCRIPTION" jdbcType="VARCHAR" property="description" />
  14. <result column="LIMITLOAD" jdbcType="DECIMAL" property="limitload" />
  15. <result column="BROWNOUTSDIRECTIVE" jdbcType="VARCHAR" property="brownoutsdirective" />
  16. <result column="WINDSPEED" jdbcType="DECIMAL" property="windspeed" />
  17. <result column="THISLOAD" jdbcType="DECIMAL" property="thisload" />
  18. <result column="WINDPOWERSTATIONID" jdbcType="VARCHAR" property="windpowerstationid" />
  19. <result column="WPNAME" jdbcType="VARCHAR" property="wpname" />
  20. <result column="LOSSPOWER" jdbcType="DECIMAL" property="losspower" />
  21. <result column="STOPHOURS" jdbcType="DECIMAL" property="stophours" />
  22. </resultMap>
  23. <sql id="Example_Where_Clause">
  24. <!--
  25. WARNING - @mbg.generated
  26. This element is automatically generated by MyBatis Generator, do not modify.
  27. -->
  28. <where>
  29. <foreach collection="oredCriteria" item="criteria" separator="or">
  30. <if test="criteria.valid">
  31. <trim prefix="(" prefixOverrides="and" suffix=")">
  32. <foreach collection="criteria.criteria" item="criterion">
  33. <choose>
  34. <when test="criterion.noValue">
  35. and ${criterion.condition}
  36. </when>
  37. <when test="criterion.singleValue">
  38. and ${criterion.condition} #{criterion.value}
  39. </when>
  40. <when test="criterion.betweenValue">
  41. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  42. </when>
  43. <when test="criterion.listValue">
  44. and ${criterion.condition}
  45. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  46. #{listItem}
  47. </foreach>
  48. </when>
  49. </choose>
  50. </foreach>
  51. </trim>
  52. </if>
  53. </foreach>
  54. </where>
  55. </sql>
  56. <sql id="Update_By_Example_Where_Clause">
  57. <!--
  58. WARNING - @mbg.generated
  59. This element is automatically generated by MyBatis Generator, do not modify.
  60. -->
  61. <where>
  62. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  63. <if test="criteria.valid">
  64. <trim prefix="(" prefixOverrides="and" suffix=")">
  65. <foreach collection="criteria.criteria" item="criterion">
  66. <choose>
  67. <when test="criterion.noValue">
  68. and ${criterion.condition}
  69. </when>
  70. <when test="criterion.singleValue">
  71. and ${criterion.condition} #{criterion.value}
  72. </when>
  73. <when test="criterion.betweenValue">
  74. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  75. </when>
  76. <when test="criterion.listValue">
  77. and ${criterion.condition}
  78. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  79. #{listItem}
  80. </foreach>
  81. </when>
  82. </choose>
  83. </foreach>
  84. </trim>
  85. </if>
  86. </foreach>
  87. </where>
  88. </sql>
  89. <sql id="Base_Column_List">
  90. <!--
  91. WARNING - @mbg.generated
  92. This element is automatically generated by MyBatis Generator, do not modify.
  93. -->
  94. ID, STOPTIME, STARTTIME, STOPTYPEID, DESCRIPTION, LIMITLOAD, BROWNOUTSDIRECTIVE,
  95. WINDSPEED, THISLOAD, WINDPOWERSTATIONID, WPNAME, LOSSPOWER, STOPHOURS
  96. </sql>
  97. <select id="selectByExample" parameterType="com.gyee.frame.model.auto.MainBrownouts2Example" resultMap="BaseResultMap">
  98. <!--
  99. WARNING - @mbg.generated
  100. This element is automatically generated by MyBatis Generator, do not modify.
  101. -->
  102. select
  103. <if test="distinct">
  104. distinct
  105. </if>
  106. <include refid="Base_Column_List" />
  107. from MAINBROWNOUTS2
  108. <if test="_parameter != null">
  109. <include refid="Example_Where_Clause" />
  110. </if>
  111. <if test="orderByClause != null">
  112. order by ${orderByClause}
  113. </if>
  114. </select>
  115. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  116. <!--
  117. WARNING - @mbg.generated
  118. This element is automatically generated by MyBatis Generator, do not modify.
  119. -->
  120. select
  121. <include refid="Base_Column_List" />
  122. from MAINBROWNOUTS2
  123. where ID = #{id,jdbcType=VARCHAR}
  124. </select>
  125. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  126. <!--
  127. WARNING - @mbg.generated
  128. This element is automatically generated by MyBatis Generator, do not modify.
  129. -->
  130. delete from MAINBROWNOUTS2
  131. where ID = #{id,jdbcType=VARCHAR}
  132. </delete>
  133. <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.MainBrownouts2Example">
  134. <!--
  135. WARNING - @mbg.generated
  136. This element is automatically generated by MyBatis Generator, do not modify.
  137. -->
  138. delete from MAINBROWNOUTS2
  139. <if test="_parameter != null">
  140. <include refid="Example_Where_Clause" />
  141. </if>
  142. </delete>
  143. <insert id="insert" parameterType="com.gyee.frame.model.auto.MainBrownouts2">
  144. <!--
  145. WARNING - @mbg.generated
  146. This element is automatically generated by MyBatis Generator, do not modify.
  147. -->
  148. insert into MAINBROWNOUTS2 (ID, STOPTIME, STARTTIME,
  149. STOPTYPEID, DESCRIPTION, LIMITLOAD,
  150. BROWNOUTSDIRECTIVE, WINDSPEED, THISLOAD,
  151. WINDPOWERSTATIONID, WPNAME, LOSSPOWER,
  152. STOPHOURS)
  153. values (#{id,jdbcType=VARCHAR}, #{stoptime,jdbcType=TIMESTAMP}, #{starttime,jdbcType=TIMESTAMP},
  154. #{stoptypeid,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{limitload,jdbcType=DECIMAL},
  155. #{brownoutsdirective,jdbcType=VARCHAR}, #{windspeed,jdbcType=DECIMAL}, #{thisload,jdbcType=DECIMAL},
  156. #{windpowerstationid,jdbcType=VARCHAR}, #{wpname,jdbcType=VARCHAR}, #{losspower,jdbcType=DECIMAL},
  157. #{stophours,jdbcType=DECIMAL})
  158. </insert>
  159. <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.MainBrownouts2">
  160. <!--
  161. WARNING - @mbg.generated
  162. This element is automatically generated by MyBatis Generator, do not modify.
  163. -->
  164. insert into MAINBROWNOUTS2
  165. <trim prefix="(" suffix=")" suffixOverrides=",">
  166. <if test="id != null">
  167. ID,
  168. </if>
  169. <if test="stoptime != null">
  170. STOPTIME,
  171. </if>
  172. <if test="starttime != null">
  173. STARTTIME,
  174. </if>
  175. <if test="stoptypeid != null">
  176. STOPTYPEID,
  177. </if>
  178. <if test="description != null">
  179. DESCRIPTION,
  180. </if>
  181. <if test="limitload != null">
  182. LIMITLOAD,
  183. </if>
  184. <if test="brownoutsdirective != null">
  185. BROWNOUTSDIRECTIVE,
  186. </if>
  187. <if test="windspeed != null">
  188. WINDSPEED,
  189. </if>
  190. <if test="thisload != null">
  191. THISLOAD,
  192. </if>
  193. <if test="windpowerstationid != null">
  194. WINDPOWERSTATIONID,
  195. </if>
  196. <if test="wpname != null">
  197. WPNAME,
  198. </if>
  199. <if test="losspower != null">
  200. LOSSPOWER,
  201. </if>
  202. <if test="stophours != null">
  203. STOPHOURS,
  204. </if>
  205. </trim>
  206. <trim prefix="values (" suffix=")" suffixOverrides=",">
  207. <if test="id != null">
  208. #{id,jdbcType=VARCHAR},
  209. </if>
  210. <if test="stoptime != null">
  211. #{stoptime,jdbcType=TIMESTAMP},
  212. </if>
  213. <if test="starttime != null">
  214. #{starttime,jdbcType=TIMESTAMP},
  215. </if>
  216. <if test="stoptypeid != null">
  217. #{stoptypeid,jdbcType=VARCHAR},
  218. </if>
  219. <if test="description != null">
  220. #{description,jdbcType=VARCHAR},
  221. </if>
  222. <if test="limitload != null">
  223. #{limitload,jdbcType=DECIMAL},
  224. </if>
  225. <if test="brownoutsdirective != null">
  226. #{brownoutsdirective,jdbcType=VARCHAR},
  227. </if>
  228. <if test="windspeed != null">
  229. #{windspeed,jdbcType=DECIMAL},
  230. </if>
  231. <if test="thisload != null">
  232. #{thisload,jdbcType=DECIMAL},
  233. </if>
  234. <if test="windpowerstationid != null">
  235. #{windpowerstationid,jdbcType=VARCHAR},
  236. </if>
  237. <if test="wpname != null">
  238. #{wpname,jdbcType=VARCHAR},
  239. </if>
  240. <if test="losspower != null">
  241. #{losspower,jdbcType=DECIMAL},
  242. </if>
  243. <if test="stophours != null">
  244. #{stophours,jdbcType=DECIMAL},
  245. </if>
  246. </trim>
  247. </insert>
  248. <select id="countByExample" parameterType="com.gyee.frame.model.auto.MainBrownouts2Example" resultType="java.lang.Long">
  249. <!--
  250. WARNING - @mbg.generated
  251. This element is automatically generated by MyBatis Generator, do not modify.
  252. -->
  253. select count(*) from MAINBROWNOUTS2
  254. <if test="_parameter != null">
  255. <include refid="Example_Where_Clause" />
  256. </if>
  257. </select>
  258. <update id="updateByExampleSelective" parameterType="map">
  259. <!--
  260. WARNING - @mbg.generated
  261. This element is automatically generated by MyBatis Generator, do not modify.
  262. -->
  263. update MAINBROWNOUTS2
  264. <set>
  265. <if test="record.id != null">
  266. ID = #{record.id,jdbcType=VARCHAR},
  267. </if>
  268. <if test="record.stoptime != null">
  269. STOPTIME = #{record.stoptime,jdbcType=TIMESTAMP},
  270. </if>
  271. <if test="record.starttime != null">
  272. STARTTIME = #{record.starttime,jdbcType=TIMESTAMP},
  273. </if>
  274. <if test="record.stoptypeid != null">
  275. STOPTYPEID = #{record.stoptypeid,jdbcType=VARCHAR},
  276. </if>
  277. <if test="record.description != null">
  278. DESCRIPTION = #{record.description,jdbcType=VARCHAR},
  279. </if>
  280. <if test="record.limitload != null">
  281. LIMITLOAD = #{record.limitload,jdbcType=DECIMAL},
  282. </if>
  283. <if test="record.brownoutsdirective != null">
  284. BROWNOUTSDIRECTIVE = #{record.brownoutsdirective,jdbcType=VARCHAR},
  285. </if>
  286. <if test="record.windspeed != null">
  287. WINDSPEED = #{record.windspeed,jdbcType=DECIMAL},
  288. </if>
  289. <if test="record.thisload != null">
  290. THISLOAD = #{record.thisload,jdbcType=DECIMAL},
  291. </if>
  292. <if test="record.windpowerstationid != null">
  293. WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
  294. </if>
  295. <if test="record.wpname != null">
  296. WPNAME = #{record.wpname,jdbcType=VARCHAR},
  297. </if>
  298. <if test="record.losspower != null">
  299. LOSSPOWER = #{record.losspower,jdbcType=DECIMAL},
  300. </if>
  301. <if test="record.stophours != null">
  302. STOPHOURS = #{record.stophours,jdbcType=DECIMAL},
  303. </if>
  304. </set>
  305. <if test="_parameter != null">
  306. <include refid="Update_By_Example_Where_Clause" />
  307. </if>
  308. </update>
  309. <update id="updateByExample" parameterType="map">
  310. <!--
  311. WARNING - @mbg.generated
  312. This element is automatically generated by MyBatis Generator, do not modify.
  313. -->
  314. update MAINBROWNOUTS2
  315. set ID = #{record.id,jdbcType=VARCHAR},
  316. STOPTIME = #{record.stoptime,jdbcType=TIMESTAMP},
  317. STARTTIME = #{record.starttime,jdbcType=TIMESTAMP},
  318. STOPTYPEID = #{record.stoptypeid,jdbcType=VARCHAR},
  319. DESCRIPTION = #{record.description,jdbcType=VARCHAR},
  320. LIMITLOAD = #{record.limitload,jdbcType=DECIMAL},
  321. BROWNOUTSDIRECTIVE = #{record.brownoutsdirective,jdbcType=VARCHAR},
  322. WINDSPEED = #{record.windspeed,jdbcType=DECIMAL},
  323. THISLOAD = #{record.thisload,jdbcType=DECIMAL},
  324. WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
  325. WPNAME = #{record.wpname,jdbcType=VARCHAR},
  326. LOSSPOWER = #{record.losspower,jdbcType=DECIMAL},
  327. STOPHOURS = #{record.stophours,jdbcType=DECIMAL}
  328. <if test="_parameter != null">
  329. <include refid="Update_By_Example_Where_Clause" />
  330. </if>
  331. </update>
  332. <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.MainBrownouts2">
  333. <!--
  334. WARNING - @mbg.generated
  335. This element is automatically generated by MyBatis Generator, do not modify.
  336. -->
  337. update MAINBROWNOUTS2
  338. <set>
  339. <if test="stoptime != null">
  340. STOPTIME = #{stoptime,jdbcType=TIMESTAMP},
  341. </if>
  342. <if test="starttime != null">
  343. STARTTIME = #{starttime,jdbcType=TIMESTAMP},
  344. </if>
  345. <if test="stoptypeid != null">
  346. STOPTYPEID = #{stoptypeid,jdbcType=VARCHAR},
  347. </if>
  348. <if test="description != null">
  349. DESCRIPTION = #{description,jdbcType=VARCHAR},
  350. </if>
  351. <if test="limitload != null">
  352. LIMITLOAD = #{limitload,jdbcType=DECIMAL},
  353. </if>
  354. <if test="brownoutsdirective != null">
  355. BROWNOUTSDIRECTIVE = #{brownoutsdirective,jdbcType=VARCHAR},
  356. </if>
  357. <if test="windspeed != null">
  358. WINDSPEED = #{windspeed,jdbcType=DECIMAL},
  359. </if>
  360. <if test="thisload != null">
  361. THISLOAD = #{thisload,jdbcType=DECIMAL},
  362. </if>
  363. <if test="windpowerstationid != null">
  364. WINDPOWERSTATIONID = #{windpowerstationid,jdbcType=VARCHAR},
  365. </if>
  366. <if test="wpname != null">
  367. WPNAME = #{wpname,jdbcType=VARCHAR},
  368. </if>
  369. <if test="losspower != null">
  370. LOSSPOWER = #{losspower,jdbcType=DECIMAL},
  371. </if>
  372. <if test="stophours != null">
  373. STOPHOURS = #{stophours,jdbcType=DECIMAL},
  374. </if>
  375. </set>
  376. where ID = #{id,jdbcType=VARCHAR}
  377. </update>
  378. <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.MainBrownouts2">
  379. <!--
  380. WARNING - @mbg.generated
  381. This element is automatically generated by MyBatis Generator, do not modify.
  382. -->
  383. update MAINBROWNOUTS2
  384. set STOPTIME = #{stoptime,jdbcType=TIMESTAMP},
  385. STARTTIME = #{starttime,jdbcType=TIMESTAMP},
  386. STOPTYPEID = #{stoptypeid,jdbcType=VARCHAR},
  387. DESCRIPTION = #{description,jdbcType=VARCHAR},
  388. LIMITLOAD = #{limitload,jdbcType=DECIMAL},
  389. BROWNOUTSDIRECTIVE = #{brownoutsdirective,jdbcType=VARCHAR},
  390. WINDSPEED = #{windspeed,jdbcType=DECIMAL},
  391. THISLOAD = #{thisload,jdbcType=DECIMAL},
  392. WINDPOWERSTATIONID = #{windpowerstationid,jdbcType=VARCHAR},
  393. WPNAME = #{wpname,jdbcType=VARCHAR},
  394. LOSSPOWER = #{losspower,jdbcType=DECIMAL},
  395. STOPHOURS = #{stophours,jdbcType=DECIMAL}
  396. where ID = #{id,jdbcType=VARCHAR}
  397. </update>
  398. </mapper>