linwe
2024-08-09 8b7258c9427882bb1798f1502eaa35184c6e374e
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
<?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="org.springblade.modules.partyOrganization.mapper.PartyOrganizationMemberMapper">
 
 
    <select id="getPage" resultType="org.springblade.modules.partyOrganization.vo.PartyOrganizationMemberVO">
        SELECT
            jpom.*,
            jh.name as houseHoldName,
            jh.phone_number as phoneNumber,
            jh.gender as gender,
            jh.birthday as birthday,
            jh.card_type as cardType,
            jh.id_card as idCard
        FROM jczz_party_organization_member jpom
        LEFT JOIN jczz_household jh ON jpom.household_id = jh.id
        where jpom.is_deleted = 0
        <if test="vo.organizationId != null and vo.organizationId !='' ">
            AND jpom.organization_id = #{vo.organizationId}
        </if>
        <if test="vo.phoneNumber != null and vo.phoneNumber !='' ">
            AND jh.phone_number LIKE CONCAT('%',#{vo.phoneNumber},'%')
        </if>
        <if test="vo.houseHoldName != null and vo.houseHoldName !='' ">
            AND jh.name LIKE CONCAT('%',#{vo.houseHoldName},'%')
        </if>
        ORDER BY jpom.sort asc
    </select>
</mapper>