PcInstitutionMapper.xml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  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.PcInstitutionMapper">
  4. <resultMap id="BaseResultMap" type="com.hz.employmentsite.model.PcInstitution">
  5. <id column="InstitutionID" jdbcType="VARCHAR" property="institutionID"/>
  6. <result column="CompanyName" jdbcType="VARCHAR" property="companyName"/>
  7. <result column="CompanyAddress" jdbcType="VARCHAR" property="companyAddress"/>
  8. <result column="FzrName" jdbcType="VARCHAR" property="fzrName"/>
  9. <result column="FzrMobile" jdbcType="VARCHAR" property="fzrMobile"/>
  10. <result column="FrName" jdbcType="VARCHAR" property="frName"/>
  11. <result column="FrMobile" jdbcType="VARCHAR" property="frMobile"/>
  12. <result column="CompanyCode" jdbcType="VARCHAR" property="companyCode"/>
  13. <result column="CompanyDesc" jdbcType="VARCHAR" property="companyDesc"/>
  14. <result column="Remark" jdbcType="VARCHAR" property="remark"/>
  15. <result column="CreateUserID" jdbcType="VARCHAR" property="createUserID"/>
  16. <result column="CreateTime" jdbcType="TIMESTAMP" property="createTime"/>
  17. <result column="ModifyUserID" jdbcType="VARCHAR" property="modifyUserID"/>
  18. <result column="ModifyTime" jdbcType="TIMESTAMP" property="modifyTime"/>
  19. <result column="SignInPoliticalArea" jdbcType="VARCHAR" property="signInPoliticalArea"/>
  20. <result column="EconomicTypeID" jdbcType="TIMESTAMP" property="economicTypeID"/>
  21. <result column="ValidDate" jdbcType="INTEGER" property="validDate"/>
  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. InstitutionID
  83. , CompanyName, CompanyAddress, FzrName, FzrMobile, FrName, FrMobile,
  84. CompanyCode, CompanyDesc, Remark, CreateUserID, CreateTime, ModifyUserID,
  85. ModifyTime,SignInPoliticalArea,EconomicTypeID,ValidDate
  86. </sql>
  87. <select id="selectByExample" parameterType="com.hz.employmentsite.model.PcInstitutionExample" resultMap="BaseResultMap">
  88. select
  89. <if test="distinct">
  90. distinct
  91. </if>
  92. <include refid="Base_Column_List" />
  93. from pc_institution
  94. <if test="_parameter != null">
  95. <include refid="Example_Where_Clause" />
  96. </if>
  97. <if test="orderByClause != null">
  98. order by ${orderByClause}
  99. </if>
  100. </select>
  101. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  102. select
  103. <include refid="Base_Column_List" />
  104. from pc_institution
  105. where InstitutionID = #{institutionID,jdbcType=VARCHAR}
  106. </select>
  107. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  108. delete from pc_institution
  109. where InstitutionID = #{institutionID,jdbcType=VARCHAR}
  110. </delete>
  111. <delete id="deleteByExample" parameterType="com.hz.employmentsite.model.PcInstitutionExample">
  112. delete from pc_institution
  113. <if test="_parameter != null">
  114. <include refid="Example_Where_Clause" />
  115. </if>
  116. </delete>
  117. <insert id="insert" parameterType="com.hz.employmentsite.model.PcInstitution">
  118. insert into pc_institution (InstitutionID, CompanyName, CompanyAddress,
  119. FzrName, FzrMobile, FrName,
  120. FrMobile, CompanyCode, CompanyDesc,
  121. Remark, CreateUserID, CreateTime,
  122. ModifyUserID, ModifyTime, SignInPoliticalArea, EconomicTypeID, ValidDate)
  123. values (#{institutionID,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, #{companyAddress,jdbcType=VARCHAR},
  124. #{fzrName,jdbcType=VARCHAR}, #{fzrMobile,jdbcType=VARCHAR}, #{frName,jdbcType=VARCHAR},
  125. #{frMobile,jdbcType=VARCHAR}, #{companyCode,jdbcType=VARCHAR}, #{companyDesc,jdbcType=VARCHAR},
  126. #{remark,jdbcType=VARCHAR}, #{createUserID,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
  127. #{modifyUserID,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, #{signInPoliticalArea,jdbcType=VARCHAR},
  128. #{economicTypeID,jdbcType=INTEGER}, #{validDate,jdbcType=TIMESTAMP})
  129. </insert>
  130. <insert id="insertSelective" parameterType="com.hz.employmentsite.model.PcInstitution">
  131. insert into pc_institution
  132. <trim prefix="(" suffix=")" suffixOverrides=",">
  133. <if test="institutionID != null">
  134. InstitutionID,
  135. </if>
  136. <if test="companyName != null">
  137. CompanyName,
  138. </if>
  139. <if test="companyAddress != null">
  140. CompanyAddress,
  141. </if>
  142. <if test="fzrName != null">
  143. FzrName,
  144. </if>
  145. <if test="fzrMobile != null">
  146. FzrMobile,
  147. </if>
  148. <if test="frName != null">
  149. FrName,
  150. </if>
  151. <if test="frMobile != null">
  152. FrMobile,
  153. </if>
  154. <if test="companyCode != null">
  155. CompanyCode,
  156. </if>
  157. <if test="companyDesc != null">
  158. CompanyDesc,
  159. </if>
  160. <if test="remark != null">
  161. Remark,
  162. </if>
  163. <if test="createUserID != null">
  164. CreateUserID,
  165. </if>
  166. <if test="createTime != null">
  167. CreateTime,
  168. </if>
  169. <if test="modifyUserID != null">
  170. ModifyUserID,
  171. </if>
  172. <if test="modifyTime != null">
  173. ModifyTime,
  174. </if>
  175. <if test="signInPoliticalArea != null">
  176. SignInPoliticalArea,
  177. </if>
  178. <if test="validDate != null">
  179. ValidDate,
  180. </if>
  181. <if test="economicTypeID != null">
  182. EconomicTypeID,
  183. </if>
  184. </trim>
  185. <trim prefix="values (" suffix=")" suffixOverrides=",">
  186. <if test="institutionID != null">
  187. #{institutionID,jdbcType=VARCHAR},
  188. </if>
  189. <if test="companyName != null">
  190. #{companyName,jdbcType=VARCHAR},
  191. </if>
  192. <if test="companyAddress != null">
  193. #{companyAddress,jdbcType=VARCHAR},
  194. </if>
  195. <if test="fzrName != null">
  196. #{fzrName,jdbcType=VARCHAR},
  197. </if>
  198. <if test="fzrMobile != null">
  199. #{fzrMobile,jdbcType=VARCHAR},
  200. </if>
  201. <if test="frName != null">
  202. #{frName,jdbcType=VARCHAR},
  203. </if>
  204. <if test="frMobile != null">
  205. #{frMobile,jdbcType=VARCHAR},
  206. </if>
  207. <if test="companyCode != null">
  208. #{companyCode,jdbcType=VARCHAR},
  209. </if>
  210. <if test="companyDesc != null">
  211. #{companyDesc,jdbcType=VARCHAR},
  212. </if>
  213. <if test="remark != null">
  214. #{remark,jdbcType=VARCHAR},
  215. </if>
  216. <if test="createUserID != null">
  217. #{createUserID,jdbcType=VARCHAR},
  218. </if>
  219. <if test="createTime != null">
  220. #{createTime,jdbcType=TIMESTAMP},
  221. </if>
  222. <if test="modifyUserID != null">
  223. #{modifyUserID,jdbcType=VARCHAR},
  224. </if>
  225. <if test="modifyTime != null">
  226. #{modifyTime,jdbcType=TIMESTAMP},
  227. </if>
  228. <if test="signInPoliticalArea != null">
  229. #{signInPoliticalArea,jdbcType=VARCHAR},
  230. </if>
  231. <if test="validDate != null">
  232. #{validDate,jdbcType=TIMESTAMP},
  233. </if>
  234. <if test="economicTypeID != null">
  235. #{economicTypeID,jdbcType=INTEGER},
  236. </if>
  237. </trim>
  238. </insert>
  239. <select id="countByExample" parameterType="com.hz.employmentsite.model.PcInstitutionExample" resultType="java.lang.Long">
  240. select count(*) from pc_institution
  241. <if test="_parameter != null">
  242. <include refid="Example_Where_Clause" />
  243. </if>
  244. </select>
  245. <update id="updateByExampleSelective" parameterType="map">
  246. update pc_institution
  247. <set>
  248. <if test="row.institutionID != null">
  249. InstitutionID = #{row.institutionID,jdbcType=VARCHAR},
  250. </if>
  251. <if test="row.companyName != null">
  252. CompanyName = #{row.companyName,jdbcType=VARCHAR},
  253. </if>
  254. <if test="row.companyAddress != null">
  255. CompanyAddress = #{row.companyAddress,jdbcType=VARCHAR},
  256. </if>
  257. <if test="row.fzrName != null">
  258. FzrName = #{row.fzrName,jdbcType=VARCHAR},
  259. </if>
  260. <if test="row.fzrMobile != null">
  261. FzrMobile = #{row.fzrMobile,jdbcType=VARCHAR},
  262. </if>
  263. <if test="row.frName != null">
  264. FrName = #{row.frName,jdbcType=VARCHAR},
  265. </if>
  266. <if test="row.frMobile != null">
  267. FrMobile = #{row.frMobile,jdbcType=VARCHAR},
  268. </if>
  269. <if test="row.companyCode != null">
  270. CompanyCode = #{row.companyCode,jdbcType=VARCHAR},
  271. </if>
  272. <if test="row.companyDesc != null">
  273. CompanyDesc = #{row.companyDesc,jdbcType=VARCHAR},
  274. </if>
  275. <if test="row.remark != null">
  276. Remark = #{row.remark,jdbcType=VARCHAR},
  277. </if>
  278. <if test="row.createUserID != null">
  279. CreateUserID = #{row.createUserID,jdbcType=VARCHAR},
  280. </if>
  281. <if test="row.createTime != null">
  282. CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
  283. </if>
  284. <if test="row.modifyUserID != null">
  285. ModifyUserID = #{row.modifyUserID,jdbcType=VARCHAR},
  286. </if>
  287. <if test="row.modifyTime != null">
  288. ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP},
  289. </if>
  290. <if test="row.signInPoliticalArea != null">
  291. SignInPoliticalArea = #{row.signInPoliticalArea,jdbcType=VARCHAR},
  292. </if>
  293. <if test="row.validDate != null">
  294. ValidDate = #{row.validDate,jdbcType=TIMESTAMP},
  295. </if>
  296. <if test="row.economicTypeID != null">
  297. EconomicTypeID = #{row.economicTypeID,jdbcType=INTEGER},
  298. </if>
  299. </set>
  300. <if test="example != null">
  301. <include refid="Update_By_Example_Where_Clause" />
  302. </if>
  303. </update>
  304. <update id="updateByExample" parameterType="map">
  305. update pc_institution
  306. set InstitutionID = #{row.institutionID,jdbcType=VARCHAR},
  307. CompanyName = #{row.companyName,jdbcType=VARCHAR},
  308. CompanyAddress = #{row.companyAddress,jdbcType=VARCHAR},
  309. FzrName = #{row.fzrName,jdbcType=VARCHAR},
  310. FzrMobile = #{row.fzrMobile,jdbcType=VARCHAR},
  311. FrName = #{row.frName,jdbcType=VARCHAR},
  312. FrMobile = #{row.frMobile,jdbcType=VARCHAR},
  313. CompanyCode = #{row.companyCode,jdbcType=VARCHAR},
  314. CompanyDesc = #{row.companyDesc,jdbcType=VARCHAR},
  315. Remark = #{row.remark,jdbcType=VARCHAR},
  316. CreateUserID = #{row.createUserID,jdbcType=VARCHAR},
  317. CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
  318. ModifyUserID = #{row.modifyUserID,jdbcType=VARCHAR},
  319. ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP},
  320. SignInPoliticalArea = #{row.signInPoliticalArea,jdbcType=VARCHAR},
  321. ValidDate = #{row.validDate,jdbcType=TIMESTAMP},
  322. EconomicTypeID = #{row.economicTypeID,jdbcType=INTEGER}
  323. <if test="example != null">
  324. <include refid="Update_By_Example_Where_Clause" />
  325. </if>
  326. </update>
  327. <update id="updateByPrimaryKeySelective" parameterType="com.hz.employmentsite.model.PcInstitution">
  328. update pc_institution
  329. <set>
  330. <if test="companyName != null">
  331. CompanyName = #{companyName,jdbcType=VARCHAR},
  332. </if>
  333. <if test="companyAddress != null">
  334. CompanyAddress = #{companyAddress,jdbcType=VARCHAR},
  335. </if>
  336. <if test="fzrName != null">
  337. FzrName = #{fzrName,jdbcType=VARCHAR},
  338. </if>
  339. <if test="fzrMobile != null">
  340. FzrMobile = #{fzrMobile,jdbcType=VARCHAR},
  341. </if>
  342. <if test="frName != null">
  343. FrName = #{frName,jdbcType=VARCHAR},
  344. </if>
  345. <if test="frMobile != null">
  346. FrMobile = #{frMobile,jdbcType=VARCHAR},
  347. </if>
  348. <if test="companyCode != null">
  349. CompanyCode = #{companyCode,jdbcType=VARCHAR},
  350. </if>
  351. <if test="companyDesc != null">
  352. CompanyDesc = #{companyDesc,jdbcType=VARCHAR},
  353. </if>
  354. <if test="remark != null">
  355. Remark = #{remark,jdbcType=VARCHAR},
  356. </if>
  357. <if test="createUserID != null">
  358. CreateUserID = #{createUserID,jdbcType=VARCHAR},
  359. </if>
  360. <if test="createTime != null">
  361. CreateTime = #{createTime,jdbcType=TIMESTAMP},
  362. </if>
  363. <if test="modifyUserID != null">
  364. ModifyUserID = #{modifyUserID,jdbcType=VARCHAR},
  365. </if>
  366. <if test="modifyTime != null">
  367. ModifyTime = #{modifyTime,jdbcType=TIMESTAMP},
  368. </if>
  369. <if test="signInPoliticalArea != null">
  370. SignInPoliticalArea = #{signInPoliticalArea,jdbcType=VARCHAR},
  371. </if>
  372. <if test="validDate != null">
  373. ValidDate = #{validDate,jdbcType=TIMESTAMP},
  374. </if>
  375. <if test="economicTypeID != null">
  376. EconomicTypeID = #{economicTypeID,jdbcType=INTEGER},
  377. </if>
  378. </set>
  379. where InstitutionID = #{institutionID,jdbcType=VARCHAR}
  380. </update>
  381. <update id="updateByPrimaryKey" parameterType="com.hz.employmentsite.model.PcInstitution">
  382. update pc_institution
  383. set CompanyName = #{companyName,jdbcType=VARCHAR},
  384. CompanyAddress = #{companyAddress,jdbcType=VARCHAR},
  385. FzrName = #{fzrName,jdbcType=VARCHAR},
  386. FzrMobile = #{fzrMobile,jdbcType=VARCHAR},
  387. FrName = #{frName,jdbcType=VARCHAR},
  388. FrMobile = #{frMobile,jdbcType=VARCHAR},
  389. CompanyCode = #{companyCode,jdbcType=VARCHAR},
  390. CompanyDesc = #{companyDesc,jdbcType=VARCHAR},
  391. Remark = #{remark,jdbcType=VARCHAR},
  392. CreateUserID = #{createUserID,jdbcType=VARCHAR},
  393. CreateTime = #{createTime,jdbcType=TIMESTAMP},
  394. ModifyUserID = #{modifyUserID,jdbcType=VARCHAR},
  395. ModifyTime = #{modifyTime,jdbcType=TIMESTAMP},
  396. signInPoliticalArea = #{signInPoliticalArea,jdbcType=VARCHAR},
  397. validDate = #{validDate,jdbcType=TIMESTAMP},
  398. economicTypeID = #{economicTypeID,jdbcType=INTEGER}
  399. where InstitutionID = #{institutionID,jdbcType=VARCHAR}
  400. </update>
  401. </mapper>