BdglLeaveFuMapper.xml 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.supervision.peopleChuRu.mapper.BdglLeaveFuMapper">
  6. <resultMap type="BdglLeaveFu" id="BdglLeaveFuResult">
  7. <result property="id" column="id" />
  8. <result property="leaveId" column="leave_id" />
  9. <result property="people" column="people" />
  10. <result property="spState" column="sp_state" />
  11. <result property="specialApproval" column="special_approval" />
  12. <result property="createtime" column="createtime" />
  13. </resultMap>
  14. <sql id="selectBdglLeaveFuVo">
  15. select id, leave_id, people, sp_state, special_approval, createtime from bdgl_leave_fu
  16. </sql>
  17. <select id="selectBdglLeaveFuList" parameterType="BdglLeaveFu" resultMap="BdglLeaveFuResult">
  18. <include refid="selectBdglLeaveFuVo"/>
  19. <where>
  20. <if test="leaveId != null "> and leave_id = #{leaveId}</if>
  21. <if test="people != null and people != ''"> and people = #{people}</if>
  22. <if test="spState != null "> and sp_state = #{spState}</if>
  23. <if test="specialApproval != null and specialApproval != ''"> and special_approval = #{specialApproval}</if>
  24. <if test="createtime != null "> and createtime = #{createtime}</if>
  25. </where>
  26. order by id desc
  27. </select>
  28. <select id="selectBdglLeaveFuById" parameterType="Long" resultMap="BdglLeaveFuResult">
  29. <include refid="selectBdglLeaveFuVo"/>
  30. where id = #{id}
  31. </select>
  32. <insert id="insertBdglLeaveFu" parameterType="BdglLeaveFu">
  33. insert into bdgl_leave_fu
  34. <trim prefix="(" suffix=")" suffixOverrides=",">
  35. <if test="id != null">id,</if>
  36. <if test="leaveId != null">leave_id,</if>
  37. <if test="people != null">people,</if>
  38. <if test="spState != null">sp_state,</if>
  39. <if test="specialApproval != null">special_approval,</if>
  40. <if test="createtime != null">createtime,</if>
  41. </trim>
  42. <trim prefix="values (" suffix=")" suffixOverrides=",">
  43. <if test="id != null">#{id},</if>
  44. <if test="leaveId != null">#{leaveId},</if>
  45. <if test="people != null">#{people},</if>
  46. <if test="spState != null">#{spState},</if>
  47. <if test="specialApproval != null">#{specialApproval},</if>
  48. <if test="createtime != null">#{createtime},</if>
  49. </trim>
  50. </insert>
  51. <update id="updateBdglLeaveFu" parameterType="BdglLeaveFu">
  52. update bdgl_leave_fu
  53. <trim prefix="SET" suffixOverrides=",">
  54. <if test="leaveId != null">leave_id = #{leaveId},</if>
  55. <if test="people != null">people = #{people},</if>
  56. <if test="spState != null">sp_state = #{spState},</if>
  57. <if test="specialApproval != null">special_approval = #{specialApproval},</if>
  58. <if test="createtime != null">createtime = #{createtime},</if>
  59. </trim>
  60. where id = #{id}
  61. </update>
  62. <delete id="deleteBdglLeaveFuById" parameterType="Long">
  63. delete from bdgl_leave_fu where id = #{id}
  64. </delete>
  65. <delete id="deleteBdglLeaveFuByIds" parameterType="String">
  66. delete from bdgl_leave_fu where id in
  67. <foreach item="id" collection="array" open="(" separator="," close=")">
  68. #{id}
  69. </foreach>
  70. </delete>
  71. </mapper>