MemberMapper.xml
1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?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>