EngagedFieldGlossoryMapper.xml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.goafanti.common.dao.EngagedFieldGlossoryMapper" >
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.EngagedFieldGlossory" >
  5. <id column="id" property="id" jdbcType="INTEGER" />
  6. <result column="name" property="name" jdbcType="VARCHAR" />
  7. <result column="pid" property="pid" jdbcType="INTEGER" />
  8. <result column="level" property="level" jdbcType="INTEGER" />
  9. </resultMap>
  10. <sql id="Base_Column_List" >
  11. id, name, pid, level
  12. </sql>
  13. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  14. select
  15. <include refid="Base_Column_List" />
  16. from engaged_field_glossory
  17. where id = #{id,jdbcType=INTEGER}
  18. </select>
  19. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  20. delete from engaged_field_glossory
  21. where id = #{id,jdbcType=INTEGER}
  22. </delete>
  23. <insert id="insert" parameterType="com.goafanti.common.model.EngagedFieldGlossory" >
  24. insert into engaged_field_glossory (id, name, pid,
  25. level)
  26. values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{pid,jdbcType=INTEGER},
  27. #{level,jdbcType=INTEGER})
  28. </insert>
  29. <insert id="insertSelective" parameterType="com.goafanti.common.model.EngagedFieldGlossory" >
  30. insert into engaged_field_glossory
  31. <trim prefix="(" suffix=")" suffixOverrides="," >
  32. <if test="id != null" >
  33. id,
  34. </if>
  35. <if test="name != null" >
  36. name,
  37. </if>
  38. <if test="pid != null" >
  39. pid,
  40. </if>
  41. <if test="level != null" >
  42. level,
  43. </if>
  44. </trim>
  45. <trim prefix="values (" suffix=")" suffixOverrides="," >
  46. <if test="id != null" >
  47. #{id,jdbcType=INTEGER},
  48. </if>
  49. <if test="name != null" >
  50. #{name,jdbcType=VARCHAR},
  51. </if>
  52. <if test="pid != null" >
  53. #{pid,jdbcType=INTEGER},
  54. </if>
  55. <if test="level != null" >
  56. #{level,jdbcType=INTEGER},
  57. </if>
  58. </trim>
  59. </insert>
  60. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.EngagedFieldGlossory" >
  61. update engaged_field_glossory
  62. <set >
  63. <if test="name != null" >
  64. name = #{name,jdbcType=VARCHAR},
  65. </if>
  66. <if test="pid != null" >
  67. pid = #{pid,jdbcType=INTEGER},
  68. </if>
  69. <if test="level != null" >
  70. level = #{level,jdbcType=INTEGER},
  71. </if>
  72. </set>
  73. where id = #{id,jdbcType=INTEGER}
  74. </update>
  75. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.EngagedFieldGlossory" >
  76. update engaged_field_glossory
  77. set name = #{name,jdbcType=VARCHAR},
  78. pid = #{pid,jdbcType=INTEGER},
  79. level = #{level,jdbcType=INTEGER}
  80. where id = #{id,jdbcType=INTEGER}
  81. </update>
  82. </mapper>