PcSiteMapper.xml 15 KB

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