PersonnelWelfareMapper.xml 14 KB

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