|
|
|
<?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.epmet.dao.IcSpecialDao">
|
|
|
|
|
|
|
|
<select id="selectByResiId" resultType="com.epmet.entity.IcSpecialEntity">
|
|
|
|
select * from ic_special where IC_RESI_USER = #{resiId} and DEL_FLAG = 0
|
|
|
|
</select>
|
|
|
|
<select id="listSpecialCrowd"
|
|
|
|
resultType="com.epmet.dto.result.LingShanSpecialCrowdListResultDTO">
|
|
|
|
select r.ID as RESI_ID
|
|
|
|
, r.NAME
|
|
|
|
, r.MOBILE
|
|
|
|
, r.ID_CARD
|
|
|
|
, r.HOME_ID
|
|
|
|
, s.CREATED_TIME
|
|
|
|
, s.UPDATED_TIME
|
|
|
|
, s.SPECIAL_RQLB SPECIAL_TYPES_STR
|
|
|
|
from ic_resi_user r
|
|
|
|
inner join ic_special s on (r.ID = s.IC_RESI_USER and s.DEL_FLAG = 0)
|
|
|
|
where
|
|
|
|
r.DEL_FLAG = 0
|
|
|
|
and (r.PIDS like CONCAT(#{orgIdPath}, '%')
|
|
|
|
<if test="orgType == 'agency'">
|
|
|
|
or r.AGENCY_ID = #{orgId}
|
|
|
|
</if>
|
|
|
|
<if test="orgType == 'grid'">
|
|
|
|
or r.GRID_ID = #{orgId}
|
|
|
|
</if>
|
|
|
|
)
|
|
|
|
<if test="name != null and name != ''">
|
|
|
|
and r.NAME like CONCAT('%', #{name}, '%')
|
|
|
|
</if>
|
|
|
|
<if test="specialType != null and specialType != ''">
|
|
|
|
and s.SPECIAL_RQLB like CONCAT('%', #{specialType}, '%')
|
|
|
|
</if>
|
|
|
|
<if test="idCard != null and idCard != ''">
|
|
|
|
and r.ID_CARD like CONCAT('%', #{idCard}, '%')
|
|
|
|
</if>
|
|
|
|
<if test="mobile != null and mobile != ''">
|
|
|
|
and r.MOBILE like CONCAT('%', #{mobile}, '%')
|
|
|
|
</if>
|
|
|
|
order by s.UPDATED_TIME desc
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectHelpCrowdType" parameterType="java.lang.String" resultType="java.lang.String">
|
|
|
|
SELECT
|
|
|
|
DISTINCT m.CROWD_TYPE
|
|
|
|
FROM
|
|
|
|
lingshan_help_crowd_resi_merge m
|
|
|
|
WHERE
|
|
|
|
m.DEL_FLAG = '0'
|
|
|
|
AND m.RESI_ID = #{resiUserId}
|
|
|
|
order by m.CREATED_TIME asc
|
|
|
|
</select>
|
|
|
|
</mapper>
|