<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.heketai.website.mapper.JobSearchMapper">
    <resultMap id="BaseResultMap" type="com.heketai.website.entity.JobSearch">
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="job_name" jdbcType="VARCHAR" property="jobName"/>
        <result column="salary" jdbcType="VARCHAR" property="salary"/>
        <result column="job_responsibilities" jdbcType="VARCHAR" property="jobResponsibilities"/>
        <result column="job_requirements" jdbcType="VARCHAR" property="jobRequirements"/>
        <result column="address" jdbcType="VARCHAR" property="address"/>
        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
        <result column="create_name" jdbcType="VARCHAR" property="createName"/>
        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
        <result column="update_name" jdbcType="VARCHAR" property="updateName"/>
        <result column="accept_mail" jdbcType="VARCHAR" property="acceptMail"/>
        <result column="person_number" jdbcType="INTEGER" property="personNumber"/>
    </resultMap>
    <select id="selectJobSearchList" resultMap="BaseResultMap">
        select id
             , job_name
             , salary
             , job_responsibilities
             , job_requirements
             , address
             , create_time
             , create_name
             , update_time
             , update_name
             , accept_mail
             , person_number
        from job_search
        where 1 = 1
        order by update_time desc
            limit #{start}, #{size}
    </select>
    <select id="selectJobSearchById" resultMap="BaseResultMap">

        select id
             , job_name
             , salary
             , job_responsibilities
             , job_requirements
             , address
             , create_time
             , create_name
             , update_time
             , update_name
             , accept_mail
             , person_number
        from job_search
        where id = #{id}
    </select>

</mapper>