<?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.sqx.modules.firstLogin.dao.WorkExpDao">
   <select id="selectWorkExpList" resultType="com.sqx.modules.firstLogin.dto.WorkExpDetailDto">
    select *
    from work_exp w
    left join work_exp_detail d on w.work_exp_id = d.work_exp_id
    where w.user_id = #{userId}
    and w.is_use = 1
    </select>
    <select id="selectWorkExpOne" resultType="com.sqx.modules.firstLogin.dto.WorkExpDetailDto">
        select *
        from work_exp w
                 left join work_exp_detail d on w.work_exp_id = d.work_exp_id
        where w.work_exp_id = #{workExpId}
          and w.is_use = 1
    </select>
    <select id="getTime" resultType="com.sqx.modules.firstLogin.dto.WorkExpTime">
        select d.start_time AS startTime,
               d.end_Time AS endTime
        from work_exp w
                 left join work_exp_detail d on w.work_exp_id = d.work_exp_id
        where w.user_id=#{userId}
          and w.is_use = 1
        ORDER BY start_time ASC
    </select>
</mapper>