BdglDutyOutfitMapper.xml 3.6 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.peoplefiverates.mapper.BdglDutyOutfitMapper">
  6. <resultMap type="BdglDutyOutfit" id="BdglDutyOutfitResult">
  7. <result property="id" column="id" />
  8. <result property="zbbz" column="zbbz" />
  9. <result property="zbsy" column="zbsy" />
  10. <result property="zbky" column="zbky" />
  11. <result property="sjpt" column="sjpt" />
  12. <result property="bzpt" column="bzpt" />
  13. <result property="cczb" column="cczb" />
  14. <result property="zbcd" column="zbcd" />
  15. </resultMap>
  16. <sql id="selectBdglDutyOutfitVo">
  17. select id, zbbz, zbsy, zbky, sjpt, bzpt, cczb, zbcd from bdgl_duty_outfit
  18. </sql>
  19. <select id="selectBdglDutyOutfitList" parameterType="BdglDutyOutfit" resultMap="BdglDutyOutfitResult">
  20. <include refid="selectBdglDutyOutfitVo"/>
  21. <where>
  22. <if test="zbbz != null "> and zbbz = #{zbbz}</if>
  23. <if test="zbsy != null "> and zbsy = #{zbsy}</if>
  24. <if test="zbky != null "> and zbky = #{zbky}</if>
  25. <if test="sjpt != null "> and sjpt = #{sjpt}</if>
  26. <if test="bzpt != null "> and bzpt = #{bzpt}</if>
  27. <if test="cczb != null "> and cczb = #{cczb}</if>
  28. <if test="zbcd != null "> and zbcd = #{zbcd}</if>
  29. </where>
  30. </select>
  31. <select id="selectBdglDutyOutfitById" parameterType="Integer" resultMap="BdglDutyOutfitResult">
  32. <include refid="selectBdglDutyOutfitVo"/>
  33. where id = #{id}
  34. </select>
  35. <insert id="insertBdglDutyOutfit" parameterType="BdglDutyOutfit" useGeneratedKeys="true" keyProperty="id">
  36. insert into bdgl_duty_outfit
  37. <trim prefix="(" suffix=")" suffixOverrides=",">
  38. <if test="zbbz != null">zbbz,</if>
  39. <if test="zbsy != null">zbsy,</if>
  40. <if test="zbky != null">zbky,</if>
  41. <if test="sjpt != null">sjpt,</if>
  42. <if test="bzpt != null">bzpt,</if>
  43. <if test="cczb != null">cczb,</if>
  44. <if test="zbcd != null">zbcd,</if>
  45. </trim>
  46. <trim prefix="values (" suffix=")" suffixOverrides=",">
  47. <if test="zbbz != null">#{zbbz},</if>
  48. <if test="zbsy != null">#{zbsy},</if>
  49. <if test="zbky != null">#{zbky},</if>
  50. <if test="sjpt != null">#{sjpt},</if>
  51. <if test="bzpt != null">#{bzpt},</if>
  52. <if test="cczb != null">#{cczb},</if>
  53. <if test="zbcd != null">#{zbcd},</if>
  54. </trim>
  55. </insert>
  56. <update id="updateBdglDutyOutfit" parameterType="BdglDutyOutfit">
  57. update bdgl_duty_outfit
  58. <trim prefix="SET" suffixOverrides=",">
  59. <if test="zbbz != null">zbbz = #{zbbz},</if>
  60. <if test="zbsy != null">zbsy = #{zbsy},</if>
  61. <if test="zbky != null">zbky = #{zbky},</if>
  62. <if test="sjpt != null">sjpt = #{sjpt},</if>
  63. <if test="bzpt != null">bzpt = #{bzpt},</if>
  64. <if test="cczb != null">cczb = #{cczb},</if>
  65. <if test="zbcd != null">zbcd = #{zbcd},</if>
  66. </trim>
  67. where id = #{id}
  68. </update>
  69. <delete id="deleteBdglDutyOutfitById" parameterType="Integer">
  70. delete from bdgl_duty_outfit where id = #{id}
  71. </delete>
  72. <delete id="deleteBdglDutyOutfitByIds" parameterType="String">
  73. delete from bdgl_duty_outfit where id in
  74. <foreach item="id" collection="array" open="(" separator="," close=")">
  75. #{id}
  76. </foreach>
  77. </delete>
  78. </mapper>