TWertherinfoMapper.xml 14 KB

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