mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
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
38
39
40
41
42
43
44
45
46
47
48
<?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.panzhihua.service_community.dao.ComActCommitteeDao">
 
    <resultMap type="com.panzhihua.service_community.entity.ComActCommittee" id="ComActCommitteeBaseResultMap">
        <result property="id" column="id"/>
        <result property="name" column="name"/>
        <result property="contactName" column="contact_name"/>
        <result property="phone" column="phone"/>
        <result property="areaId" column="area_id"/>
        <result property="userId" column="user_id"/>
        <result property="createTime" column="create_time"/>
        <result property="communityId" column="communityId"/>
    </resultMap>
 
    <select id="pageList" resultType="com.panzhihua.common.model.vos.community.ComActCommiteeVO">
        select t.*,t1.account,t1.password,t2.address as areaName,t3.role_id as roleId from com_act_committee t
        left join sys_user t1 on t.user_id = t1.user_id
        left join com_mng_village t2 on t.area_id = t2.village_id
        left join sys_user_role t3 on t.user_id = t3.user_id
        <where>
            1=1
            <if test="commonPage.areaId!=null and commonPage.areaId !=''">
                and t.area_id  =#{commonPage.areaId}
            </if>
            <if test="commonPage.name!=null and commonPage.name!=''">
                and t.name like concat(#{commonPage.name},'%')
            </if>
            <if test="commonPage.phone!=null and commonPage.phone!=''">
                and t.phone like concat(#{commonPage.phone},'%')
            </if>
            <if test="commonPage.username!=null and commonPage.username!=''">
                and t.contact_name like concat(#{commonPage.username},'%')
            </if>
            <if test="commonPage.paramId!=null">
                and t.community_id = ${commonPage.paramId}
            </if>
        </where>
        order by t.create_time desc
    </select>
    <select id="selectCommitteePartyPercent"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT `name` AS filed, 0 AS num, 0 AS percent
        FROM com_act_committee
        WHERE community_id = ${communityId}
    </select>
 
</mapper>