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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?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_dangjian.dao.ComPbServiceTeamDAO">
 
    <resultMap type="com.panzhihua.service_dangjian.model.dos.ComPbServiceTeamDO" id="ComPbServiceTeamMap">
        <result property="id" column="id" jdbcType="INTEGER"/>
        <result property="name" column="name" jdbcType="VARCHAR"/>
        <result property="job" column="job" jdbcType="VARCHAR"/>
        <result property="jobTwo" column="job_two" jdbcType="VARCHAR"/>
        <result property="url" column="url" jdbcType="VARCHAR"/>
        <result property="createAt" column="create_at" jdbcType="TIMESTAMP"/>
        <result property="communityId" column="community_id" jdbcType="INTEGER"/>
        <result property="jobResponsibilities" column="job_responsibilities" jdbcType="VARCHAR"/>
        <result property="phone" column="phone" jdbcType="VARCHAR"/>
        <result property="isReg" column="is_reg" jdbcType="INTEGER"/>
        <result property="cardNo" column="card_no" jdbcType="VARCHAR"/>
    </resultMap>
 
    <select id="PageComPbServiceTeamDTO"
            resultType="com.panzhihua.common.model.vos.partybuilding.west.ComPbServiceTeamVO">
        SELECT t1.*, t2.`name` AS communityName
        FROM com_pb_service_team t1
        LEFT JOIN com_act t2 ON t1.community_id = t2.community_id
        WHERE 1=1
        <if test="pageComPbServiceTeamDTO.streetId != null">
            AND t2.street_id = #{pageComPbServiceTeamDTO.streetId}
        </if>
        <if test="pageComPbServiceTeamDTO.communityId != null">
            AND t1.community_id = ${pageComPbServiceTeamDTO.communityId}
        </if>
        <if test ="pageComPbServiceTeamDTO.name != null and pageComPbServiceTeamDTO.name.trim() != &quot;&quot;">
            AND t1.`name` LIKE concat(#{pageComPbServiceTeamDTO.name}, '%' )
        </if>
        <if test="pageComPbServiceTeamDTO.keyword != null and pageComPbServiceTeamDTO.keyword.trim() != &quot;&quot;">
            AND(t1.`name` LIKE concat(#{pageComPbServiceTeamDTO.keyword}, '%' )
            OR t1.phone LIKE concat(#{pageComPbServiceTeamDTO.keyword}, '%' ))
        </if>
        <if test="pageComPbServiceTeamDTO.job != null and pageComPbServiceTeamDTO.job.trim() != &quot;&quot;">
            AND t1.job LIKE concat( #{pageComPbServiceTeamDTO.job}, '%')
        </if>
    </select>
 
 
    <select id="getComPbServiceTeamData" resultType="com.panzhihua.common.model.vos.partybuilding.ComPbServiceTeamVO">
        SELECT t1.*, t2.`name` AS communityName
        FROM com_pb_service_team t1
        LEFT JOIN com_act t2 ON t1.community_id = t2.community_id
        <where>
            1=1
            <if test=" communityId != null and communityId != '' ">
                AND t1.community_id = #{communityId}
            </if>
            <if test="phone != null and phone != '' ">
                AND t1.phone = #{phone}
            </if>
        </where>
    </select>
 
 
 
 
    <select id="pageServiceTeamProperty"
            resultType="com.panzhihua.common.model.vos.partybuilding.ComPbServiceTeamVO">
        select * from com_pb_service_team where property_id=#{pageComPbServiceTeamDTO.propertyId}
        <if test="pageComPbServiceTeamDTO.name != null and pageComPbServiceTeamDTO.name != ''">
            AND name like concat('%',#{pageComPbServiceTeamDTO.name},'%')
        </if>
        <if test="pageComPbServiceTeamDTO.job != null and pageComPbServiceTeamDTO.job != ''">
            AND name like concat('%',#{pageComPbServiceTeamDTO.job},'%')
        </if>
    </select>
 
</mapper>