StationPersonnelMapper.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  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.StationPersonnelMapper">
  4. <resultMap id="BaseResultMap" type="com.platform.yijia.pojo.StationPersonnel">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. -->
  9. <id column="personnel_id" jdbcType="INTEGER" property="personnelId" />
  10. <result column="personnel_name" jdbcType="VARCHAR" property="personnelName" />
  11. <result column="gun_no" jdbcType="VARCHAR" property="gunNo" />
  12. <result column="station_id" jdbcType="INTEGER" property="stationId" />
  13. <result column="station_name" jdbcType="VARCHAR" property="stationName" />
  14. <result column="qr_code" jdbcType="VARCHAR" property="qrCode" />
  15. <result column="personnel_phone" jdbcType="VARCHAR" property="personnelPhone" />
  16. </resultMap>
  17. <sql id="Example_Where_Clause">
  18. <!--
  19. WARNING - @mbg.generated
  20. This element is automatically generated by MyBatis Generator, do not modify.
  21. -->
  22. <where>
  23. <foreach collection="oredCriteria" item="criteria" separator="or">
  24. <if test="criteria.valid">
  25. <trim prefix="(" prefixOverrides="and" suffix=")">
  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 close=")" collection="criterion.value" item="listItem" open="(" 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. <!--
  52. WARNING - @mbg.generated
  53. This element is automatically generated by MyBatis Generator, do not modify.
  54. -->
  55. <where>
  56. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  57. <if test="criteria.valid">
  58. <trim prefix="(" prefixOverrides="and" suffix=")">
  59. <foreach collection="criteria.criteria" item="criterion">
  60. <choose>
  61. <when test="criterion.noValue">
  62. and ${criterion.condition}
  63. </when>
  64. <when test="criterion.singleValue">
  65. and ${criterion.condition} #{criterion.value}
  66. </when>
  67. <when test="criterion.betweenValue">
  68. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  69. </when>
  70. <when test="criterion.listValue">
  71. and ${criterion.condition}
  72. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  73. #{listItem}
  74. </foreach>
  75. </when>
  76. </choose>
  77. </foreach>
  78. </trim>
  79. </if>
  80. </foreach>
  81. </where>
  82. </sql>
  83. <sql id="Base_Column_List">
  84. <!--
  85. WARNING - @mbg.generated
  86. This element is automatically generated by MyBatis Generator, do not modify.
  87. -->
  88. personnel_id, personnel_name, gun_no, station_id, station_name, qr_code, personnel_phone
  89. </sql>
  90. <select id="selectByExample" parameterType="com.platform.yijia.pojo.StationPersonnelExample" resultMap="BaseResultMap">
  91. <!--
  92. WARNING - @mbg.generated
  93. This element is automatically generated by MyBatis Generator, do not modify.
  94. -->
  95. select
  96. <if test="distinct">
  97. distinct
  98. </if>
  99. <include refid="Base_Column_List" />
  100. from station_personnel
  101. <if test="_parameter != null">
  102. <include refid="Example_Where_Clause" />
  103. </if>
  104. <if test="orderByClause != null">
  105. order by ${orderByClause}
  106. </if>
  107. </select>
  108. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  109. <!--
  110. WARNING - @mbg.generated
  111. This element is automatically generated by MyBatis Generator, do not modify.
  112. -->
  113. select
  114. <include refid="Base_Column_List" />
  115. from station_personnel
  116. where personnel_id = #{personnelId,jdbcType=INTEGER}
  117. </select>
  118. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  119. <!--
  120. WARNING - @mbg.generated
  121. This element is automatically generated by MyBatis Generator, do not modify.
  122. -->
  123. delete from station_personnel
  124. where personnel_id = #{personnelId,jdbcType=INTEGER}
  125. </delete>
  126. <delete id="deleteByExample" parameterType="com.platform.yijia.pojo.StationPersonnelExample">
  127. <!--
  128. WARNING - @mbg.generated
  129. This element is automatically generated by MyBatis Generator, do not modify.
  130. -->
  131. delete from station_personnel
  132. <if test="_parameter != null">
  133. <include refid="Example_Where_Clause" />
  134. </if>
  135. </delete>
  136. <insert id="insert" parameterType="com.platform.yijia.pojo.StationPersonnel">
  137. <!--
  138. WARNING - @mbg.generated
  139. This element is automatically generated by MyBatis Generator, do not modify.
  140. -->
  141. insert into station_personnel (personnel_id, personnel_name, gun_no,
  142. station_id, station_name, qr_code,
  143. personnel_phone)
  144. values (#{personnelId,jdbcType=INTEGER}, #{personnelName,jdbcType=VARCHAR}, #{gunNo,jdbcType=VARCHAR},
  145. #{stationId,jdbcType=INTEGER}, #{stationName,jdbcType=VARCHAR}, #{qrCode,jdbcType=VARCHAR},
  146. #{personnelPhone,jdbcType=VARCHAR})
  147. </insert>
  148. <insert id="insertSelective" parameterType="com.platform.yijia.pojo.StationPersonnel">
  149. <!--
  150. WARNING - @mbg.generated
  151. This element is automatically generated by MyBatis Generator, do not modify.
  152. -->
  153. insert into station_personnel
  154. <trim prefix="(" suffix=")" suffixOverrides=",">
  155. <if test="personnelId != null">
  156. personnel_id,
  157. </if>
  158. <if test="personnelName != null">
  159. personnel_name,
  160. </if>
  161. <if test="gunNo != null">
  162. gun_no,
  163. </if>
  164. <if test="stationId != null">
  165. station_id,
  166. </if>
  167. <if test="stationName != null">
  168. station_name,
  169. </if>
  170. <if test="qrCode != null">
  171. qr_code,
  172. </if>
  173. <if test="personnelPhone != null">
  174. personnel_phone,
  175. </if>
  176. </trim>
  177. <trim prefix="values (" suffix=")" suffixOverrides=",">
  178. <if test="personnelId != null">
  179. #{personnelId,jdbcType=INTEGER},
  180. </if>
  181. <if test="personnelName != null">
  182. #{personnelName,jdbcType=VARCHAR},
  183. </if>
  184. <if test="gunNo != null">
  185. #{gunNo,jdbcType=VARCHAR},
  186. </if>
  187. <if test="stationId != null">
  188. #{stationId,jdbcType=INTEGER},
  189. </if>
  190. <if test="stationName != null">
  191. #{stationName,jdbcType=VARCHAR},
  192. </if>
  193. <if test="qrCode != null">
  194. #{qrCode,jdbcType=VARCHAR},
  195. </if>
  196. <if test="personnelPhone != null">
  197. #{personnelPhone,jdbcType=VARCHAR},
  198. </if>
  199. </trim>
  200. </insert>
  201. <select id="countByExample" parameterType="com.platform.yijia.pojo.StationPersonnelExample" resultType="java.lang.Long">
  202. <!--
  203. WARNING - @mbg.generated
  204. This element is automatically generated by MyBatis Generator, do not modify.
  205. -->
  206. select count(*) from station_personnel
  207. <if test="_parameter != null">
  208. <include refid="Example_Where_Clause" />
  209. </if>
  210. </select>
  211. <update id="updateByExampleSelective" parameterType="map">
  212. <!--
  213. WARNING - @mbg.generated
  214. This element is automatically generated by MyBatis Generator, do not modify.
  215. -->
  216. update station_personnel
  217. <set>
  218. <if test="record.personnelId != null">
  219. personnel_id = #{record.personnelId,jdbcType=INTEGER},
  220. </if>
  221. <if test="record.personnelName != null">
  222. personnel_name = #{record.personnelName,jdbcType=VARCHAR},
  223. </if>
  224. <if test="record.gunNo != null">
  225. gun_no = #{record.gunNo,jdbcType=VARCHAR},
  226. </if>
  227. <if test="record.stationId != null">
  228. station_id = #{record.stationId,jdbcType=INTEGER},
  229. </if>
  230. <if test="record.stationName != null">
  231. station_name = #{record.stationName,jdbcType=VARCHAR},
  232. </if>
  233. <if test="record.qrCode != null">
  234. qr_code = #{record.qrCode,jdbcType=VARCHAR},
  235. </if>
  236. <if test="record.personnelPhone != null">
  237. personnel_phone = #{record.personnelPhone,jdbcType=VARCHAR},
  238. </if>
  239. </set>
  240. <if test="_parameter != null">
  241. <include refid="Update_By_Example_Where_Clause" />
  242. </if>
  243. </update>
  244. <update id="updateByExample" parameterType="map">
  245. <!--
  246. WARNING - @mbg.generated
  247. This element is automatically generated by MyBatis Generator, do not modify.
  248. -->
  249. update station_personnel
  250. set personnel_id = #{record.personnelId,jdbcType=INTEGER},
  251. personnel_name = #{record.personnelName,jdbcType=VARCHAR},
  252. gun_no = #{record.gunNo,jdbcType=VARCHAR},
  253. station_id = #{record.stationId,jdbcType=INTEGER},
  254. station_name = #{record.stationName,jdbcType=VARCHAR},
  255. qr_code = #{record.qrCode,jdbcType=VARCHAR},
  256. personnel_phone = #{record.personnelPhone,jdbcType=VARCHAR}
  257. <if test="_parameter != null">
  258. <include refid="Update_By_Example_Where_Clause" />
  259. </if>
  260. </update>
  261. <update id="updateByPrimaryKeySelective" parameterType="com.platform.yijia.pojo.StationPersonnel">
  262. <!--
  263. WARNING - @mbg.generated
  264. This element is automatically generated by MyBatis Generator, do not modify.
  265. -->
  266. update station_personnel
  267. <set>
  268. <if test="personnelName != null">
  269. personnel_name = #{personnelName,jdbcType=VARCHAR},
  270. </if>
  271. <if test="gunNo != null">
  272. gun_no = #{gunNo,jdbcType=VARCHAR},
  273. </if>
  274. <if test="stationId != null">
  275. station_id = #{stationId,jdbcType=INTEGER},
  276. </if>
  277. <if test="stationName != null">
  278. station_name = #{stationName,jdbcType=VARCHAR},
  279. </if>
  280. <if test="qrCode != null">
  281. qr_code = #{qrCode,jdbcType=VARCHAR},
  282. </if>
  283. <if test="personnelPhone != null">
  284. personnel_phone = #{personnelPhone,jdbcType=VARCHAR},
  285. </if>
  286. </set>
  287. where personnel_id = #{personnelId,jdbcType=INTEGER}
  288. </update>
  289. <update id="updateByPrimaryKey" parameterType="com.platform.yijia.pojo.StationPersonnel">
  290. <!--
  291. WARNING - @mbg.generated
  292. This element is automatically generated by MyBatis Generator, do not modify.
  293. -->
  294. update station_personnel
  295. set personnel_name = #{personnelName,jdbcType=VARCHAR},
  296. gun_no = #{gunNo,jdbcType=VARCHAR},
  297. station_id = #{stationId,jdbcType=INTEGER},
  298. station_name = #{stationName,jdbcType=VARCHAR},
  299. qr_code = #{qrCode,jdbcType=VARCHAR},
  300. personnel_phone = #{personnelPhone,jdbcType=VARCHAR}
  301. where personnel_id = #{personnelId,jdbcType=INTEGER}
  302. </update>
  303. </mapper>