BdglDutyMeasureMapper.xml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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.BdglDutyMeasureMapper">
  6. <resultMap type="BdglDutyMeasure" id="BdglDutyMeasureResult">
  7. <result property="id" column="id" />
  8. <result property="ylZscb" column="yl_zscb" />
  9. <result property="ylCxyz" column="yl_cxyz" />
  10. <result property="ylZcnl" column="yl_zcnl" />
  11. <result property="jxZscb" column="jx_zscb" />
  12. <result property="jxCxyz" column="jx_cxyz" />
  13. <result property="jxZcnl" column="jx_zcnl" />
  14. <result property="zbjZscb" column="zbj_zscb" />
  15. <result property="wswzZscb" column="wswz_zscb" />
  16. <result property="wswzCxyz" column="wswz_cxyz" />
  17. <result property="dyCcl" column="dy_ccl" />
  18. <result property="wxCcl" column="wx_ccl" />
  19. </resultMap>
  20. <sql id="selectBdglDutyMeasureVo">
  21. select id, yl_zscb, yl_cxyz, yl_zcnl, jx_zscb, jx_cxyz, jx_zcnl, zbj_zscb, wswz_zscb, wswz_cxyz, dy_ccl, wx_ccl from bdgl_duty_measure
  22. </sql>
  23. <select id="selectBdglDutyMeasureList" parameterType="BdglDutyMeasure" resultMap="BdglDutyMeasureResult">
  24. <include refid="selectBdglDutyMeasureVo"/>
  25. <where>
  26. <if test="ylZscb != null "> and yl_zscb = #{ylZscb}</if>
  27. <if test="ylCxyz != null "> and yl_cxyz = #{ylCxyz}</if>
  28. <if test="ylZcnl != null "> and yl_zcnl = #{ylZcnl}</if>
  29. <if test="jxZscb != null "> and jx_zscb = #{jxZscb}</if>
  30. <if test="jxCxyz != null "> and jx_cxyz = #{jxCxyz}</if>
  31. <if test="jxZcnl != null "> and jx_zcnl = #{jxZcnl}</if>
  32. <if test="zbjZscb != null "> and zbj_zscb = #{zbjZscb}</if>
  33. <if test="wswzZscb != null "> and wswz_zscb = #{wswzZscb}</if>
  34. <if test="wswzCxyz != null "> and wswz_cxyz = #{wswzCxyz}</if>
  35. <if test="dyCcl != null "> and dy_ccl = #{dyCcl}</if>
  36. <if test="wxCcl != null "> and wx_ccl = #{wxCcl}</if>
  37. </where>
  38. </select>
  39. <select id="selectBdglDutyMeasureById" parameterType="Integer" resultMap="BdglDutyMeasureResult">
  40. <include refid="selectBdglDutyMeasureVo"/>
  41. where id = #{id}
  42. </select>
  43. <insert id="insertBdglDutyMeasure" parameterType="BdglDutyMeasure" useGeneratedKeys="true" keyProperty="id">
  44. insert into bdgl_duty_measure
  45. <trim prefix="(" suffix=")" suffixOverrides=",">
  46. <if test="ylZscb != null">yl_zscb,</if>
  47. <if test="ylCxyz != null">yl_cxyz,</if>
  48. <if test="ylZcnl != null">yl_zcnl,</if>
  49. <if test="jxZscb != null">jx_zscb,</if>
  50. <if test="jxCxyz != null">jx_cxyz,</if>
  51. <if test="jxZcnl != null">jx_zcnl,</if>
  52. <if test="zbjZscb != null">zbj_zscb,</if>
  53. <if test="wswzZscb != null">wswz_zscb,</if>
  54. <if test="wswzCxyz != null">wswz_cxyz,</if>
  55. <if test="dyCcl != null">dy_ccl,</if>
  56. <if test="wxCcl != null">wx_ccl,</if>
  57. </trim>
  58. <trim prefix="values (" suffix=")" suffixOverrides=",">
  59. <if test="ylZscb != null">#{ylZscb},</if>
  60. <if test="ylCxyz != null">#{ylCxyz},</if>
  61. <if test="ylZcnl != null">#{ylZcnl},</if>
  62. <if test="jxZscb != null">#{jxZscb},</if>
  63. <if test="jxCxyz != null">#{jxCxyz},</if>
  64. <if test="jxZcnl != null">#{jxZcnl},</if>
  65. <if test="zbjZscb != null">#{zbjZscb},</if>
  66. <if test="wswzZscb != null">#{wswzZscb},</if>
  67. <if test="wswzCxyz != null">#{wswzCxyz},</if>
  68. <if test="dyCcl != null">#{dyCcl},</if>
  69. <if test="wxCcl != null">#{wxCcl},</if>
  70. </trim>
  71. </insert>
  72. <update id="updateBdglDutyMeasure" parameterType="BdglDutyMeasure">
  73. update bdgl_duty_measure
  74. <trim prefix="SET" suffixOverrides=",">
  75. <if test="ylZscb != null">yl_zscb = #{ylZscb},</if>
  76. <if test="ylCxyz != null">yl_cxyz = #{ylCxyz},</if>
  77. <if test="ylZcnl != null">yl_zcnl = #{ylZcnl},</if>
  78. <if test="jxZscb != null">jx_zscb = #{jxZscb},</if>
  79. <if test="jxCxyz != null">jx_cxyz = #{jxCxyz},</if>
  80. <if test="jxZcnl != null">jx_zcnl = #{jxZcnl},</if>
  81. <if test="zbjZscb != null">zbj_zscb = #{zbjZscb},</if>
  82. <if test="wswzZscb != null">wswz_zscb = #{wswzZscb},</if>
  83. <if test="wswzCxyz != null">wswz_cxyz = #{wswzCxyz},</if>
  84. <if test="dyCcl != null">dy_ccl = #{dyCcl},</if>
  85. <if test="wxCcl != null">wx_ccl = #{wxCcl},</if>
  86. </trim>
  87. where id = #{id}
  88. </update>
  89. <delete id="deleteBdglDutyMeasureById" parameterType="Integer">
  90. delete from bdgl_duty_measure where id = #{id}
  91. </delete>
  92. <delete id="deleteBdglDutyMeasureByIds" parameterType="String">
  93. delete from bdgl_duty_measure where id in
  94. <foreach item="id" collection="array" open="(" separator="," close=")">
  95. #{id}
  96. </foreach>
  97. </delete>
  98. </mapper>