ProjectMemberMappingMapper.xml
750 Bytes
<?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>