BdglPeopleRecallAuditlogMapper.xml 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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.peopleManage.mapper.BdglPeopleRecallAuditlogMapper">
  6. <resultMap type="BdglPeopleRecallAuditlog" id="BdglPeopleRecallAuditlogResult">
  7. <result property="id" column="id" />
  8. <result property="pid" column="pid" />
  9. <result property="peopleId" column="people_id" />
  10. <result property="adminId" column="admin_id" />
  11. <result property="type" column="type" />
  12. <result property="contents" column="contents" />
  13. <result property="createtime" column="createtime" />
  14. <result property="updatetime" column="updatetime" />
  15. </resultMap>
  16. <sql id="selectBdglPeopleRecallAuditlogVo">
  17. select id, pid, people_id, admin_id, type, contents, createtime, updatetime from bdgl_people_recall_auditlog
  18. </sql>
  19. <select id="selectBdglPeopleRecallAuditlogList" parameterType="BdglPeopleRecallAuditlog" resultMap="BdglPeopleRecallAuditlogResult">
  20. <include refid="selectBdglPeopleRecallAuditlogVo"/>
  21. <where>
  22. <if test="pid != null "> and pid = #{pid}</if>
  23. <if test="peopleId != null "> and people_id = #{peopleId}</if>
  24. <if test="adminId != null "> and admin_id = #{adminId}</if>
  25. <if test="type != null and type != ''"> and type = #{type}</if>
  26. <if test="contents != null and contents != ''"> and contents = #{contents}</if>
  27. <if test="createtime != null "> and createtime = #{createtime}</if>
  28. <if test="updatetime != null "> and updatetime = #{updatetime}</if>
  29. </where>
  30. </select>
  31. <select id="selectBdglPeopleRecallAuditlogById" parameterType="Integer" resultMap="BdglPeopleRecallAuditlogResult">
  32. <include refid="selectBdglPeopleRecallAuditlogVo"/>
  33. where id = #{id}
  34. </select>
  35. <insert id="insertBdglPeopleRecallAuditlog" parameterType="BdglPeopleRecallAuditlog" useGeneratedKeys="true" keyProperty="id">
  36. insert into bdgl_people_recall_auditlog
  37. <trim prefix="(" suffix=")" suffixOverrides=",">
  38. <if test="pid != null">pid,</if>
  39. <if test="peopleId != null">people_id,</if>
  40. <if test="adminId != null">admin_id,</if>
  41. <if test="type != null and type != ''">type,</if>
  42. <if test="contents != null">contents,</if>
  43. <if test="createtime != null">createtime,</if>
  44. <if test="updatetime != null">updatetime,</if>
  45. </trim>
  46. <trim prefix="values (" suffix=")" suffixOverrides=",">
  47. <if test="pid != null">#{pid},</if>
  48. <if test="peopleId != null">#{peopleId},</if>
  49. <if test="adminId != null">#{adminId},</if>
  50. <if test="type != null and type != ''">#{type},</if>
  51. <if test="contents != null">#{contents},</if>
  52. <if test="createtime != null">#{createtime},</if>
  53. <if test="updatetime != null">#{updatetime},</if>
  54. </trim>
  55. </insert>
  56. <update id="updateBdglPeopleRecallAuditlog" parameterType="BdglPeopleRecallAuditlog">
  57. update bdgl_people_recall_auditlog
  58. <trim prefix="SET" suffixOverrides=",">
  59. <if test="pid != null">pid = #{pid},</if>
  60. <if test="peopleId != null">people_id = #{peopleId},</if>
  61. <if test="adminId != null">admin_id = #{adminId},</if>
  62. <if test="type != null and type != ''">type = #{type},</if>
  63. <if test="contents != null">contents = #{contents},</if>
  64. <if test="createtime != null">createtime = #{createtime},</if>
  65. <if test="updatetime != null">updatetime = #{updatetime},</if>
  66. </trim>
  67. where id = #{id}
  68. </update>
  69. <delete id="deleteBdglPeopleRecallAuditlogById" parameterType="Integer">
  70. delete from bdgl_people_recall_auditlog where id = #{id}
  71. </delete>
  72. <delete id="deleteBdglPeopleRecallAuditlogByIds" parameterType="String">
  73. delete from bdgl_people_recall_auditlog where id in
  74. <foreach item="id" collection="array" open="(" separator="," close=")">
  75. #{id}
  76. </foreach>
  77. </delete>
  78. </mapper>