ElPassMarkconfigMapper.xml 4.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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.zd.exam.mapper.ElPassMarkconfigMapper">
  6. <resultMap type="com.zd.exam.domain.ElPassMarkconfig" id="ElPassMarkconfigResult">
  7. <result property="id" column="id"/>
  8. <result property="passMark" column="pass_mark"/>
  9. <result property="gainSafeCert" column="gain_safe_cert"/>
  10. <result property="gainSubSafeCert" column="gain_sub_safe_cert"/>
  11. <result property="blackScore" column="black_score"/>
  12. <result property="createBy" column="create_by"/>
  13. <result property="createTime" column="create_time"/>
  14. <result property="updateBy" column="update_by"/>
  15. <result property="updateTime" column="update_time"/>
  16. <result property="remark" column="remark"/>
  17. </resultMap>
  18. <sql id="selectElPassMarkconfigVo">
  19. select id, pass_mark, gain_safe_cert, gain_sub_safe_cert, black_score, create_by, create_time, update_by, update_time, remark from el_pass_markconfig
  20. </sql>
  21. <sql id="selectElPassMarkconfigListVo">
  22. select t.id, t.pass_mark, t.gain_safe_cert, t.gain_sub_safe_cert, t.black_score, t.create_by, t.create_time, t.update_by, t.update_time, t.remark from el_pass_markconfig as t
  23. </sql>
  24. <select id="selectElPassMarkconfigList" parameterType="com.zd.exam.domain.ElPassMarkconfig" resultType="com.zd.exam.domain.vo.ElPassMarkconfigVO">
  25. <include refid="selectElPassMarkconfigVo"/>
  26. <where>
  27. <if test="passMark != null "> and pass_mark = #{passMark}</if>
  28. <if test="gainSafeCert != null "> and gain_safe_cert = #{gainSafeCert}</if>
  29. <if test="gainSubSafeCert != null "> and gain_sub_safe_cert = #{gainSubSafeCert}</if>
  30. <if test="blackScore != null "> and black_score = #{blackScore}</if>
  31. </where>
  32. </select>
  33. <select id="selectElPassMarkconfigById" resultMap="ElPassMarkconfigResult">
  34. <include refid="selectElPassMarkconfigVo"/>
  35. where id = #{id}
  36. </select>
  37. <insert id="insertElPassMarkconfig" parameterType="com.zd.exam.domain.ElPassMarkconfig" useGeneratedKeys="true" keyProperty="id">
  38. insert into el_pass_markconfig
  39. <trim prefix="(" suffix=")" suffixOverrides=",">
  40. <if test="passMark != null">pass_mark,</if>
  41. <if test="gainSafeCert != null">gain_safe_cert,</if>
  42. <if test="gainSubSafeCert != null">gain_sub_safe_cert,</if>
  43. <if test="blackScore != null">black_score,</if>
  44. <if test="createBy != null">create_by,</if>
  45. <if test="createTime != null">create_time,</if>
  46. <if test="updateBy != null">update_by,</if>
  47. <if test="updateTime != null">update_time,</if>
  48. <if test="remark != null">remark,</if>
  49. </trim>
  50. <trim prefix="values (" suffix=")" suffixOverrides=",">
  51. <if test="passMark != null">#{passMark},</if>
  52. <if test="gainSafeCert != null">#{gainSafeCert},</if>
  53. <if test="gainSubSafeCert != null">#{gainSubSafeCert},</if>
  54. <if test="blackScore != null">#{blackScore},</if>
  55. <if test="createBy != null">#{createBy},</if>
  56. <if test="createTime != null">#{createTime},</if>
  57. <if test="updateBy != null">#{updateBy},</if>
  58. <if test="updateTime != null">#{updateTime},</if>
  59. <if test="remark != null">#{remark},</if>
  60. </trim>
  61. </insert>
  62. <update id="updateElPassMarkconfig" parameterType="com.zd.exam.domain.ElPassMarkconfig">
  63. update el_pass_markconfig
  64. <trim prefix="SET" suffixOverrides=",">
  65. <if test="passMark != null">pass_mark = #{passMark},</if>
  66. <if test="gainSafeCert != null">gain_safe_cert = #{gainSafeCert},</if>
  67. <if test="gainSubSafeCert != null">gain_sub_safe_cert = #{gainSubSafeCert},</if>
  68. <if test="blackScore != null">black_score = #{blackScore},</if>
  69. <if test="createBy != null">create_by = #{createBy},</if>
  70. <if test="createTime != null">create_time = #{createTime},</if>
  71. <if test="updateBy != null">update_by = #{updateBy},</if>
  72. <if test="updateTime != null">update_time = #{updateTime},</if>
  73. <if test="remark != null">remark = #{remark},</if>
  74. </trim>
  75. where id = #{id}
  76. </update>
  77. <delete id="deleteElPassMarkconfigById" >
  78. delete from el_pass_markconfig where id = #{id}
  79. </delete>
  80. <delete id="deleteElPassMarkconfigByIds">
  81. delete from el_pass_markconfig where id in
  82. <foreach item="id" collection="array" open="(" separator="," close=")">
  83. #{id}
  84. </foreach>
  85. </delete>
  86. </mapper>