Blame view

ProjectMemberMappingMapper.xml 751 Bytes
涂亚平 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
<?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.subsidy.mapper.ProjectMemberMappingMapper">


    <select id="detail" parameterType="long" resultType="com.subsidy.vo.member.DetailVO">
        SELECT
            t.id,
            t2.project_name,
            t.job_name,
            ifnull( t.delete_date, t.create_date ) AS hireTime
        FROM
            project_member_mapping t
            LEFT JOIN project t2 ON t.project_id = t2.id
        WHERE
            t2.delete_date IS NULL
            AND t.member_id = #{memberId}
        ORDER BY
            ifnull( t.delete_date, t.create_date ) DESC
    </select>

</mapper>