<?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() != """>
|
AND t1.`name` LIKE concat(#{pageComPbServiceTeamDTO.name}, '%' )
|
</if>
|
<if test="pageComPbServiceTeamDTO.keyword != null and pageComPbServiceTeamDTO.keyword.trim() != """>
|
AND(t1.`name` LIKE concat(#{pageComPbServiceTeamDTO.keyword}, '%' )
|
OR t1.phone LIKE concat(#{pageComPbServiceTeamDTO.keyword}, '%' ))
|
</if>
|
<if test="pageComPbServiceTeamDTO.job != null and pageComPbServiceTeamDTO.job.trim() != """>
|
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>
|