MmInfoResumeMapper.xml 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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.ygj.yuemum.dao.maternitymatron.MmInfoResumeDao" >
  4. <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.maternitymatron.MmInfoResume" >
  5. <id column="id" property="id" jdbcType="INTEGER" />
  6. <result column="servant_code" property="servant_code" jdbcType="INTEGER" />
  7. <result column="resume_code" property="resume_code" jdbcType="INTEGER" />
  8. <result column="resume_path" property="resume_path" jdbcType="VARCHAR" />
  9. <result column="rqcode_path" property="rqcode_path" jdbcType="VARCHAR" />
  10. <result column="resume_comment" property="resume_comment" jdbcType="VARCHAR" />
  11. </resultMap>
  12. <sql id="Base_Column_List" >
  13. id, servant_code, module_code,resume_path,rqcode_path,resume_comment
  14. </sql>
  15. <!-- 得到所有的简历信息 -->
  16. <select id="getAll" resultMap="BaseResultMap" >
  17. select
  18. <include refid="Base_Column_List" />
  19. from mm_info_resume
  20. </select>
  21. <!-- 根据id查找某个简历信息 -->
  22. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  23. select
  24. <include refid="Base_Column_List" />
  25. from mm_info_resume
  26. where servant_code = #{servant_code,jdbcType=INTEGER}
  27. </select>
  28. <!-- 根据id删除某个简历信息 -->
  29. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  30. delete from mm_info_resume
  31. where id = #{id,jdbcType=INTEGER}
  32. </delete>
  33. <!-- 插入一条简历信息 -->
  34. <insert id="insertSelective" parameterType="com.ygj.yuemum.domain.maternitymatron.MmInfoResume" >
  35. insert into mm_info_resume
  36. <trim prefix="(" suffix=")" suffixOverrides="," >
  37. <if test="servant_code != null" >
  38. servant_code,
  39. </if>
  40. <if test="resume_code != null" >
  41. resume_code,
  42. </if>
  43. <if test="resume_path != null" >
  44. resume_path,
  45. </if>
  46. <if test="rqcode_path != null" >
  47. rqcode_path
  48. </if>
  49. </trim>
  50. <trim prefix="values (" suffix=")" suffixOverrides="," >
  51. <if test="servant_code != null" >
  52. #{servant_code,jdbcType=INTEGER},
  53. </if>
  54. <if test="resume_code != null" >
  55. #{resume_code,jdbcType=INTEGER},
  56. </if>
  57. <if test="resume_path != null" >
  58. #{resume_path,jdbcType=VARCHAR},
  59. </if>
  60. <if test="rqcode_path != null" >
  61. #{rqcode_path,jdbcType=VARCHAR}
  62. </if>
  63. </trim>
  64. </insert>
  65. <!-- 根据id更新一条简历信息 -->
  66. <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.maternitymatron.MmInfoResume" >
  67. update mm_info_resume
  68. <set >
  69. <if test="servant_code != null" >
  70. servant_code = #{servant_code,jdbcType=INTEGER},
  71. </if>
  72. <if test="resume_code != null" >
  73. resume_code = #{resume_code,jdbcType=INTEGER},
  74. </if>
  75. <if test="resume_path != null" >
  76. resume_path = #{resume_path,jdbcType=VARCHAR}
  77. </if>
  78. <if test="rqcode_path != null" >
  79. rqcode_path = #{rqcode_path,jdbcType=VARCHAR}
  80. </if>
  81. </set>
  82. where id = #{id,jdbcType=INTEGER}
  83. </update>
  84. </mapper>