MemberMapper.xml 1.23 KB
<?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.MemberMapper">

    <select id="academyMembers" resultType="com.subsidy.vo.member.AcademyMembersVO">
        SELECT
            t.id,
            t.user_name,
            t.`status`,
            t.account_name,
            t.gender,
            t.telephone,
            t.id_card,
            t.email,
            t2.college,
            t.major,
            t.practice_status,
            t.enrollment_year
        FROM
            member t
            LEFT JOIN academy_college_dict t2 ON t.college_id = t2.id
        WHERE
            t.delete_date IS NULL
            and t2.delete_date is null
            <if test="practiceStatus != null and practiceStatus != ''">
                AND t.practice_status = #{practiceStatus}
            </if>
            <if test="userName != null and userName != ''">
                AND t.user_name like  concat('%',#{userName} ,'%')
            </if>
            <if test="academyId != null and academyId != ''">
                AND t.academy_id = #{academyId}
            </if>
            and t.member_type = 0
    </select>

</mapper>