StationInfoMapper.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  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.platform.yijia.dao.StationInfoMapper">
  4. <resultMap id="BaseResultMap" type="com.platform.yijia.pojo.StationInfo">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. -->
  9. <id column="station_id" jdbcType="INTEGER" property="stationId" />
  10. <result column="station_name" jdbcType="VARCHAR" property="stationName" />
  11. <result column="station_address" jdbcType="VARCHAR" property="stationAddress" />
  12. <result column="oil_gun_num" jdbcType="INTEGER" property="oilGunNum" />
  13. <result column="contacts" jdbcType="VARCHAR" property="contacts" />
  14. <result column="phone" jdbcType="VARCHAR" property="phone" />
  15. <result column="station_group_id" jdbcType="INTEGER" property="stationGroupId" />
  16. <result column="station_group_name" jdbcType="VARCHAR" property="stationGroupName" />
  17. <result column="station_longitude" jdbcType="VARCHAR" property="stationLongitude" />
  18. <result column="station_latitude" jdbcType="VARCHAR" property="stationLatitude" />
  19. </resultMap>
  20. <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.platform.yijia.pojo.StationInfo">
  21. <!--
  22. WARNING - @mbg.generated
  23. This element is automatically generated by MyBatis Generator, do not modify.
  24. -->
  25. <result column="station_pic" jdbcType="LONGVARBINARY" property="stationPic" />
  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. station_id, station_name, station_address, oil_gun_num, contacts, phone, station_group_id,
  99. station_group_name, station_longitude, station_latitude
  100. </sql>
  101. <sql id="Blob_Column_List">
  102. <!--
  103. WARNING - @mbg.generated
  104. This element is automatically generated by MyBatis Generator, do not modify.
  105. -->
  106. station_pic
  107. </sql>
  108. <select id="selectByExampleWithBLOBs" parameterType="com.platform.yijia.pojo.StationInfoExample" resultMap="ResultMapWithBLOBs">
  109. <!--
  110. WARNING - @mbg.generated
  111. This element is automatically generated by MyBatis Generator, do not modify.
  112. -->
  113. select
  114. <if test="distinct">
  115. distinct
  116. </if>
  117. <include refid="Base_Column_List" />
  118. ,
  119. <include refid="Blob_Column_List" />
  120. from station_info
  121. <if test="_parameter != null">
  122. <include refid="Example_Where_Clause" />
  123. </if>
  124. <if test="orderByClause != null">
  125. order by ${orderByClause}
  126. </if>
  127. </select>
  128. <select id="selectByExample" parameterType="com.platform.yijia.pojo.StationInfoExample" resultMap="BaseResultMap">
  129. <!--
  130. WARNING - @mbg.generated
  131. This element is automatically generated by MyBatis Generator, do not modify.
  132. -->
  133. select
  134. <if test="distinct">
  135. distinct
  136. </if>
  137. <include refid="Base_Column_List" />
  138. from station_info
  139. <if test="_parameter != null">
  140. <include refid="Example_Where_Clause" />
  141. </if>
  142. <if test="orderByClause != null">
  143. order by ${orderByClause}
  144. </if>
  145. </select>
  146. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
  147. <!--
  148. WARNING - @mbg.generated
  149. This element is automatically generated by MyBatis Generator, do not modify.
  150. -->
  151. select
  152. <include refid="Base_Column_List" />
  153. ,
  154. <include refid="Blob_Column_List" />
  155. from station_info
  156. where station_id = #{stationId,jdbcType=INTEGER}
  157. </select>
  158. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  159. <!--
  160. WARNING - @mbg.generated
  161. This element is automatically generated by MyBatis Generator, do not modify.
  162. -->
  163. delete from station_info
  164. where station_id = #{stationId,jdbcType=INTEGER}
  165. </delete>
  166. <delete id="deleteByExample" parameterType="com.platform.yijia.pojo.StationInfoExample">
  167. <!--
  168. WARNING - @mbg.generated
  169. This element is automatically generated by MyBatis Generator, do not modify.
  170. -->
  171. delete from station_info
  172. <if test="_parameter != null">
  173. <include refid="Example_Where_Clause" />
  174. </if>
  175. </delete>
  176. <insert id="insert" parameterType="com.platform.yijia.pojo.StationInfo">
  177. <!--
  178. WARNING - @mbg.generated
  179. This element is automatically generated by MyBatis Generator, do not modify.
  180. -->
  181. insert into station_info (station_id, station_name, station_address,
  182. oil_gun_num, contacts, phone,
  183. station_group_id, station_group_name, station_longitude,
  184. station_latitude, station_pic)
  185. values (#{stationId,jdbcType=INTEGER}, #{stationName,jdbcType=VARCHAR}, #{stationAddress,jdbcType=VARCHAR},
  186. #{oilGunNum,jdbcType=INTEGER}, #{contacts,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR},
  187. #{stationGroupId,jdbcType=INTEGER}, #{stationGroupName,jdbcType=VARCHAR}, #{stationLongitude,jdbcType=VARCHAR},
  188. #{stationLatitude,jdbcType=VARCHAR}, #{stationPic,jdbcType=LONGVARBINARY})
  189. </insert>
  190. <insert id="insertSelective" parameterType="com.platform.yijia.pojo.StationInfo">
  191. <!--
  192. WARNING - @mbg.generated
  193. This element is automatically generated by MyBatis Generator, do not modify.
  194. -->
  195. insert into station_info
  196. <trim prefix="(" suffix=")" suffixOverrides=",">
  197. <if test="stationId != null">
  198. station_id,
  199. </if>
  200. <if test="stationName != null">
  201. station_name,
  202. </if>
  203. <if test="stationAddress != null">
  204. station_address,
  205. </if>
  206. <if test="oilGunNum != null">
  207. oil_gun_num,
  208. </if>
  209. <if test="contacts != null">
  210. contacts,
  211. </if>
  212. <if test="phone != null">
  213. phone,
  214. </if>
  215. <if test="stationGroupId != null">
  216. station_group_id,
  217. </if>
  218. <if test="stationGroupName != null">
  219. station_group_name,
  220. </if>
  221. <if test="stationLongitude != null">
  222. station_longitude,
  223. </if>
  224. <if test="stationLatitude != null">
  225. station_latitude,
  226. </if>
  227. <if test="stationPic != null">
  228. station_pic,
  229. </if>
  230. </trim>
  231. <trim prefix="values (" suffix=")" suffixOverrides=",">
  232. <if test="stationId != null">
  233. #{stationId,jdbcType=INTEGER},
  234. </if>
  235. <if test="stationName != null">
  236. #{stationName,jdbcType=VARCHAR},
  237. </if>
  238. <if test="stationAddress != null">
  239. #{stationAddress,jdbcType=VARCHAR},
  240. </if>
  241. <if test="oilGunNum != null">
  242. #{oilGunNum,jdbcType=INTEGER},
  243. </if>
  244. <if test="contacts != null">
  245. #{contacts,jdbcType=VARCHAR},
  246. </if>
  247. <if test="phone != null">
  248. #{phone,jdbcType=VARCHAR},
  249. </if>
  250. <if test="stationGroupId != null">
  251. #{stationGroupId,jdbcType=INTEGER},
  252. </if>
  253. <if test="stationGroupName != null">
  254. #{stationGroupName,jdbcType=VARCHAR},
  255. </if>
  256. <if test="stationLongitude != null">
  257. #{stationLongitude,jdbcType=VARCHAR},
  258. </if>
  259. <if test="stationLatitude != null">
  260. #{stationLatitude,jdbcType=VARCHAR},
  261. </if>
  262. <if test="stationPic != null">
  263. #{stationPic,jdbcType=LONGVARBINARY},
  264. </if>
  265. </trim>
  266. </insert>
  267. <select id="countByExample" parameterType="com.platform.yijia.pojo.StationInfoExample" resultType="java.lang.Long">
  268. <!--
  269. WARNING - @mbg.generated
  270. This element is automatically generated by MyBatis Generator, do not modify.
  271. -->
  272. select count(*) from station_info
  273. <if test="_parameter != null">
  274. <include refid="Example_Where_Clause" />
  275. </if>
  276. </select>
  277. <update id="updateByExampleSelective" parameterType="map">
  278. <!--
  279. WARNING - @mbg.generated
  280. This element is automatically generated by MyBatis Generator, do not modify.
  281. -->
  282. update station_info
  283. <set>
  284. <if test="record.stationId != null">
  285. station_id = #{record.stationId,jdbcType=INTEGER},
  286. </if>
  287. <if test="record.stationName != null">
  288. station_name = #{record.stationName,jdbcType=VARCHAR},
  289. </if>
  290. <if test="record.stationAddress != null">
  291. station_address = #{record.stationAddress,jdbcType=VARCHAR},
  292. </if>
  293. <if test="record.oilGunNum != null">
  294. oil_gun_num = #{record.oilGunNum,jdbcType=INTEGER},
  295. </if>
  296. <if test="record.contacts != null">
  297. contacts = #{record.contacts,jdbcType=VARCHAR},
  298. </if>
  299. <if test="record.phone != null">
  300. phone = #{record.phone,jdbcType=VARCHAR},
  301. </if>
  302. <if test="record.stationGroupId != null">
  303. station_group_id = #{record.stationGroupId,jdbcType=INTEGER},
  304. </if>
  305. <if test="record.stationGroupName != null">
  306. station_group_name = #{record.stationGroupName,jdbcType=VARCHAR},
  307. </if>
  308. <if test="record.stationLongitude != null">
  309. station_longitude = #{record.stationLongitude,jdbcType=VARCHAR},
  310. </if>
  311. <if test="record.stationLatitude != null">
  312. station_latitude = #{record.stationLatitude,jdbcType=VARCHAR},
  313. </if>
  314. <if test="record.stationPic != null">
  315. station_pic = #{record.stationPic,jdbcType=LONGVARBINARY},
  316. </if>
  317. </set>
  318. <if test="_parameter != null">
  319. <include refid="Update_By_Example_Where_Clause" />
  320. </if>
  321. </update>
  322. <update id="updateByExampleWithBLOBs" parameterType="map">
  323. <!--
  324. WARNING - @mbg.generated
  325. This element is automatically generated by MyBatis Generator, do not modify.
  326. -->
  327. update station_info
  328. set station_id = #{record.stationId,jdbcType=INTEGER},
  329. station_name = #{record.stationName,jdbcType=VARCHAR},
  330. station_address = #{record.stationAddress,jdbcType=VARCHAR},
  331. oil_gun_num = #{record.oilGunNum,jdbcType=INTEGER},
  332. contacts = #{record.contacts,jdbcType=VARCHAR},
  333. phone = #{record.phone,jdbcType=VARCHAR},
  334. station_group_id = #{record.stationGroupId,jdbcType=INTEGER},
  335. station_group_name = #{record.stationGroupName,jdbcType=VARCHAR},
  336. station_longitude = #{record.stationLongitude,jdbcType=VARCHAR},
  337. station_latitude = #{record.stationLatitude,jdbcType=VARCHAR},
  338. station_pic = #{record.stationPic,jdbcType=LONGVARBINARY}
  339. <if test="_parameter != null">
  340. <include refid="Update_By_Example_Where_Clause" />
  341. </if>
  342. </update>
  343. <update id="updateByExample" parameterType="map">
  344. <!--
  345. WARNING - @mbg.generated
  346. This element is automatically generated by MyBatis Generator, do not modify.
  347. -->
  348. update station_info
  349. set station_id = #{record.stationId,jdbcType=INTEGER},
  350. station_name = #{record.stationName,jdbcType=VARCHAR},
  351. station_address = #{record.stationAddress,jdbcType=VARCHAR},
  352. oil_gun_num = #{record.oilGunNum,jdbcType=INTEGER},
  353. contacts = #{record.contacts,jdbcType=VARCHAR},
  354. phone = #{record.phone,jdbcType=VARCHAR},
  355. station_group_id = #{record.stationGroupId,jdbcType=INTEGER},
  356. station_group_name = #{record.stationGroupName,jdbcType=VARCHAR},
  357. station_longitude = #{record.stationLongitude,jdbcType=VARCHAR},
  358. station_latitude = #{record.stationLatitude,jdbcType=VARCHAR}
  359. <if test="_parameter != null">
  360. <include refid="Update_By_Example_Where_Clause" />
  361. </if>
  362. </update>
  363. <update id="updateByPrimaryKeySelective" parameterType="com.platform.yijia.pojo.StationInfo">
  364. <!--
  365. WARNING - @mbg.generated
  366. This element is automatically generated by MyBatis Generator, do not modify.
  367. -->
  368. update station_info
  369. <set>
  370. <if test="stationName != null">
  371. station_name = #{stationName,jdbcType=VARCHAR},
  372. </if>
  373. <if test="stationAddress != null">
  374. station_address = #{stationAddress,jdbcType=VARCHAR},
  375. </if>
  376. <if test="oilGunNum != null">
  377. oil_gun_num = #{oilGunNum,jdbcType=INTEGER},
  378. </if>
  379. <if test="contacts != null">
  380. contacts = #{contacts,jdbcType=VARCHAR},
  381. </if>
  382. <if test="phone != null">
  383. phone = #{phone,jdbcType=VARCHAR},
  384. </if>
  385. <if test="stationGroupId != null">
  386. station_group_id = #{stationGroupId,jdbcType=INTEGER},
  387. </if>
  388. <if test="stationGroupName != null">
  389. station_group_name = #{stationGroupName,jdbcType=VARCHAR},
  390. </if>
  391. <if test="stationLongitude != null">
  392. station_longitude = #{stationLongitude,jdbcType=VARCHAR},
  393. </if>
  394. <if test="stationLatitude != null">
  395. station_latitude = #{stationLatitude,jdbcType=VARCHAR},
  396. </if>
  397. <if test="stationPic != null">
  398. station_pic = #{stationPic,jdbcType=LONGVARBINARY},
  399. </if>
  400. </set>
  401. where station_id = #{stationId,jdbcType=INTEGER}
  402. </update>
  403. <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.platform.yijia.pojo.StationInfo">
  404. <!--
  405. WARNING - @mbg.generated
  406. This element is automatically generated by MyBatis Generator, do not modify.
  407. -->
  408. update station_info
  409. set station_name = #{stationName,jdbcType=VARCHAR},
  410. station_address = #{stationAddress,jdbcType=VARCHAR},
  411. oil_gun_num = #{oilGunNum,jdbcType=INTEGER},
  412. contacts = #{contacts,jdbcType=VARCHAR},
  413. phone = #{phone,jdbcType=VARCHAR},
  414. station_group_id = #{stationGroupId,jdbcType=INTEGER},
  415. station_group_name = #{stationGroupName,jdbcType=VARCHAR},
  416. station_longitude = #{stationLongitude,jdbcType=VARCHAR},
  417. station_latitude = #{stationLatitude,jdbcType=VARCHAR},
  418. station_pic = #{stationPic,jdbcType=LONGVARBINARY}
  419. where station_id = #{stationId,jdbcType=INTEGER}
  420. </update>
  421. <update id="updateByPrimaryKey" parameterType="com.platform.yijia.pojo.StationInfo">
  422. <!--
  423. WARNING - @mbg.generated
  424. This element is automatically generated by MyBatis Generator, do not modify.
  425. -->
  426. update station_info
  427. set station_name = #{stationName,jdbcType=VARCHAR},
  428. station_address = #{stationAddress,jdbcType=VARCHAR},
  429. oil_gun_num = #{oilGunNum,jdbcType=INTEGER},
  430. contacts = #{contacts,jdbcType=VARCHAR},
  431. phone = #{phone,jdbcType=VARCHAR},
  432. station_group_id = #{stationGroupId,jdbcType=INTEGER},
  433. station_group_name = #{stationGroupName,jdbcType=VARCHAR},
  434. station_longitude = #{stationLongitude,jdbcType=VARCHAR},
  435. station_latitude = #{stationLatitude,jdbcType=VARCHAR}
  436. where station_id = #{stationId,jdbcType=INTEGER}
  437. </update>
  438. </mapper>