<?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.lz.modules.app.dao.StaffProjectExperienceDao">

	<!-- 可根据自己的需求，是否要使用 -->
    <resultMap type="com.lz.modules.app.entity.StaffProjectExperienceEntity" id="staffProjectExperienceMap">
        <result property="id" column="id"/>
        <result property="isDelete" column="is_delete"/>
        <result property="createTime" column="create_time"/>
        <result property="updateTime" column="update_time"/>
        <result property="staffId" column="staff_id"/>
        <result property="projectName" column="project_name"/>
        <result property="projectBeginTime" column="project_begin_time"/>
        <result property="projectEndTime" column="project_end_time"/>
        <result property="projectContent" column="project_content"/>
    </resultMap>

    <select id="getProjectInfoByStaffId" resultType="com.lz.modules.app.dto.StaffProjectExperienceDto">
        SELECT project_name,DATE_FORMAT(project_begin_time,'%Y-%m-%d') project_begin_time,if(DATE_FORMAT(project_begin_time,'%Y-%m-%d') is null,'至今',DATE_FORMAT(project_begin_time,'%Y-%m-%d')) project_end_time,project_content from lz_staff_project_experience where is_delete=0 and staff_id=#{staffId}
    </select>


</mapper>
